Added server example
This commit is contained in:
parent
9c53235e7e
commit
559df424d3
5 changed files with 71 additions and 7 deletions
|
@ -35,7 +35,15 @@ func (s *Scanner) scanStruct(file *fs.File, tokens token.List, i int) (int, erro
|
|||
fieldTypeName := tokens[i].Text(file.Bytes)
|
||||
fieldType := types.Int
|
||||
|
||||
if fieldTypeName != "Int" {
|
||||
switch fieldTypeName {
|
||||
case "Int", "Int64":
|
||||
case "Int32":
|
||||
fieldType = types.Int32
|
||||
case "Int16":
|
||||
fieldType = types.Int16
|
||||
case "Int8":
|
||||
fieldType = types.Int8
|
||||
default:
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue