Fix lint errors

This commit is contained in:
9seconds
2018-07-09 16:11:05 +03:00
parent fb00cd1121
commit 29b5130c95
32 changed files with 207 additions and 55 deletions
+4
View File
@@ -9,12 +9,15 @@ import (
"github.com/juju/errors"
)
// NonceRequest is the data type which contains all the data for correct
// nonce request.
type NonceRequest struct {
KeySelector []byte
CryptoTS []byte
Nonce []byte
}
// Bytes returns serialized nonce request.
func (r *NonceRequest) Bytes() []byte {
buf := &bytes.Buffer{}
@@ -27,6 +30,7 @@ func (r *NonceRequest) Bytes() []byte {
return buf.Bytes()
}
// NewNonceRequest builds new none request based on proxy secret.
func NewNonceRequest(proxySecret []byte) (*NonceRequest, error) {
nonce := make([]byte, 16)
keySelector := make([]byte, 4)