config

package
v1.0.1010 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

*

  • 配置 *
  • @create 2021-8-1
  • @author deatil

func New

func New(data map[string]any) Config

*

  • 构造函数

func (Config) Get

func (this Config) Get(key string, defaults ...any) any

*

  • 获取一个带默认的值

func (Config) Has

func (this Config) Has(key string) bool

*

  • 是否存在

func (Config) Set

func (this Config) Set(key string, value any) interfaces.Config

*

  • 设置单个新数据

func (Config) With

func (this Config) With(data map[string]any) interfaces.Config

*

  • 覆盖旧数据

Jump to

Keyboard shortcuts

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