1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-06-23 00:40:06 +02:00

refactor: use os and io packages intead of ioutil when possible (#2189)

This commit is contained in:
Carlos Alexandro Becker
2021-04-25 13:00:51 -03:00
committed by GitHub
parent 95bef19280
commit 5866b9cb63
31 changed files with 112 additions and 128 deletions

View File

@ -3,8 +3,8 @@ package blob
import (
"fmt"
"io"
"io/ioutil"
"net/url"
"os"
"path"
"github.com/apex/log"
@ -166,7 +166,7 @@ func newUploader(ctx *context.Context) uploader {
}
func getData(ctx *context.Context, conf config.Blob, path string) ([]byte, error) {
data, err := ioutil.ReadFile(path)
data, err := os.ReadFile(path)
if err != nil {
return data, fmt.Errorf("failed to open file %s: %w", path, err)
}