Skip to content

Use flags on commandline#2

Open
jforest wants to merge 15 commits into
vimeo:masterfrom
CashStar:use_flags_on_commandline
Open

Use flags on commandline#2
jforest wants to merge 15 commits into
vimeo:masterfrom
CashStar:use_flags_on_commandline

Conversation

@jforest

@jforest jforest commented Oct 30, 2014

Copy link
Copy Markdown

Rolls in all the changes from my previous pull request #1 , plus adds command line flags, allowing configuration of where the targets file is, the interval, bucket, statsd_host, statsd_port, and debug.

Debug will turn on output to stdout, like before, but by default it doesn't output anything to stdout

@jaxxstorm

Copy link
Copy Markdown

Hey @jforest - wondered if you could help. Was trying to build your PR into a binary and got the following error:

# command-line-arguments
./smoketcp.go:81: cannot use s (type statsd.Statter) as type *statsd.Client in argument to doEvery: need type assertion

Not great with Go so no idea how to fix..

@jforest

jforest commented Apr 16, 2015

Copy link
Copy Markdown
Author

I don't see any issues at all when building:

siena-2:smoketcp jforest$ git branch
  master
* use_flags_on_commandline
siena-2:smoketcp jforest$ ls
LICENSE-2.0.txt NOTICE      README.md   smoketcp.go
siena-2:smoketcp jforest$ go build
siena-2:smoketcp jforest$ ls
LICENSE-2.0.txt NOTICE      README.md   smoketcp    smoketcp.go
siena-2:smoketcp jforest$ ./smoketcp --help
Usage of ./smoketcp:
  -bucket="smoketcp": Graphite bucket prefix
  -debug=false: if true, turn on debugging output
  -interval=10: How often to run the tests
  -statsdHost="localhost": Statsd Hostname
  -statsdPort="8125": Statsd port
  -targetFile="targets": File containing the list of targets, ex: server1:80

@jaxxstorm

Copy link
Copy Markdown

Which version of go are you using? I'm on 1.4.2, possibly need to downgrade?

~/go/src/github.com/vimeo/smoketcp $ go version
go version go1.4.2 linux/amd64

@jforest

jforest commented Apr 16, 2015

Copy link
Copy Markdown
Author
siena-2:smoketcp jforest$ go version
go version go1.4 darwin/amd64

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

Successfully merging this pull request may close these issues.

2 participants