test loading secret key
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
)
|
||||
|
||||
var db *sqlx.DB
|
||||
var secretKey string
|
||||
|
||||
const (
|
||||
sqlFile = "smt.db"
|
||||
@@ -80,6 +81,11 @@ func ConnectDatabase() {
|
||||
//defer db.Close()
|
||||
}
|
||||
|
||||
func LoadSecretKey(key string) {
|
||||
// Store the secret key so that we can access it when encrypting/decrypting
|
||||
secretKey = key
|
||||
}
|
||||
|
||||
func DisconnectDatabase() {
|
||||
log.Printf("DisconnectDatabase called")
|
||||
defer db.Close()
|
||||
|
Reference in New Issue
Block a user