Documentation ¶
Overview ¶
Package serialize 提供对 message 包的序列化操作
Index ¶
- func LoadFS(fsys fs.FS, name string, u UnmarshalFunc) (*message.Language, error)
- func LoadFSGlob(s Search, glob string, fsys ...fs.FS) ([]*message.Language, error)
- func LoadFile(path string, u UnmarshalFunc) (*message.Language, error)
- func LoadGlob(s Search, glob string) ([]*message.Language, error)
- func Marshal(l *message.Language, f MarshalFunc) ([]byte, error)
- func SaveFile(l *message.Language, path string, f MarshalFunc, mode fs.FileMode) error
- func SaveFiles(langs []*message.Language, dir, ext string, f MarshalFunc, mode fs.FileMode) error
- func Unmarshal(data []byte, u UnmarshalFunc) (*message.Language, error)
- type MarshalFunc
- type Search
- type UnmarshalFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Marshal ¶
func Marshal(l *message.Language, f MarshalFunc) ([]byte, error)
Marshal 将 l 转换为 []byte
Types ¶
type MarshalFunc ¶
type UnmarshalFunc ¶
Click to show internal directories.
Click to hide internal directories.