aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flag.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/flag.go b/flag.go
index fd60893..51c78aa 100644
--- a/flag.go
+++ b/flag.go
@@ -140,15 +140,15 @@ func (f *Feature) String() string {
return fmt.Sprintf("%s (enabled: %t)", f.Name, f.Enabled())
}
+// ParseFunc describes functions that will parse a string and return a
+// value or an error.
+type ParseFunc[T any] func(string) (T, error)
+
// ParseTime parses a string according to the time.RFC3339 format.
func ParseTime(s string) (time.Time, error) {
return time.Parse(time.RFC3339, s)
}
-// ParseFunc describes functions that will parse a string and return a
-// value or an error.
-type ParseFunc[T any] func(string) (T, error)
-
type flagFeature struct{ *Feature }
func (flagFeature) IsBoolFlag() bool { return true }