Merge pull request #23193 from allencloud/fix-typos

use grep to find all a/an typos
This commit is contained in:
Sven Dowideit 2016-06-02 18:45:08 -07:00
commit 054469e284
9 changed files with 11 additions and 11 deletions

View file

@ -132,7 +132,7 @@ func TestDecompressStreamXz(t *testing.T) {
archive, err := os.Open(tmp + "archive.xz") archive, err := os.Open(tmp + "archive.xz")
_, err = DecompressStream(archive) _, err = DecompressStream(archive)
if err != nil { 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 compression := Uncompressed
output := compression.Extension() output := compression.Extension()
if output != "tar" { 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) { func TestExtensionBzip2(t *testing.T) {

View file

@ -252,7 +252,7 @@ func TestChangesWithChangesGH13590(t *testing.T) {
checkChanges(expectedChanges, changes, 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) { func TestChangesDirsEmpty(t *testing.T) {
// TODO Windows. There may be a way of running this, but turning off for now // TODO Windows. There may be a way of running this, but turning off for now
// as createSampleDir uses symlinks. // as createSampleDir uses symlinks.

View file

@ -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 { type Ctx struct {
user string user string
userAuthNMethod string userAuthNMethod string

View file

@ -99,7 +99,7 @@ func (errorReaderCloser) Read(p []byte) (n int, err error) {
return 0, fmt.Errorf("An error occurred") 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) { func TestResumableRequestReaderWithReadError(t *testing.T) {
var req *http.Request var req *http.Request
req, err := http.NewRequest("GET", "", nil) req, err := http.NewRequest("GET", "", nil)

View file

@ -55,7 +55,7 @@ func HashData(src io.Reader) (string, error) {
return "sha256:" + hex.EncodeToString(h.Sum(nil)), nil 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. // the function will run at the end of file or close the file.
type OnEOFReader struct { type OnEOFReader struct {
Rc io.ReadCloser Rc io.ReadCloser

View file

@ -13,7 +13,7 @@ import (
) )
// JSONError wraps a concrete Code and Message, `Code` is // 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 { type JSONError struct {
Code int `json:"code,omitempty"` Code int `json:"code,omitempty"`
Message string `json:"message,omitempty"` Message string `json:"message,omitempty"`

View file

@ -1,5 +1,5 @@
Package mflag (aka multiple-flag) implements command-line flag parsing. 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: It adds:

View file

@ -24,7 +24,7 @@
// //
// You can also add "deprecated" flags, they are still usable, but are not shown // 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 // 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: // 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") // 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 // 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 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 // In case of name collision between the flagsets it will apply
// the destination FlagSet's errorHandling behavior. // the destination FlagSet's errorHandling behavior.
func Merge(dest *FlagSet, flagsets ...*FlagSet) error { func Merge(dest *FlagSet, flagsets ...*FlagSet) error {

View file

@ -38,7 +38,7 @@ func (out chanOutput) WriteProgress(p Progress) error {
return nil return nil
} }
// ChanOutput returns a Output that writes progress updates to the // ChanOutput returns an Output that writes progress updates to the
// supplied channel. // supplied channel.
func ChanOutput(progressChan chan<- Progress) Output { func ChanOutput(progressChan chan<- Progress) Output {
return chanOutput(progressChan) return chanOutput(progressChan)