// unmarshalConfig creates a MHConfigFile struct from MH_CONFIG
unmarshalConfig creates a MHConfigFile struct from MH_CONFIG
// unmarshalConfig creates a MHConfigFile struct from MH_CONFIG
func unmarshalConfig(logger *logrus.Entry) lib.MHConfigFile {
	mhConfigFile := lib.MHConfigFile{}
	if err := viper.Unmarshal(&mhConfigFile); err != nil {
		logger.WithField("error", err).Fatal("Failed to unmarshal mh configuration file")
	}
	if mhConfigFile.TargetContext != "" {
		logger.Warn("Top-level configuration is deprecated, move to the 'mh' key")
		mhConfigFile.MH.TargetContext = mhConfigFile.TargetContext
	}
	logger = logger.WithField("configFile", viper.ConfigFileUsed())
	return mhConfigFile
}
func unmarshalConfig ( logger * logrus . Entry ) lib . MHConfigFile { mhConfigFile := lib . MHConfigFile { } if err := viper . Unmarshal ( & mhConfigFile ) ; err != nil { logger . WithField ( " " , err ) . Fatal ( " " ) } if mhConfigFile . TargetContext != " " { logger . Warn ( " " ) mhConfigFile . MH . TargetContext = mhConfigFile . TargetContext } logger = logger . WithField ( " " , viper . ConfigFileUsed ( ) ) return mhConfigFile }
unmarshalConfig creates a MHConfigFile struct from MH_CONFIG
unmarshalConfig creates a MHConfigFile struct from MH_CONFIG
// Check top-level targetContext for backwards compatibility