Closed didil closed 1 year ago
from and --from are the same thing, they should be treated as duplicate parameter probably. Not sure how setting a parameter and it's alias is treated in other tools.
The way the cli library we use (cobra) parses flag arguments, the latest value overwrites previous ones
ping google.com --from georgia -F miami
: location is set to miamiping google.com -F miami --from georgia
: location is set to georgiaBut this isn't something we can do easily for the from field as one value comes for a flag argument and the other is parsed separately from the "query/target" field
If its not easy to standardize it then I think we can just keep the current logic with Vietnam as final location
While working on https://github.com/jsdelivr/globalping-cli/issues/16 I noticed that contrary to what I implemented yesterday for the http flags (flags take precedence over what is in the "query/target" field), when running the command
ping google.com from vietnam --from georgia
, this ping is made from vietnam. I'm not sure if this by design ?