Documentation ¶
Index ¶
- Constants
- Variables
- type Content
- type Context
- func (c Context) Any(name string) (any, error)
- func (c Context) Float64(key string) (float64, error)
- func (c Context) Int64(key string) (int64, error)
- func (c Context) Set(name string, value any)
- func (c Context) String(name string) (string, error)
- func (c Context) Time(key string) (time.Time, error)
- type Datetime
- type DatetimeFormat
- type Evalable
- type FunctionArg
- type Message
- type Number
- type NumberFormat
- type PlainArg
- type Plural
- type PluralCase
- type Select
Constants ¶
View Source
const DefaultCase = "other"
{ GENDER, select,
male {He} female {She} other {They} } liked this.
Variables ¶
View Source
var ErrNoDefaultCase = errors.New("no default case")
Functions ¶
This section is empty.
Types ¶
type Datetime ¶
type Datetime struct {
// contains filtered or unexported fields
}
func NewDatetime ¶
func NewDatetime(argName string, format DatetimeFormat, lang language.Tag) *Datetime
type DatetimeFormat ¶
type DatetimeFormat int
const ( NoneDatetimeFormat DatetimeFormat = iota ShortDatetimeFormat // 1/2/06, 3:04 PM MediumDatetimeFormat // Jan 2, 2006, 3:04:05 PM LongDatetimeFormat // January 2, 2006 at 3:04:05 PM UTC // TODO: go std time formater does not have full forms of local abbreviation FullDatetimeFormat // Monday, January 2, 2006 at 3:04:05 PM Coordinated Universal Time )
type FunctionArg ¶
{age, number, integer}
type Number ¶
type Number struct { ArgName string Format NumberFormat Lang language.Tag // contains filtered or unexported fields }
type NumberFormat ¶
type NumberFormat int
const ( NoneNumberFormat NumberFormat = iota IntegerNumberFormat PercentNumberFormat )
type Plural ¶
type Plural struct { ArgName string Lang language.Tag Offset int EqCases map[uint64]Evalable Cases map[plural.Form]Evalable // contains filtered or unexported fields }
{ COUNT, plural,
=0 {There are no results.} one {There is one result.} other {There are # results.} }
func NewSelectOrdinal ¶
type PluralCase ¶
Click to show internal directories.
Click to hide internal directories.