Skip to content

Commit

Permalink
jcall: Remove the unnecessary -http flag.
Browse files Browse the repository at this point in the history
The URL already has enough to detect the format, and the scheme
prefix is required by the HTTP client anyway.
  • Loading branch information
creachadair committed Oct 1, 2021
1 parent d440e08 commit c986bef
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/jcall/jcall.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
var (
dialTimeout = flag.Duration("dial", 5*time.Second, "Timeout on dialing the server (0 for no timeout)")
callTimeout = flag.Duration("timeout", 0, "Timeout on each call (0 for no timeout)")
doHTTP = flag.Bool("http", false, "Connect via HTTP (address is the endpoint URL)")
doNotify = flag.Bool("notify", false, "Send a notification")
withContext = flag.Bool("c", false, "Send context with request")
chanFraming = flag.String("f", envOrDefault("JCALL_FRAMING", "raw"), "Channel framing")
Expand Down Expand Up @@ -111,7 +110,7 @@ func main() {
// connection; the HTTP client will handle that.
start := time.Now()
var cc channel.Channel
if *doHTTP || isHTTP(flag.Arg(0)) {
if isHTTP(flag.Arg(0)) {
cc = jhttp.NewChannel(flag.Arg(0), nil)
} else if nc := newFraming(*chanFraming); nc == nil {
log.Fatalf("Unknown channel framing %q", *chanFraming)
Expand Down

0 comments on commit c986bef

Please sign in to comment.