wip: me lost

This commit is contained in:
Laurence 2024-04-23 13:16:14 +01:00
parent 8e20b9dce6
commit 7c8f671fb1
No known key found for this signature in database
GPG key ID: B053BEE3478E8FEF

View file

@ -91,7 +91,7 @@ func (d *DockerSource) UnmarshalConfig(yamlConfig []byte) error {
return fmt.Errorf("no containers names or containers ID configuration provided")
}
if d.Config.UseContainerLabels && len(d.Config.ContainerName) > 0 || len(d.Config.ContainerID) > 0 || len(d.Config.ContainerIDRegexp) > 0 || len(d.Config.ContainerNameRegexp) > 0 {
if d.Config.UseContainerLabels && (len(d.Config.ContainerName) > 0 || len(d.Config.ContainerID) > 0 || len(d.Config.ContainerIDRegexp) > 0 || len(d.Config.ContainerNameRegexp) > 0) {
return fmt.Errorf("use_container_labels and container_name, container_id, container_id_regexp, container_name_regexp are mutually exclusive")
}