5 // ObjectType is a constant enumeration type for identifying the kind of object
6 // type an implementing instance of the Object interface is.
10 UnknownObjectType ObjectType = iota
17 // ObjectTypeFromString converts from a given string to an ObjectType
18 // enumeration instance.
19 func ObjectTypeFromString(s string) ObjectType {
20 switch strings.ToLower(s) {
26 return CommitObjectType
30 return UnknownObjectType
34 // String implements the fmt.Stringer interface and returns a string
35 // representation of the ObjectType enumeration instance.
36 func (t ObjectType) String() string {
38 case UnknownObjectType:
44 case CommitObjectType: