mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-19 20:32:35 +02:00
fix: revert isExplicit checking
This commit is contained in:
parent
f762b3e637
commit
98777205a5
1 changed files with 9 additions and 8 deletions
|
@ -52,7 +52,15 @@ type (
|
|||
var DummyContainer = new(Container)
|
||||
|
||||
func FromDocker(c *container.Summary, dockerHost string) (res *Container) {
|
||||
isExplicit := false
|
||||
var isExplicit bool
|
||||
for lbl := range c.Labels {
|
||||
if strings.HasPrefix(lbl, NSProxy+".") {
|
||||
isExplicit = true
|
||||
} else {
|
||||
delete(c.Labels, lbl)
|
||||
}
|
||||
}
|
||||
|
||||
helper := containerHelper{c}
|
||||
res = &Container{
|
||||
DockerHost: dockerHost,
|
||||
|
@ -83,13 +91,6 @@ func FromDocker(c *container.Summary, dockerHost string) (res *Container) {
|
|||
res.setPublicHostname()
|
||||
res.loadDeleteIdlewatcherLabels(helper)
|
||||
|
||||
for lbl := range c.Labels {
|
||||
if strings.HasPrefix(lbl, NSProxy+".") {
|
||||
isExplicit = true
|
||||
} else {
|
||||
delete(c.Labels, lbl)
|
||||
}
|
||||
}
|
||||
res.RouteConfig = utils.FitMap(c.Labels)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue