Skip to content

Commit 8e10796

Browse files
alexandearfredbi
authored andcommitted
fix(typo): correct typos in funcs, comments, and docs
Signed-off-by: Oleksandr Redko <[email protected]>
1 parent 274f279 commit 8e10796

File tree

11 files changed

+14
-14
lines changed

11 files changed

+14
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Minor changes due to internal maintenance that don't affect the behavior of the
9191
* removes the dependency to `mailru/easyjson` by default (#68)
9292
* functionality remains the same, but performance may somewhat degrade for applications
9393
that relied on `easyjson`
94-
* users of the JSON or YAML utilities who want to use `easyjson` as their prefered JSON serializer library
94+
* users of the JSON or YAML utilities who want to use `easyjson` as their preferred JSON serializer library
9595
will be able to do so by registering this the corresponding JSON adapter at runtime. See below.
9696
* ordered keys in JSON and YAML objects: this feature used to rely solely on `easyjson`.
9797
With this release, an implementation relying on the standard `encoding/json` is provided.

conv/convert_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package conv
77
//
88
// The idea to convert values to pointers and the other way around, was inspired, eons ago, by the aws go sdk.
99
//
10-
// Nowadays, all sensible API sdk's expose a similar functinality.
10+
// Nowadays, all sensible API sdk's expose a similar functionality.
1111

1212
// Pointer returns a pointer to the value passed in.
1313
func Pointer[T any](v T) *T {

conv_iface_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func TestConvIface(t *testing.T) {
1515
const epsilon = 1e-6
1616

1717
t.Run("deprecated Convert functions should work", func(t *testing.T) {
18-
// only check happy path - more comprehensive testing is carried out inside the called packag
18+
// only check happy path - more comprehensive testing is carried out inside the called package
1919
assert.True(t, IsFloat64AJSONInteger(1.00))
2020

2121
b, err := ConvertBool("true")

jsonutils/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Each adapter is an independent go module. Hence you'll pick its dependencies onl
7878

7979
At this moment we provide:
8080
* `stdlib`: JSON adapter based on the standard library
81-
* `easyjson`: JSON adapter based on the `github.com/mailru/easyyjson`
81+
* `easyjson`: JSON adapter based on the `github.com/mailru/easyjson`
8282

8383
The adapters provide the basic `Marshal` and `Unmarshal` capabilities, plus an implementation
8484
of the `MapSlice` pattern.

jsonutils/adapters/testintegration/integration_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func (o *EasyOrderedTarget) MarshalEasyJSON(w *jwriter.Writer) {
125125
o.MockEJMarshaler.MarshalEasyJSON(w)
126126
}
127127

128-
func (o *EasyOrderedTarget) UnmrshalEasyJSON(l *jlexer.Lexer) {
128+
func (o *EasyOrderedTarget) UnmarshalEasyJSON(l *jlexer.Lexer) {
129129
o.MockEJUnmarshaler.UnmarshalEasyJSON(l)
130130
}
131131

jsonutils/concat.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func init() {
2323

2424
// ConcatJSON concatenates multiple json objects or arrays efficiently.
2525
//
26-
// Note that [ConcatJSON] performs a very simmple (and fast) concatenation
26+
// Note that [ConcatJSON] performs a very simple (and fast) concatenation
2727
// operation: it does not attempt to merge objects.
2828
func ConcatJSON(blobs ...[]byte) []byte {
2929
if len(blobs) == 0 {

loading/json_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func TestJSONMatcher(t *testing.T) {
2323

2424
func TestJSONDoc(t *testing.T) {
2525
t.Run("should retrieve pet store API as JSON", func(t *testing.T) {
26-
serv := httptest.NewServer(http.HandlerFunc(serveJSONPestore))
26+
serv := httptest.NewServer(http.HandlerFunc(serveJSONPetStore))
2727

2828
defer serv.Close()
2929

loading/loading_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121

2222
func TestLoadFromHTTP(t *testing.T) {
2323
t.Run("should load pet store API doc", func(t *testing.T) {
24-
ts := httptest.NewServer(http.HandlerFunc(serveYAMLPestore))
24+
ts := httptest.NewServer(http.HandlerFunc(serveYAMLPetStore))
2525
defer ts.Close()
2626

2727
content, err := LoadFromFileOrHTTP(ts.URL)

loading/serve_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ func TestMain(m *testing.M) {
3030

3131
// test handlers
3232

33-
// serveYAMLPestore is a http handler to serve the YAMLPestore doc.
34-
func serveYAMLPestore(rw http.ResponseWriter, _ *http.Request) {
33+
// serveYAMLPetStore is a http handler to serve the yamlPetStore doc.
34+
func serveYAMLPetStore(rw http.ResponseWriter, _ *http.Request) {
3535
rw.WriteHeader(http.StatusOK)
3636
_, _ = rw.Write(yamlPetStore)
3737
}
3838

39-
// serveJSONPestore is a http handler to serve the jsonPestore doc.
40-
func serveJSONPestore(rw http.ResponseWriter, _ *http.Request) {
39+
// serveJSONPetStore is a http handler to serve the jsonPetStore doc.
40+
func serveJSONPetStore(rw http.ResponseWriter, _ *http.Request) {
4141
rw.WriteHeader(http.StatusOK)
4242
_, _ = rw.Write(jsonPetStore)
4343
}

loading/yaml_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func TestYAMLMatcher(t *testing.T) {
2323

2424
func TestYAMLDoc(t *testing.T) {
2525
t.Run("should retrieve pet store API as YAML", func(t *testing.T) {
26-
serv := httptest.NewServer(http.HandlerFunc(serveYAMLPestore))
26+
serv := httptest.NewServer(http.HandlerFunc(serveYAMLPetStore))
2727
defer serv.Close()
2828

2929
s, err := YAMLDoc(serv.URL)

0 commit comments

Comments
 (0)