Skip to content

Commit

Permalink
schema: typekind names are not capitalized.
Browse files Browse the repository at this point in the history
Capitalizing them would make them more easily confused with names of types.

Remember, in the Schema DSL, in a statement `type String string`:
the first word is a keyword;
the second word is the type name;
and the third word is the typekind.
  • Loading branch information
warpfork committed Aug 30, 2021
1 parent 4acc544 commit f9a4ced
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions schema/kind.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,31 @@ const (
func (k TypeKind) String() string {
switch k {
case TypeKind_Invalid:
return "Invalid"
return "invalid"
case TypeKind_Map:
return "Map"
return "map"
case TypeKind_List:
return "List"
return "list"
case TypeKind_Unit:
return "Unit"
return "unit"
case TypeKind_Bool:
return "Bool"
return "bool"
case TypeKind_Int:
return "Int"
return "int"
case TypeKind_Float:
return "Float"
return "float"
case TypeKind_String:
return "String"
return "string"
case TypeKind_Bytes:
return "Bytes"
return "bytes"
case TypeKind_Link:
return "Link"
return "link"
case TypeKind_Struct:
return "Struct"
return "struct"
case TypeKind_Union:
return "Union"
return "union"
case TypeKind_Enum:
return "Enum"
return "enum"
default:
panic("invalid enumeration value!")
}
Expand Down

0 comments on commit f9a4ced

Please sign in to comment.