Configu SDK for Go
To install the this package, simply type install configu using go get
:
go get github.com/configu/configu/go
package main
import (
configu "github.com/configu/configu/go"
"fmt"
)
func main() {
store := configu.InMemoryStore{}
set, _ := configu.NewConfigSet("test")
schema, _ := configu.NewConfigSchema("get-started.cfgu.json")
configu.UpsertCommand{
Store: &store,
Set: set,
Schema: schema,
Configs: map[string]string{"GREETING": "hey", "SUBJECT": "configu go SDK"},
}.Run()
config, err := configu.EvalCommand{
Store: &store,
Set: set,
Schema: schema,
}.Run()
if err != nil {
panic(err)
}
fmt.Printf("%v\n", config)
}
[//]: # Link here once we have a reference page.
- Follow the Development section from the
CONTRIBUTING.md
.
cd go
go install
Follow the Sending a Pull Request section from the CONTRIBUTING.md
.