Define cli options struct
This commit is contained in:
parent
d904ea9a29
commit
73ee7ca95a
3
main.go
3
main.go
@ -15,7 +15,7 @@ import (
|
|||||||
|
|
||||||
const VERSION = "0.4.1"
|
const VERSION = "0.4.1"
|
||||||
|
|
||||||
var options struct {
|
type Options struct {
|
||||||
Version bool `short:"v" long:"version" description:"Print version"`
|
Version bool `short:"v" long:"version" description:"Print version"`
|
||||||
Debug bool `short:"d" long:"debug" description:"Enable debugging mode" default:"false"`
|
Debug bool `short:"d" long:"debug" description:"Enable debugging mode" default:"false"`
|
||||||
Url string `long:"url" description:"Database connection string"`
|
Url string `long:"url" description:"Database connection string"`
|
||||||
@ -33,6 +33,7 @@ var options struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var dbClient *Client
|
var dbClient *Client
|
||||||
|
var options Options
|
||||||
|
|
||||||
func exitWithMessage(message string) {
|
func exitWithMessage(message string) {
|
||||||
fmt.Println("Error:", message)
|
fmt.Println("Error:", message)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user