From 81e8c49ac2e106d48d6f1b6840657c38492b4c1e Mon Sep 17 00:00:00 2001 From: Blake Mizerany Date: Sat, 6 Apr 2024 16:58:10 -0700 Subject: [PATCH] x/model: some doc fixes --- x/model/name.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x/model/name.go b/x/model/name.go index 2d845d39..fa5f0293 100644 --- a/x/model/name.go +++ b/x/model/name.go @@ -300,7 +300,7 @@ var bufPool = sync.Pool{ }, } -// MarshalText implements encoding.TextMarshaler. +// MarshalText implements [encoding.TextMarshaler]. func (r Name) MarshalText() ([]byte, error) { b := bufPool.Get().(*bytes.Buffer) b.Reset() @@ -315,7 +315,7 @@ func (r Name) MarshalText() ([]byte, error) { return b.Bytes(), nil } -// UnmarshalText implements encoding.TextUnmarshaler. +// UnmarshalText implements [encoding.TextUnmarshaler]. func (r *Name) UnmarshalText(text []byte) error { // unsafeString is safe here because the contract of UnmarshalText // that text belongs to us for the duration of the call. @@ -465,7 +465,7 @@ func NameParts(s string) iter.Seq2[NamePart, string] { } // Valid returns true if the Name has a valid nick. To know if a Name is -// "complete", use Complete. +// "complete", use [Name.Complete]. func (r Name) Valid() bool { // Parts ensures we only have valid parts, so no need to validate // them here, only check if we have a name or not.