l10n

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2022 License: MIT Imports: 4 Imported by: 0

README

country

References:

European Union VAT identification numbers
  • at
  • be
  • bg
  • cy
  • cz
  • de
  • dk
  • ee
  • es
  • fi
  • fr
  • gr
  • hr
  • hu
  • ie
  • it
  • lt
  • lu
  • lv
  • mt
  • nl
  • pl
  • pt
  • ro
  • se
  • sk
  • si
VAT numbers of non-EU countries
  • al
  • au
  • by
  • ca
  • ch
  • gb
  • id
  • il
  • in
  • is
  • kz
  • mc
  • mk
  • ng
  • no
  • nz
  • ph
  • rs
  • ru
  • sm
  • tr
  • ua
  • uz (regex only, control digit algorithm is unknown at the moment)
VAT numbers of Latin American countries
  • ar
  • bo
  • br
  • cl
  • co
  • cr
  • do
  • ec
  • gt
  • hn
  • mx
  • ni
  • pa
  • pe
  • py
  • sv
  • uy
  • ve

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ISO31661A_2 = make(map[string]Country)
View Source
var ISO31661A_3 = make(map[string]Country)

Functions

func ISO7064_MOD11_10

func ISO7064_MOD11_10(v string) bool

ISO 7064 (MOD 11, 10)

Types

type Country

type Country struct {
	// ISO 3166-1 Alpha-2
	A2 string
	// ISO 3166-1 Alpha-3
	A3 string
	// ISO 3166-1 numeric
	Num string
	// The validator for the country's zip / postal code, will be nil
	// for countries that don't use postal codes.
	Zip StringMatcher
	// The validator for the country's phone numbers, may be nil.
	Phone StringMatcher
	//
	VAT StringMatcher
}

func Get

func Get(cc string) (c Country, ok bool)

type StringMatcher

type StringMatcher interface {
	MatchString(v string) bool
}

mimics *regexp.Regexp interface

type StringMatcherFunc

type StringMatcherFunc func(v string) bool

func (StringMatcherFunc) MatchString

func (f StringMatcherFunc) MatchString(v string) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL