diff --git a/common/common.go b/common/common.go index 3acee88e..875cc56d 100644 --- a/common/common.go +++ b/common/common.go @@ -7,8 +7,8 @@ import ( ) var ( - ErrorAlreadyReleased = errors.New("Object already released.") - ErrBadConfiguration = errors.New("Bad configuration.") + ErrObjectReleased = errors.New("Object already released.") + ErrBadConfiguration = errors.New("Bad configuration.") ) // Releasable interface is for those types that can release its members. diff --git a/common/crypto/io.go b/common/crypto/io.go index f5a79b28..cf4d4bba 100644 --- a/common/crypto/io.go +++ b/common/crypto/io.go @@ -21,7 +21,7 @@ func NewCryptionReader(stream cipher.Stream, reader io.Reader) *CryptionReader { func (this *CryptionReader) Read(data []byte) (int, error) { if this.reader == nil { - return 0, common.ErrorAlreadyReleased + return 0, common.ErrObjectReleased } nBytes, err := this.reader.Read(data) if nBytes > 0 { @@ -49,7 +49,7 @@ func NewCryptionWriter(stream cipher.Stream, writer io.Writer) *CryptionWriter { func (this *CryptionWriter) Write(data []byte) (int, error) { if this.writer == nil { - return 0, common.ErrorAlreadyReleased + return 0, common.ErrObjectReleased } this.stream.XORKeyStream(data, data) return this.writer.Write(data)