Skip to content

Latest commit

 

History

History
 
 

go

@configu/go

Configu SDK for Go

Install

To install the this package, simply type install configu using go get:

go get github.com/configu/configu/go

Usage

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)
}

Reference

[//]: # Link here once we have a reference page.

Contributing

Requirements

  1. Follow the Development section from the CONTRIBUTING.md.

Setup

cd go
go install

Contribute

Follow the Sending a Pull Request section from the CONTRIBUTING.md.