qconfig

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadFromToml

func LoadFromToml(path string, config interface{}) error

LoadFromToml

@Description: 通过toml文件加载配置,支持描述输出,需要在指定的属性后面增加如下tag
                字段名1 `comment:"描述"`
                字段名2 `comment:"描述"`
@param path 配置文件路径 xxx.toml
@param config 配置结构体
@return error

func OnlyLoadFromToml

func OnlyLoadFromToml(path string, config interface{}) error

OnlyLoadFromToml

@Description: (仅加载) 通过toml文件加载配置,支持描述输出,需要在指定的属性后面增加如下tag
                字段名1 `comment:"描述"`
                字段名2 `comment:"描述"`
@param path 配置文件路径 xxx.toml
@param config 配置结构体
@return error

func SaveFromToml

func SaveFromToml(path string, config interface{}) error

SaveFromToml

@Description: 保存到Toml文件
@param path 配置文件路径 xxx.toml
@param config 配置结构体
@return error

Types

This section is empty.

Jump to

Keyboard shortcuts

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