conf

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package conf ******************************************************************************

  • @DESC 配置文件操作
  • @AUTH Neo
  • @DATE 2022-03-14
  • @CHANGE LOGS
  • DATE CHANGER DETAIL *****************************************************************************

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FillConfigStruct

func FillConfigStruct(v any, section string) error

FillConfigStruct ******************************************************************************

  • @DESC 反射结构体字段,根据字段名读取配置文件信息,由参数v引用返回
  • @PARAMS v any 配置信息结构
  • section string 配置文件节点
  • @RETURN
  • @AUTH Neo
  • @DATE 2022-03-14
  • @CHANGE LOGS
  • DATE CHANGER DETAIL *****************************************************************************

func FillConfigStructWithExcept added in v0.0.2

func FillConfigStructWithExcept(v any, section string, exceptKeys []string) (err error)

FillConfigStructWithExcept ******************************************************************************

  • @DESC 反射结构体字段,根据字段名读取配置文件信息,由参数v引用返回。可排除不读取的项
  • 由于Beego提供的配置文件读取方法中只有基本的类型,特殊类型的要排除,单独处理
  • @PARAMS v any 配置信息结构
  • section string 配置文件节点
  • exceptKeys []string 指定不读取的配置项
  • @RETURN
  • @AUTH Neo
  • @DATE 2022-03-14
  • @CHANGE LOGS
  • DATE CHANGER DETAIL *****************************************************************************

Types

This section is empty.

Jump to

Keyboard shortcuts

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