You've already forked goreleaser
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:
committed by
GitHub
parent
95bef19280
commit
5866b9cb63
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user