Documentation
¶
Overview ¶
Package files 配置文件管理
Index ¶
- func LoadLocales(f *Files, b *catalog.Builder, fsys fs.FS, glob string) error
- type FileSerializer
- type Files
- func (f *Files) Add(m MarshalFunc, u UnmarshalFunc, ext ...string)
- func (f *Files) Delete(ext ...string)
- func (f *Files) Len() int
- func (f *Files) Load(fsys fs.FS, name string, v any) error
- func (f *Files) Save(path string, v any) error
- func (f *Files) Set(ext string, m MarshalFunc, u UnmarshalFunc)
- type MarshalFunc
- type UnmarshalFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileSerializer ¶
type FileSerializer struct { Marshal MarshalFunc Unmarshal UnmarshalFunc }
type Files ¶
type Files struct {
// contains filtered or unexported fields
}
Files 配置文件管理
func (*Files) Add ¶
func (f *Files) Add(m MarshalFunc, u UnmarshalFunc, ext ...string)
Add 添加新的序列方法
ext 为文件扩展名,需要带 . 符号;
type MarshalFunc ¶
type UnmarshalFunc ¶
Click to show internal directories.
Click to hide internal directories.