forked from quic-go/quic-go
add a quiet flag to the example client
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
verbose := flag.Bool("v", false, "verbose")
|
verbose := flag.Bool("v", false, "verbose")
|
||||||
tls := flag.Bool("tls", false, "activate support for IETF QUIC (work in progress)")
|
tls := flag.Bool("tls", false, "activate support for IETF QUIC (work in progress)")
|
||||||
|
quiet := flag.Bool("q", false, "don't print the data")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
urls := flag.Args()
|
urls := flag.Args()
|
||||||
|
|
||||||
@@ -57,8 +58,12 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
logger.Infof("Request Body:")
|
if *quiet {
|
||||||
logger.Infof("%s", body.Bytes())
|
logger.Infof("Request Body: %d bytes", body.Len())
|
||||||
|
} else {
|
||||||
|
logger.Infof("Request Body:")
|
||||||
|
logger.Infof("%s", body.Bytes())
|
||||||
|
}
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}(addr)
|
}(addr)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user