Skip to content

Commit

Permalink
chore: remove deprecated ioutil package
Browse files Browse the repository at this point in the history
  • Loading branch information
simpsonw committed Jan 11, 2024
1 parent 2177088 commit c619935
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/terraform-demux/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"io/ioutil"
"io"
"log"
"os"
"runtime"
Expand All @@ -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")
Expand Down
3 changes: 1 addition & 2 deletions internal/releaseapi/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit c619935

Please sign in to comment.