packageenumimport("fmt""strings")// Stringered wraps the string type to implement the fmt.Stringer interface.typeStringeredstring// String returns the string value.func(sStringered)String()string{returnstring(s)}// StringeredList converts a list of strings to a list of Stringered.funcStringeredList(values[]string)[]Stringered{varout[]Stringeredfor_,v:=rangevalues{out=append(out,Stringered(v))}returnout}// EnumString returns a comma-separated string of the enum values.// This is primarily used to generate a cli flag.funcEnumString[Tfmt.Stringer](values[]T)string{varoutstrings.Builderfori,v:=rangevalues{out.WriteString(v.String())ifi+1<len(values){out.WriteString(", ")}}returnout.String()}