update golangci-lint and replace deprecated calls to io/ioutil

This commit is contained in:
Markus Muellner
2022-09-22 17:18:14 +02:00
committed by Benj Fassbind
parent 71fd730598
commit 352f4e8772
23 changed files with 30 additions and 52 deletions

View File

@@ -2,7 +2,6 @@ package utils
import (
"fmt"
"io/ioutil"
"log"
"os"
"testing"
@@ -22,7 +21,7 @@ type UtilsSuite struct {
var _ = Suite(&UtilsSuite{})
func (s *UtilsSuite) SetUpSuite(c *C) {
s.tempfile, _ = ioutil.TempFile(c.MkDir(), "aptly-test-inaccessible")
s.tempfile, _ = os.CreateTemp(c.MkDir(), "aptly-test-inaccessible")
if err := os.Chmod(s.tempfile.Name(), 0000); err != nil {
log.Fatalln(err)
}