Browse Source

Add support for displaying list of features with ./yarnd --enable-feature list

pull/526/head
James Mills 3 weeks ago
parent
commit
0d0ba52435
Signed by: prologic GPG Key ID: AC4C014F1440EBD6
  1. 9
      cmd/yarnd/main.go

9
cmd/yarnd/main.go

@ -35,6 +35,15 @@ func (f *flagSliceOfFeatureType) Type() string {
}
func (f *flagSliceOfFeatureType) Set(value string) error {
if strings.ToLower(value) == "list" {
fmt.Println("Available Features:")
for _, feature := range internal.AvailableFeatures() {
fmt.Printf(" - %s\n", feature)
}
fmt.Println()
os.Exit(0)
}
feature, err := internal.FeatureFromString(value)
if err != nil {
log.Warnf("invalid feature %s", value)

Loading…
Cancel
Save