diff --git a/archive/archive_test.go b/archive/archive_test.go index 495cac8..85e4122 100644 --- a/archive/archive_test.go +++ b/archive/archive_test.go @@ -132,7 +132,7 @@ func TestDecompressStreamXz(t *testing.T) { archive, err := os.Open(tmp + "archive.xz") _, err = DecompressStream(archive) if err != nil { - t.Fatalf("Failed to decompress a xz file.") + t.Fatalf("Failed to decompress an xz file.") } } @@ -181,7 +181,7 @@ func TestExtensionUncompressed(t *testing.T) { compression := Uncompressed output := compression.Extension() if output != "tar" { - t.Fatalf("The extension of a uncompressed archive should be 'tar'.") + t.Fatalf("The extension of an uncompressed archive should be 'tar'.") } } func TestExtensionBzip2(t *testing.T) { diff --git a/archive/changes_test.go b/archive/changes_test.go index bca6825..8a2d0e8 100644 --- a/archive/changes_test.go +++ b/archive/changes_test.go @@ -252,7 +252,7 @@ func TestChangesWithChangesGH13590(t *testing.T) { checkChanges(expectedChanges, changes, t) } -// Create an directory, copy it, make sure we report no changes between the two +// Create a directory, copy it, make sure we report no changes between the two func TestChangesDirsEmpty(t *testing.T) { // TODO Windows. There may be a way of running this, but turning off for now // as createSampleDir uses symlinks. diff --git a/authorization/authz.go b/authorization/authz.go index 08d3e2c..ebbc380 100644 --- a/authorization/authz.go +++ b/authorization/authz.go @@ -40,7 +40,7 @@ func NewCtx(authZPlugins []Plugin, user, userAuthNMethod, requestMethod, request } } -// Ctx stores a a single request-response interaction context +// Ctx stores a single request-response interaction context type Ctx struct { user string userAuthNMethod string diff --git a/httputils/resumablerequestreader_test.go b/httputils/resumablerequestreader_test.go index 7006f04..5a2906d 100644 --- a/httputils/resumablerequestreader_test.go +++ b/httputils/resumablerequestreader_test.go @@ -99,7 +99,7 @@ func (errorReaderCloser) Read(p []byte) (n int, err error) { return 0, fmt.Errorf("An error occurred") } -// If a an unknown error is encountered, return 0, nil and log it +// If an unknown error is encountered, return 0, nil and log it func TestResumableRequestReaderWithReadError(t *testing.T) { var req *http.Request req, err := http.NewRequest("GET", "", nil) diff --git a/ioutils/readers.go b/ioutils/readers.go index e73b02b..63f3c07 100644 --- a/ioutils/readers.go +++ b/ioutils/readers.go @@ -55,7 +55,7 @@ func HashData(src io.Reader) (string, error) { return "sha256:" + hex.EncodeToString(h.Sum(nil)), nil } -// OnEOFReader wraps a io.ReadCloser and a function +// OnEOFReader wraps an io.ReadCloser and a function // the function will run at the end of file or close the file. type OnEOFReader struct { Rc io.ReadCloser diff --git a/jsonmessage/jsonmessage.go b/jsonmessage/jsonmessage.go index 65cccbc..91b073b 100644 --- a/jsonmessage/jsonmessage.go +++ b/jsonmessage/jsonmessage.go @@ -13,7 +13,7 @@ import ( ) // JSONError wraps a concrete Code and Message, `Code` is -// is a integer error code, `Message` is the error message. +// is an integer error code, `Message` is the error message. type JSONError struct { Code int `json:"code,omitempty"` Message string `json:"message,omitempty"` diff --git a/mflag/README.md b/mflag/README.md index da00efa..5e81bb2 100644 --- a/mflag/README.md +++ b/mflag/README.md @@ -1,5 +1,5 @@ Package mflag (aka multiple-flag) implements command-line flag parsing. -It's an **hacky** fork of the [official golang package](http://golang.org/pkg/flag/) +It's a **hacky** fork of the [official golang package](http://golang.org/pkg/flag/) It adds: diff --git a/mflag/flag.go b/mflag/flag.go index e2a0c42..5014157 100644 --- a/mflag/flag.go +++ b/mflag/flag.go @@ -24,7 +24,7 @@ // // You can also add "deprecated" flags, they are still usable, but are not shown // in the usage and will display a warning when you try to use them. `#` before -// an option means this option is deprecated, if there is an following option +// an option means this option is deprecated, if there is a following option // without `#` ahead, then that's the replacement, if not, it will just be removed: // var ip = flag.Int([]string{"#f", "#flagname", "-flagname"}, 1234, "help message for flagname") // this will display: `Warning: '-f' is deprecated, it will be replaced by '--flagname' soon. See usage.` or @@ -1236,7 +1236,7 @@ func (v mergeVal) Name() string { return v.key } -// Merge is an helper function that merges n FlagSets into a single dest FlagSet +// Merge is a helper function that merges n FlagSets into a single dest FlagSet // In case of name collision between the flagsets it will apply // the destination FlagSet's errorHandling behavior. func Merge(dest *FlagSet, flagsets ...*FlagSet) error { diff --git a/progress/progress.go b/progress/progress.go index 61315cb..df3c2ba 100644 --- a/progress/progress.go +++ b/progress/progress.go @@ -38,7 +38,7 @@ func (out chanOutput) WriteProgress(p Progress) error { return nil } -// ChanOutput returns a Output that writes progress updates to the +// ChanOutput returns an Output that writes progress updates to the // supplied channel. func ChanOutput(progressChan chan<- Progress) Output { return chanOutput(progressChan)