config/utils.go
func Get(source interface{}, environment string, configEnv Environment) (conf interface{}, err error) {
	if filename, ok := source.(string); ok {
		source, err = ioutil.ReadFile(filename)
		if err != nil {
			log.Printf("Fatal: %v", err)
			return
		}
	}

	err = yaml.Unmarshal(source.([]byte), configEnv)
	if err != nil {
		log.Printf("Fatal: bad config : %v", err)
		return
	}

	conf = configEnv.GetEnvironment(environment)
	if conf == nil {
		err = errors.New("No configuration")
		return
	}
	return
}
func Get(source interface{}, environment string, configEnv Environment) (conf interface{}, err error) {
	if filename, ok := source.(string); ok {
		source, err = ioutil.ReadFile(filename)
		if err != nil {
			log.Printf("Fatal: %v", err)
			return
		}
	}

	err = yaml.Unmarshal(source.([]byte), configEnv)
	if err != nil {
		log.Printf("Fatal: bad config : %v", err)
		return
	}

	conf = configEnv.GetEnvironment(environment)
	if conf == nil {
		err = errors.New("No configuration")
		return
	}
	return
}
// Get a config