From cf994baa5ba0e1bb098e2315e8c7f92e222d7a4d Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Mon, 7 Jan 2019 20:21:08 +0000 Subject: [PATCH] fix: remove unused functions License: MIT Signed-off-by: Henrique Dias --- cmd/utils.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/cmd/utils.go b/cmd/utils.go index 66b6fa9c..daea6687 100644 --- a/cmd/utils.go +++ b/cmd/utils.go @@ -2,7 +2,6 @@ package cmd import ( "crypto/rand" - "errors" "log" "os" @@ -62,21 +61,6 @@ func mustGetUint(cmd *cobra.Command, flag string) uint { return b } -func getDB() *storm.DB { - databasePath := v.GetString("database") - if _, err := os.Stat(databasePath); err != nil { - panic(errors.New(databasePath + " does not exid.store. Please run 'filebrowser init' fird.store.")) - } - - db, err := storm.Open(databasePath) - checkErr(err) - return db -} - -func getStorage(db *storm.DB) *storage.Storage { - return bolt.NewStorage(db) -} - func generateRandomBytes(n int) []byte { b := make([]byte, n) _, err := rand.Read(b)