Documentation
¶
Overview ¶
Package codegen renders generated Go source for internal/cldr/.
Index ¶
- func FormatFile(src []byte) ([]byte, error)
- func RenderLanguageMatchingProfile(path string, profile cldr.LanguageMatching) error
- func RenderRuntime(outDir string, input RuntimeInput) error
- func RenderTimeZoneRegistry(path string, registry tzdb.Registry) error
- func RenderUnicodeTypeAliases(path string, aliases []cldr.UnicodeTypeAlias) error
- type ManifestHash
- type ManifestInput
- type RuntimeInput
- type StringRef
- type StringTable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatFile ¶
func RenderLanguageMatchingProfile ¶ added in v0.2.6
func RenderLanguageMatchingProfile(path string, profile cldr.LanguageMatching) error
func RenderRuntime ¶
func RenderRuntime(outDir string, input RuntimeInput) error
func RenderTimeZoneRegistry ¶ added in v0.2.6
func RenderUnicodeTypeAliases ¶ added in v0.2.6
func RenderUnicodeTypeAliases(path string, aliases []cldr.UnicodeTypeAlias) error
Types ¶
type ManifestHash ¶
type ManifestInput ¶
type RuntimeInput ¶
type RuntimeInput struct {
Manifest ManifestInput
Locales extract.Locales
ScriptDirections map[string]bool
Numbers extract.Numbers
Currencies extract.CurrencyData
Dates extract.Dates
Preferences cldr.PreferenceData
Metazones extract.Metazones
Units extract.Units
ListPatterns extract.ListPatterns
RelativeTime extract.RelativeTimeFields
DisplayNames extract.DisplayNames
}
type StringTable ¶
type StringTable struct {
// contains filtered or unexported fields
}
func NewStringTable ¶
func NewStringTable() *StringTable
func (*StringTable) Add ¶
func (t *StringTable) Add(s string) StringRef
func (*StringTable) EmitDataConst ¶ added in v0.2.6
func (t *StringTable) EmitDataConst(w io.Writer, name string) error
EmitDataConst writes only the string table body as a chunked const with the given name. It emits no package clause, type, or method: the caller owns those. This is the const-only payload form a domain data.go uses, where the sliceRef type and string() method live in the hand-written decode.go instead.
Source Files
¶
- currency_encode.go
- date_encode.go
- displaynames_encode.go
- domain.go
- encoder.go
- format.go
- language_matching.go
- list_encode.go
- locale_encode.go
- locale_leaf.go
- manifest.go
- number_encode.go
- numbers.go
- payload.go
- relativetime_encode.go
- render.go
- stringtable.go
- timezone_encode.go
- timezone_registry.go
- unicode_alias.go
- unit_encode.go
Click to show internal directories.
Click to hide internal directories.