...

Source file src/github.com/google/flatbuffers/tests/MyGame/Example/Race.go

Documentation: github.com/google/flatbuffers/tests/MyGame/Example

     1  // Code generated by the FlatBuffers compiler. DO NOT EDIT.
     2  
     3  package Example
     4  
     5  import "strconv"
     6  
     7  type Race int8
     8  
     9  const (
    10  	RaceNone  Race = -1
    11  	RaceHuman Race = 0
    12  	RaceDwarf Race = 1
    13  	RaceElf   Race = 2
    14  )
    15  
    16  var EnumNamesRace = map[Race]string{
    17  	RaceNone:  "None",
    18  	RaceHuman: "Human",
    19  	RaceDwarf: "Dwarf",
    20  	RaceElf:   "Elf",
    21  }
    22  
    23  var EnumValuesRace = map[string]Race{
    24  	"None":  RaceNone,
    25  	"Human": RaceHuman,
    26  	"Dwarf": RaceDwarf,
    27  	"Elf":   RaceElf,
    28  }
    29  
    30  func (v Race) String() string {
    31  	if s, ok := EnumNamesRace[v]; ok {
    32  		return s
    33  	}
    34  	return "Race(" + strconv.FormatInt(int64(v), 10) + ")"
    35  }
    36  

View as plain text