mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-19 16:46:55 +00:00
Other: Update golangci-lint to v1.50.0
This commit is contained in:
@ -19,7 +19,7 @@ package context
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"runtime/pprof"
|
||||
)
|
||||
|
||||
@ -41,7 +41,7 @@ func (ph *panicHandler) HandlePanic() {
|
||||
|
||||
r := bytes.NewBufferString("")
|
||||
_ = pprof.Lookup("goroutine").WriteTo(r, 2)
|
||||
b, err := ioutil.ReadAll(r)
|
||||
b, err := io.ReadAll(r)
|
||||
ph.t.Errorf("pprof details: %s %s", err, b)
|
||||
|
||||
ph.t.FailNow()
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
package context
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
@ -29,7 +29,7 @@ type fakeCache struct {
|
||||
// newFakeCache creates a temporary folder for files.
|
||||
// It's expected the test calls `ClearData` before finish to remove it from the file system.
|
||||
func newFakeCache() *fakeCache {
|
||||
dir, err := ioutil.TempDir("", "test-cache")
|
||||
dir, err := os.MkdirTemp("", "test-cache")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
package context
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
)
|
||||
|
||||
@ -27,7 +26,7 @@ type fakeLocations struct {
|
||||
}
|
||||
|
||||
func newFakeLocations() *fakeLocations {
|
||||
dir, err := ioutil.TempDir("", "test-cache")
|
||||
dir, err := os.MkdirTemp("", "test-cache")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@ -18,8 +18,8 @@
|
||||
package context
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"math/rand"
|
||||
"os"
|
||||
|
||||
"github.com/ProtonMail/proton-bridge/v2/internal/config/settings"
|
||||
)
|
||||
@ -32,7 +32,7 @@ type fakeSettings struct {
|
||||
// newFakeSettings creates a temporary folder for files.
|
||||
// It's expected the test calls `ClearData` before finish to remove it from the file system.
|
||||
func newFakeSettings() *fakeSettings {
|
||||
dir, err := ioutil.TempDir("", "test-settings")
|
||||
dir, err := os.MkdirTemp("", "test-settings")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user