confx

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

* @Author: cnzf1 * @Date: 2021-12-15 16:01:51 * @LastEditors: cnzf1 * @LastEditTime: 2023-02-28 14:59:46 * @Description: viper解析配置文件

Index

Constants

View Source
const (
	TYPE_JSON = "json"
	TYPE_YAML = "yaml"
	TYPE_TOML = "toml"
	TYPE_INI  = "ini"
)

Variables

This section is empty.

Functions

func OnConfigChanged

func OnConfigChanged(f func())

func Parse

func Parse(target interface{}, fullpath string)

Parse support file type:JSON, TOML, YAML, INI

func ParseStr

func ParseStr(content []byte, typo TYPE, target interface{})

ParseStr support content type:JSON, TOML, YAML, INI

Types

type TYPE

type TYPE string

Jump to

Keyboard shortcuts

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