place

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clean

func Clean(name string) string

Types

type Hint

type Hint interface {
	ID() string // a unique identifier for the hint
}

type PlaceKind

type PlaceKind string
const (
	PlaceKindUnknown  PlaceKind = "unknown"
	PlaceKindCountry  PlaceKind = "country"
	PlaceKindUKNation PlaceKind = "uknation"
	PlaceKindAddress  PlaceKind = "address"
)

type PlaceName

type PlaceName struct {
	ID         string
	Kind       PlaceKind
	Name       string
	Adjective  string
	Aliases    []string
	Unknown    bool
	ChildHints []Hint
	PartOf     []*PlaceName
}

func ClassifyName

func ClassifyName(name string, hints ...Hint) *PlaceName

func LookupPlaceName

func LookupPlaceName(v string) (*PlaceName, bool)

func UnknownPlaceName

func UnknownPlaceName() *PlaceName

func (*PlaceName) FindContainerKind

func (pn *PlaceName) FindContainerKind(kind PlaceKind) (*PlaceName, bool)

func (*PlaceName) IsUnknown

func (c *PlaceName) IsUnknown() bool

func (*PlaceName) SameAs

func (c *PlaceName) SameAs(other *PlaceName) bool

Jump to

Keyboard shortcuts

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