Move stuff around

This commit is contained in:
2018-07-07 14:11:23 +02:00
parent 9b845584ed
commit 6c6ccaf0b3
10 changed files with 102 additions and 50 deletions
+25
View File
@@ -0,0 +1,25 @@
package main
import (
"context"
"flag"
"github.com/localhots/gobelt/dbc"
"github.com/localhots/gobelt/log"
)
func main() {
dsn := flag.String("dsn", "", "Database source name")
flag.Parse()
ctx := context.Background()
conn, err := dbc.Connect(ctx, dbc.MySQL, *dsn)
if err != nil {
log.Fatal(ctx, "Failed to establish database conneciton", log.F{
"dsn": dsn,
"error": err,
})
}
_ = conn
}