allow stdout pipe

master
Bel LaPointe 2019-01-03 14:41:46 -07:00
parent 6e8f3feee9
commit 520fca8ee5
1 changed files with 4 additions and 2 deletions

View File

@ -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) {