setting

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package setting 设置

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
}

Setting 使用viper读取设置信息

func NewSetting

func NewSetting(name, path string) (*Setting, error)

NewSetting 读取配置信息

func (*Setting) ReadSection

func (s *Setting) ReadSection(k string, v any) error

ReadSection 根据给定的建造的写入map section

func (*Setting) ReloadAllSections

func (s *Setting) ReloadAllSections() error

ReloadAllSections 重载所有键值对

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