mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 18:15:42 +01:00
If there are year folders in directory listings, fetch files from the extra level.
This commit is contained in:
parent
29f26e0299
commit
131a7155fa
3 changed files with 85 additions and 30 deletions
|
|
@ -24,9 +24,16 @@ const page0 = `<html>
|
|||
|
||||
func TestLinksOnPage(t *testing.T) {
|
||||
|
||||
links, err := linksOnPage(
|
||||
var links []string
|
||||
|
||||
err := linksOnPage(
|
||||
strings.NewReader(page0),
|
||||
func(s string) (string, error) { return s, nil },
|
||||
func(s string) error {
|
||||
if strings.HasSuffix(s, ".json") {
|
||||
links = append(links, s)
|
||||
}
|
||||
return nil
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue