aboutsummaryrefslogtreecommitdiff
path: root/result.go
diff options
context:
space:
mode:
Diffstat (limited to 'result.go')
-rw-r--r--result.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/result.go b/result.go
new file mode 100644
index 0000000..a66114f
--- /dev/null
+++ b/result.go
@@ -0,0 +1,22 @@
+// SPDX-FileCopyrightText: 2025 M. Shulhan <ms@kilabit.info>
+// SPDX-License-Identifier: GPL-3.0-only
+
+package deadlinks
+
+// Broken store the link with its HTTP status.
+type Broken struct {
+ Link string
+ Code int
+}
+
+// Result store the result of Scan.
+type Result struct {
+ // PageLinks store the page and its broken links.
+ PageLinks map[string][]Broken
+}
+
+func newResult() *Result {
+ return &Result{
+ PageLinks: map[string][]Broken{},
+ }
+}