Skip to content

Commit

Permalink
Fix order of column error check in importer (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
subins2000 committed Jul 15, 2023
1 parent 793f092 commit 1d58374
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/importer/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,14 @@ func (im *Importer) readEntry(r []string) (entry, error) {
return e, fmt.Errorf("unknown language '%s' at column 2", e.Lang)
}

if e.Initial == "" {
e.Initial = strings.ToUpper(string(e.Content[0]))
}

if e.Content == "" {
return e, fmt.Errorf("empty content (word) at column 1")
}

if e.Initial == "" {
e.Initial = strings.ToUpper(string(e.Content[0]))
}

defTypeStr := cleanString(r[9])
if typ == typeDef {
defTypes := splitString(defTypeStr)
Expand Down

0 comments on commit 1d58374

Please sign in to comment.