aboutsummaryrefslogtreecommitdiffhomepage
path: root/check/absolute.go
diff options
context:
space:
mode:
Diffstat (limited to 'check/absolute.go')
-rw-r--r--check/absolute.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/check/absolute.go b/check/absolute.go
index 1a050d06..c5970abb 100644
--- a/check/absolute.go
+++ b/check/absolute.go
@@ -31,6 +31,8 @@ func (e AbsoluteError) Is(target error) bool {
type Absolute struct{ pathname unique.Handle[string] }
var (
+ _ fmt.GoStringer = new(Absolute)
+
_ encoding.TextAppender = new(Absolute)
_ encoding.TextMarshaler = new(Absolute)
_ encoding.TextUnmarshaler = new(Absolute)
@@ -40,6 +42,10 @@ var (
_ encoding.BinaryUnmarshaler = new(Absolute)
)
+func (a *Absolute) GoString() string {
+ return fmt.Sprintf("check.MustAbs(%q)", a.String())
+}
+
// ok returns whether [Absolute] is not the zero value.
func (a *Absolute) ok() bool { return a != nil && *a != (Absolute{}) }