Skip to content

Commit

Permalink
Refactor: Change function loadNetOpts from public to private in file …
Browse files Browse the repository at this point in the history
…Create.go
  • Loading branch information
motinsa committed Jan 2, 2025
1 parent 842be9a commit c08f852
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/cmd/container/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func Create(ctx context.Context, client *containerd.Client, args []string, netMa
envs = append(envs, "HOSTNAME="+netLabelOpts.Hostname)
opts = append(opts, oci.WithEnv(envs))

internalLabels.LoadNetOpts(netLabelOpts)
internalLabels.loadNetOpts(netLabelOpts)

// NOTE: OCI hooks are currently not supported on Windows so we skip setting them altogether.
// The OCI hooks we define (whose logic can be found in pkg/ocihook) primarily
Expand Down Expand Up @@ -726,8 +726,8 @@ func withInternalLabels(internalLabels internalLabels) (containerd.NewContainerO
return containerd.WithAdditionalContainerLabels(m), nil
}

// LoadNetOpts loads network options into InternalLabels.
func (il *internalLabels) LoadNetOpts(opts types.NetworkOptions) {
// loadNetOpts loads network options into InternalLabels.
func (il *internalLabels) loadNetOpts(opts types.NetworkOptions) {
il.hostname = opts.Hostname
il.ports = opts.PortMappings
il.ipAddress = opts.IPAddress
Expand Down

0 comments on commit c08f852

Please sign in to comment.