From 89705dd61f418df561ebbe7cf645ba82a61e47e7 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Tue, 11 Jun 2024 22:25:45 +0200 Subject: fix: Make use of the description --- pkg/service/git.go | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'pkg/service') diff --git a/pkg/service/git.go b/pkg/service/git.go index 7418d97..0907924 100644 --- a/pkg/service/git.go +++ b/pkg/service/git.go @@ -3,12 +3,9 @@ package service import ( "errors" "log/slog" - "os" - "path" "git.gabrielgio.me/cerrado/pkg/config" "git.gabrielgio.me/cerrado/pkg/git" - "git.gabrielgio.me/cerrado/pkg/u" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/object" ) @@ -66,19 +63,9 @@ func (g *GitService) ListRepositories() ([]*Repository, error) { continue } - d := path.Join(r.Path, "description") - description := "" - if u.FileExist(d) { - if b, err := os.ReadFile(d); err == nil { - description = string(b) - } else { - slog.Error("Error loading description file", "err", err) - } - } - repos = append(repos, &Repository{ Name: r.Name, - Description: description, + Description: r.Description, LastCommitDate: obj.Author.When.Format(timeFormat), Ref: head.Name().Short(), }) -- cgit v1.2.3