diff options
| author | Shulhan <ms@kilabit.info> | 2026-02-12 01:04:40 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-02-12 01:04:40 +0700 |
| commit | 9c7ee77376294e9abd70ca356e26d0ab16ad7466 (patch) | |
| tree | 2fc279d233575571389ea89d2ba0be16314bc7dd /link.go | |
| parent | 8100b3be0730173a77f1a64f9ac6bc8862a159ac (diff) | |
| download | jarink-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.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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"` |
