mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
daemon: remove Daemon.children(), Daemon.parents() wrappers
Remove the wrappers to make it more explicit that these are related to the legacy links feature. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -99,7 +99,8 @@ func (daemon *Daemon) getInspectData(daemonCfg *config.Config, container *contai
|
||||
// make a copy to play with
|
||||
hostConfig := *container.HostConfig
|
||||
|
||||
children := daemon.children(container)
|
||||
// Add information for legacy links
|
||||
children := daemon.linkIndex.children(container)
|
||||
hostConfig.Links = nil // do not expose the internal structure
|
||||
for linkAlias, child := range children {
|
||||
hostConfig.Links = append(hostConfig.Links, fmt.Sprintf("%s:%s", child.Name, linkAlias))
|
||||
|
||||
Reference in New Issue
Block a user