config

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

* @Descripttion: 配置解析器 * @version: * @Author: lfzxs@qq.com * @Date: 2023-06-19 10:22:18 * @LastEditors: lfzxs@qq.com * @LastEditTime: 2023-06-21 14:11:42

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type YamlConfig

type YamlConfig struct {
	Data     map[string]any
	Loader   loader.LoaderService
	Resolver resolver.ResolverService
	URI      string
}

func DefaultConfig

func DefaultConfig() *YamlConfig

func FromFile

func FromFile(filePath string) (cfg YamlConfig, err error)

func FromFolders

func FromFolders(fileName string, searchFolds ...string) (cfg YamlConfig, err error)

func (*YamlConfig) Build

func (sf *YamlConfig) Build(env ...map[string]any)

构建配置对象

func (*YamlConfig) GetValue

func (sf *YamlConfig) GetValue(name string) any

获取配置值

Jump to

Keyboard shortcuts

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