allow stdout pipe
parent
6e8f3feee9
commit
520fca8ee5
6
main.go
6
main.go
|
|
@ -6,6 +6,7 @@ import (
|
|||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"gitlab-app.eng.qops.net/golang/jwt"
|
||||
|
|
@ -44,7 +45,7 @@ func main() {
|
|||
}
|
||||
|
||||
if verbose {
|
||||
fmt.Println(req)
|
||||
fmt.Fprintf(os.Stderr, "%v\n", req)
|
||||
}
|
||||
resp, err := c.Do(req)
|
||||
if err != nil {
|
||||
|
|
@ -56,7 +57,8 @@ func main() {
|
|||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
fmt.Printf("(%d) %s\n", resp.StatusCode, bytes.TrimSpace(b))
|
||||
fmt.Fprintf(os.Stderr, "(%d) ", resp.StatusCode)
|
||||
fmt.Printf("%s\n", bytes.TrimSpace(b))
|
||||
}
|
||||
|
||||
func setJWT(r *http.Request, brandID string) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue