Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ajeetdsouza committed Jan 6, 2021
1 parent cd093a1 commit 058d940
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dgraph/cmd/bulk/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,7 @@ func run() {
}

var bulkMeta pb.BulkMeta
err = bulkMeta.Unmarshal(bulkMetaData)
if err != nil {
if err = bulkMeta.Unmarshal(bulkMetaData); err != nil {
fmt.Fprintln(os.Stderr, "Error deserializing bulk meta file")
os.Exit(1)
}
Expand All @@ -333,8 +332,7 @@ func run() {
fmt.Fprintln(os.Stderr, "Error serializing bulk meta file")
os.Exit(1)
}
err = ioutil.WriteFile(bulkMetaPath, bulkMetaData, 0644)
if err != nil {
if err = ioutil.WriteFile(bulkMetaPath, bulkMetaData, 0644); err != nil {
fmt.Fprintln(os.Stderr, "Error writing to bulk meta file")
os.Exit(1)
}
Expand Down

0 comments on commit 058d940

Please sign in to comment.