From 6ce7baed2beaa6e46824218a69eed6702c636b00 Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Tue, 26 May 2020 09:05:08 +0200 Subject: [PATCH] Removed (already redundant) resources.go. --- resources.go | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 resources.go diff --git a/resources.go b/resources.go deleted file mode 100644 index fd4f330..0000000 --- a/resources.go +++ /dev/null @@ -1,43 +0,0 @@ -package tins2020 - -import ( - rice "github.com/GeertJohan/go.rice" - "github.com/spf13/afero" - "opslag.de/schobers/fs/ricefs" - "opslag.de/schobers/fs/vfs" -) - -type Resources struct { - box *rice.Box - fs afero.Fs - copy vfs.CopyDir -} - -func (r *Resources) Box() *rice.Box { - return r.box -} - -func (r *Resources) Destroy() { - r.copy.Destroy() -} - -func (r *Resources) Fs() afero.Fs { - return r.fs -} - -func (r *Resources) Open(box *rice.Box) error { - r.box = box - r.fs = vfs.NewOsFsFallback(r.box.Name(), ricefs.NewFs(box)) - copy, err := vfs.NewCopyDir(r.fs) - if err != nil { - return err - } - r.copy = copy - return nil -} - -func (r *Resources) Copy() vfs.CopyDir { return r.copy } - -func (r *Resources) Retrieve(name string) (string, error) { - return r.copy.Retrieve(name) -}