Merge pull request #9017 from Juneezee/refactor/redundant-nil-check
Remove redundant nil check
This commit is contained in:
commit
2a806c710a
@ -275,7 +275,6 @@ func (c *container) NewTask(ctx context.Context, ioCreate cio.Creator, opts ...N
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
if info.RootFS != nil {
|
||||
for _, m := range info.RootFS {
|
||||
request.Rootfs = append(request.Rootfs, &types.Mount{
|
||||
Type: m.Type,
|
||||
@ -284,7 +283,6 @@ func (c *container) NewTask(ctx context.Context, ioCreate cio.Creator, opts ...N
|
||||
Options: m.Options,
|
||||
})
|
||||
}
|
||||
}
|
||||
request.RuntimePath = info.RuntimePath
|
||||
if info.Options != nil {
|
||||
o, err := typeurl.MarshalAny(info.Options)
|
||||
|
@ -193,7 +193,6 @@ func ConfigureHosts(ctx context.Context, options HostOptions) docker.RegistryHos
|
||||
}
|
||||
}
|
||||
|
||||
if host.clientPairs != nil {
|
||||
for _, pair := range host.clientPairs {
|
||||
certPEMBlock, err := os.ReadFile(pair[0])
|
||||
if err != nil {
|
||||
@ -216,7 +215,6 @@ func ConfigureHosts(ctx context.Context, options HostOptions) docker.RegistryHos
|
||||
|
||||
tlsConfig.Certificates = append(tlsConfig.Certificates, cert)
|
||||
}
|
||||
}
|
||||
|
||||
c := *client
|
||||
c.Transport = tr
|
||||
|
Loading…
Reference in New Issue
Block a user