Added version
This commit is contained in:
parent
0143977eb0
commit
6c853bbaaa
1 changed files with 7 additions and 0 deletions
|
@ -21,6 +21,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
"flag"
|
"flag"
|
||||||
|
"fmt"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
|
|
||||||
"forge.monodon.me/Gnarwhal/diodemail/smtp"
|
"forge.monodon.me/Gnarwhal/diodemail/smtp"
|
||||||
|
@ -28,8 +29,14 @@ import (
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
var cert_path string
|
var cert_path string
|
||||||
|
var version bool
|
||||||
flag.StringVar(&cert_path, "config", "/etc/diodemail/config.json", "Path to config file")
|
flag.StringVar(&cert_path, "config", "/etc/diodemail/config.json", "Path to config file")
|
||||||
|
flag.BoolVar(&version, "version", false, "Print version")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
if version {
|
||||||
|
fmt.Println("diodemail version 1.0.0")
|
||||||
|
return
|
||||||
|
}
|
||||||
config, err := LoadConfig(cert_path)
|
config, err := LoadConfig(cert_path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
|
Loading…
Reference in a new issue