mirror of
https://github.com/fullstorydev/grpcurl.git
synced 2026-09-05 18:16:08 +03:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cfa6ff6886 |
@@ -4,6 +4,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"flag"
|
||||
"fmt"
|
||||
@@ -764,7 +765,7 @@ func main() {
|
||||
// create a request to invoke an RPC
|
||||
tmpl := grpcurl.MakeTemplate(dsc)
|
||||
options := grpcurl.FormatOptions{EmitJSONDefaultFields: true}
|
||||
_, formatter, err := grpcurl.RequestParserAndFormatter(grpcurl.Format(*format), descSource, nil, options)
|
||||
_, formatter, err := grpcurl.RequestParserAndFormatter(grpcurl.Format(*format), descSource, bytes.NewReader(nil), options)
|
||||
if err != nil {
|
||||
fail(err, "Failed to construct formatter for %q", *format)
|
||||
}
|
||||
|
||||
+1
-1
@@ -128,7 +128,7 @@ func TestHandler(t *testing.T) {
|
||||
|
||||
verbose := verbosityLevel > 0
|
||||
|
||||
_, formatter, err := RequestParserAndFormatter(format, source, nil, FormatOptions{IncludeTextSeparator: !verbose})
|
||||
_, formatter, err := RequestParserAndFormatter(format, source, bytes.NewReader(nil), FormatOptions{IncludeTextSeparator: !verbose})
|
||||
if err != nil {
|
||||
t.Errorf("Failed to create parser and formatter: %v", err)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user