summaryrefslogtreecommitdiffstats
path: root/cedar.go
diff options
context:
space:
mode:
Diffstat (limited to 'cedar.go')
-rw-r--r--cedar.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/cedar.go b/cedar.go
index 496584c..501cc1f 100644
--- a/cedar.go
+++ b/cedar.go
@@ -79,6 +79,19 @@ func readFile(f *os.File) ([]byte, error) {
return bs, nil
}
+func writeFile(f os.File, cache Ids) error {
+ bs, err := json.Marshal(cache)
+ if err != nil {
+ return err
+ }
+
+ n, err := f.Write(bs)
+ if n != len(bs) {
+ return err
+ }
+ return nil
+}
+
func cacheFor(section string) (Ids, error) {
cache := make(Ids, 0)