diff options
| author | Shulhan <ms@kilabit.info> | 2025-06-04 01:07:51 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2025-06-05 00:14:02 +0700 |
| commit | ec44df63c7fdba18201992e83574fdce1e3bdc8f (patch) | |
| tree | 8f96f2d84ef65bdf49ea485e006a925e05f47b58 /brokenlinks.go | |
| parent | 5687a7a87ad79c63831b9aa6fcb01a41e54cccc9 (diff) | |
| download | jarink-ec44df63c7fdba18201992e83574fdce1e3bdc8f.tar.xz | |
all: use snake case for JSON fields in Broken result
Diffstat (limited to 'brokenlinks.go')
| -rw-r--r-- | brokenlinks.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/brokenlinks.go b/brokenlinks.go index 768216d..69a14ad 100644 --- a/brokenlinks.go +++ b/brokenlinks.go @@ -15,20 +15,20 @@ const Version = `0.1.0` // reachable during GET or HEAD, either timeout or IP or domain not exist. const StatusBadLink = 700 +// Broken store the broken link, HTTP status code, and the error message that +// cause it. +type Broken struct { + Link string `json:"link"` + Error string `json:"error,omitempty"` + Code int `json:"code"` +} + // BrokenlinksOptions define the options for scanning broken links. type BrokenlinksOptions struct { Url string IsVerbose bool } -// Broken store the broken link, HTTP status code, and the error message that -// cause it. -type Broken struct { - Link string - Error string `json:"omitempty"` - Code int -} - // BrokenlinksResult store the result of scanning for broken links. type BrokenlinksResult struct { // PageLinks store the page and its broken links. |
