mirror of
https://github.com/rjNemo/go-pass-gen
synced 2026-06-11 21:26:48 +00:00
28 lines
321 B
Go
28 lines
321 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
"log"
|
|
|
|
"github.com/rjNemo/go-pass-gen/api"
|
|
"github.com/rjNemo/go-pass-gen/cmd"
|
|
)
|
|
|
|
func main() {
|
|
web := flag.Bool("web", false, "")
|
|
flag.Parse()
|
|
|
|
if *web {
|
|
serveWeb()
|
|
return
|
|
}
|
|
cli()
|
|
}
|
|
|
|
func cli() {
|
|
cmd.Execute()
|
|
}
|
|
|
|
func serveWeb() {
|
|
log.Fatal(api.NewServer().Start(":8080"))
|
|
}
|