Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cmd/call/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"encoding/json"
"flag"
"fmt"
"github.com/spf13/pflag"

"github.com/spf13/cobra"
"github.com/wearefair/gurl/pkg/config"
Expand Down Expand Up @@ -42,6 +43,11 @@ func init() {
// Add any flags that were registered on the built-in flag package.
flags.AddGoFlagSet(flag.CommandLine)

ConfigureFlags(flags)
}

// ConfigureFlags registers the flags not only in this project but for those projects that import this one
func ConfigureFlags(flags *pflag.FlagSet){
flags.StringVarP(&uri, "uri", "u", "", "gRPC URI in the form of host:port/service_name/method_name")
flags.StringVarP(&data, "data", "d", "", "Data, as JSON string, to send to the gRPC service")
CallCmd.MarkFlagRequired("uri")
Expand Down