Skip to content

Commit

Permalink
Use proteus:",101" notation
Browse files Browse the repository at this point in the history
Thanks to dennwc for advice it may be better to use proteus:",101" notation - it will be easier to extend later.
  • Loading branch information
liasece committed Mar 2, 2019
1 parent 482a696 commit 6204512
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scanner/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,10 @@ func isIgnoredField(f *types.Var, tags []string) bool {
}

func getProtoID(f *types.Var, tags []string) int {
if len(tags) == 0 {
if len(tags) < 2 {
return 0
}
i, err := strconv.Atoi(tags[0])
i, err := strconv.Atoi(tags[1])
if err != nil {
return 0
}
Expand Down

0 comments on commit 6204512

Please sign in to comment.