aboutsummaryrefslogtreecommitdiffhomepage
path: root/hst/fslink.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-25 22:52:48 +0900
committerOphestra <cat@gensokyo.uk>2025-08-25 22:52:48 +0900
commitc328b584c0449e846f8d49976df65fce657c2a67 (patch)
treea10fa3d86bd814d7f299836b0032ec6b5bd89cd0 /hst/fslink.go
parent9585b35d5b4e91bb327e3eddb229d1b711eeec2f (diff)
hst/fslink: improve string representation
This shortens the representation of most common use cases and generally improves readability. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'hst/fslink.go')
-rw-r--r--hst/fslink.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/hst/fslink.go b/hst/fslink.go
index 8bba9b49..40b4fd8b 100644
--- a/hst/fslink.go
+++ b/hst/fslink.go
@@ -50,9 +50,12 @@ func (l *FSLink) String() string {
return "<invalid>"
}
- dereference := ""
+ var dereference string
if l.Dereference {
+ if l.Target.String() == l.Linkname {
+ return l.Target.String() + "@"
+ }
dereference = "*"
}
- return "&" + l.Target.String() + ":" + dereference + l.Linkname
+ return l.Target.String() + " -> " + dereference + l.Linkname
}