Update for 0.18.0
This commit is contained in:
@@ -118,6 +118,7 @@ func (s *StructParser) Parse() ([]Item, error) {
|
||||
}
|
||||
|
||||
func (s *StructParser) parseStructFields() ([]Field, error) {
|
||||
encountered := map[string]struct{}{}
|
||||
var out []Field
|
||||
for {
|
||||
line, err := s.r.ReadString('\n')
|
||||
@@ -144,6 +145,12 @@ func (s *StructParser) parseStructFields() ([]Field, error) {
|
||||
continue
|
||||
}
|
||||
|
||||
if _, ok := encountered[sm[1]]; ok {
|
||||
continue
|
||||
} else {
|
||||
encountered[sm[1]] = struct{}{}
|
||||
}
|
||||
|
||||
out = append(out, Field{
|
||||
OrigName: sm[1],
|
||||
Name: s.TransformName(sm[1]),
|
||||
|
||||
Reference in New Issue
Block a user