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:
committed by
niusmallnan
parent
2f50b7b178
commit
1f50386828
22
pkg/init/debug/debug.go
Normal file
22
pkg/init/debug/debug.go
Normal 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)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user