jconfig: stathat.com/c/jconfig Index | Files

package jconfig

import "stathat.com/c/jconfig"

The jconfig package provides a simple, basic configuration file parser using JSON.

Index

Package Files

config.go

type Config Uses

type Config struct {
    // contains filtered or unexported fields
}

func LoadConfig Uses

func LoadConfig(filename string) *Config

Loads config information from a JSON file

func LoadConfigString Uses

func LoadConfigString(s string) *Config

Loads config information from a JSON string

func (*Config) GetArray Uses

func (c *Config) GetArray(key string) []interface{}

Returns an array for the config variable key

func (*Config) GetBool Uses

func (c *Config) GetBool(key string) bool

Returns a bool for the config variable key

func (*Config) GetFloat Uses

func (c *Config) GetFloat(key string) float64

Returns a float for the config variable key

func (*Config) GetInt Uses

func (c *Config) GetInt(key string) int

Returns an int for the config variable key

func (*Config) GetMap Uses

func (c *Config) GetMap(key string) map[string]interface{}

Returns an map for the config variable key

func (*Config) GetString Uses

func (c *Config) GetString(key string) string

Returns a string for the config variable key

func (*Config) LoadMerge Uses

func (c *Config) LoadMerge(filename string)

func (*Config) StringMerge Uses

func (c *Config) StringMerge(s string)

Package jconfig imports 4 packages (graph) and is imported by 3 packages. Updated 2016-07-14. Refresh now. Tools for package owners.