textlanguagedb

package
v0.0.0-...-692e47d Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package textlanguagedb provides wrappers for golang.org/x/text/language package language.Script which implement database/sql Scanner and Value interfaces; meaning they can be passed directly to database drivers and correct parsing will be done.

It also provides some "wrapper" functions to avoid awkward conversions.

Package textlanguagedb provides wrappers for golang.org/x/text/language package language.Script which implement database/sql Scanner and Value interfaces; meaning they can be passed directly to database drivers and correct parsing will be done.

It also provides some "wrapper" functions to avoid awkward conversions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Script

type Script struct {
	language.Script
}

func MustParseScript

func MustParseScript(s string) Script

func NewScript

func NewScript(scr language.Script) Script

func ParseScript

func ParseScript(s string) (Script, error)

func (Script) IsUnspecified

func (s Script) IsUnspecified() bool

IsUnspecified will return whether the underlying Script in question is unspecified, by checking whether s.String() == "Zzzz" (as specified by the language package)

func (*Script) Scan

func (s *Script) Scan(src interface{}) error

func (Script) Value

func (s Script) Value() (driver.Value, error)

type Tag

type Tag struct {
	language.Tag
}

func MustParse

func MustParse(t string) Tag

func NewTag

func NewTag(t language.Tag) Tag

func Parse

func Parse(ts string) (Tag, error)

func (*Tag) Scan

func (t *Tag) Scan(src interface{}) error

func (Tag) Value

func (t Tag) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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