hashicorp / go-discover

Discover nodes in cloud environments
Mozilla Public License 2.0
563 stars 123 forks source link

Add `json` flag #74

Open jasonwalsh opened 5 years ago

jasonwalsh commented 5 years ago

This pull request includes a small feature that I and possibly others may find useful with tools like jq. The json flag returns the output as a JSON document like so:

$ discover addrs json=true ...
{
  "addresses": [
    "172.31.92.102",
    "172.31.34.208",
    "172.31.13.215"
  ]
}
jasonwalsh commented 5 years ago

I believe #69 should fix the build failure.

jasonwalsh commented 5 years ago

Is there any use for this? If not, I can close the PR.

hashicorp-cla commented 2 years ago

CLA assistant check
All committers have signed the CLA.