Skip to content

Commit 35a947a

Browse files
committed
fix some lint errors
1 parent d3b49db commit 35a947a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

actionsdotnetactcompat/action_cache.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func fetchAction(ctx context.Context, target string, owner string, name string,
9292
cachedTar := filepath.Join(target, owner+"."+name+"."+resolvedSha+".tar")
9393
defer func() {
9494
if reterr != nil {
95-
os.Remove(cachedTar)
95+
_ = os.Remove(cachedTar)
9696
}
9797
}()
9898
if fr, err := os.Open(cachedTar); err == nil {
@@ -105,7 +105,7 @@ func fetchAction(ctx context.Context, target string, owner string, name string,
105105
if logger != nil {
106106
logger.Infof("Downloading action %v/%v (sha:%v) from %v", owner, name, resolvedSha, tarURL)
107107
}
108-
req, err := http.NewRequestWithContext(ctx, http.MethodGet, tarURL, nil)
108+
req, err := http.NewRequestWithContext(ctx, http.MethodGet, tarURL, http.NoBody)
109109
if err != nil {
110110
return "", err
111111
}
@@ -121,8 +121,8 @@ func fetchAction(ctx context.Context, target string, owner string, name string,
121121
defer rsp.Body.Close()
122122
if rsp.StatusCode != http.StatusOK {
123123
buf := &bytes.Buffer{}
124-
io.Copy(buf, rsp.Body)
125-
return "", fmt.Errorf("Failed to download action from %v response %v", tarURL, buf.String())
124+
_, _ = io.Copy(buf, rsp.Body)
125+
return "", fmt.Errorf("failed to download action from %v response %v", tarURL, buf.String())
126126
}
127127
fo, err := os.Create(cachedTar)
128128
if err != nil {

0 commit comments

Comments
 (0)