diff --git a/api/config/v1/config.go b/api/config/v1/config.go index 0ab9531d1..0af2c8125 100644 --- a/api/config/v1/config.go +++ b/api/config/v1/config.go @@ -97,13 +97,9 @@ func DisableResourceNamingInConfig(logger logger, config *Config) { config.Resources.MIGs = nil // Disable renaming / device selection in Sharing.TimeSlicing.Resources - if (config.sharing.TimeSlicing != nil) { - config.Sharing.TimeSlicing.disableResoureRenaming(logger, "timeSlicing") - } + config.Sharing.TimeSlicing.disableResoureRenaming(logger, "timeSlicing") // Disable renaming / device selection in Sharing.MPS.Resources - if (config.Sharing.MPS != nil) { - config.Sharing.MPS.disableResoureRenaming(logger, "mps") - } + config.Sharing.MPS.disableResoureRenaming(logger, "mps") } // parseConfig parses a config file as either YAML of JSON and unmarshals it into a Config struct. diff --git a/api/config/v1/sharing.go b/api/config/v1/sharing.go index e084f67a3..ab7681124 100644 --- a/api/config/v1/sharing.go +++ b/api/config/v1/sharing.go @@ -38,7 +38,7 @@ func (s *Sharing) SharingStrategy() SharingStrategy { return SharingStrategyMPS } - if s.TimeSlicing != nil && s.TimeSlicing.isReplicated() { + if s.TimeSlicing.isReplicated() { return SharingStrategyTimeSlicing } return SharingStrategyNone