From a86aaf0878571545c084acaba6cdc2855bde9550 Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Tue, 7 Mar 2023 21:39:07 +0530 Subject: [PATCH] remove / prefix from repo name --- pages/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/user.go b/pages/user.go index 59d26c8..7baed06 100644 --- a/pages/user.go +++ b/pages/user.go @@ -153,7 +153,7 @@ func HandleUser(c *fiber.Ctx) error { e.ForEach("div.pinned-item-list-item-content", func(i int, el *colly.HTMLElement) { var MainRepo RepoList MainRepo = RepoList{} // Clear data if old data is present - MainRepo.Name = el.ChildAttr("div.width-full a", "href") + MainRepo.Name = strings.TrimPrefix(el.ChildAttr("div.width-full a", "href"), "/") MainRepo.Type = el.ChildText("div.width-full span.Label") MainRepo.Desc = el.ChildText("p.pinned-item-desc") MainRepo.Lang = el.ChildText("p.color-fg-muted span[itemprop*='programmingLanguage']")