adapter

package
v1.0.1006 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPath added in v1.0.1002

func GetPath(name string) []string

获取

Types

type Adapter

type Adapter struct{}

*

  • 适配器 *
  • @create 2021-9-25
  • @author deatil

func (*Adapter) Get

func (this *Adapter) Get(keyName string) any

Get 一个原始值

func (*Adapter) IsSet

func (this *Adapter) IsSet(keyName string) bool

是否设置

func (*Adapter) OnConfigChange

func (this *Adapter) OnConfigChange(f func(string))

事件

func (*Adapter) Set

func (this *Adapter) Set(keyName string, value any)

设置

func (*Adapter) SetDefault

func (this *Adapter) SetDefault(keyName string, value any)

设置默认值

type Path

type Path struct {
	// 路径
	Pathes PathesMap
}

*

  • 配置路径 *
  • @create 2022-1-3
  • @author deatil

func NewPath added in v1.0.1002

func NewPath() *Path

单例

func WithPath added in v1.0.1002

func WithPath(name string, path string) *Path

添加

func (*Path) GetPath

func (this *Path) GetPath(name string) []string

获取

func (*Path) WithPath

func (this *Path) WithPath(name string, path string) *Path

添加

type PathesMap

type PathesMap = map[string][]string

路径类型

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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