Skip to content

Commit 58dfc7e

Browse files
authored
internal/dinosql: Sort imported packages (#165)
1 parent 385d61f commit 58dfc7e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/dinosql/gen.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ func (r Result) ModelImports() [][]string {
242242
stds = append(stds, s)
243243
}
244244

245+
sort.Strings(stds)
246+
sort.Strings(pkgs)
245247
return [][]string{stds, pkgs}
246248
}
247249

@@ -375,6 +377,8 @@ func (r Result) QueryImports(filename string) [][]string {
375377
stds = append(stds, s)
376378
}
377379

380+
sort.Strings(stds)
381+
sort.Strings(pkgs)
378382
return [][]string{stds, pkgs}
379383
}
380384

0 commit comments

Comments
 (0)