aboutsummaryrefslogtreecommitdiff
path: root/link.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-02-12 01:04:40 +0700
committerShulhan <ms@kilabit.info>2026-02-12 01:04:40 +0700
commit9c7ee77376294e9abd70ca356e26d0ab16ad7466 (patch)
tree2fc279d233575571389ea89d2ba0be16314bc7dd /link.go
parent8100b3be0730173a77f1a64f9ac6bc8862a159ac (diff)
downloadjarink-9c7ee77376294e9abd70ca356e26d0ab16ad7466.tar.xz
brokenlinks: store the anchor or image source in link
In the struct Link, we add field Value that store the href from A element or src from IMG element. This allow us to debug any error during scan, especially joining path and link.
Diffstat (limited to 'link.go')
-rw-r--r--link.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/link.go b/link.go
index 266bcdd..0d43e2c 100644
--- a/link.go
+++ b/link.go
@@ -14,6 +14,9 @@ type Link struct {
// The error from scan.
ErrScan error `json:"-"`
+ // Value contains the original URL inside the anchor or image element.
+ Value string `json:"value"`
+
Url string `json:"url"`
Error string `json:"error,omitempty"`
Size int64 `json:"size,omitempty"`