cfg

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IniCfg

type IniCfg struct {
	Filename string
	Sections map[string]*tsection
}

func NewIniCfg

func NewIniCfg(fname string) (*IniCfg, error)

创建IniCfg对象

func (*IniCfg) ReadInt

func (t *IniCfg) ReadInt(sectionname string, keyname string, defaultval int) int

func (*IniCfg) ReadString

func (t *IniCfg) ReadString(sectionname string, keyname string, defaultval string) string

获取配置

func (*IniCfg) Save

func (t *IniCfg) Save() error

保存Cfg文件

func (*IniCfg) WriteInt

func (t *IniCfg) WriteInt(sectionname string, keyname string, val int) error

保存配置

func (*IniCfg) WriteString

func (t *IniCfg) WriteString(sectionname string, keyname string, val string) error

Jump to

Keyboard shortcuts

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