config

package module
v0.0.0-...-aacfeb9 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2017 License: MIT Imports: 5 Imported by: 3

README

config

A configuration layer based on revel project

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Pwd          string
	Filename     string
	IsProduction bool
	// contains filtered or unexported fields
}

Config struct provide access to configuration files

func NewConfig

func NewConfig(cfgfile ...string) (config *Config, err error)

NewConfig creates a new configuration struct

func (*Config) Database

func (c *Config) Database(property string) (result string)

Database gets any database configuration property

func (*Config) Default

func (c *Config) Default(property string) (result string)

Default gets any configuration property from default section

func (*Config) File

func (c *Config) File() (file string)

File gets absolute configuration path

func (*Config) Property

func (c *Config) Property(section string, property string) (result string, err error)

Property gets any section configuration property

Jump to

Keyboard shortcuts

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