Address pull request comments
* Further simplify "constructor" function's allocation of structs * Fix formatting
This commit is contained in:
		
							parent
							
								
									3cf038f300
								
							
						
					
					
						commit
						d48140cab3
					
				| @ -89,10 +89,7 @@ type keyStorePassphrase struct { | ||||
| } | ||||
| 
 | ||||
| func NewKeyStorePassphrase(path string) KeyStore2 { | ||||
| 	ks := &keyStorePassphrase{ | ||||
| 		keysDirPath : path, | ||||
| 	} | ||||
| 	return ks | ||||
| 	return &keyStorePassphrase{path} | ||||
| } | ||||
| 
 | ||||
| func (ks keyStorePassphrase) GenerateNewKey(rand io.Reader, auth string) (key *Key, err error) { | ||||
| @ -105,8 +102,8 @@ func (ks keyStorePassphrase) GetKey(keyId *uuid.UUID, auth string) (key *Key, er | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	key = &Key{ | ||||
| 		Id : keyId, | ||||
| 		PrivateKey : ToECDSA(keyBytes), | ||||
| 		Id:         keyId, | ||||
| 		PrivateKey: ToECDSA(keyBytes), | ||||
| 	} | ||||
| 	return key, err | ||||
| } | ||||
|  | ||||
| @ -54,9 +54,7 @@ func DefaultDataDir() string { | ||||
| } | ||||
| 
 | ||||
| func NewKeyStorePlain(path string) KeyStore2 { | ||||
| 	ks := new(keyStorePlain) | ||||
| 	ks.keysDirPath = path | ||||
| 	return ks | ||||
| 	return &keyStorePlain{path} | ||||
| } | ||||
| 
 | ||||
| func (ks keyStorePlain) GenerateNewKey(rand io.Reader, auth string) (key *Key, err error) { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user