aboutsummaryrefslogtreecommitdiff
path: root/status.go
diff options
context:
space:
mode:
Diffstat (limited to 'status.go')
-rw-r--r--status.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/status.go b/status.go
new file mode 100644
index 0000000..b9c7aa1
--- /dev/null
+++ b/status.go
@@ -0,0 +1,30 @@
+package main
+
+import (
+ "fmt"
+)
+
+func status(conf *Conf, args []string) error {
+ if len(args) != 0 {
+ return statusFiles(conf, args)
+ }
+ names, err := conf.FileNames()
+ if err != nil {
+ return err
+ }
+ return statusFiles(conf, names)
+}
+
+func statusFiles(conf *Conf, names []string) error {
+ for _, name := range names {
+ if err := statusFile(conf, name); err != nil {
+ return fmt.Errorf("could not check status of %s: %v", name, err)
+ }
+ }
+ return nil
+}
+
+func statusFile(conf *Conf, name string) error {
+ fmt.Printf("%s: OK\n", name)
+ return nil
+}