Example #1
0
func printObject(title string, v interface{}) {
	if v == nil {
		return
	}

	data, _ := env_json.MarshalIndent(v, "", "    ")

	fmt.Println(title+":\n", string(data))
}
Example #2
0
func (p *runtimeConfig) Serialize() (str string, err error) {
	var data []byte
	if data, err = env_json.MarshalIndent(p, "", "    "); err != nil {
		return
	}

	str = string(data)

	return
}
Example #3
0
func (p Options) Serialize() (str string, err error) {
	var data []byte
	if data, err = env_json.MarshalIndent(&p, "", "    "); err != nil {
		return
	}

	str = string(data)

	return
}