Every line of 'golang enum string' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Go code is secure.
424 func Enum(p api.Protocol) uint16 { 425 if p == api.ProtocolTCP { 426 return 6 427 } 428 if p == api.ProtocolUDP { 429 return 17 430 } 431 return 0 432 }
307 func (n ExampleEnum) String() string { 308 switch n { 309 case EXAMPLE_ENUM_OPTION_A: 310 return "EXAMPLE_ENUM_OPTION_A" 311 case EXAMPLE_ENUM_OPTION_B: 312 return "EXAMPLE_ENUM_OPTION_B" 313 case EXAMPLE_ENUM_OPTION_C: 314 return "EXAMPLE_ENUM_OPTION_C" 315 } 316 return "UNKNOWN" 317 }
15 func (c *EnumConstraint) Enum(v ...interface{}) *EnumConstraint { 16 c.enums = v 17 return c 18 }
60 func (x Link_Kind) String() string { 61 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 62 }
117 func (x Component_Action) String() string { 118 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 119 }
57 func (x LinkRequest_DefinitionKind) String() string { 58 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 59 }
59 func (x TestEnum) String() string { 60 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 61 }
89 func (x Dataset_DatasetType) String() string { 90 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 91 }
103 func (x GroupField) String() string { 104 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 105 }
196 func (x UserSettings_TransactionIsolation) String() string { 197 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 198 }