// NewGRPCConn returns a new GRPC connection
NewGRPCConn returns a new GRPC connection
// NewGRPCConn returns a new GRPC connection
func NewGRPCConn(host string) (*grpc.ClientConn, error) {
	var grpcOpts []grpc.DialOption
	if viper.GetBool(flagGRPCInsecure) {
		grpcOpts = append(grpcOpts, grpc.WithInsecure())
	}
	conn, err := grpc.Dial(host, grpcOpts...)
	if err != nil {
		return nil, err
	}
	return conn, nil
}
func NewGRPCConn ( host string ) ( * grpc . ClientConn , error ) { var grpcOpts [ ] grpc . DialOption if viper . GetBool ( flagGRPCInsecure ) { grpcOpts = append ( grpcOpts , grpc . WithInsecure ( ) ) } conn , err := grpc . Dial ( host , grpcOpts ... ) if err != nil { return nil , err } return conn , nil }
NewGRPCConn returns a new GRPC connection
NewGRPCConn returns a new GRPC connection