From 15bb58980a7597267dfd79e0898324d917753d0d Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Wed, 31 Aug 2022 12:00:40 +0200 Subject: [PATCH] cleanup imports --- createboltcard/database.go | 3 ++- createboltcard/main.go | 3 ++- crypto.go | 1 + database.go | 3 ++- lnurlw_callback.go | 5 +++-- lnurlw_request.go | 3 ++- main.go | 3 ++- new_card_request.go | 3 ++- 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/createboltcard/database.go b/createboltcard/database.go index 5594ac6..0928a40 100644 --- a/createboltcard/database.go +++ b/createboltcard/database.go @@ -4,8 +4,9 @@ import ( "database/sql" "errors" "fmt" - _ "github.com/lib/pq" "os" + + _ "github.com/lib/pq" ) func db_open() (*sql.DB, error) { diff --git a/createboltcard/main.go b/createboltcard/main.go index b32fa26..a5e9a97 100644 --- a/createboltcard/main.go +++ b/createboltcard/main.go @@ -5,9 +5,10 @@ import ( "encoding/hex" "flag" "fmt" + "os" + log "github.com/sirupsen/logrus" qrcode "github.com/skip2/go-qrcode" - "os" ) func random_hex() string { diff --git a/crypto.go b/crypto.go index 23ed884..aa83fac 100644 --- a/crypto.go +++ b/crypto.go @@ -6,6 +6,7 @@ import ( "crypto/cipher" "crypto/rand" "encoding/hex" + "github.com/aead/cmac" ) diff --git a/database.go b/database.go index 897a120..7e29ffb 100644 --- a/database.go +++ b/database.go @@ -4,8 +4,9 @@ import ( "database/sql" "errors" "fmt" - _ "github.com/lib/pq" "os" + + _ "github.com/lib/pq" ) type Card struct { diff --git a/lnurlw_callback.go b/lnurlw_callback.go index 39e47e5..5e56415 100644 --- a/lnurlw_callback.go +++ b/lnurlw_callback.go @@ -1,10 +1,11 @@ package main import ( - decodepay "github.com/fiatjaf/ln-decodepay" - log "github.com/sirupsen/logrus" "net/http" "os" + + decodepay "github.com/fiatjaf/ln-decodepay" + log "github.com/sirupsen/logrus" ) func lnurlw_callback(w http.ResponseWriter, req *http.Request) { diff --git a/lnurlw_request.go b/lnurlw_request.go index aebe6a5..4dbf491 100644 --- a/lnurlw_request.go +++ b/lnurlw_request.go @@ -4,10 +4,11 @@ import ( "encoding/hex" "encoding/json" "errors" - log "github.com/sirupsen/logrus" "net/http" "os" "strconv" + + log "github.com/sirupsen/logrus" ) type Response struct { diff --git a/main.go b/main.go index dc746db..976d57a 100644 --- a/main.go +++ b/main.go @@ -1,9 +1,10 @@ package main import ( - log "github.com/sirupsen/logrus" "net/http" "os" + + log "github.com/sirupsen/logrus" ) func write_error(w http.ResponseWriter) { diff --git a/new_card_request.go b/new_card_request.go index ec11b01..44963b9 100644 --- a/new_card_request.go +++ b/new_card_request.go @@ -3,9 +3,10 @@ package main import ( "database/sql" "encoding/json" - log "github.com/sirupsen/logrus" "net/http" "os" + + log "github.com/sirupsen/logrus" ) /**