Skip to content

Commit 6e6c78f

Browse files
authored
Merge pull request #9 from kianmeng/fix-typos
doc: fix typos
2 parents 283adeb + 3d0cdc9 commit 6e6c78f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ In other situations you might _not_ want to have a default value set, because a
254254
particular CLI flag is mandatory (using cobra's
255255
[MarkFlagRequired](https://pkg.go.dev/github.com/spf13/cobra#MarkFlagRequired)).
256256
Here, cobra's help should not show a (useless) default enum flag setting but
257-
only the availabe enum values.
257+
only the available enum values.
258258

259259
**Don't assign the zero value** of your enum type to any value, except the
260260
"non-existing" default.
@@ -370,14 +370,14 @@ The included `enumflag.code-workspace` defines the following tasks:
370370

371371
#### Aux Tasks
372372

373-
- _pksite service_: auxilliary task to run `pkgsite` as a background service
373+
- _pksite service_: auxiliary task to run `pkgsite` as a background service
374374
using `scripts/pkgsite.sh`. The script leverages browser-sync and nodemon to
375375
hot reload the Go module documentation on changes; many thanks to @mdaverde's
376376
[_Build your Golang package docs
377377
locally_](https://mdaverde.com/posts/golang-local-docs) for paving the way.
378378
`scripts/pkgsite.sh` adds automatic installation of `pkgsite`, as well as the
379379
`browser-sync` and `nodemon` npm packages for the local user.
380-
- _view pkgsite_: auxilliary task to open the VSCode-integrated "simple" browser
380+
- _view pkgsite_: auxiliary task to open the VSCode-integrated "simple" browser
381381
and pass it the local URL to open in order to show the module documentation
382382
rendered by `pkgsite`. This requires a detour via a task input with ID
383383
"_pkgsite_".

mapper.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
// EnumIdentifiers maps enumeration values to their corresponding textual
2727
// representations (~identifiers). This mapping is a one-to-many mapping in that
2828
// the same enumeration value may have more than only one associated textual
29-
// representation (indentifier). If more than one textual representation exists
29+
// representation (identifier). If more than one textual representation exists
3030
// for the same enumeration value, then the first textual representation is
3131
// considered to be the canonical one.
3232
type EnumIdentifiers[E constraints.Integer] map[E][]string
@@ -62,7 +62,7 @@ func (m enumMapper[E]) ValueOf(name string) (E, error) {
6262
comparefn = func(s string) bool { return strings.ToLower(s) == name }
6363
}
6464
// Try to find a matching enum value textual representation, and then take
65-
// its enumation value ("code").
65+
// its enumeration value ("code").
6666
for enumval, ids := range m.m {
6767
if slices.IndexFunc(ids, comparefn) >= 0 {
6868
return enumval, nil

0 commit comments

Comments
 (0)