Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
check error after load
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeylanzman committed Dec 21, 2017
1 parent 58494a4 commit a7e6848
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions safesql.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ func main() {
}
p, err := c.Load()

if err != nil {
fmt.Printf("error loading packages %v: %v\n", pkgs, err)
os.Exit(2)
}

imports := getImports(p)
existOne := false
for i := range sqlPackages {
Expand All @@ -81,11 +86,6 @@ func main() {
os.Exit(2)
}

if err != nil {
fmt.Printf("error loading packages %v: %v\n", pkgs, err)
os.Exit(2)
}

s := ssautil.CreateProgram(p, 0)
s.Build()

Expand Down

0 comments on commit a7e6848

Please sign in to comment.