Package implements read operations of .properties source.
The Goproperties API reference is available on GoDoc.
Install Goproperties using the go get
command:
go get -u github.com/dmotylev/goproperties
Example:
package main
import "github.com/dmotylev/goproperties"
func main() {
p, _ := properties.Load("credentials")
username := p.String("username","demo")
password := p.String("password","demo")
// ... use given credentials
_, _ = username, password
}
Look at properties_test.go for more usage hints.
The main part depends on the Go distribution only.
The test part depends on gocheck package.
Use following go get
command to install test dependencies:
go get -u launchpad.net/gocheck
For the license see LICENSE.