ini

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mode

type Mode int
const (
	ModeNormal Mode = iota
	ModeUppercase
	ModeLowercase
)

type Provider

type Provider struct {
	// SectionMode and KeyMode determine weather the section and key parameters
	// should be automatically converted to lower or upper case.
	// Normally SectionMode should be ModeLowercase and KeyMode should be ModeUppercase.
	SectionMode, KeyMode Mode
	// contains filtered or unexported fields
}

func New

func New(source interface{}) (*Provider, error)

New returns new ini provider instance with specified ini config source.

func (*Provider) GetBool

func (p *Provider) GetBool(_, section, name string) (bool, error)

GetBool gets bool from ini file for specified parameters.

func (*Provider) GetFloat

func (p *Provider) GetFloat(_, section, name string) (float64, error)

GetFloat gets float from ini file for specified parameters.

func (*Provider) GetInt

func (p *Provider) GetInt(_, section, name string) (int, error)

GetInt gets int from ini file for specified parameters.

func (*Provider) GetString

func (p *Provider) GetString(_, section, name string) (string, error)

GetString gets string from ini file for specified parameters.

Jump to

Keyboard shortcuts

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