summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorOleksandr Redko <oleksandr.red+github@gmail.com>2023-02-19 00:43:26 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-03-01 16:28:43 +0100
commitd453c12742e992d672fcf3e61b7a5ed35391c4b0 (patch)
tree1299a1f5a44bda1cf6449a8257f393350b2cc012 /modules
parent97b010f521e592b5fc29daace225476b64543643 (diff)
Replace deprecated ioutil with io and os
https://pkg.go.dev/io/ioutil is deprecated since Go 1.16.
Diffstat (limited to 'modules')
-rw-r--r--modules/client.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/client.go b/modules/client.go
index 953391e59..1fff787d1 100644
--- a/modules/client.go
+++ b/modules/client.go
@@ -20,7 +20,6 @@ import (
"encoding/json"
"fmt"
"io"
- "io/ioutil"
"os"
"os/exec"
"path/filepath"
@@ -443,7 +442,7 @@ func (c *Client) Clean(pattern string) error {
}
func (c *Client) runVerify() error {
- return c.runGo(context.Background(), ioutil.Discard, "mod", "verify")
+ return c.runGo(context.Background(), io.Discard, "mod", "verify")
}
func isProbablyModule(path string) bool {
@@ -458,7 +457,7 @@ func (c *Client) listGoMods() (goModules, error) {
downloadModules := func(modules ...string) error {
args := []string{"mod", "download"}
args = append(args, modules...)
- out := ioutil.Discard
+ out := io.Discard
err := c.runGo(context.Background(), out, args...)
if err != nil {
return fmt.Errorf("failed to download modules: %w", err)