Skip to content

Commit c1cc191

Browse files
authored
Merge pull request #128 from alexandear/fix-typos
Fix typos in comments and field names
2 parents c062e01 + 64bfbfa commit c1cc191

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

contexttags/contexttags.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
// WithContextTags captures the k/v pairs stored in the context via the
2626
// `logtags` package and annotates them on the error.
2727
//
28-
// Only the stromg representation of values remains available. This is
28+
// Only the strong representation of values remains available. This is
2929
// because the library cannot guarantee that the underlying value is
3030
// preserved across the network. To avoid creating a stateful interface
3131
// (where the user code needs to know whether an error has traveled

errutil/doc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414

1515
// Package errutil combines primitives from the library, the Go errors
1616
// package and github.com/pkg/errors. It aims to serve as drop-in
17-
// replacement to gitub.com/pkg/errors and replace the legacy
17+
// replacement to github.com/pkg/errors and replace the legacy
1818
// implementation of `pgerrors`.
1919
package errutil

exthttp/ext_http.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func (w *withHTTPCode) Unwrap() error { return w.cause }
6565
func (w *withHTTPCode) Format(s fmt.State, verb rune) { errors.FormatError(w, s, verb) }
6666

6767
// SafeFormatter implements errors.SafeFormatter.
68-
// Note: see the documentat ion of errbase.SafeFormatter for details
68+
// Note: see the documentation of errbase.SafeFormatter for details
6969
// on how to implement this. In particular beware of not emitting
7070
// unsafe strings.
7171
func (w *withHTTPCode) SafeFormatError(p errors.Printer) (next error) {

fmttests/datadriven_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ var wrapCommands = map[string]commandFn{
244244
"assertwrap": func(err error, args []arg) error {
245245
return errutil.NewAssertionErrorWithWrappedErrf(err, "assertmsg: %s", strfy(args))
246246
},
247-
// barirer is a simpler barrier
247+
// barrier is a simpler barrier
248248
"barrier": func(err error, _ []arg) error { return barriers.Handled(err) },
249249
// domains are hidden annotations. Tested here for sentry reporting.
250250
"domain": func(err error, _ []arg) error { return domains.WithDomain(err, "mydomain") },

markers/markers_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -727,9 +727,9 @@ func (e *invalidError) Cause() error { return e.emptyRef }
727727
func TestDelegateToIsMethod(t *testing.T) {
728728
tt := testutils.T{T: t}
729729

730-
efoo := &errWithIs{msg: "foo", seecret: "foo"}
731-
efoo2 := &errWithIs{msg: "foo", seecret: "bar"}
732-
ebar := &errWithIs{msg: "bar", seecret: "foo"}
730+
efoo := &errWithIs{msg: "foo", secret: "foo"}
731+
efoo2 := &errWithIs{msg: "foo", secret: "bar"}
732+
ebar := &errWithIs{msg: "bar", secret: "foo"}
733733

734734
tt.Check(markers.Is(efoo, efoo2)) // equality based on message
735735
tt.Check(markers.Is(efoo, ebar)) // equality based on method
@@ -741,15 +741,15 @@ func TestDelegateToIsMethod(t *testing.T) {
741741
}
742742

743743
type errWithIs struct {
744-
msg string
745-
seecret string
744+
msg string
745+
secret string
746746
}
747747

748748
func (e *errWithIs) Error() string { return e.msg }
749749

750750
func (e *errWithIs) Is(o error) bool {
751751
if ex, ok := o.(*errWithIs); ok {
752-
return e.seecret == ex.seecret
752+
return e.secret == ex.secret
753753
}
754754
return false
755755
}

0 commit comments

Comments
 (0)