configfile

package
v1.8.3 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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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