Skip to content

Commit

Permalink
bump tzf to 0.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ringsaturn committed Mar 26, 2023
1 parent 0c0a0a9 commit 738fc16
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/gin-gonic/gin v1.9.0
github.com/paulmach/orb v0.9.0
github.com/ringsaturn/gtu v0.0.0-20211128160806-850d778b2143
github.com/ringsaturn/tzf v0.11.2
github.com/ringsaturn/tzf v0.12.0
github.com/ringsaturn/tzf-rel v0.0.2022-g1
github.com/stretchr/testify v1.8.2
google.golang.org/protobuf v1.30.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/ringsaturn/go-cities.json v0.3.5 h1:MCRHTdXyXwh6EVbHp17otHrktDulK0Vu/UPd7tX0Inc=
github.com/ringsaturn/gtu v0.0.0-20211128160806-850d778b2143 h1:WAgALpzXsdUuzN09a8Hh9QSFEozPrJsOU6Wyuk54OfM=
github.com/ringsaturn/gtu v0.0.0-20211128160806-850d778b2143/go.mod h1:f8tMjXpWpMIkxZy6slPk09AHI7G3M/9AwvM/Skjp65E=
github.com/ringsaturn/tzf v0.11.2 h1:HIhk6AKj4h9uIs6a5X9qcukeoDzXzFgKWbK90OCC5SQ=
github.com/ringsaturn/tzf v0.11.2/go.mod h1:5PHreJiVNZZ/zNfU4J9NixlMmI9WZNXavfeMh+SeQlI=
github.com/ringsaturn/tzf v0.12.0 h1:+fXa8T9hcwK58l/20Llgg50Fg6pg51dbZD6S7MRQXd4=
github.com/ringsaturn/tzf v0.12.0/go.mod h1:5PHreJiVNZZ/zNfU4J9NixlMmI9WZNXavfeMh+SeQlI=
github.com/ringsaturn/tzf-rel v0.0.2022-g1 h1:K7Ju6lJ95SlWfL5/Nlcrae3l0xxwvimmNX6WXLdYaHw=
github.com/ringsaturn/tzf-rel v0.0.2022-g1/go.mod h1:TvyUIUpF3aCH98QYjTmMb1cqK7pFswdFLoIVZwGNV/M=
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
Expand Down
12 changes: 3 additions & 9 deletions handler/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ func check(err error) {
}
}

type Finder interface {
GetTimezoneName(lng float64, lat float64) string
GetTimezoneNames(lng float64, lat float64) ([]string, error)
TimezoneNames() []string
}

type VisualizableTimezoneData interface {
GetShape(name string) (interface{}, error)
}
Expand Down Expand Up @@ -72,7 +66,7 @@ func (d *polygonData) GetShape(name string) (interface{}, error) {
}

var (
finder Finder
finder tzf.F
tzData VisualizableTimezoneData
)

Expand All @@ -88,7 +82,7 @@ type SetupFinderOptions struct {
CustomDataPath string
}

func setupFuzzyFinder(dataPath string) (Finder, VisualizableTimezoneData, error) {
func setupFuzzyFinder(dataPath string) (tzf.F, VisualizableTimezoneData, error) {
var err error
tzpb := &pb.PreindexTimezones{}
if dataPath == "" {
Expand All @@ -110,7 +104,7 @@ func setupFuzzyFinder(dataPath string) (Finder, VisualizableTimezoneData, error)
return finder, &fuzzyData{data: tzpb}, err
}

func setupPolygonFinder(dataPath string) (Finder, VisualizableTimezoneData, error) {
func setupPolygonFinder(dataPath string) (tzf.F, VisualizableTimezoneData, error) {
var err error
tzpb := &pb.Timezones{}

Expand Down

0 comments on commit 738fc16

Please sign in to comment.