fix if cond order

This commit is contained in:
sillyguodong 2023-05-16 11:10:08 +08:00
parent f68a560b32
commit 76633e1836
No known key found for this signature in database
GPG key ID: 4A0646FA86256DF4

View file

@ -107,7 +107,7 @@ func LoadDefault(file string) (*Config, error) {
// but we have to be compatible with it for now.
// rule: if the value of `container.network` is blank and the value of `container.network_mode` is not blank,
// then the value of `container.network` will be set to the value of `container.network_mode`.
if cfg.Container.Network == "" && cfg.Container.NetworkMode != "" {
if cfg.Container.NetworkMode != "" && cfg.Container.Network == "" {
cfg.Container.Network = cfg.Container.NetworkMode
}