Skip to content

Commit

Permalink
fix error when validating dot imports (#45)
Browse files Browse the repository at this point in the history
Fixes #44

Signed-off-by: Matheus Alcantara <[email protected]>
  • Loading branch information
matheusalcantarazup authored Feb 8, 2022
1 parent 73cde23 commit 76d765e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/gci/imports/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (i ImportDef) Validate() error {
func checkAlias(alias string) error {
for idx, r := range alias {
if !unicode.IsLetter(r) {
if r != '_' {
if r != '_' && r != '.' {
if idx == 0 || !unicode.IsDigit(r) {
// aliases may not start with a digit
return InvalidCharacterError{r, alias}
Expand Down

0 comments on commit 76d765e

Please sign in to comment.