Skip to content

Commit

Permalink
change data path
Browse files Browse the repository at this point in the history
  • Loading branch information
debanshurout committed Feb 28, 2024
1 parent 0a158f9 commit c0c6bc4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
21 changes: 5 additions & 16 deletions packages/i18nify-go/country.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,18 @@ package i18nify_go

import (
"fmt"
"i18nify/packages/i18nify-go/modules/language"
"i18nify/packages/i18nify-go/modules/timezone"
"i18nify/packages/i18nify-go/modules/country_information"
"io/ioutil"
)

const CountryData_File = "modules/country/country_v1.json"
const CountryData_File = "modules/country_information/data/country_v1.json"

type CountryV1 struct {
ctry country_information.Country
}

func (c CountryV1) GetLanguage(code string) language.Language {
//TODO implement me
panic("implement me")
}

func (c CountryV1) GetTimezone(code string) timezone.Timezone {
//TODO implement me
panic("implement me")
country country_information.Country
}

func (c CountryV1) GetCountryInformation(code string) country_information.CountryInformation {
return c.ctry.GetCountryInformation()[code]
return c.country.GetCountryInformation()[code]
}

func NewCountryV1() ICountry {
Expand All @@ -35,6 +24,6 @@ func NewCountryV1() ICountry {
}
c, _ := country_information.UnmarshalCountry(jsonData)

v1 := CountryV1{ctry: c}
v1 := CountryV1{country: c}
return v1
}
5 changes: 1 addition & 4 deletions packages/i18nify-go/interface.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package i18nify_go

import (
"i18nify/packages/i18nify-go/modules/language"
"i18nify/packages/i18nify-go/modules/timezone"
"i18nify/packages/i18nify-go/modules/country_information"
)

type ICountry interface {
GetCountryInformation(code string) country_information.CountryInformation
GetLanguage(code string) language.Language
GetTimezone(code string) timezone.Timezone
}

0 comments on commit c0c6bc4

Please sign in to comment.