From c5b61cdaf7636a71721a5e3b21debfa9c0deeebf Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Tue, 7 Dec 2021 17:03:01 -0800 Subject: [PATCH] Formatting + Quality --- app/applets.go | 2 +- model/attr/scope.go | 2 +- protocol/files/manifest_test.go | 1 - storage/v1/file_enc.go | 2 +- storage/v1/profile_store.go | 2 -- 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/applets.go b/app/applets.go index a3e2d23..912c7fc 100644 --- a/app/applets.go +++ b/app/applets.go @@ -113,7 +113,7 @@ func (ap *appletPlugins) AddPlugin(peerid string, id plugins.PluginID, bus event pluginsinf, _ := ap.plugins.Load(peerid) peerPlugins := pluginsinf.([]plugins.Plugin) - newp,err := plugins.Get(id, bus, acn, peerid) + newp, err := plugins.Get(id, bus, acn, peerid) if err == nil { newp.Start() peerPlugins = append(peerPlugins, newp) diff --git a/model/attr/scope.go b/model/attr/scope.go index ac4890e..8c9d67d 100644 --- a/model/attr/scope.go +++ b/model/attr/scope.go @@ -77,4 +77,4 @@ func (scope Scope) IsPublic() bool { // IsConversation returns true if the scope is a conversation scope func (scope Scope) IsConversation() bool { return scope == ConversationScope -} \ No newline at end of file +} diff --git a/protocol/files/manifest_test.go b/protocol/files/manifest_test.go index cb0608b..caa14ad 100644 --- a/protocol/files/manifest_test.go +++ b/protocol/files/manifest_test.go @@ -117,7 +117,6 @@ func TestManifestLarge(t *testing.T) { t.Fatalf("could not store chunk %v %v", i, err) } - // Attempt to store the chunk in an invalid position... _, err = cwtchPngOutManifest.StoreChunk(uint64(i+1), contents) if err == nil { diff --git a/storage/v1/file_enc.go b/storage/v1/file_enc.go index 5598ebb..2acbd63 100644 --- a/storage/v1/file_enc.go +++ b/storage/v1/file_enc.go @@ -63,7 +63,7 @@ func DecryptFile(ciphertext []byte, key [32]byte) ([]byte, error) { func ReadEncryptedFile(directory, filename string, key [32]byte) ([]byte, error) { encryptedbytes, err := ioutil.ReadFile(path.Join(directory, filename)) if err == nil { - return DecryptFile(encryptedbytes, key) + return DecryptFile(encryptedbytes, key) } return nil, err } diff --git a/storage/v1/profile_store.go b/storage/v1/profile_store.go index 5cd9d07..f8122b2 100644 --- a/storage/v1/profile_store.go +++ b/storage/v1/profile_store.go @@ -10,8 +10,6 @@ import ( ) const profileFilename = "profile" -const version = "1" -const versionFile = "VERSION" const saltFile = "SALT" //ProfileStoreV1 storage for profiles and message streams that uses in memory key and fs stored salt instead of in memory password