// Code generated by go-enum DO NOT EDIT. // Version: 0.9.1 // Revision: 42b1ed55945781de07471bb2db52b3f9edee19b0 // Build Date: 2025-08-02T17:25:40Z // Built By: goreleaser package fnamest import ( "fmt" "strings" ) const ( // Default is a FnameST of type default. Default FnameST = "default" // Message is a FnameST of type message. Message FnameST = "message" // Template is a FnameST of type template. Template FnameST = "template" ) var ErrInvalidFnameST = fmt.Errorf("not a valid FnameST, try [%s]", strings.Join(_FnameSTNames, ", ")) var _FnameSTNames = []string{ string(Default), string(Message), string(Template), } // FnameSTNames returns a list of possible string values of FnameST. func FnameSTNames() []string { tmp := make([]string, len(_FnameSTNames)) copy(tmp, _FnameSTNames) return tmp } // FnameSTValues returns a list of the values for FnameST func FnameSTValues() []FnameST { return []FnameST{ Default, Message, Template, } } // String implements the Stringer interface. func (x FnameST) String() string { return string(x) } // IsValid provides a quick way to determine if the typed value is // part of the allowed enumerated values func (x FnameST) IsValid() bool { _, err := ParseFnameST(string(x)) return err == nil } var _FnameSTValue = map[string]FnameST{ "default": Default, "message": Message, "template": Template, } // ParseFnameST attempts to convert a string to a FnameST. func ParseFnameST(name string) (FnameST, error) { if x, ok := _FnameSTValue[name]; ok { return x, nil } // Case insensitive parse, do a separate lookup to prevent unnecessary cost of lowercasing a string if we don't need to. if x, ok := _FnameSTValue[strings.ToLower(name)]; ok { return x, nil } return FnameST(""), fmt.Errorf("%s is %w", name, ErrInvalidFnameST) } // Set implements the Golang flag.Value interface func. func (x *FnameST) Set(val string) error { v, err := ParseFnameST(val) *x = v return err } // Get implements the Golang flag.Getter interface func. func (x *FnameST) Get() interface{} { return *x } // Type implements the github.com/spf13/pFlag Value interface. func (x *FnameST) Type() string { return "FnameST" }