Documentation
¶
Index ¶
- Variables
- func Load(root string) error
- func RegisterWidget(path, name string)
- func Replace(value *string) bool
- type Dict
- func (dict *Dict) Apply(lang Lang)
- func (dict *Dict) AsDefault() *Dict
- func (dict *Dict) Merge(new *Dict)
- func (dict *Dict) Replace(names []string, value *string) bool
- func (dict *Dict) ReplaceAll(widgets []string, ptr interface{}) error
- func (dict *Dict) ReplaceClone(widgets []string, input interface{}) (interface{}, error)
- func (dict *Dict) ReplaceMatch(names []string, value *string) bool
- type Lang
- type Words
Constants ¶
This section is empty.
Variables ¶
View Source
var Dicts = map[string]*Dict{}
Dicts the dictionaries loaded
View Source
var Widgets = map[string]string{
"models": "model",
"flows": "flow",
"apis": "api",
}
Widgets build-in widgets path mapping
Functions ¶
func RegisterWidget ¶ added in v0.10.2
func RegisterWidget(path, name string)
RegisterWidget Register the path of widget
Types ¶
type Dict ¶ added in v0.10.2
Dict the language dictionary
Default the default language
func (*Dict) Apply ¶ added in v0.10.2
Apply Replace the words in the dictionary if was replaced return true else return false
func (*Dict) Replace ¶ added in v0.10.2
Replace replace the value in the dictionary if was replaced return true else return false
func (*Dict) ReplaceAll ¶ added in v0.10.2
ReplaceAll replace the value in dictionary
func (*Dict) ReplaceClone ¶ added in v0.10.2
ReplaceClone replace the value in dictionary
Click to show internal directories.
Click to hide internal directories.