fix: remove unused functions
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
parent
ee0e23c166
commit
cf994baa5b
16
cmd/utils.go
16
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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user