Skip to content

Commit eec1617

Browse files
Merge pull request #23 from danielgtaylor/generic-body-stdin
fix: read body from stdin for generic calls
2 parents fff23db + 6a8adbe commit eec1617

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cli/cli.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ var au aurora.Aurora
7777
func generic(method string, addr string, args []string) {
7878
var body io.Reader
7979

80-
if len(args) > 0 {
81-
d, err := GetBody("application/json", args)
82-
if err != nil {
83-
panic(err)
84-
}
80+
d, err := GetBody("application/json", args)
81+
if err != nil {
82+
panic(err)
83+
}
84+
if len(d) > 0 {
8585
body = strings.NewReader(d)
8686
}
8787

0 commit comments

Comments
 (0)