Beispiel #1
0
// Config is used to to configure the snap
func (s *SystemImagePart) Config(configuration []byte) (newConfig string, err error) {
	if cfg := string(configuration); cfg != "" {
		return coreconfig.Set(cfg)
	}

	return coreconfig.Get()
}
Beispiel #2
0
// coreConfig configure the OS snap
func coreConfigImpl(configuration []byte) (newConfig string, err error) {
	if cfg := string(configuration); cfg != "" {
		return coreconfig.Set(cfg)
	}

	return coreconfig.Get()
}
Beispiel #3
0
// coreConfig configure the OS snap
func coreConfigImpl(configuration []byte) (newConfig []byte, err error) {
	if len(configuration) > 0 {
		return coreconfig.Set(configuration)
	}

	return coreconfig.Get()
}