fix golangci offenses

This commit is contained in:
A.Unger
2020-05-22 10:24:01 +02:00
parent b40048af13
commit c219866c7a
19 changed files with 51 additions and 68 deletions
+3 -2
View File
@@ -2,11 +2,12 @@
package store
import (
"io/ioutil"
"path"
"github.com/owncloud/ocis-settings/pkg/proto/v0"
"google.golang.org/grpc/codes"
gstatus "google.golang.org/grpc/status"
"io/ioutil"
"path"
)
// ListBundles returns all bundles in the mountPath folder belonging to the given extension
+2 -1
View File
@@ -1,9 +1,10 @@
package store
import (
"os"
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
"os"
)
// Unmarshal file into record
+9 -1
View File
@@ -1,9 +1,10 @@
package store
import (
"github.com/owncloud/ocis-settings/pkg/proto/v0"
"os"
"path"
"github.com/owncloud/ocis-settings/pkg/proto/v0"
)
const folderNameBundles = "bundles"
@@ -28,6 +29,13 @@ func (s Store) buildFilePathFromBundleArgs(extension string, bundleKey string) s
return path.Join(extensionFolder, bundleKey+".json")
}
// // Builds the folder path for storing settings values
// func (s Store) buildFolderPathValues() string {
// folderPath := path.Join(s.mountPath, folderNameValues)
// s.ensureFolderExists(folderPath)
// return folderPath
// }
// Builds a unique file name from the given settings value
func (s Store) buildFilePathFromValue(value *proto.SettingsValue) string {
return s.buildFilePathFromValueArgs(value.Identifier.AccountUuid, value.Identifier.Extension, value.Identifier.BundleKey)
+4 -3
View File
@@ -2,12 +2,13 @@
package store
import (
"github.com/owncloud/ocis-settings/pkg/proto/v0"
"google.golang.org/grpc/codes"
gstatus "google.golang.org/grpc/status"
"os"
"path"
"path/filepath"
"github.com/owncloud/ocis-settings/pkg/proto/v0"
"google.golang.org/grpc/codes"
gstatus "google.golang.org/grpc/status"
)
// ReadValue tries to find a value by the given identifier attributes within the mountPath