...

Source file src/github.com/gogo/protobuf/test/issue330/type.go

Documentation: github.com/gogo/protobuf/test/issue330

     1  package issue330
     2  
     3  type TypeIdentifier uint32
     4  
     5  const (
     6  	UnknownType TypeIdentifier = 0
     7  	UserType    TypeIdentifier = 20
     8  )
     9  
    10  func (t TypeIdentifier) String() string {
    11  	switch t {
    12  	case 20:
    13  		return "User"
    14  	default:
    15  		return "Unknown"
    16  	}
    17  }
    18  

View as plain text