Skip to content

Commit

Permalink
lint: Satisfy unslice
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechampine committed Mar 26, 2024
1 parent 88ba8c8 commit 90599f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion types/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ func (p SpendPolicy) String() string {
if i > 0 {
sb.WriteByte(',')
}
writeHex(pk.Key[:])
writeHex(pk.Key)
}
sb.WriteString("],")
sb.WriteString(strconv.FormatUint(uint64(p.SignaturesRequired), 10))
Expand Down
4 changes: 2 additions & 2 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ func (b *Block) ID() BlockID {
// Implementations of fmt.Stringer, encoding.Text(Un)marshaler, and json.(Un)marshaler

func stringerHex(prefix string, data []byte) string {
return prefix + ":" + hex.EncodeToString(data[:])
return prefix + ":" + hex.EncodeToString(data)
}

func marshalHex(prefix string, data []byte) ([]byte, error) {
Expand Down Expand Up @@ -897,7 +897,7 @@ func (s *Specifier) UnmarshalText(b []byte) error {

// MarshalText implements encoding.TextMarshaler.
func (uk UnlockKey) MarshalText() ([]byte, error) {
return marshalHex(uk.Algorithm.String(), uk.Key[:])
return marshalHex(uk.Algorithm.String(), uk.Key)
}

// UnmarshalText implements encoding.TextUnmarshaler.
Expand Down

0 comments on commit 90599f1

Please sign in to comment.