Skip to content

Commit

Permalink
Update deprecated API usage
Browse files Browse the repository at this point in the history
  • Loading branch information
slonopotamus committed Mar 14, 2024
1 parent 80b9be1 commit d0aa70a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion containerd/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (d *Driver) parshAuth(auth *RegistryAuth) CredentialsOpt {
func withResolver(creds CredentialsOpt) containerd.RemoteOpt {
resolver := remotesdocker.NewResolver(remotesdocker.ResolverOptions{
Hosts: remotesdocker.ConfigureDefaultRegistries(remotesdocker.WithAuthorizer(
remotesdocker.NewAuthorizer(nil, creds))),
remotesdocker.NewDockerAuthorizer(remotesdocker.WithAuthCreds(creds)))),
})
return containerd.WithResolver(resolver)
}
Expand Down
3 changes: 1 addition & 2 deletions etchosts/etchosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"strings"

Expand Down Expand Up @@ -64,7 +63,7 @@ func BuildEtcHosts(hostsFile string) error {
return err
}
}
return ioutil.WriteFile(hostsFile, content.Bytes(), 0644)
return os.WriteFile(hostsFile, content.Bytes(), 0644)
}

// CopyEtcHosts copies /etc/hosts to NOMAD_TASK_DIR/etc_hosts
Expand Down

0 comments on commit d0aa70a

Please sign in to comment.