Add version information
This commit is contained in:
parent
07c5b9cf5a
commit
e3b065ff89
5 changed files with 44 additions and 6 deletions
7
main.go
7
main.go
|
@ -8,13 +8,20 @@ import (
|
|||
"syscall"
|
||||
|
||||
"github.com/mdiluz/rove/pkg/server"
|
||||
"github.com/mdiluz/rove/pkg/version"
|
||||
)
|
||||
|
||||
var ver = flag.Bool("version", false, "Display version number")
|
||||
var port = flag.Int("port", 8080, "The port to host on")
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
if *ver {
|
||||
fmt.Println(version.Version)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
s := server.NewServer(
|
||||
server.OptionPort(*port),
|
||||
server.OptionPersistentData())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue