fix: remove unused functions

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
Henrique Dias 2019-01-07 20:21:08 +00:00
parent ee0e23c166
commit cf994baa5b

View File

@ -2,7 +2,6 @@ package cmd
import ( import (
"crypto/rand" "crypto/rand"
"errors"
"log" "log"
"os" "os"
@ -62,21 +61,6 @@ func mustGetUint(cmd *cobra.Command, flag string) uint {
return b 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 { func generateRandomBytes(n int) []byte {
b := make([]byte, n) b := make([]byte, n)
_, err := rand.Read(b) _, err := rand.Read(b)