tools

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deref

func Deref[T any](p *T) T

Deref safely returns the value pointed to by p, or the zero value if p is nil.

Types

type LocalizedString

type LocalizedString struct {
	// contains filtered or unexported fields
}

func NewLocalizedString

func NewLocalizedString(value interface{}) (LocalizedString, error)

func (LocalizedString) GetMulti

func (s LocalizedString) GetMulti() (MultiLangString, bool)

func (LocalizedString) GetPlain

func (s LocalizedString) GetPlain() (string, bool)

func (LocalizedString) IsMulti

func (s LocalizedString) IsMulti() bool

func (LocalizedString) IsPlain

func (s LocalizedString) IsPlain() bool

func (LocalizedString) Type

type LocalizedStringType

type LocalizedStringType string
const (
	LocalizedStringTypePlain LocalizedStringType = "plain"
	LocalizedStringTypeMulti LocalizedStringType = "multi"
)

type MultiLangString

type MultiLangString map[string]string

Jump to

Keyboard shortcuts

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