summaryrefslogtreecommitdiffstats
path: root/routes/util.go
diff options
context:
space:
mode:
authorLibravatar Anirudh Oppiliappan <x@icyphox.sh>2022-12-22 21:13:49 +0530
committerLibravatar Anirudh Oppiliappan <x@icyphox.sh>2022-12-22 21:13:49 +0530
commitf661e6e4ce1177352b5bc40238351920cc25a69b (patch)
tree602979b0ef6f931206686d435aa1aff93c5a6a57 /routes/util.go
parent2b57b6e0b1b936f45aa4ed8fd0ed2f57b7d370f3 (diff)
downloadlegit-f661e6e4ce1177352b5bc40238351920cc25a69b.tar.gz
legit-f661e6e4ce1177352b5bc40238351920cc25a69b.tar.bz2
legit-f661e6e4ce1177352b5bc40238351920cc25a69b.zip
config: add repo.ignore
Diffstat (limited to '')
-rw-r--r--routes/util.go26
1 files changed, 26 insertions, 0 deletions
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
+}