Skip to content

Commit 1afc809

Browse files
committed
chore: address feedback
1 parent d5aa650 commit 1afc809

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ The following emojis are used to highlight certain changes:
2121
* 🛠 The `ipns` package has been refactored. You should no longer use the direct Protobuf
2222
version of the IPNS Record. Instead, we have a shiny new `ipns.Record` type that wraps
2323
all the required functionality to work the best as possible with IPNS v2 Records. Please
24-
check the [documentation](https://pkg.go.dev/github.com/ipfs/boxo/ipns) for more information.
24+
check the [documentation](https://pkg.go.dev/github.com/ipfs/boxo/ipns) for more information,
25+
and follow [ipfs/specs#376](https://github.com/ipfs/specs/issues/376) for related IPIP.
2526

2627
### Removed
2728

ipns/errors.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,39 @@ import (
1010
const MaxRecordSize int = 10 << (10 * 1)
1111

1212
// ErrExpiredRecord is returned when an IPNS [Record] is invalid due to being expired.
13-
var ErrExpiredRecord = errors.New("the IPNS record is expired")
13+
var ErrExpiredRecord = errors.New("record is expired")
1414

1515
// ErrUnrecognizedValidity is returned when an IPNS [Record] has an unknown validity type.
16-
var ErrUnrecognizedValidity = errors.New("the IPNS record contains an unrecognized validity type")
16+
var ErrUnrecognizedValidity = errors.New("record contains an unrecognized validity type")
1717

1818
// ErrInvalidValidity is returned when an IPNS [Record] has a known validity type,
1919
// but the validity value is invalid.
20-
var ErrInvalidValidity = errors.New("the IPNS record contains an invalid validity")
20+
var ErrInvalidValidity = errors.New("record contains an invalid validity")
2121

2222
// ErrRecordSize is returned when an IPNS [Record] exceeds the maximum size.
23-
var ErrRecordSize = errors.New("the IPNS record exceeds allowed size limit")
23+
var ErrRecordSize = errors.New("record exceeds allowed size limit")
2424

2525
// ErrDataMissing is returned when an IPNS [Record] is missing the data field.
26-
var ErrDataMissing = errors.New("the IPNS record is missing the data field")
26+
var ErrDataMissing = errors.New("record is missing the dag-cbor data field")
2727

2828
// ErrInvalidRecord is returned when an IPNS [Record] is malformed.
29-
var ErrInvalidRecord = errors.New("the IPNS record is malformed")
29+
var ErrInvalidRecord = errors.New("record is malformed")
3030

3131
// ErrPublicKeyMismatch is return when the public key embedded in an IPNS [Record]
3232
// does not match the expected public key.
33-
var ErrPublicKeyMismatch = errors.New("the IPNS record public key does not match the expected public key")
33+
var ErrPublicKeyMismatch = errors.New("record public key does not match the expected public key")
3434

3535
// ErrPublicKeyNotFound is returned when the public key is not found.
3636
var ErrPublicKeyNotFound = errors.New("public key not found")
3737

3838
// ErrInvalidPublicKey is returned when an IPNS [Record] has an invalid public key,
39-
var ErrInvalidPublicKey = errors.New("the IPNS record public key invalid")
39+
var ErrInvalidPublicKey = errors.New("public key invalid")
4040

4141
// ErrSignature is returned when an IPNS [Record] fails signature verification.
42-
var ErrSignature = errors.New("the IPNS record signature verification failed")
42+
var ErrSignature = errors.New("signature verification failed")
4343

4444
// ErrInvalidName is returned when an IPNS [Name] is invalid.
45-
var ErrInvalidName = errors.New("the IPNS name is invalid")
45+
var ErrInvalidName = errors.New("name is invalid")
4646

47-
// ErrInvalidPath is returned when an IPNS Record has an invalid path.
48-
var ErrInvalidPath = errors.New("the IPNS record path invalid")
47+
// ErrInvalidPath is returned when an IPNS [Record] has an invalid path.
48+
var ErrInvalidPath = errors.New("value is not a valid content path")

0 commit comments

Comments
 (0)