Skip to content

Commit

Permalink
Merge pull request #6024 from q384566678/add-err-check
Browse files Browse the repository at this point in the history
vtcompose: add err check
  • Loading branch information
sougou authored Apr 9, 2020
2 parents 3412a34 + 6ab908f commit b85009f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/compose/vtcompose/vtcompose.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ func handleError(err error) {
func appendToSqlFile(schemaFileNames []string, f *os.File) {
for _, file := range schemaFileNames {
data, err := ioutil.ReadFile(tablesPath + file)
if err != nil {
log.Fatalf("reading %s: %s", tablesPath+file, err)
}

_, err = f.Write(data)
handleError(err)

Expand Down

0 comments on commit b85009f

Please sign in to comment.