File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ import (
2828 "github.com/reconquest/barely"
2929)
3030
31- var version = "1.0 "
31+ var version = "1.1 "
3232
3333var (
3434 servicePtr * string
3838 useHTTPSPtr * bool
3939 throttlePtr * bool
4040 ignoreCertificatePtr * bool
41+
42+ printVersion * bool
4143)
4244
4345type service struct {
@@ -180,12 +182,19 @@ func main() {
180182 ignoreCertificatePtr = flag .Bool ("insecure" , false , "Don't verify the certificate when using HTTPs" )
181183 throttlePtr = flag .Bool ("throttle" , false , "Throttle request speed. (random for a max of 10sec)" )
182184
185+ printVersion = flag .Bool ("version" , false , "Print the version and exit" )
186+
183187 flag .Parse ()
184188
185189 if ! validateFlags () {
186190 return
187191 }
188192
193+ if * printVersion {
194+ fmt .Printf ("go-out version %s\n " , version )
195+ return
196+ }
197+
189198 fmt .Println ("===== Configuration =====" )
190199 fmt .Printf ("Service: %s\n " , * servicePtr )
191200 fmt .Printf ("Start Port: %d\n " , * startPortPtr )
You can’t perform that action at this time.
0 commit comments