From f661e6e4ce1177352b5bc40238351920cc25a69b Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Thu, 22 Dec 2022 21:13:49 +0530 Subject: config: add repo.ignore --- routes/util.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 routes/util.go (limited to 'routes/util.go') diff --git a/routes/util.go b/routes/util.go new file mode 100644 index 0000000..d3f80fe --- /dev/null +++ b/routes/util.go @@ -0,0 +1,26 @@ +package routes + +import ( + "os" + "path/filepath" +) + +func getDescription(path string) (desc string) { + db, err := os.ReadFile(filepath.Join(path, "description")) + if err == nil { + desc = string(db) + } else { + desc = "" + } + return +} + +func (d *deps) isIgnored(name string) bool { + for _, i := range d.c.Repo.Ignore { + if name == i { + return true + } + } + + return false +} -- cgit