Skip to content

Commit

Permalink
internal: use filepath.Join for cross-platform paths in codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdecaf committed Jan 21, 2019
1 parent b69f372 commit 094294d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion internal/iso3166/iso3166.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by an Apache License
// license that can be found in the LICENSE file.

// Generated on 2018-11-06T03:52:02Z by adam, any modifications will be overwritten
// Generated on 2019-01-21T12:30:39Z by adam, any modifications will be overwritten
package iso3166

var countryCodes = map[string]bool{
Expand Down
8 changes: 4 additions & 4 deletions internal/iso3166/iso3166_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ import (
"log"
"net/http"
"os/user"
"path/filepath"
"runtime"
"time"
)

const (
var (
// From https://datahub.io/core/country-list#data
downloadUrl = "https://datahub.io/core/country-list/r/data.json"

outputFilename = "internal/iso3166/iso3166.go"
downloadUrl = "https://datahub.io/core/country-list/r/data.json"
outputFilename = filepath.Join("internal", "iso3166", "iso3166.go")
)

// [{"Code": "AF", "Name": "Afghanistan"}, ...]
Expand Down
2 changes: 1 addition & 1 deletion internal/iso4217/iso4217.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by an Apache License
// license that can be found in the LICENSE file.

// Generated on 2018-11-06T03:52:05Z by adam, any modifications will be overwritten
// Generated on 2019-01-21T12:30:42Z by adam, any modifications will be overwritten
package iso4217

var currencyCodes = map[string]bool{
Expand Down
8 changes: 4 additions & 4 deletions internal/iso4217/iso4217_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ import (
"log"
"net/http"
"os/user"
"path/filepath"
"runtime"
"time"
)

const (
downloadUrl = "https://datahub.io/core/currency-codes/r/codes-all.json"

outputFilename = "internal/iso4217/iso4217.go"
var (
downloadUrl = "https://datahub.io/core/currency-codes/r/codes-all.json"
outputFilename = filepath.Join("internal", "iso4217", "iso4217.go")
)

// {"AlphabeticCode": "AFN", "Currency": "Afghani", ... }
Expand Down

0 comments on commit 094294d

Please sign in to comment.