mirror of
https://github.com/xcat2/confluent.git
synced 2025-09-23 02:28:39 +00:00
Fix invoke to a file to not repeat the request
This commit is contained in:
@@ -97,11 +97,13 @@ func main() {
|
||||
mime = "application/json"
|
||||
}
|
||||
if *outputfile != "" {
|
||||
apiclient.Fetch(invokeapi.Arg(0), *outputfile, mime, body)
|
||||
err := apiclient.Fetch(invokeapi.Arg(0), *outputfile, mime, body)
|
||||
if err != nil { panic(err) }
|
||||
} else {
|
||||
rsp, err := apiclient.GrabText(invokeapi.Arg(0), mime, body)
|
||||
if err != nil { panic(err) }
|
||||
fmt.Println(rsp)
|
||||
}
|
||||
rsp, err := apiclient.GrabText(invokeapi.Arg(0), mime, body)
|
||||
if err != nil { panic(err) }
|
||||
fmt.Println(rsp)
|
||||
default:
|
||||
panic("Unrecognized subcommand")
|
||||
}
|
||||
|
Reference in New Issue
Block a user