Documentation
¶
Overview ¶
* @Author: NyanCatda * @Date: 2022-03-23 21:01:14 * @LastEditTime: 2022-03-23 21:41:50 * @LastEditors: NyanCatda * @Description: 读取配置项 * @FilePath: \Momizi\Internal\Plugin\JavaScript\Tools\Config\Config.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PluginPath = Controller.PluginPath + "/"
Functions ¶
func RegistrationFunction ¶
*
- @description: 注册配置文件函数
- @param {*goja.Runtime} VM 实例
- @return {error} 错误信息
Types ¶
type Config ¶
func (Config) Delete ¶
func (Config Config) Delete(Conf *JsonConfig.Config, Name string) bool
*
- @description: 删除配置项
- @param {string} Path 配置文件路径
- @param {map[string]any} Default 默认配置
- @param {string} Name 配置项名称
- @return {bool} 是否删除成功
func (Config) Get ¶
func (Config Config) Get(Conf *JsonConfig.Config, Name string) any
*
- @description: 读取配置项
- @param {string} Path 配置文件路径
- @param {map[string]any} Default 默认配置
- @param {string} Name 配置项名称
- @return {*}
Click to show internal directories.
Click to hide internal directories.