diff --git a/cmd/terraform-demux/main.go b/cmd/terraform-demux/main.go index 73227f6..39b9816 100644 --- a/cmd/terraform-demux/main.go +++ b/cmd/terraform-demux/main.go @@ -1,7 +1,7 @@ package main import ( - "io/ioutil" + "io" "log" "os" "runtime" @@ -15,7 +15,7 @@ var ( func main() { if os.Getenv("TF_DEMUX_LOG") == "" { - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) } arch := os.Getenv("TF_DEMUX_ARCH") diff --git a/internal/releaseapi/client.go b/internal/releaseapi/client.go index 947dc23..9a54768 100644 --- a/internal/releaseapi/client.go +++ b/internal/releaseapi/client.go @@ -7,7 +7,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "log" "net/http" "os" @@ -246,7 +245,7 @@ func (c *Client) downloadReleaseArchive(build Build) (*os.File, int64, error) { return nil, 0, errors.Errorf("unexpected status code '%s' in response", response.StatusCode) } - tmp, err := ioutil.TempFile("", filepath.Base(build.URL)) + tmp, err := os.CreateTemp("", filepath.Base(build.URL)) if err != nil { return nil, 0, errors.Wrap(err, "could not create temporary file for release archive")