Other: Add v2 to module name

This commit is contained in:
James Houlahan
2022-05-31 15:54:04 +02:00
parent 098956b81a
commit 4edf2eb92c
230 changed files with 696 additions and 642 deletions

View File

@ -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
}

View File

@ -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)