profile

package module
v0.0.0-...-9e740bb Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: BSD-2-Clause Imports: 2 Imported by: 0

README

profile

The profile is go configuration module. It is:

  • Simple

  • Winbase api style, like GetProfileString, GetProfileInt ...

  • Stored in JSON, INI, TOML format.

  • Overridable by environment variable and arguments.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DELIMITER = config.DELIMITER

Functions

This section is empty.

Types

type Profile

type Profile struct {
	*config.Config
	// contains filtered or unexported fields
}

func New

func New(dsn string, section string) (*Profile, error)

func (*Profile) GetBool

func (pf *Profile) GetBool(key string, bDefault bool) bool

func (*Profile) GetInt

func (pf *Profile) GetInt(key string, nDefault int) int

func (*Profile) GetInt64

func (pf *Profile) GetInt64(key string, nDefault int64) int64

func (*Profile) GetString

func (pf *Profile) GetString(key string, sDefault string) string

func (*Profile) HasKey

func (pf *Profile) HasKey(key string) (interface{}, bool)

func (*Profile) WithSection

func (pf *Profile) WithSection(section string) *Profile

func (*Profile) WriteBool

func (pf *Profile) WriteBool(key string, b bool)

func (*Profile) WriteInt

func (pf *Profile) WriteInt(key string, n int)

func (*Profile) WriteInt64

func (pf *Profile) WriteInt64(key string, n int64)

func (*Profile) WriteString

func (pf *Profile) WriteString(key string, str string)

func (*Profile) WriteValue

func (pf *Profile) WriteValue(key string, v any)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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