forked from cwtch.im/cwtch
1
0
Fork 0

Updated capitalization of cwtchPeer in comments

This commit is contained in:
Angus Champion de Crespigny 2018-06-24 14:59:42 -04:00 committed by Gogs
parent 8e55a77173
commit 67adc0fbce
1 changed files with 3 additions and 3 deletions

View File

@ -144,7 +144,7 @@ func (cp *cwtchPeer) setup() {
} }
} }
// NewCwtchPeer creates and returns a new CwtchPeer with the given name. // NewCwtchPeer creates and returns a new cwtchPeer with the given name.
func NewCwtchPeer(name string, password string) CwtchPeerInterface { func NewCwtchPeer(name string, password string) CwtchPeerInterface {
cp := new(cwtchPeer) cp := new(cwtchPeer)
cp.Profile = model.GenerateNewProfile(name) cp.Profile = model.GenerateNewProfile(name)
@ -155,7 +155,7 @@ func NewCwtchPeer(name string, password string) CwtchPeerInterface {
return cp return cp
} }
// Save saves the CwtchPeer profile state to a file. // Save saves the cwtchPeer profile state to a file.
func (cp *cwtchPeer) Save(profilefile string) error { func (cp *cwtchPeer) Save(profilefile string) error {
cp.mutex.Lock() cp.mutex.Lock()
encryptedbytes := EncryptProfile(cp, cp.password) encryptedbytes := EncryptProfile(cp, cp.password)
@ -166,7 +166,7 @@ func (cp *cwtchPeer) Save(profilefile string) error {
return err return err
} }
// LoadCwtchPeer loads an existing CwtchPeer from a file. CHECK METHOD RETURN // LoadCwtchPeer loads an existing CwtchPeer from a file.
func LoadCwtchPeer(profilefile string, password string) (*cwtchPeer, error) { func LoadCwtchPeer(profilefile string, password string) (*cwtchPeer, error) {
encryptedbytes, _ := ioutil.ReadFile(profilefile) encryptedbytes, _ := ioutil.ReadFile(profilefile)