package countries
import "git.sr.ht/~pingoo/stdx/countries"
Index ¶
- Constants
- Variables
- func GetMap() map[string]Country
- func Init() (err error)
- func Name(countryCode string) (countryName string, err error)
- type Country
- type CountryInt32
Constants ¶
const ( Unknown = "Unknown" CodeUnknown = "XX" )
Variables ¶
var Bytes []byte
Functions ¶
func GetMap ¶
func Init ¶
func Init() (err error)
func Name ¶
Types ¶
type Country ¶
func GetList ¶
func GetList() []Country
type CountryInt32 ¶
type CountryInt32 string
CountryInt32 is a tpye that store a 2-letters country code as an int32. The goal is to have more efficient database operations than using the a basic TEXT
func (*CountryInt32) Scan ¶
func (country *CountryInt32) Scan(src interface{}) (err error)
Scan implements sql.Scanner so CountryInt32 can be read from databases transparently.
func (CountryInt32) Value ¶
func (country CountryInt32) Value() (driver.Value, error)
Value implements sql.Valuer so that CountryInt32 can be written to databases
Source Files ¶
countries.go countryint32.go
- Version
- v0.0.0-20240218134121-094174641f6e (latest)
- Published
- Feb 18, 2024
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 4 months ago –
Tools for package owners.