From 2df5e154434bce61c3e4aa9626b69f8ef5b80598 Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Sat, 10 Dec 2022 14:14:22 +0000 Subject: Reorder things a bit --- flag.go | 8 ++++---- 1 file 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 } -- cgit v1.2.3-70-g09d2