From c328b584c0449e846f8d49976df65fce657c2a67 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 25 Aug 2025 22:52:48 +0900 Subject: hst/fslink: improve string representation This shortens the representation of most common use cases and generally improves readability. Signed-off-by: Ophestra --- hst/fslink.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'hst/fslink.go') 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 "" } - 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 } -- cgit v1.3.1