errori18n

package
v0.0.0-...-83019ed Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLanguage

func SetLanguage(code LangCode)

Types

type Error

type Error struct {
	ErrorCode ErrorCode
	// contains filtered or unexported fields
}

func Errorf

func Errorf(code ErrorCode, args ...interface{}) *Error

func (*Error) String

func (e *Error) String() string

type ErrorCode

type ErrorCode string
const (
	ERR_UNKNOWN        ErrorCode = "ERR_UNKNOWN"
	ERR_SIMPLE         ErrorCode = "ERR_SIMPLE"
	ERR_VARIADIC       ErrorCode = "ERR_VARIADIC"
	ERR_DIVIDE_BY_ZERO ErrorCode = "ERR_DIVIDE_BY_ZERO"
)

Auto-generated using `go run errori18n/codesgen.go`. Please do not edit this file.

func (ErrorCode) String

func (e ErrorCode) String() string

type LangCode

type LangCode uint32
const (
	LANG_UNKNOWN LangCode = iota
	LANG_EN
	LANG_DE
)

func (LangCode) String

func (l LangCode) String() string

Jump to

Keyboard shortcuts

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