config

package
v0.0.0-...-3edccc7 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Confiruration files parser implementation.

Configuration file expected to be a traditional UNIX key-value plain text file. E.g.

foo.bar = "some value" foo.baz = "some another value" bar = 14

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
}

func Parse

func Parse(reader io.Reader) (*Config, error)

func ParseFile

func ParseFile(file string) (*Config, error)

func (*Config) Bool

func (c *Config) Bool(name string, def bool) (bool, error)

func (*Config) Defined

func (c *Config) Defined(name string) bool

func (*Config) Int

func (c *Config) Int(name string, def int) (int, error)

func (*Config) String

func (c *Config) String(name string, def string) string

type Error

type Error struct {
	Line    int
	Message string
}

func (Error) Error

func (err Error) Error() string

Jump to

Keyboard shortcuts

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