watch projects.list and reload on changes
1 file changed, 2 insertions(+), 3 deletions(-)
changed files
M routes/util.go → routes/util.go
@@ -11,7 +11,6 @@ "strings" securejoin "github.com/cyphar/filepath-securejoin" "github.com/dimfeld/httptreemux/v5" - "go.alanpearce.eu/elgit/config" "go.alanpearce.eu/elgit/data" "go.alanpearce.eu/elgit/git" )@@ -50,8 +49,8 @@ httptreemux.Clean(name)+".git", ) } -func ReadProjectsList(c *config.Config) ([]string, error) { - content, err := os.ReadFile(filepath.Join(c.Repo.Root, "projects.list")) +func ReadProjectsList(filename string) ([]string, error) { + content, err := os.ReadFile(filename) if err != nil { return nil, err }