// Code generated by "enumer -type=EntropyMode -trimprefix=Entropy"; DO NOT EDIT. package configutil import ( "fmt" ) const _EntropyModeName = "UnknownAugmentation" var _EntropyModeIndex = [...]uint8{0, 7, 19} func (i EntropyMode) String() string { if i < 0 || i >= EntropyMode(len(_EntropyModeIndex)-1) { return fmt.Sprintf("EntropyMode(%d)", i) } return _EntropyModeName[_EntropyModeIndex[i]:_EntropyModeIndex[i+1]] } var _EntropyModeValues = []EntropyMode{0, 1} var _EntropyModeNameToValueMap = map[string]EntropyMode{ _EntropyModeName[0:7]: 0, _EntropyModeName[7:19]: 1, } // EntropyModeString retrieves an enum value from the enum constants string name. // Throws an error if the param is not part of the enum. func EntropyModeString(s string) (EntropyMode, error) { if val, ok := _EntropyModeNameToValueMap[s]; ok { return val, nil } return 0, fmt.Errorf("%s does not belong to EntropyMode values", s) } // EntropyModeValues returns all values of the enum func EntropyModeValues() []EntropyMode { return _EntropyModeValues } // IsAEntropyMode returns "true" if the value is listed in the enum definition. "false" otherwise func (i EntropyMode) IsAEntropyMode() bool { for _, v := range _EntropyModeValues { if i == v { return true } } return false }