MCPcopy Index your code
hub / github.com/docker/cli / convertNetworks

Function convertNetworks

cli/command/service/opts.go:425–436  ·  view source on GitHub ↗
(networks opts.NetworkOpt)

Source from the content-addressed store, hash-verified

423}
424
425func convertNetworks(networks opts.NetworkOpt) []swarm.NetworkAttachmentConfig {
426 nws := networks.Value()
427 netAttach := make([]swarm.NetworkAttachmentConfig, 0, len(nws))
428 for _, net := range nws {
429 netAttach = append(netAttach, swarm.NetworkAttachmentConfig{
430 Target: net.Target,
431 Aliases: net.Aliases,
432 DriverOpts: net.DriverOpts,
433 })
434 }
435 return netAttach
436}
437
438type endpointOptions struct {
439 mode string

Callers 2

updateNetworksFunction · 0.85
ToServiceMethod · 0.85

Calls 1

ValueMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…