Commit Graph

3 Commits

Author SHA1 Message Date
刘小乐
cd2ac648ff
Fix read yaml config from memory
package main

import (
	"fmt"

	"github.com/micro/go-micro/config"
	"github.com/micro/go-micro/config/source/memory"
)

var configData = []byte(`
---
a: 1234
`)

func main() {
	memorySource := memory.NewSource(
		memory.WithYAML(configData),
	)
	// Create new config
	conf := config.NewConfig()

	// Load file source
	conf.Load(memorySource)

	fmt.Println(string(conf.Bytes()))
}
2019-08-11 18:05:35 +08:00
Asim Aslam
a2fbf19341 Move sync deps, change uuid to google and update go.mod 2019-06-07 13:53:42 +01:00
Asim Aslam
5e6491b7b0 add config 2019-05-30 23:11:13 +01:00