config

package module
v0.0.0-...-249f36a Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2014 License: MIT Imports: 4 Imported by: 0

README

go-config

A go package for parsing JSON config file.

Features

  • Parsing JSON config file.
  • Config with default value.

Installation

$ go get github.com/monochromegane/go-config

Usage

This package uses struct for storing parsed JSON config data.

type Config struct {
	Name string `json:"name" default:"default name"`
}
{
  "name": "name"
}

And, you can get config by the following.

var conf Config
config.Parse("config.json", &conf)

Tasks

  • Show config description.
  • Set default value to slice.

Code status

  • Build Status

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(path string, config interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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