msg

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAll

func GetAll() map[string]Message

GetAll exported

func Init

func Init(m []Message) (err error)

Init exported

Types

type Message

type Message struct {
	Key   string
	Msg   string
	Args  []interface{}
	Field string
}

Message exported

func Get

func Get(key string) Message

Get exported

func New

func New(k string, m string) Message

New exported

func (*Message) Copy added in v0.2.0

func (m *Message) Copy(msn Message)

Error exported

func (*Message) Error

func (m *Message) Error() string

Error exported

func (Message) M2E

func (m Message) M2E() *Message

M2E exported

func (Message) SetArgs

func (m Message) SetArgs(args ...interface{}) Message

SetArgs exported

func (Message) SetField

func (m Message) SetField(field string) Message

SetField exported

func (Message) String

func (m Message) String() string

String exported

type MessageList

type MessageList []Message

MessageList exported

func ValidationErrors added in v0.2.0

func ValidationErrors(err error) (ml MessageList)

Return a validation errors list

func (MessageList) Error

func (ml MessageList) Error() string

Error exported

Jump to

Keyboard shortcuts

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