mirror of
https://github.com/docker/cli.git
synced 2026-09-24 15:30:10 -05:00
Fix some typos in comments and strings
Most of them were found and fixed by codespell. Signed-off-by: Stefan Weil <sw@weilnetz.de> Upstream-commit: 2eee613326fb59fd168849618d14a9054a40f9f5 Component: engine
This commit is contained in:
@@ -148,7 +148,7 @@ func (rm *responseModifier) Hijack() (net.Conn, *bufio.ReadWriter, error) {
|
||||
|
||||
hijacker, ok := rm.rw.(http.Hijacker)
|
||||
if !ok {
|
||||
return nil, nil, fmt.Errorf("Internal reponse writer doesn't support the Hijacker interface")
|
||||
return nil, nil, fmt.Errorf("Internal response writer doesn't support the Hijacker interface")
|
||||
}
|
||||
return hijacker.Hijack()
|
||||
}
|
||||
@@ -157,7 +157,7 @@ func (rm *responseModifier) Hijack() (net.Conn, *bufio.ReadWriter, error) {
|
||||
func (rm *responseModifier) CloseNotify() <-chan bool {
|
||||
closeNotifier, ok := rm.rw.(http.CloseNotifier)
|
||||
if !ok {
|
||||
logrus.Errorf("Internal reponse writer doesn't support the CloseNotifier interface")
|
||||
logrus.Errorf("Internal response writer doesn't support the CloseNotifier interface")
|
||||
return nil
|
||||
}
|
||||
return closeNotifier.CloseNotify()
|
||||
@@ -167,7 +167,7 @@ func (rm *responseModifier) CloseNotify() <-chan bool {
|
||||
func (rm *responseModifier) Flush() {
|
||||
flusher, ok := rm.rw.(http.Flusher)
|
||||
if !ok {
|
||||
logrus.Errorf("Internal reponse writer doesn't support the Flusher interface")
|
||||
logrus.Errorf("Internal response writer doesn't support the Flusher interface")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ type errorReaderCloser struct{}
|
||||
func (errorReaderCloser) Close() error { return nil }
|
||||
|
||||
func (errorReaderCloser) Read(p []byte) (n int, err error) {
|
||||
return 0, fmt.Errorf("A error occured")
|
||||
return 0, fmt.Errorf("An error occurred")
|
||||
}
|
||||
|
||||
// If a an unknown error is encountered, return 0, nil and log it
|
||||
|
||||
@@ -11,7 +11,7 @@ type statusError struct {
|
||||
err string
|
||||
}
|
||||
|
||||
// Error returns a formated string for this error type
|
||||
// Error returns a formatted string for this error type
|
||||
func (e *statusError) Error() string {
|
||||
return fmt.Sprintf("%s: %v", e.method, e.err)
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ func TestWriteWithWriterError(t *testing.T) {
|
||||
t.Fatalf("Didn't get expected error.")
|
||||
}
|
||||
if n != expectedReturnedBytes {
|
||||
t.Fatalf("Didn't get expected writen bytes %d, got %d.",
|
||||
t.Fatalf("Didn't get expected written bytes %d, got %d.",
|
||||
expectedReturnedBytes, n)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user