File size: 269 Bytes
287a0bc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package flag

import (
	"fmt"

	"github.com/spf13/cobra"
)

const (
	DefaultGRPCPort = 50051
)

func GRPCAddr(cmd *cobra.Command, conf *string) {
	cmd.Flags().StringVarP(conf, "grpc-addr", "g", fmt.Sprintf("0.0.0.0:%d", DefaultGRPCPort), "GRPC service bind address")
}