Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix some typos #522

Merged
merged 1 commit into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/playback/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func unmarshalArgs(args []string) (urls []*url.URL, err error) {
for _, s := range args {
uri, er := url.Parse(s)
if er != nil {
err = fmt.Errorf("%w: unexpect url: %s", err, s)
err = fmt.Errorf("%w: unexpected url: %s", err, s)
continue
}
urls = append(urls, uri)
Expand Down
2 changes: 1 addition & 1 deletion cmd/wayback/pprof.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func profiling() {

addr := listener.Addr().(*net.TCPAddr)
logger.Info("Go profiling via: http://%s", addr)
logger.Info("More defails can be found at https://go.dev/blog/pprof")
logger.Info("More details can be found at https://go.dev/blog/pprof")

go func() {
//#nosec G114 -- Ignored for convenience
Expand Down
2 changes: 1 addition & 1 deletion config/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ func (o *Options) MastodonClientKey() string {
return o.mastodon.clientKey
}

// MastodonClientSecret returns the cilent secret of Mastodon application.
// MastodonClientSecret returns the client secret of Mastodon application.
func (o *Options) MastodonClientSecret() string {
return o.mastodon.clientSecret
}
Expand Down
2 changes: 1 addition & 1 deletion publish/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const (

// Publisher is the interface that wraps the basic Publish method.
//
// Publish publish message to serveral media platforms, e.g. Telegram channel, GitHub Issues, etc.
// Publish publish message to several media platforms, e.g. Telegram channel, GitHub Issues, etc.
// The cols must either be a []wayback.Collect, args use for specific service.
type Publisher interface {
Publish(context.Context, reduxer.Reduxer, []wayback.Collect, ...string) error
Expand Down
2 changes: 1 addition & 1 deletion service/matrix/matrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (m *Matrix) Serve() error {
}(ev)
})
syncer.OnEventType(event.EventEncrypted, func(source matrix.EventSource, ev *event.Event) {
logger.Error("Unsupport encryption message")
logger.Error("Unsupported encryption message")
// logger.Debug("event: %v", ev)
// if err := m.process(context.Background(), ev); err != nil {
// logger.Error("process request failure, error: %v", err)
Expand Down
4 changes: 2 additions & 2 deletions service/matrix/matrix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func TestProcess(t *testing.T) {
}
})
recvSyncer.OnEventType(event.EventEncrypted, func(source matrix.EventSource, ev *event.Event) {
t.Log("Unsupport encryption message")
t.Log("Unsupported encryption message")
// logger.Debug("event: %v", ev)
// if err := m.process(context.Background(), ev); err != nil {
// logger.Error("process request failure, error: %v", err)
Expand All @@ -258,7 +258,7 @@ func TestProcess(t *testing.T) {
select {
case <-tick.C:
if i == 0 {
t.Error("Timeout while wating for test message from the other thread.")
t.Error("Timeout while waiting for test message from the other thread.")
sender.destroyRoomForTest(resp.RoomID)
recver.destroyRoomForTest(resp.RoomID)
time.Sleep(time.Second)
Expand Down
2 changes: 1 addition & 1 deletion service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type doFunc func(cols []wayback.Collect, rdx reduxer.Reduxer) error

// Servicer is the interface that wraps Serve and Shutdown method.
//
// Servicer serve serveral media platforms, e.g. Telegram, Discord, etc.
// Servicer serve several media platforms, e.g. Telegram, Discord, etc.
type Servicer interface {
// Serve serve a service.
Serve() error
Expand Down
2 changes: 1 addition & 1 deletion service/twitter/twitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func New(ctx context.Context, opts service.Options) (*Twitter, error) {
// Serve always returns a nil error.
func (t *Twitter) Serve() error {
if t.client == nil {
return errors.New("Initialize Twitter cilent failed.")
return errors.New("Initialize Twitter client failed.")
}

user, _, err := t.client.Accounts.VerifyCredentials(&twitter.AccountVerifyParams{IncludeEntities: twitter.Bool(false)})
Expand Down
Loading