verbose output parameter
This commit is contained in:
parent
8fc5aebf12
commit
f312575da4
6
app.go
6
app.go
@ -3,7 +3,6 @@ package main
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
@ -14,6 +13,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/gobuffalo/packr"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
)
|
||||
|
||||
@ -62,6 +62,7 @@ func main() {
|
||||
}
|
||||
bindPort = &v
|
||||
}},
|
||||
{"verbose", "v", "enable verbose output", nil},
|
||||
{"help", "h", "print this help", nil},
|
||||
}
|
||||
printHelp := func() {
|
||||
@ -79,6 +80,9 @@ func main() {
|
||||
printHelp()
|
||||
os.Exit(64)
|
||||
}
|
||||
if v == "--verbose" || v == "-v" {
|
||||
log.SetLevel(log.TraceLevel)
|
||||
}
|
||||
knownParam := false
|
||||
for _, opt := range opts {
|
||||
if v == "--"+opt.longName {
|
||||
|
Loading…
Reference in New Issue
Block a user