setting

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: GPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Setting

type Setting struct {
	// contains filtered or unexported fields
}

func NewSetting

func NewSetting(configName, configType string, configPaths ...string) (*Setting, error)

NewSetting 初始化本项目的配置的基础属性 设定配置文件的名称为 config,配置类型为 yaml,并且设置其配置路径为相对路径 configs/

func (*Setting) ReadSection

func (s *Setting) ReadSection(k string, v interface{}) error

ReadSection 绑定配置文件

func (*Setting) ReloadAllSection

func (s *Setting) ReloadAllSection() error

ReloadAllSection 重新读取配置文件

func (*Setting) WatchSettingChange

func (s *Setting) WatchSettingChange()

WatchSettingChange 监听配置文件

Jump to

Keyboard shortcuts

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