config

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

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

Go to latest
Published: Sep 24, 2015 License: BSD-3-Clause Imports: 6 Imported by: 5

README

Configuration file parser

Only support JSON format.

Build Status Coverage GoDoc License

Install

go get github.com/zhgo/config

Copyright 2015 The zhgo Authors. All rights reserved.

Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WorkingDir

func WorkingDir() string

Types

type Config

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

func NewConfig

func NewConfig(p string) *Config

New Config

func (*Config) Load

func (c *Config) Load(p string) error

Load configuration file

func (*Config) Parse

func (c *Config) Parse(j interface{}) error

Configuration parsing

func (*Config) Read

func (c *Config) Read(str string) error

Read from string

func (*Config) Replace

func (c *Config) Replace(r map[string]string) *Config

Jump to

Keyboard shortcuts

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