fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
parent
83be58f17e
commit
b4488c647b
9 changed files with 11 additions and 11 deletions
|
@ -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) {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"`
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue