mehrdadrad / mylg

Network Diagnostic Tool
http://mylg.io
MIT License
2.7k stars 232 forks source link

Adds a configurable setting for hping interval and cleans up help #52

Closed gummiboll closed 7 years ago

gummiboll commented 7 years ago

Hello!

This PR makes hping interval a configurable setting (and shows the default in hping help). Also cleaned up the syntax a little in hping help.

PS. This build might fail in travis because http/ping references github.com/mehrdadrad/mylg/cli and this PR has some changes in cli/config.go.

mehrdadrad commented 7 years ago

@gummiboll Thanks, just it needs the below change when you get a chance.

- Interval string `json:"interval" tag:"interval"`
+ Interval string `json:"interval" tag:"lower"`

this tag forces CLI package to make the argument to lowercase.

gummiboll commented 7 years ago

Heh, whoops. Knew that, I just failed. Fixed now :)

gummiboll commented 7 years ago

Changed the default interval to 1s for hping instead of 0s which seems a bit.. dangerous. 1s really isn't that much better but usually HEAD-requests are quite light.