forked from Silverfish/proton-bridge
Other: Add v2 to module name
This commit is contained in:
4
internal/config/cache/cache.go
vendored
4
internal/config/cache/cache.go
vendored
@ -22,7 +22,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/ProtonMail/proton-bridge/pkg/files"
|
||||
"github.com/ProtonMail/proton-bridge/v2/pkg/files"
|
||||
)
|
||||
|
||||
type Cache struct {
|
||||
@ -30,7 +30,7 @@ type Cache struct {
|
||||
}
|
||||
|
||||
func New(dir, version string) (*Cache, error) {
|
||||
if err := os.MkdirAll(filepath.Join(dir, version), 0700); err != nil {
|
||||
if err := os.MkdirAll(filepath.Join(dir, version), 0o700); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
2
internal/config/cache/cache_test.go
vendored
2
internal/config/cache/cache_test.go
vendored
@ -61,7 +61,7 @@ func TestRemoveOldVersions(t *testing.T) {
|
||||
|
||||
func createFilesInDir(t *testing.T, dir string, files ...string) {
|
||||
for _, target := range files {
|
||||
require.NoError(t, os.MkdirAll(filepath.Dir(filepath.Join(dir, target)), 0700))
|
||||
require.NoError(t, os.MkdirAll(filepath.Dir(filepath.Join(dir, target)), 0o700))
|
||||
|
||||
f, err := os.Create(filepath.Join(dir, target))
|
||||
require.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user