From ec44df63c7fdba18201992e83574fdce1e3bdc8f Mon Sep 17 00:00:00 2001 From: Shulhan Date: Wed, 4 Jun 2025 01:07:51 +0700 Subject: all: use snake case for JSON fields in Broken result --- brokenlinks.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'brokenlinks.go') 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. -- cgit v1.3