1
0
mirror of https://github.com/rancher/os.git synced 2025-09-06 01:01:43 +00:00

Move around code for better clarity

This commit is contained in:
Darren Shepherd
2018-09-15 21:55:26 -07:00
committed by niusmallnan
parent 2f50b7b178
commit 1f50386828
112 changed files with 992 additions and 859 deletions

22
pkg/init/debug/debug.go Normal file
View File

@@ -0,0 +1,22 @@
package debug
import (
"github.com/rancher/os/config"
"github.com/rancher/os/pkg/log"
)
func PrintAndLoadConfig(_ *config.CloudConfig) (*config.CloudConfig, error) {
PrintConfig()
cfg := config.LoadConfig()
return cfg, nil
}
func PrintConfig() {
cfgString, err := config.Export(false, true)
if err != nil {
log.WithFields(log.Fields{"err": err}).Error("Error serializing config")
} else {
log.Debugf("Config: %s", cfgString)
}
}