Skip to content

Commit b2acc9e

Browse files
authored
Merge pull request #10 from thediveo/develop
Develop
2 parents 283adeb + 03b100b commit b2acc9e

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

Diff for: README.md

+1-15
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.
@@ -368,20 +368,6 @@ The included `enumflag.code-workspace` defines the following tasks:
368368
- **Run all tests with coverage** task: does what it says on the tin and runs
369369
all tests with coverage.
370370

371-
#### Aux Tasks
372-
373-
- _pksite service_: auxilliary task to run `pkgsite` as a background service
374-
using `scripts/pkgsite.sh`. The script leverages browser-sync and nodemon to
375-
hot reload the Go module documentation on changes; many thanks to @mdaverde's
376-
[_Build your Golang package docs
377-
locally_](https://mdaverde.com/posts/golang-local-docs) for paving the way.
378-
`scripts/pkgsite.sh` adds automatic installation of `pkgsite`, as well as the
379-
`browser-sync` and `nodemon` npm packages for the local user.
380-
- _view pkgsite_: auxilliary task to open the VSCode-integrated "simple" browser
381-
and pass it the local URL to open in order to show the module documentation
382-
rendered by `pkgsite`. This requires a detour via a task input with ID
383-
"_pkgsite_".
384-
385371
## Make Targets
386372

387373
- `make`: lists available targets.

Diff for: 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)