Fix some typos in comments and strings
Most of them were found and fixed by codespell. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
049dda3ee7
commit
8cb9b57bc2
4 changed files with 6 additions and 6 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue