From c2205c02fdc12de96933f0c85c62d81e30d0a697 Mon Sep 17 00:00:00 2001 From: Shivaprasad Date: Tue, 25 Sep 2018 18:01:37 +0530 Subject: [PATCH] Fixed typos reported by goreportcard.com --- clipmon.go | 4 ++-- server.go | 2 +- sources/wikipedia/request.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clipmon.go b/clipmon.go index 0da402f..9200808 100644 --- a/clipmon.go +++ b/clipmon.go @@ -22,7 +22,7 @@ type ClipboardMonitor struct { oldContent string } -// Run starts an infinite for loop which continuosly monitors +// Run starts an infinite for loop which continuously monitors // the system clipboard for changes. Run() can be invoked as // a goroutine, and a context can be passed in for stopping // the monitor. @@ -54,7 +54,7 @@ func (cbm *ClipboardMonitor) Run(ctx context.Context) error { rs, err := cbm.Instance.Search(ctx, query, Strategy1st) if err == nil && rs != nil { if len(rs) > 0 { - cbm.Instance.Infof("recieved result. pasting back..") + cbm.Instance.Infof("received result. pasting back..") clipboard.WriteAll(rs[0].Content) cbm.oldContent = rs[0].Content } else { diff --git a/server.go b/server.go index e13f2dc..4f31e44 100644 --- a/server.go +++ b/server.go @@ -57,7 +57,7 @@ func (srv Server) handleSearch(wr http.ResponseWriter, req *http.Request) { ctx := req.Context() rs, err := srv.ins.Search(ctx, query, strategy) if err != nil { - srv.Warnf("error occured during search: %s", err) + srv.Warnf("error occurred during search: %s", err) wr.WriteHeader(http.StatusNotFound) json.NewEncoder(wr).Encode(map[string]interface{}{ "error": err.Error(), diff --git a/sources/wikipedia/request.go b/sources/wikipedia/request.go index 6824b1c..f7568e6 100644 --- a/sources/wikipedia/request.go +++ b/sources/wikipedia/request.go @@ -66,7 +66,7 @@ func NewRequest(baseURL, query, language string) (*Request, error) { } // Execute fetches the data and decodes it into a Response. -// Returns an error if the data could not be retrived or the decoding fails. +// Returns an error if the data could not be retrieved or the decoding fails. func (r *Request) Execute(ctx context.Context, noCheckCert bool) (*Response, error) { client := &http.Client{}