diff options
| author | Horus3 | 2015-03-11 15:42:44 +0100 |
|---|---|---|
| committer | Horus3 | 2015-03-11 15:42:44 +0100 |
| commit | 502899e07bbc23398fbcadf7a5e15624855bf877 (patch) | |
| tree | 857b0391982906954a5047a013c6be4c1d324827 /config.go | |
| download | web2irc-502899e07bbc23398fbcadf7a5e15624855bf877.tar.gz | |
Initial commit.
Diffstat (limited to 'config.go')
| -rw-r--r-- | config.go | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/config.go b/config.go new file mode 100644 index 0000000..04caaf0 --- /dev/null +++ b/config.go @@ -0,0 +1,33 @@ +package main + +import ( + "log" + "os" +) + +func checkConfig() { + check := os.Getenv("WEB2IRC_HTTP_IP") + if check == "" { + log.Fatal("Env WEB2IRC_HTTP_IP not found.") + } + check = os.Getenv("WEB2IRC_HTTP_PORT") + if check == "" { + log.Fatal("Env WEB2IRC_HTTP_PORT not found.") + } + check = os.Getenv("WEB2IRC_IRC_NICK") + if check == "" { + log.Fatal("Env WEB2IRC_IRC_NICK not found.") + } + check = os.Getenv("WEB2IRC_IRC_REAL_NAME") + if check == "" { + log.Fatal("Env WEB2IRC_IRC_REAL_NAME not found.") + } + check = os.Getenv("WEB2IRC_IRC_SERVER") + if check == "" { + log.Fatal("Env WEB2IRC_IRC_SERVER not found.") + } + check = os.Getenv("WEB2IRC_IRC_SERVER_PORT") + if check == "" { + log.Fatal("Env WEB2IRC_IRC_SERVER_PORT not found.") + } +} |
