Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why I always get "unknown format:" when I use json config file #86

Closed
kuailezhish opened this issue Apr 22, 2019 · 2 comments
Closed

Why I always get "unknown format:" when I use json config file #86

kuailezhish opened this issue Apr 22, 2019 · 2 comments

Comments

@kuailezhish
Copy link

Proto file(s)
helloworld.proto

syntax = "proto3";

option java_multiple_files = true;
option java_package = "io.grpc.examples.helloworld";
option java_outer_classname = "HelloWorldProto";

package helloworld;

// The greeting service definition.
service Greeter {
    // Sends a greeting
    rpc SayHello (HelloRequest) returns (HelloReply) {
    }
}

// The request message containing the user's name.
message HelloRequest {
    string name = 1;
}

// The response message containing the greetings
message HelloReply {
    string message = 1;
}

Command line arguments / config
config.json is in the same directory with helloworld.proto, its content:

{
  "insecure": true,
  "proto": "helloworld.proto",
  "call": "helloworld.Greeter.SayHello",
  "total": 200,
  "concurrency": 10,
  "data": {
    "name": "Joe"
  },
  "host": "localhost:8099"
}

Describe the bug
when I used this command ghz --config=config.json, I got unknown format:
when I used another command ghz -config ./config.json, I got ghz: error: strconv.ParseUint: parsing "onfig": invalid syntax, try --help

I can success running rpc test with pure command Line ghz --insecure --proto ./helloworld.proto --call helloworld.Greeter.SayHello -d '{"name":"Joe"}' localhost:8099
How can I change my config so that I can use json config file?

Environment

  • OS: macOS 10.14.1
  • ghz: 0.35.0

Additional context
My grpc service is started in localhost with port 8099

@bojand
Copy link
Owner

bojand commented Apr 22, 2019

Hello, thanks for the reporting this issue. Seems a small bug was introduced in a recent release. I believe this should be addressed now in 0.35.1. Please let me know if this is still an issue.

@kuailezhish
Copy link
Author

Thanks for your handling this problem very quickly! Now, the issue is gone, and I can load json config file successfully. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants