From 66b0d513da991bc95c9a2a7dd185f9d6fb203bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C4=B1za=20Sabuncu?= Date: Fri, 5 Jul 2024 11:56:07 +0300 Subject: [PATCH] fix double slash --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index a3f2a8f..0a3768c 100644 --- a/main.go +++ b/main.go @@ -25,7 +25,7 @@ const ( /_/_/ /_/\__,_/\___/_/|_|\__/_/ \___/\___/ %s ` - version = `v1.0.5` + version = `v1.0.6` treeBranch = `├── ` treeEnd = `└── ` @@ -134,6 +134,8 @@ func crawl(line chan string, wg *sync.WaitGroup, url string, extensions, matcher wg.Add(1) defer wg.Done() + url = strings.ReplaceAll(url, "//", "/") + body, err := get(url) if err != nil { return fmt.Errorf("error getting index: %w", err)