Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxr1998 committed Aug 12, 2018
1 parent 218cd71 commit 340c144
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions import.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ func processData(fileContents [][]string, output []json.RawMessage, matcher func
func getVisitsAndCaptures() []byte {
var fileContents [][]string
var err error

if fileContents, err = readFile(); err != nil {
log.Println(err)
return nil
Expand All @@ -69,9 +68,10 @@ func getVisitsAndCaptures() []byte {
visitedPortals, capturedPortals,
}

if encodedJSON, err := json.Marshal(result); err == nil {
return encodedJSON
var encodedJSON []byte
if encodedJSON, err = json.Marshal(result); err != nil {
log.Println(err)
return nil
}
log.Println(err)
return nil
return encodedJSON
}

0 comments on commit 340c144

Please sign in to comment.