File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ In other situations you might _not_ want to have a default value set, because a
254
254
particular CLI flag is mandatory (using cobra's
255
255
[ MarkFlagRequired] ( https://pkg.go.dev/github.com/spf13/cobra#MarkFlagRequired ) ).
256
256
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.
258
258
259
259
** Don't assign the zero value** of your enum type to any value, except the
260
260
"non-existing" default.
@@ -370,14 +370,14 @@ The included `enumflag.code-workspace` defines the following tasks:
370
370
371
371
#### Aux Tasks
372
372
373
- - _ pksite service_ : auxilliary task to run ` pkgsite ` as a background service
373
+ - _ pksite service_ : auxiliary task to run ` pkgsite ` as a background service
374
374
using ` scripts/pkgsite.sh ` . The script leverages browser-sync and nodemon to
375
375
hot reload the Go module documentation on changes; many thanks to @mdaverde 's
376
376
[ _ Build your Golang package docs
377
377
locally_ ] ( https://mdaverde.com/posts/golang-local-docs ) for paving the way.
378
378
` scripts/pkgsite.sh ` adds automatic installation of ` pkgsite ` , as well as the
379
379
` 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
381
381
and pass it the local URL to open in order to show the module documentation
382
382
rendered by ` pkgsite ` . This requires a detour via a task input with ID
383
383
"_ pkgsite_ ".
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import (
26
26
// EnumIdentifiers maps enumeration values to their corresponding textual
27
27
// representations (~identifiers). This mapping is a one-to-many mapping in that
28
28
// 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
30
30
// for the same enumeration value, then the first textual representation is
31
31
// considered to be the canonical one.
32
32
type EnumIdentifiers [E constraints.Integer ] map [E ][]string
@@ -62,7 +62,7 @@ func (m enumMapper[E]) ValueOf(name string) (E, error) {
62
62
comparefn = func (s string ) bool { return strings .ToLower (s ) == name }
63
63
}
64
64
// Try to find a matching enum value textual representation, and then take
65
- // its enumation value ("code").
65
+ // its enumeration value ("code").
66
66
for enumval , ids := range m .m {
67
67
if slices .IndexFunc (ids , comparefn ) >= 0 {
68
68
return enumval , nil
You can’t perform that action at this time.
0 commit comments