We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcc55ce commit a861357Copy full SHA for a861357
registers/sitemap/hierarchical_generator.go
@@ -3,6 +3,7 @@ package sitemap
3
import (
4
"context"
5
6
+ "github.com/pkg/errors"
7
urlutils "github.com/thewizardplusplus/go-crawler/url-utils"
8
)
9
@@ -21,10 +22,15 @@ func (generator HierarchicalGenerator) ExtractLinks(
21
22
[]string,
23
error,
24
) {
- return urlutils.GenerateHierarchicalLinks(
25
+ hierarchicalLinks, err := urlutils.GenerateHierarchicalLinks(
26
baseLink,
27
"sitemap.xml",
28
urlutils.SanitizeBaseLink(generator.SanitizeLink),
29
urlutils.WithMaximalHierarchyDepth(generator.MaximalDepth),
30
31
+ if err != nil {
32
+ return nil, errors.Wrap(err, "unable to generate the hierarchical links")
33
+ }
34
+
35
+ return hierarchicalLinks, nil
36
}
0 commit comments