Check to see if the configuration file exists and exit if it doesn't to avoid cluttering up the screen with panic output:
17:47:02 c1-macbook (tl/check-if-config-exists) ~/Documents/Go/src/github.com/tonylambiris/pgproxy $ ./pgproxy
E0430 17:48:21.319894 31550 utils.go:46] stat ./pgproxy.conf: no such file or directory
This pull request also adds a -config flag to give the ability to put the configuration file anywhere, and it also refrains from exiting if the hostname cannot be looked up (sets it to <unknown>)
Check to see if the configuration file exists and exit if it doesn't to avoid cluttering up the screen with panic output:
This changes the default output of
This pull request also adds a
-config
flag to give the ability to put the configuration file anywhere, and it also refrains from exiting if the hostname cannot be looked up (sets it to<unknown>
)Thanks!