Formatting + Quality
This commit is contained in:
parent
93cbe0556c
commit
c5b61cdaf7
|
@ -113,7 +113,7 @@ func (ap *appletPlugins) AddPlugin(peerid string, id plugins.PluginID, bus event
|
||||||
pluginsinf, _ := ap.plugins.Load(peerid)
|
pluginsinf, _ := ap.plugins.Load(peerid)
|
||||||
peerPlugins := pluginsinf.([]plugins.Plugin)
|
peerPlugins := pluginsinf.([]plugins.Plugin)
|
||||||
|
|
||||||
newp,err := plugins.Get(id, bus, acn, peerid)
|
newp, err := plugins.Get(id, bus, acn, peerid)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
newp.Start()
|
newp.Start()
|
||||||
peerPlugins = append(peerPlugins, newp)
|
peerPlugins = append(peerPlugins, newp)
|
||||||
|
|
|
@ -77,4 +77,4 @@ func (scope Scope) IsPublic() bool {
|
||||||
// IsConversation returns true if the scope is a conversation scope
|
// IsConversation returns true if the scope is a conversation scope
|
||||||
func (scope Scope) IsConversation() bool {
|
func (scope Scope) IsConversation() bool {
|
||||||
return scope == ConversationScope
|
return scope == ConversationScope
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,6 @@ func TestManifestLarge(t *testing.T) {
|
||||||
t.Fatalf("could not store chunk %v %v", i, err)
|
t.Fatalf("could not store chunk %v %v", i, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Attempt to store the chunk in an invalid position...
|
// Attempt to store the chunk in an invalid position...
|
||||||
_, err = cwtchPngOutManifest.StoreChunk(uint64(i+1), contents)
|
_, err = cwtchPngOutManifest.StoreChunk(uint64(i+1), contents)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
|
|
@ -63,7 +63,7 @@ func DecryptFile(ciphertext []byte, key [32]byte) ([]byte, error) {
|
||||||
func ReadEncryptedFile(directory, filename string, key [32]byte) ([]byte, error) {
|
func ReadEncryptedFile(directory, filename string, key [32]byte) ([]byte, error) {
|
||||||
encryptedbytes, err := ioutil.ReadFile(path.Join(directory, filename))
|
encryptedbytes, err := ioutil.ReadFile(path.Join(directory, filename))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return DecryptFile(encryptedbytes, key)
|
return DecryptFile(encryptedbytes, key)
|
||||||
}
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,8 +10,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const profileFilename = "profile"
|
const profileFilename = "profile"
|
||||||
const version = "1"
|
|
||||||
const versionFile = "VERSION"
|
|
||||||
const saltFile = "SALT"
|
const saltFile = "SALT"
|
||||||
|
|
||||||
//ProfileStoreV1 storage for profiles and message streams that uses in memory key and fs stored salt instead of in memory password
|
//ProfileStoreV1 storage for profiles and message streams that uses in memory key and fs stored salt instead of in memory password
|
||||||
|
|
Loading…
Reference in New Issue