configfile

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 0 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
}

Config 配置项集合

func Parse

func Parse(data []byte) *Config

Parse : 解析conf 文件, 变量使用key=value方式

func (*Config) Session

func (c *Config) Session(sessionName string) map[string]*Value

Session 取配置项中指定名字的Session

type Value

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

Value 配置项值

func (*Value) ArrayCount

func (v *Value) ArrayCount() int

ArrayCount 读取配置项Array的count (如果是Array)

func (*Value) Get

func (v *Value) Get() string

Get 读取配置项值 : string

func (*Value) GetArrayItem

func (v *Value) GetArrayItem(index int) *Value

GetArrayItem 取Array子项

func (*Value) IsArray

func (v *Value) IsArray() bool

IsArray 配置项值是否是一个Array

Jump to

Keyboard shortcuts

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