Skip to content

Commit

Permalink
Fix absolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
Iftekher Sunny committed Oct 30, 2017
1 parent d8da967 commit ee5cdf8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions country.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package country
import (
"encoding/json"
"io/ioutil"
"path"
"runtime"
"path/filepath"
)

// Country struct
Expand All @@ -27,9 +26,7 @@ func (country *Country) readCountriesDataFile() *Country {
return country
}

_, filename, _, _ := runtime.Caller(0)

dataPath := path.Join(path.Dir(filename), "data/countries.json")
dataPath, _ := filepath.Abs("./data/countries.json")

file, _ := ioutil.ReadFile(dataPath)

Expand Down

0 comments on commit ee5cdf8

Please sign in to comment.