Update for 0.18.0

This commit is contained in:
2023-07-03 17:47:46 -07:00
parent ff36330625
commit 058b3879ae
36 changed files with 603 additions and 1027 deletions

View File

@@ -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]),