We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41af389 commit 62a26d6Copy full SHA for 62a26d6
main.go
@@ -21,6 +21,7 @@ type PGConfig struct {
21
DBName string
22
Query string
23
FrequencyInMS int32
24
+ Debug bool
25
}
26
27
// ConnStr returns a connection string to connect to postgres
@@ -53,7 +54,9 @@ func main() {
53
54
log.Fatal(err)
55
56
- json.NewEncoder(os.Stdout).Encode(conf)
57
+ if conf.Debug {
58
+ json.NewEncoder(os.Stdout).Encode(conf)
59
+ }
60
61
db, err := sql.Open("postgres", conf.ConnStr())
62
if err != nil {
0 commit comments