fix build
This commit is contained in:
parent
59151232dd
commit
0e3895a1f2
11 changed files with 43 additions and 8 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -6,6 +6,7 @@
|
|||
*.dylib
|
||||
boltcard
|
||||
createboltcard/createboltcard
|
||||
wipeboltcard/wipeboltcard
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
|
|
|||
|
|
@ -27,6 +27,27 @@ func db_open() (*sql.DB, error) {
|
|||
return db, nil
|
||||
}
|
||||
|
||||
func db_get_setting(setting_name string) (string) {
|
||||
|
||||
setting_value := ""
|
||||
|
||||
db, err := db_open()
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
defer db.Close()
|
||||
|
||||
sqlStatement := `select value from settings where name=$1;`
|
||||
|
||||
row := db.QueryRow(sqlStatement, setting_name)
|
||||
err = row.Scan(&setting_value)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return setting_value
|
||||
}
|
||||
|
||||
func db_get_card_name_count(card_name string) (card_count int, err error) {
|
||||
|
||||
card_count = 0
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import (
|
|||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
qrcode "github.com/skip2/go-qrcode"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
|
|
|||
1
email.go
1
email.go
|
|
@ -7,7 +7,6 @@ import (
|
|||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/ses"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import (
|
|||
"io"
|
||||
"io/ioutil"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
"crypto/sha256"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/gorilla/mux"
|
||||
"net/http"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/gorilla/mux"
|
||||
"net/http"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import (
|
|||
decodepay "github.com/fiatjaf/ln-decodepay"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"net/http"
|
||||
"os"
|
||||
)
|
||||
|
||||
func lnurlw_callback(w http.ResponseWriter, req *http.Request) {
|
||||
|
|
|
|||
1
main.go
1
main.go
|
|
@ -5,7 +5,6 @@ import (
|
|||
"github.com/gorilla/mux"
|
||||
"net/http"
|
||||
"time"
|
||||
"os"
|
||||
)
|
||||
|
||||
var router = mux.NewRouter()
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import (
|
|||
"encoding/json"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"net/http"
|
||||
"os"
|
||||
)
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -27,6 +27,27 @@ func db_open() (*sql.DB, error) {
|
|||
return db, nil
|
||||
}
|
||||
|
||||
func db_get_setting(setting_name string) (string) {
|
||||
|
||||
setting_value := ""
|
||||
|
||||
db, err := db_open()
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
defer db.Close()
|
||||
|
||||
sqlStatement := `select value from settings where name=$1;`
|
||||
|
||||
row := db.QueryRow(sqlStatement, setting_name)
|
||||
err = row.Scan(&setting_value)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return setting_value
|
||||
}
|
||||
|
||||
func db_get_card_name_count(card_name string) (card_count int, err error) {
|
||||
|
||||
card_count = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue