env

package
v1.3.10 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRootMapValue

func GetRootMapValue() map[interface{}]interface{}

Get the value from root for map

func GetRootValue

func GetRootValue() interface{}

Get the value from root

func GetValue

func GetValue(path string) (interface{}, error)

Get the value by path like below file.yaml test: test test2:

test3: test333

/ GetValue("test2.test3") ===> test333

func LoadEnvConfig

func LoadEnvConfig(file string, mode string) error

load configuration file

Types

type EnvConfig

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

func (*EnvConfig) GetRootValue

func (p *EnvConfig) GetRootValue() interface{}

func (*EnvConfig) MergeData

func (p *EnvConfig) MergeData(data any) interface{}

func (*EnvConfig) SetData

func (p *EnvConfig) SetData(data any)

func (*EnvConfig) SetEnv

func (p *EnvConfig) SetEnv(mode string)

Jump to

Keyboard shortcuts

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