├── .gitignore ├── vendor ├── github.com │ ├── prometheus │ │ ├── procfs │ │ │ ├── fixtures │ │ │ │ ├── 584 │ │ │ │ │ └── stat │ │ │ │ ├── 26231 │ │ │ │ │ ├── cmdline │ │ │ │ │ ├── io │ │ │ │ │ ├── stat │ │ │ │ │ └── limits │ │ │ │ ├── 26232 │ │ │ │ │ ├── cmdline │ │ │ │ │ ├── stat │ │ │ │ │ └── limits │ │ │ │ ├── symlinktargets │ │ │ │ │ ├── abc │ │ │ │ │ ├── def │ │ │ │ │ ├── ghi │ │ │ │ │ ├── uvw │ │ │ │ │ ├── xyz │ │ │ │ │ └── README │ │ │ │ ├── net │ │ │ │ │ ├── ip_vs_stats │ │ │ │ │ └── ip_vs │ │ │ │ └── mdstat │ │ │ ├── Makefile │ │ │ ├── NOTICE │ │ │ ├── README.md │ │ │ ├── AUTHORS.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── fs.go │ │ │ ├── proc_io.go │ │ │ └── stat.go │ │ └── common │ │ │ ├── expfmt │ │ │ ├── fuzz │ │ │ │ └── corpus │ │ │ │ │ ├── minimal │ │ │ │ │ ├── from_test_parse_0 │ │ │ │ │ ├── from_test_parse_error_0 │ │ │ │ │ ├── from_test_parse_error_3 │ │ │ │ │ ├── from_test_parse_error_1 │ │ │ │ │ ├── from_test_parse_error_16 │ │ │ │ │ ├── from_test_parse_error_18 │ │ │ │ │ ├── from_test_parse_error_5 │ │ │ │ │ ├── from_test_parse_error_6 │ │ │ │ │ ├── from_test_parse_error_8 │ │ │ │ │ ├── from_test_parse_error_15 │ │ │ │ │ ├── from_test_parse_error_4 │ │ │ │ │ ├── from_test_parse_error_10 │ │ │ │ │ ├── from_test_parse_error_11 │ │ │ │ │ ├── from_test_parse_error_17 │ │ │ │ │ ├── from_test_parse_error_9 │ │ │ │ │ ├── from_test_parse_error_2 │ │ │ │ │ ├── from_test_parse_error_12 │ │ │ │ │ ├── from_test_parse_error_14 │ │ │ │ │ ├── from_test_parse_error_13 │ │ │ │ │ ├── from_test_parse_error_7 │ │ │ │ │ ├── from_test_parse_error_19 │ │ │ │ │ ├── from_test_parse_1 │ │ │ │ │ ├── from_test_parse_2 │ │ │ │ │ ├── from_test_parse_4 │ │ │ │ │ └── from_test_parse_3 │ │ │ ├── testdata │ │ │ │ └── json2 │ │ │ └── fuzz.go │ │ │ └── model │ │ │ └── model.go │ ├── agtorre │ │ └── gocolorize │ │ │ ├── wercker.yml │ │ │ └── LICENSE.txt │ ├── bugsnag │ │ ├── bugsnag-go │ │ │ ├── Makefile │ │ │ ├── examples │ │ │ │ ├── revelapp │ │ │ │ │ ├── app │ │ │ │ │ │ ├── views │ │ │ │ │ │ │ ├── footer.html │ │ │ │ │ │ │ ├── errors │ │ │ │ │ │ │ │ ├── 500.html │ │ │ │ │ │ │ │ └── 404.html │ │ │ │ │ │ │ ├── flash.html │ │ │ │ │ │ │ ├── App │ │ │ │ │ │ │ │ └── Index.html │ │ │ │ │ │ │ └── header.html │ │ │ │ │ │ └── controllers │ │ │ │ │ │ │ └── app.go │ │ │ │ │ ├── public │ │ │ │ │ │ └── img │ │ │ │ │ │ │ ├── favicon.png │ │ │ │ │ │ │ ├── glyphicons-halflings.png │ │ │ │ │ │ │ └── glyphicons-halflings-white.png │ │ │ │ │ ├── tests │ │ │ │ │ │ └── apptest.go │ │ │ │ │ ├── messages │ │ │ │ │ │ └── sample.en │ │ │ │ │ └── conf │ │ │ │ │ │ ├── routes │ │ │ │ │ │ └── app.conf │ │ │ │ ├── appengine │ │ │ │ │ ├── app.yaml │ │ │ │ │ ├── README.md │ │ │ │ │ ├── mylogs.txt │ │ │ │ │ └── hello.go │ │ │ │ └── http │ │ │ │ │ └── main.go │ │ │ ├── errors │ │ │ │ └── README.md │ │ │ ├── CHANGELOG.md │ │ │ ├── appengine_test.go │ │ │ ├── panicwrap.go │ │ │ ├── LICENSE.txt │ │ │ └── json_tags.go │ │ ├── panicwrap │ │ │ ├── monitor_windows.go │ │ │ ├── LICENSE │ │ │ └── monitor.go │ │ └── osext │ │ │ ├── osext_plan9.go │ │ │ ├── osext_procfs.go │ │ │ ├── osext_windows.go │ │ │ ├── LICENSE │ │ │ └── osext.go │ ├── go-martini │ │ └── martini │ │ │ ├── wercker.yml │ │ │ ├── go_version.go │ │ │ ├── Godeps │ │ │ └── Godeps.json │ │ │ ├── env_test.go │ │ │ ├── env.go │ │ │ ├── logger_test.go │ │ │ ├── logger.go │ │ │ ├── LICENSE │ │ │ └── return_handler.go │ ├── martini-contrib │ │ └── render │ │ │ ├── wercker.yml │ │ │ ├── fixtures │ │ │ ├── basic │ │ │ │ ├── hypertext.html │ │ │ │ ├── content.tmpl │ │ │ │ ├── delims.tmpl │ │ │ │ ├── hello.tmpl │ │ │ │ ├── admin │ │ │ │ │ └── index.tmpl │ │ │ │ ├── layout.tmpl │ │ │ │ ├── another_layout.tmpl │ │ │ │ └── current_layout.tmpl │ │ │ └── custom_funcs │ │ │ │ └── index.tmpl │ │ │ └── LICENSE │ ├── olebedev │ │ └── config │ │ │ ├── wercker.yml │ │ │ ├── LICENSE │ │ │ └── README.md │ ├── revel │ │ └── revel │ │ │ ├── version.yaml │ │ │ ├── version.go │ │ │ ├── libs.go │ │ │ ├── panic.go │ │ │ ├── LICENSE │ │ │ ├── filter.go │ │ │ └── invoker.go │ ├── getsentry │ │ └── raven-go │ │ │ ├── runtests.sh │ │ │ ├── Dockerfile.test │ │ │ ├── docs │ │ │ ├── sentry-doc-config.json │ │ │ └── index.rst │ │ │ ├── README.md │ │ │ ├── writer.go │ │ │ ├── examples_test.go │ │ │ ├── exception_test.go │ │ │ └── exception.go │ ├── codegangsta │ │ ├── inject │ │ │ ├── update_readme.sh │ │ │ └── LICENSE │ │ └── negroni │ │ │ ├── recovery_test.go │ │ │ ├── logger_test.go │ │ │ ├── doc.go │ │ │ ├── logger.go │ │ │ ├── recovery.go │ │ │ └── LICENSE │ ├── zenazn │ │ └── goji │ │ │ ├── web │ │ │ ├── mutil │ │ │ │ └── mutil.go │ │ │ ├── middleware │ │ │ │ ├── middleware.go │ │ │ │ ├── nocache_test.go │ │ │ │ ├── subrouter_test.go │ │ │ │ ├── envinit.go │ │ │ │ └── recoverer.go │ │ │ ├── atomic_appengine.go │ │ │ ├── cpool.go │ │ │ ├── atomic.go │ │ │ ├── chanpool.go │ │ │ ├── router_middleware_test.go │ │ │ ├── mux_test.go │ │ │ ├── match_test.go │ │ │ ├── handler.go │ │ │ ├── func_equal.go │ │ │ └── middleware12_test.go │ │ │ ├── bind │ │ │ ├── systemd_stub.go │ │ │ ├── einhorn_stub.go │ │ │ └── systemd.go │ │ │ ├── example │ │ │ ├── README.md │ │ │ └── middleware.go │ │ │ ├── serve_appengine.go │ │ │ ├── graceful │ │ │ ├── einhorn.go │ │ │ └── serve.go │ │ │ ├── goji.go │ │ │ └── LICENSE │ ├── Sirupsen │ │ └── logrus │ │ │ ├── terminal_bsd.go │ │ │ ├── terminal_solaris.go │ │ │ ├── terminal_linux.go │ │ │ ├── hooks │ │ │ ├── syslog │ │ │ │ ├── README.md │ │ │ │ └── syslog_test.go │ │ │ ├── papertrail │ │ │ │ └── papertrail_test.go │ │ │ └── airbrake │ │ │ │ └── airbrake.go │ │ │ ├── terminal_notwindows.go │ │ │ ├── doc.go │ │ │ ├── writer.go │ │ │ ├── terminal_windows.go │ │ │ ├── examples │ │ │ ├── hook │ │ │ │ └── hook.go │ │ │ └── basic │ │ │ │ └── basic.go │ │ │ ├── json_formatter.go │ │ │ ├── LICENSE │ │ │ ├── hooks.go │ │ │ ├── formatters │ │ │ └── logstash │ │ │ │ └── logstash_test.go │ │ │ └── CHANGELOG.md │ ├── boltdb │ │ └── bolt │ │ │ ├── bolt_386.go │ │ │ ├── bolt_arm.go │ │ │ ├── boltsync_unix.go │ │ │ ├── bolt_amd64.go │ │ │ ├── bolt_linux.go │ │ │ ├── bolt_openbsd.go │ │ │ ├── bolt_test.go │ │ │ ├── LICENSE │ │ │ └── Makefile │ ├── muesli │ │ └── cache2go │ │ │ ├── errors.go │ │ │ ├── benchmark_test.go │ │ │ ├── cache.go │ │ │ └── examples │ │ │ ├── dataloader │ │ │ └── dataloader.go │ │ │ └── callbacks │ │ │ └── callbacks.go │ ├── oxtoacart │ │ └── bpool │ │ │ ├── bpool.go │ │ │ ├── bufferpool_test.go │ │ │ ├── bytepool_test.go │ │ │ ├── bufferpool.go │ │ │ ├── bytepool.go │ │ │ └── sizedbufferpool_test.go │ ├── gorilla │ │ ├── context │ │ │ └── README.md │ │ └── mux │ │ │ └── bench_test.go │ ├── stretchr │ │ └── testify │ │ │ └── assert │ │ │ └── errors.go │ ├── rs │ │ └── cors │ │ │ ├── examples │ │ │ ├── default │ │ │ │ └── server.go │ │ │ ├── nethttp │ │ │ │ └── server.go │ │ │ ├── goji │ │ │ │ └── server.go │ │ │ ├── martini │ │ │ │ └── server.go │ │ │ ├── openbar │ │ │ │ └── server.go │ │ │ ├── alice │ │ │ │ └── server.go │ │ │ └── negroni │ │ │ │ └── server.go │ │ │ └── LICENSE │ ├── tobi │ │ └── airbrake-go │ │ │ ├── handler.go │ │ │ ├── README │ │ │ └── LICENSE │ ├── matttproud │ │ └── golang_protobuf_extensions │ │ │ └── pbutil │ │ │ └── doc.go │ ├── goji │ │ └── param │ │ │ ├── error_helpers.go │ │ │ └── LICENSE │ ├── robfig │ │ ├── config │ │ │ └── error.go │ │ └── pathtree │ │ │ └── LICENSE │ └── justinas │ │ └── alice │ │ └── LICENSE ├── bitbucket.org │ └── ww │ │ └── goautoneg │ │ └── Makefile ├── golang.org │ └── x │ │ └── sys │ │ └── unix │ │ ├── asm.s │ │ ├── constants.go │ │ ├── syscall_no_getwd.go │ │ ├── zsysnum_solaris_amd64.go │ │ ├── env_unset.go │ │ ├── flock_linux_32bit.go │ │ ├── asm_solaris_amd64.s │ │ ├── gccgo_linux_amd64.go │ │ ├── race0.go │ │ ├── env_unix.go │ │ ├── asm_linux_arm64.s │ │ ├── str.go │ │ ├── race.go │ │ ├── asm_linux_ppc64x.s │ │ ├── asm_linux_arm.s │ │ ├── asm_freebsd_arm.s │ │ ├── asm_netbsd_arm.s │ │ ├── asm_darwin_386.s │ │ ├── asm_freebsd_386.s │ │ ├── asm_netbsd_386.s │ │ ├── asm_openbsd_386.s │ │ ├── asm_darwin_amd64.s │ │ ├── asm_dragonfly_386.s │ │ ├── asm_freebsd_amd64.s │ │ ├── asm_linux_amd64.s │ │ ├── asm_netbsd_amd64.s │ │ ├── asm_openbsd_amd64.s │ │ ├── asm_dragonfly_amd64.s │ │ ├── asm_darwin_arm.s │ │ ├── asm_darwin_arm64.s │ │ ├── flock.go │ │ ├── mksysnum_darwin.pl │ │ ├── asm_linux_386.s │ │ ├── syscall_solaris_amd64.go │ │ ├── gccgo_c.c │ │ ├── syscall_openbsd_amd64.go │ │ ├── sockcmsg_linux.go │ │ ├── syscall_netbsd_386.go │ │ ├── syscall_netbsd_arm.go │ │ ├── syscall_openbsd_386.go │ │ ├── syscall_netbsd_amd64.go │ │ ├── mksysnum_dragonfly.pl │ │ └── mksysnum_openbsd.pl └── gopkg.in │ ├── fsnotify.v1 │ ├── open_mode_bsd.go │ └── open_mode_darwin.go │ └── yaml.v2 │ └── LICENSE.libyaml ├── example-config.yaml ├── gluon-collector ├── init │ └── systemd ├── meshviewer │ └── loader_test.go ├── test │ └── json.go ├── data │ ├── boltstore_test.go │ └── statistics_test.go ├── scheduler │ └── scheduler_test.go ├── httpserver │ ├── server.go │ └── route.go ├── pipeline │ └── deflatepipe.go ├── prometheus │ └── pipes_test.go ├── main_test.go └── receiver_test.go ├── utils └── utils.go └── announced └── response.go /.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | pkg/ 3 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/fixtures/26232/cmdline: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/fixtures/symlinktargets/abc: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/fixtures/symlinktargets/def: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/fixtures/symlinktargets/ghi: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/fixtures/symlinktargets/uvw: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/fixtures/symlinktargets/xyz: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/agtorre/gocolorize/wercker.yml: -------------------------------------------------------------------------------- 1 | box: pjvds/golang 2 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/Makefile: -------------------------------------------------------------------------------- 1 | default: 2 | go test 3 | -------------------------------------------------------------------------------- /vendor/github.com/go-martini/martini/wercker.yml: -------------------------------------------------------------------------------- 1 | box: wercker/golang@1.1.1 -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/minimal: -------------------------------------------------------------------------------- 1 | m{} 0 2 | -------------------------------------------------------------------------------- /vendor/github.com/martini-contrib/render/wercker.yml: -------------------------------------------------------------------------------- 1 | box: wercker/golang@1.1.1 -------------------------------------------------------------------------------- /vendor/github.com/olebedev/config/wercker.yml: -------------------------------------------------------------------------------- 1 | box: wercker/golang@1.1.1 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/fixtures/26231/cmdline: -------------------------------------------------------------------------------- 1 | vimtest.go+10 -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_0: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /vendor/github.com/martini-contrib/render/fixtures/basic/hypertext.html: -------------------------------------------------------------------------------- 1 | Hypertext! 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_0: -------------------------------------------------------------------------------- 1 | bla 3.14 -------------------------------------------------------------------------------- /vendor/github.com/martini-contrib/render/fixtures/basic/content.tmpl: -------------------------------------------------------------------------------- 1 |

{{ . }}

2 | -------------------------------------------------------------------------------- /vendor/github.com/martini-contrib/render/fixtures/basic/delims.tmpl: -------------------------------------------------------------------------------- 1 |

Hello {[{.}]}

-------------------------------------------------------------------------------- /vendor/github.com/martini-contrib/render/fixtures/basic/hello.tmpl: -------------------------------------------------------------------------------- 1 |

Hello {{.}}

2 | -------------------------------------------------------------------------------- /vendor/github.com/martini-contrib/render/fixtures/basic/admin/index.tmpl: -------------------------------------------------------------------------------- 1 |

Admin {{.}}

2 | -------------------------------------------------------------------------------- /vendor/github.com/martini-contrib/render/fixtures/custom_funcs/index.tmpl: -------------------------------------------------------------------------------- 1 | {{ myCustomFunc }} 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_3: -------------------------------------------------------------------------------- 1 | metric{@="bla"} 3.14 -------------------------------------------------------------------------------- /vendor/github.com/martini-contrib/render/fixtures/basic/layout.tmpl: -------------------------------------------------------------------------------- 1 | head 2 | {{ yield }} 3 | foot 4 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_1: -------------------------------------------------------------------------------- 1 | metric{label="\t"} 3.14 -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_16: -------------------------------------------------------------------------------- 1 | 2 | # TYPE met-ric 3 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_18: -------------------------------------------------------------------------------- 1 | {label="bla"} 3.14 2 -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_5: -------------------------------------------------------------------------------- 1 | metric{label+="bla"} 3.14 -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_6: -------------------------------------------------------------------------------- 1 | metric{label=bla} 3.14 -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_8: -------------------------------------------------------------------------------- 1 | metric{label="bla"+} 3.14 -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_15: -------------------------------------------------------------------------------- 1 | 2 | # TYPE metric bla 3 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_4: -------------------------------------------------------------------------------- 1 | metric{__name__="bla"} 3.14 -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_10: -------------------------------------------------------------------------------- 1 | metric{label="bla"} 3.14 2 3 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_11: -------------------------------------------------------------------------------- 1 | metric{label="bla"} blubb 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_17: -------------------------------------------------------------------------------- 1 | @invalidmetric{label="bla"} 3.14 2 -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_9: -------------------------------------------------------------------------------- 1 | metric{label="bla"} 3.14 2.72 2 | -------------------------------------------------------------------------------- /vendor/github.com/revel/revel/version.yaml: -------------------------------------------------------------------------------- 1 | version: 0.12.0dev 2 | buildDate: 2015-01-23 3 | minimumGo: >= go1.3 4 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_2: -------------------------------------------------------------------------------- 1 | 2 | metric{label="new 3 | line"} 3.14 4 | -------------------------------------------------------------------------------- /vendor/github.com/martini-contrib/render/fixtures/basic/another_layout.tmpl: -------------------------------------------------------------------------------- 1 | another head 2 | {{ yield }} 3 | another foot 4 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_12: -------------------------------------------------------------------------------- 1 | 2 | # HELP metric one 3 | # HELP metric two 4 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_14: -------------------------------------------------------------------------------- 1 | 2 | metric 4.12 3 | # TYPE metric counter 4 | -------------------------------------------------------------------------------- /vendor/github.com/getsentry/raven-go/runtests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | go test -race ./... 3 | go test -cover ./... 4 | go test -v ./... 5 | -------------------------------------------------------------------------------- /vendor/github.com/martini-contrib/render/fixtures/basic/current_layout.tmpl: -------------------------------------------------------------------------------- 1 | {{ current }} head 2 | {{ yield }} 3 | {{ current }} foot 4 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_13: -------------------------------------------------------------------------------- 1 | 2 | # TYPE metric counter 3 | # TYPE metric untyped 4 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_7: -------------------------------------------------------------------------------- 1 | 2 | # TYPE metric summary 3 | metric{quantile="bla"} 3.14 4 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_19: -------------------------------------------------------------------------------- 1 | 2 | # TYPE metric histogram 3 | metric_bucket{le="bla"} 3.14 4 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/inject/update_readme.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | go get github.com/robertkrimen/godocdown/godocdown 3 | godocdown > README.md 4 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/Makefile: -------------------------------------------------------------------------------- 1 | ci: 2 | go fmt 3 | go vet 4 | go test -v ./... 5 | go get github.com/golang/lint/golint 6 | golint *.go 7 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/web/mutil/mutil.go: -------------------------------------------------------------------------------- 1 | // Package mutil contains various functions that are helpful when writing http 2 | // middleware. 3 | package mutil 4 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/web/middleware/middleware.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package middleware provides several standard middleware implementations. 3 | */ 4 | package middleware 5 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/bind/systemd_stub.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package bind 4 | 5 | func systemdInit() {} 6 | func usingSystemd() bool { return false } 7 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/app/views/footer.html: -------------------------------------------------------------------------------- 1 | {{if eq .RunMode "dev"}} 2 | {{template "debug.html" .}} 3 | {{end}} 4 | 5 | 6 | -------------------------------------------------------------------------------- /vendor/github.com/go-martini/martini/go_version.go: -------------------------------------------------------------------------------- 1 | // +build !go1.1 2 | 3 | package martini 4 | 5 | func MartiniDoesNotSupportGo1Point0() { 6 | "Martini requires Go 1.1 or greater." 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/fixtures/26231/io: -------------------------------------------------------------------------------- 1 | rchar: 750339 2 | wchar: 818609 3 | syscr: 7405 4 | syscw: 5245 5 | read_bytes: 1024 6 | write_bytes: 2048 7 | cancelled_write_bytes: -1024 8 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/examples/appengine/app.yaml: -------------------------------------------------------------------------------- 1 | application: bugsnag-test 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/public/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ffdo/node-informant/HEAD/vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/public/img/favicon.png -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/panicwrap/monitor_windows.go: -------------------------------------------------------------------------------- 1 | package panicwrap 2 | 3 | import "fmt" 4 | 5 | func monitor(c *WrapConfig) (int, error) { 6 | return -1, fmt.Errorf("Monitor is not supported on windows") 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/fixtures/symlinktargets/README: -------------------------------------------------------------------------------- 1 | This directory contains some empty files that are the symlinks the files in the "fd" directory point to. 2 | They are otherwise ignored by the tests 3 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_1: -------------------------------------------------------------------------------- 1 | 2 | minimal_metric 1.234 3 | another_metric -3e3 103948 4 | # Even that: 5 | no_labels{} 3 6 | # HELP line for non-existing metric will be ignored. 7 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/fixtures/26232/stat: -------------------------------------------------------------------------------- 1 | 33 (ata_sff) S 2 0 0 0 -1 69238880 0 0 0 0 0 0 0 0 0 -20 1 0 5 0 0 18446744073709551615 0 0 0 0 0 0 0 2147483647 0 18446744073709551615 0 0 17 1 0 0 0 0 0 0 0 0 0 0 0 0 0 2 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/public/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ffdo/node-informant/HEAD/vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/public/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/public/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ffdo/node-informant/HEAD/vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/public/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | 3 | package logrus 4 | 5 | import "syscall" 6 | 7 | const ioctlReadTermios = syscall.TIOCGETA 8 | 9 | type Termios syscall.Termios 10 | -------------------------------------------------------------------------------- /vendor/github.com/revel/revel/version.go: -------------------------------------------------------------------------------- 1 | package revel 2 | 3 | const ( 4 | // Current Revel version 5 | VERSION = "0.12.0" 6 | // Latest commit date 7 | BUILD_DATE = "2015-03-25" 8 | // Minimum required Go version 9 | MINIMUM_GO = ">= go1.3" 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_386.go: -------------------------------------------------------------------------------- 1 | package bolt 2 | 3 | // maxMapSize represents the largest mmap size supported by Bolt. 4 | const maxMapSize = 0x7FFFFFFF // 2GB 5 | 6 | // maxAllocSize is the size used when creating array pointers. 7 | const maxAllocSize = 0xFFFFFFF 8 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_arm.go: -------------------------------------------------------------------------------- 1 | package bolt 2 | 3 | // maxMapSize represents the largest mmap size supported by Bolt. 4 | const maxMapSize = 0x7FFFFFFF // 2GB 5 | 6 | // maxAllocSize is the size used when creating array pointers. 7 | const maxAllocSize = 0xFFFFFFF 8 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/boltsync_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!plan9,!linux,!openbsd 2 | 3 | package bolt 4 | 5 | var odirect int 6 | 7 | // fdatasync flushes written data to a file descriptor. 8 | func fdatasync(db *DB) error { 9 | return db.file.Sync() 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_amd64.go: -------------------------------------------------------------------------------- 1 | package bolt 2 | 3 | // maxMapSize represents the largest mmap size supported by Bolt. 4 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB 5 | 6 | // maxAllocSize is the size used when creating array pointers. 7 | const maxAllocSize = 0x7FFFFFFF 8 | -------------------------------------------------------------------------------- /vendor/bitbucket.org/ww/goautoneg/Makefile: -------------------------------------------------------------------------------- 1 | include $(GOROOT)/src/Make.inc 2 | 3 | TARG=bitbucket.org/ww/goautoneg 4 | GOFILES=autoneg.go 5 | 6 | include $(GOROOT)/src/Make.pkg 7 | 8 | format: 9 | gofmt -w *.go 10 | 11 | docs: 12 | gomake clean 13 | godoc ${TARG} > README.txt 14 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/cache2go/errors.go: -------------------------------------------------------------------------------- 1 | package cache2go 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | var ( 8 | ErrKeyNotFound = errors.New("Key not found in cache") 9 | ErrKeyNotFoundOrLoadable = errors.New("Key not found and could not be loaded into cache") 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/github.com/oxtoacart/bpool/bpool.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package bpool implements leaky pools of byte arrays and Buffers as bounded 3 | channels. It is based on the leaky buffer example from the Effective Go 4 | documentation: http://golang.org/doc/effective_go.html#leaky_buffer 5 | */ 6 | package bpool 7 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_linux.go: -------------------------------------------------------------------------------- 1 | package bolt 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | var odirect = syscall.O_DIRECT 8 | 9 | // fdatasync flushes written data to a file descriptor. 10 | func fdatasync(db *DB) error { 11 | return syscall.Fdatasync(int(db.file.Fd())) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/NOTICE: -------------------------------------------------------------------------------- 1 | procfs provides functions to retrieve system, kernel and process 2 | metrics from the pseudo-filesystem proc. 3 | 4 | Copyright 2014-2015 The Prometheus Authors 5 | 6 | This product includes software developed at 7 | SoundCloud Ltd. (http://soundcloud.com/). 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | TEXT ·use(SB),NOSPLIT,$0 10 | RET 11 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/errors/README.md: -------------------------------------------------------------------------------- 1 | Adds stacktraces to errors in golang. 2 | 3 | This was made to help build the Bugsnag notifier but can be used standalone if 4 | you like to have stacktraces on errors. 5 | 6 | See [Godoc](https://godoc.org/github.com/bugsnag/bugsnag-go/errors) for the API docs. 7 | -------------------------------------------------------------------------------- /vendor/github.com/go-martini/martini/Godeps/Godeps.json: -------------------------------------------------------------------------------- 1 | { 2 | "ImportPath": "github.com/go-martini/martini", 3 | "GoVersion": "go1.4.2", 4 | "Deps": [ 5 | { 6 | "ImportPath": "github.com/codegangsta/inject", 7 | "Comment": "v1.0-rc1-10-g33e0aa1", 8 | "Rev": "33e0aa1cb7c019ccc3fbe049a8262a6403d30504" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/context/README.md: -------------------------------------------------------------------------------- 1 | context 2 | ======= 3 | [![Build Status](https://travis-ci.org/gorilla/context.png?branch=master)](https://travis-ci.org/gorilla/context) 4 | 5 | gorilla/context is a general purpose registry for global request variables. 6 | 7 | Read the full documentation here: http://www.gorillatoolkit.org/pkg/context 8 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/examples/appengine/README.md: -------------------------------------------------------------------------------- 1 | This is an example google app-engine app. 2 | 3 | To use it you will need to install the [App Engine 4 | SDK](https://cloud.google.com/appengine/downloads) for Go. 5 | 6 | Then run: 7 | 8 | goapp deploy 9 | 10 | Then open: https://bugsnag-test.appspot.com/ in your web-browser. 11 | -------------------------------------------------------------------------------- /vendor/github.com/getsentry/raven-go/Dockerfile.test: -------------------------------------------------------------------------------- 1 | FROM golang:1.4 2 | 3 | RUN mkdir -p /go/src/github.com/getsentry/raven-go 4 | WORKDIR /go/src/github.com/getsentry/raven-go 5 | ENV GOPATH /go 6 | 7 | RUN go install -race std && go get golang.org/x/tools/cmd/cover 8 | 9 | COPY . /go/src/github.com/getsentry/raven-go 10 | 11 | CMD ["./runtests.sh"] 12 | -------------------------------------------------------------------------------- /example-config.yaml: -------------------------------------------------------------------------------- 1 | receiver: 2 | - type: announced 3 | interface: "bat0" 4 | port: 21444 5 | 6 | interval: 7 | statistics: 300 8 | nodeinfo: 1800 9 | 10 | logger: 11 | level: "debug" 12 | 13 | http: 14 | port: 8080 15 | #address: "[::]" 16 | 17 | prometheus: 18 | namelabel: true 19 | sitecodelabel: true 20 | 21 | meshviewer_version: 1 22 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/web/atomic_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package web 4 | 5 | func (rt *router) getMachine() *routeMachine { 6 | rt.lock.Lock() 7 | defer rt.lock.Unlock() 8 | return rt.machine 9 | } 10 | 11 | // We always hold the lock when calling setMachine. 12 | func (rt *router) setMachine(m *routeMachine) { 13 | rt.machine = m 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris 2 | 3 | package logrus 4 | 5 | import ( 6 | "os" 7 | 8 | "golang.org/x/sys/unix" 9 | ) 10 | 11 | // IsTerminal returns true if the given file descriptor is a terminal. 12 | func IsTerminal() bool { 13 | _, err := unix.IoctlGetTermios(int(os.Stdout.Fd()), unix.TCGETA) 14 | return err == nil 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/fixtures/26231/stat: -------------------------------------------------------------------------------- 1 | 26231 (vim) R 5392 7446 5392 34835 7446 4218880 32533 309516 26 82 1677 44 158 99 20 0 1 0 82375 56274944 1981 18446744073709551615 4194304 6294284 140736914091744 140736914087944 139965136429984 0 0 12288 1870679807 0 0 0 17 0 0 0 31 0 0 8391624 8481048 16420864 140736914093252 140736914093279 140736914093279 140736914096107 0 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/fixtures/net/ip_vs_stats: -------------------------------------------------------------------------------- 1 | Total Incoming Outgoing Incoming Outgoing 2 | Conns Packets Packets Bytes Bytes 3 | 16AA370 E33656E5 0 51D8C8883AB3 0 4 | 5 | Conns/s Pkts/s Pkts/s Bytes/s Bytes/s 6 | 4 1FB3C 0 1282A8F 0 7 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/bind/einhorn_stub.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package bind 4 | 5 | import ( 6 | "net" 7 | ) 8 | 9 | func einhornInit() {} 10 | func einhornAck() {} 11 | func einhornBind(fd int) (net.Listener, error) { return nil, nil } 12 | func usingEinhorn() bool { return false } 13 | -------------------------------------------------------------------------------- /vendor/gopkg.in/fsnotify.v1/open_mode_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build freebsd openbsd netbsd dragonfly 6 | 7 | package fsnotify 8 | 9 | import "syscall" 10 | 11 | const openMode = syscall.O_NONBLOCK | syscall.O_RDONLY 12 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_linux.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2013 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | package logrus 7 | 8 | import "syscall" 9 | 10 | const ioctlReadTermios = syscall.TCGETS 11 | 12 | type Termios syscall.Termios 13 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/fixtures/584/stat: -------------------------------------------------------------------------------- 1 | 1020 ((a b ) ( c d) ) R 28378 1020 28378 34842 1020 4218880 286 0 0 0 0 0 0 0 20 0 1 0 10839175 10395648 155 18446744073709551615 4194304 4238788 140736466511168 140736466511168 140609271124624 0 0 0 0 0 0 0 17 5 0 0 0 0 0 6336016 6337300 25579520 140736466515030 140736466515061 140736466515061 140736466518002 0 2 | #!/bin/cat /proc/self/stat 3 | -------------------------------------------------------------------------------- /vendor/gopkg.in/fsnotify.v1/open_mode_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin 6 | 7 | package fsnotify 8 | 9 | import "syscall" 10 | 11 | // note: this constant is not defined on BSD 12 | const openMode = syscall.O_EVTONLY 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_no_getwd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build dragonfly freebsd netbsd openbsd 6 | 7 | package unix 8 | 9 | const ImplementsGetwd = false 10 | 11 | func Getwd() (string, error) { return "", ENOTSUP } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | // TODO(aram): remove these before Go 1.3. 10 | const ( 11 | SYS_EXECVE = 59 12 | SYS_FCNTL = 62 13 | ) 14 | -------------------------------------------------------------------------------- /gluon-collector/init/systemd: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Gluon Collector. Collects information about gluon nodes 3 | 4 | [Service] 5 | PIDFile=/tmp/gluon-collector.pid-3030 6 | User=root 7 | Group=root 8 | WorkingDirectory=/opt/gluon-collector 9 | ExecStart=/bin/bash -c '/opt/gluon-collector/gluon-collector-linux-amd64 -config /etc/gluon-collector.yaml' 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 1.0.4 2 | ----- 3 | 4 | - Fix appengine integration broken by 1.0.3 5 | 6 | 1.0.3 7 | ----- 8 | 9 | - Allow any Logger with a Printf method. 10 | 11 | 1.0.2 12 | ----- 13 | 14 | - Use bugsnag copies of dependencies to avoid potential link rot 15 | 16 | 1.0.1 17 | ----- 18 | 19 | - gofmt/golint/govet docs improvements. 20 | 21 | 1.0.0 22 | ----- 23 | -------------------------------------------------------------------------------- /vendor/github.com/getsentry/raven-go/docs/sentry-doc-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "wizards": { 3 | "go": { 4 | "name": "Go", 5 | "client_lib": "raven-go", 6 | "is_framework": false, 7 | "doc_link": "", 8 | "snippets": [ 9 | "index#installation", 10 | "index#configuring-the-client", 11 | "index#reporting-errors" 12 | ] 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.4 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Unsetenv(key string) error { 12 | // This was added in Go 1.4. 13 | return syscall.Unsetenv(key) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/errors.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | // AnError is an error instance useful for testing. If the code does not care 8 | // about error specifics, and only needs to return the error for example, this 9 | // error should be used to make the test code more readable. 10 | var AnError = errors.New("assert.AnError general error for testing") 11 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/app/views/errors/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Application error 5 | 6 | 7 | {{if eq .RunMode "dev"}} 8 | {{template "errors/500-dev.html" .}} 9 | {{else}} 10 |

Oops, an error occured

11 |

12 | This exception has been logged. 13 |

14 | {{end}} 15 | 16 | 17 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/appengine_test.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package bugsnag 4 | 5 | import ( 6 | "appengine/aetest" 7 | ) 8 | 9 | func init() { 10 | c, err := aetest.NewContext(nil) 11 | if err != nil { 12 | panic(err) 13 | } 14 | 15 | OnBeforeNotify(func(event *Event, config *Configuration) error { 16 | 17 | event.RawData = append(event.RawData, c) 18 | 19 | return nil 20 | }) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/app/views/errors/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Not found 5 | 6 | 7 | {{if eq .RunMode "dev"}} 8 | {{template "errors/404-dev.html" .}} 9 | {{else}} 10 | {{with .Error}} 11 |

12 | {{.Title}} 13 |

14 |

15 | {{.Description}} 16 |

17 | {{end}} 18 | {{end}} 19 | 20 | 21 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/app/controllers/app.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import "github.com/revel/revel" 4 | import "time" 5 | 6 | type App struct { 7 | *revel.Controller 8 | } 9 | 10 | func (c App) Index() revel.Result { 11 | go func() { 12 | time.Sleep(5 * time.Second) 13 | panic("hello!") 14 | }() 15 | 16 | s := make([]string, 0) 17 | revel.INFO.Print(s[0]) 18 | return c.Render() 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/web/cpool.go: -------------------------------------------------------------------------------- 1 | // +build go1.3 2 | 3 | package web 4 | 5 | import "sync" 6 | 7 | type cPool sync.Pool 8 | 9 | func makeCPool() *cPool { 10 | return &cPool{} 11 | } 12 | 13 | func (c *cPool) alloc() *cStack { 14 | cs := (*sync.Pool)(c).Get() 15 | if cs == nil { 16 | return nil 17 | } 18 | return cs.(*cStack) 19 | } 20 | 21 | func (c *cPool) release(cs *cStack) { 22 | (*sync.Pool)(c).Put(cs) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/app/views/flash.html: -------------------------------------------------------------------------------- 1 | {{if .flash.success}} 2 |
3 | {{.flash.success}} 4 |
5 | {{end}} 6 | 7 | {{if or .errors .flash.error}} 8 |
9 | {{if .flash.error}} 10 | {{.flash.error}} 11 | {{end}} 12 | 17 |
18 | {{end}} 19 | -------------------------------------------------------------------------------- /vendor/github.com/getsentry/raven-go/README.md: -------------------------------------------------------------------------------- 1 | # raven [![Build Status](https://travis-ci.org/getsentry/raven-go.png?branch=master)](https://travis-ci.org/getsentry/raven-go) 2 | 3 | raven is a Go client for the [Sentry](https://github.com/getsentry/sentry) 4 | event/error logging system. 5 | 6 | [**Documentation**](http://godoc.org/github.com/getsentry/raven-go). 7 | 8 | ## Installation 9 | 10 | ```text 11 | go get github.com/getsentry/raven-go 12 | ``` 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_2: -------------------------------------------------------------------------------- 1 | 2 | # A normal comment. 3 | # 4 | # TYPE name counter 5 | name{labelname="val1",basename="basevalue"} NaN 6 | name {labelname="val2",basename="base\"v\\al\nue"} 0.23 1234567890 7 | # HELP name two-line\n doc str\\ing 8 | 9 | # HELP name2 doc str"ing 2 10 | # TYPE name2 gauge 11 | name2{labelname="val2" ,basename = "basevalue2" } +Inf 54321 12 | name2{ labelname = "val1" , }-Inf 13 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/tests/apptest.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import "github.com/revel/revel" 4 | 5 | type AppTest struct { 6 | revel.TestSuite 7 | } 8 | 9 | func (t *AppTest) Before() { 10 | println("Set up") 11 | } 12 | 13 | func (t AppTest) TestThatIndexPageWorks() { 14 | t.Get("/") 15 | t.AssertOk() 16 | t.AssertContentType("text/html; charset=utf-8") 17 | } 18 | 19 | func (t *AppTest) After() { 20 | println("Tear down") 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/osext/osext_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package osext 6 | 7 | import "syscall" 8 | 9 | func executable() (string, error) { 10 | f, err := Open("/proc/" + itoa(Getpid()) + "/text") 11 | if err != nil { 12 | return "", err 13 | } 14 | defer f.Close() 15 | return syscall.Fd2path(int(f.Fd())) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/example/README.md: -------------------------------------------------------------------------------- 1 | Gritter 2 | ======= 3 | 4 | Gritter is an example application built using Goji, where people who have 5 | nothing better to do can post short 140-character "greets." 6 | 7 | A good place to start is with `main.go`, which contains a well-commented 8 | walkthrough of Goji's features. Gritter uses a couple custom middlewares, which 9 | have been arbitrarily placed in `middleware.go`. Finally some uninteresting 10 | "database models" live in `models.go`. 11 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/web/atomic.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package web 4 | 5 | import ( 6 | "sync/atomic" 7 | "unsafe" 8 | ) 9 | 10 | func (rt *router) getMachine() *routeMachine { 11 | ptr := (*unsafe.Pointer)(unsafe.Pointer(&rt.machine)) 12 | sm := (*routeMachine)(atomic.LoadPointer(ptr)) 13 | return sm 14 | } 15 | func (rt *router) setMachine(m *routeMachine) { 16 | ptr := (*unsafe.Pointer)(unsafe.Pointer(&rt.machine)) 17 | atomic.StorePointer(ptr, unsafe.Pointer(m)) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/rs/cors/examples/default/server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/rs/cors" 7 | ) 8 | 9 | func main() { 10 | mux := http.NewServeMux() 11 | mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { 12 | w.Header().Set("Content-Type", "application/json") 13 | w.Write([]byte("{\"hello\": \"world\"}")) 14 | }) 15 | 16 | // Use default options 17 | handler := cors.Default().Handler(mux) 18 | http.ListenAndServe(":8080", handler) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/rs/cors/examples/nethttp/server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/rs/cors" 7 | ) 8 | 9 | func main() { 10 | c := cors.New(cors.Options{ 11 | AllowedOrigins: []string{"http://foo.com"}, 12 | }) 13 | 14 | handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 15 | w.Header().Set("Content-Type", "application/json") 16 | w.Write([]byte("{\"hello\": \"world\"}")) 17 | }) 18 | 19 | http.ListenAndServe(":8080", c.Handler(handler)) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/rs/cors/examples/goji/server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/rs/cors" 7 | "github.com/zenazn/goji" 8 | ) 9 | 10 | func main() { 11 | c := cors.New(cors.Options{ 12 | AllowedOrigins: []string{"http://foo.com"}, 13 | }) 14 | goji.Use(c.Handler) 15 | 16 | goji.Get("/", func(w http.ResponseWriter, r *http.Request) { 17 | w.Header().Set("Content-Type", "application/json") 18 | w.Write([]byte("{\"hello\": \"world\"}")) 19 | }) 20 | 21 | goji.Serve() 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/tobi/airbrake-go/handler.go: -------------------------------------------------------------------------------- 1 | package airbrake 2 | 3 | import ( 4 | "net/http" 5 | ) 6 | 7 | // CapturePanicHandler "middleware". 8 | // Wraps the http handler so that all panics will be dutifully reported to airbrake 9 | // 10 | // Example: 11 | // http.HandleFunc("/", airbrake.CapturePanicHandler(MyServerFunc)) 12 | func CapturePanicHandler(app http.HandlerFunc) http.HandlerFunc { 13 | return func(w http.ResponseWriter, r *http.Request) { 14 | defer CapturePanic(r) 15 | app(w, r) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/messages/sample.en: -------------------------------------------------------------------------------- 1 | # Sample messages file for the English language (en) 2 | # Message file extensions should be ISO 639-1 codes (http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) 3 | # Sections within each message file can optionally override the defaults using ISO 3166-1 alpha-2 codes (http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) 4 | # See also: 5 | # - http://www.rfc-editor.org/rfc/bcp/bcp47.txt 6 | # - http://www.w3.org/International/questions/qa-accept-lang-locales 7 | 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-64 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-64 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/github.com/rs/cors/examples/martini/server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/go-martini/martini" 5 | "github.com/martini-contrib/render" 6 | "github.com/rs/cors" 7 | ) 8 | 9 | func main() { 10 | c := cors.New(cors.Options{ 11 | AllowedOrigins: []string{"http://foo.com"}, 12 | }) 13 | 14 | m := martini.Classic() 15 | m.Use(render.Renderer()) 16 | m.Use(c.HandlerFunc) 17 | 18 | m.Get("/", func(r render.Render) { 19 | r.JSON(200, map[string]interface{}{"hello": "world"}) 20 | }) 21 | 22 | m.Run() 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_4: -------------------------------------------------------------------------------- 1 | 2 | # HELP request_duration_microseconds The response latency. 3 | # TYPE request_duration_microseconds histogram 4 | request_duration_microseconds_bucket{le="100"} 123 5 | request_duration_microseconds_bucket{le="120"} 412 6 | request_duration_microseconds_bucket{le="144"} 592 7 | request_duration_microseconds_bucket{le="172.8"} 1524 8 | request_duration_microseconds_bucket{le="+Inf"} 2693 9 | request_duration_microseconds_sum 1.7560473e+06 10 | request_duration_microseconds_count 2693 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo,linux,amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/go-martini/martini/env_test.go: -------------------------------------------------------------------------------- 1 | package martini 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func Test_SetENV(t *testing.T) { 8 | tests := []struct { 9 | in string 10 | out string 11 | }{ 12 | {"", "development"}, 13 | {"not_development", "not_development"}, 14 | } 15 | 16 | for _, test := range tests { 17 | setENV(test.in) 18 | if Env != test.out { 19 | expect(t, Env, test.out) 20 | } 21 | } 22 | } 23 | 24 | func Test_Root(t *testing.T) { 25 | if len(Root) == 0 { 26 | t.Errorf("Expected root path will be set") 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /gluon-collector/meshviewer/loader_test.go: -------------------------------------------------------------------------------- 1 | package meshviewer 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/ffdo/node-informant/gluon-collector/data" 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func TestLoadingLegacyNodesJson(t *testing.T) { 11 | assert := assert.New(t) 12 | nodeJsonPath := "../../../../../../nodes.json" 13 | 14 | store := data.NewSimpleInMemoryStore() 15 | importer := &FFMapBackendDataLoader{Store: store} 16 | err := importer.LoadNodesFromFile(nodeJsonPath) 17 | assert.Nil(err) 18 | assert.True(0 < len(store.GetNodeInfos())) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/README.md: -------------------------------------------------------------------------------- 1 | # procfs 2 | 3 | This procfs package provides functions to retrieve system, kernel and process 4 | metrics from the pseudo-filesystem proc. 5 | 6 | *WARNING*: This package is a work in progress. Its API may still break in 7 | backwards-incompatible ways without warnings. Use it at your own risk. 8 | 9 | [![GoDoc](https://godoc.org/github.com/prometheus/procfs?status.png)](https://godoc.org/github.com/prometheus/procfs) 10 | [![Build Status](https://travis-ci.org/prometheus/procfs.svg?branch=master)](https://travis-ci.org/prometheus/procfs) 11 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/hooks/syslog/README.md: -------------------------------------------------------------------------------- 1 | # Syslog Hooks for Logrus :walrus: 2 | 3 | ## Usage 4 | 5 | ```go 6 | import ( 7 | "log/syslog" 8 | "github.com/Sirupsen/logrus" 9 | logrus_syslog "github.com/Sirupsen/logrus/hooks/syslog" 10 | ) 11 | 12 | func main() { 13 | log := logrus.New() 14 | hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") 15 | 16 | if err == nil { 17 | log.Hooks.Add(hook) 18 | } 19 | } 20 | ``` 21 | -------------------------------------------------------------------------------- /vendor/github.com/rs/cors/examples/openbar/server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/rs/cors" 7 | ) 8 | 9 | func main() { 10 | c := cors.New(cors.Options{ 11 | AllowedOrigins: []string{"*"}, 12 | AllowedMethods: []string{"GET", "POST", "PUT", "DELETE"}, 13 | AllowCredentials: true, 14 | }) 15 | 16 | h := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 17 | w.Header().Set("Content-Type", "application/json") 18 | w.Write([]byte("{\"hello\": \"world\"}")) 19 | }) 20 | 21 | http.ListenAndServe(":8080", c.Handler(h)) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/conf/routes: -------------------------------------------------------------------------------- 1 | # Routes 2 | # This file defines all application routes (Higher priority routes first) 3 | # ~~~~ 4 | 5 | module:testrunner 6 | 7 | GET / App.Index 8 | 9 | # Ignore favicon requests 10 | GET /favicon.ico 404 11 | 12 | # Map static resources from the /app/public folder to the /public path 13 | GET /public/*filepath Static.Serve("public") 14 | 15 | # Catch all 16 | * /:controller/:action :controller.:action 17 | -------------------------------------------------------------------------------- /vendor/github.com/getsentry/raven-go/writer.go: -------------------------------------------------------------------------------- 1 | package raven 2 | 3 | type Writer struct { 4 | Client *Client 5 | Level Severity 6 | Logger string // Logger name reported to Sentry 7 | } 8 | 9 | // Write formats the byte slice p into a string, and sends a message to 10 | // Sentry at the severity level indicated by the Writer w. 11 | func (w *Writer) Write(p []byte) (int, error) { 12 | message := string(p) 13 | 14 | packet := NewPacket(message, &Message{message, nil}) 15 | packet.Level = w.Level 16 | packet.Logger = w.Logger 17 | w.Client.Capture(packet, nil) 18 | 19 | return len(p), nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/rs/cors/examples/alice/server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/justinas/alice" 7 | "github.com/rs/cors" 8 | ) 9 | 10 | func main() { 11 | c := cors.New(cors.Options{ 12 | AllowedOrigins: []string{"http://foo.com"}, 13 | }) 14 | 15 | mux := http.NewServeMux() 16 | 17 | mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { 18 | w.Header().Set("Content-Type", "application/json") 19 | w.Write([]byte("{\"hello\": \"world\"}")) 20 | }) 21 | 22 | chain := alice.New(c.Handler).Then(mux) 23 | http.ListenAndServe(":8080", chain) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/app/views/App/Index.html: -------------------------------------------------------------------------------- 1 | {{set . "title" "Home"}} 2 | {{template "header.html" .}} 3 | 4 |
5 |
6 |
7 |
8 |

It works!

9 |

10 |
11 |
12 |
13 |
14 | 15 |
16 |
17 |
18 | {{template "flash.html" .}} 19 |
20 |
21 |
22 | 23 | {{template "footer.html" .}} 24 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/serve_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package goji 4 | 5 | import ( 6 | "log" 7 | "net/http" 8 | ) 9 | 10 | func init() { 11 | if fl := log.Flags(); fl&log.Ltime != 0 { 12 | log.SetFlags(fl | log.Lmicroseconds) 13 | } 14 | } 15 | 16 | // Serve starts Goji using reasonable defaults. 17 | func Serve() { 18 | DefaultMux.Compile() 19 | // Install our handler at the root of the standard net/http default mux. 20 | // This is required for App Engine, and also allows packages like expvar 21 | // to continue working as expected. 22 | http.Handle("/", DefaultMux) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/web/middleware/nocache_test.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "net/http" 5 | "net/http/httptest" 6 | "testing" 7 | 8 | "github.com/zenazn/goji/web" 9 | ) 10 | 11 | func TestNoCache(t *testing.T) { 12 | 13 | rr := httptest.NewRecorder() 14 | s := web.New() 15 | 16 | s.Use(NoCache) 17 | r, err := http.NewRequest("GET", "/", nil) 18 | if err != nil { 19 | t.Fatal(err) 20 | } 21 | 22 | s.ServeHTTP(rr, r) 23 | 24 | for k, v := range noCacheHeaders { 25 | if rr.HeaderMap[k][0] != v { 26 | t.Errorf("%s header not set by middleware.", k) 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/rs/cors/examples/negroni/server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/codegangsta/negroni" 7 | "github.com/rs/cors" 8 | ) 9 | 10 | func main() { 11 | c := cors.New(cors.Options{ 12 | AllowedOrigins: []string{"http://foo.com"}, 13 | }) 14 | 15 | mux := http.NewServeMux() 16 | 17 | mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { 18 | w.Header().Set("Content-Type", "application/json") 19 | w.Write([]byte("{\"hello\": \"world\"}")) 20 | }) 21 | 22 | n := negroni.Classic() 23 | n.Use(c) 24 | n.UseHandler(mux) 25 | n.Run(":3000") 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/mux/bench_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Gorilla Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package mux 6 | 7 | import ( 8 | "net/http" 9 | "testing" 10 | ) 11 | 12 | func BenchmarkMux(b *testing.B) { 13 | router := new(Router) 14 | handler := func(w http.ResponseWriter, r *http.Request) {} 15 | router.HandleFunc("/v1/{v1}", handler) 16 | 17 | request, _ := http.NewRequest("GET", "/v1/anything", nil) 18 | for i := 0; i < b.N; i++ { 19 | router.ServeHTTP(nil, request) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/web/chanpool.go: -------------------------------------------------------------------------------- 1 | // +build !go1.3 2 | 3 | package web 4 | 5 | // This is an alternate implementation of Go 1.3's sync.Pool. 6 | 7 | // Maximum size of the pool of spare middleware stacks 8 | const cPoolSize = 32 9 | 10 | type cPool chan *cStack 11 | 12 | func makeCPool() *cPool { 13 | p := make(cPool, cPoolSize) 14 | return &p 15 | } 16 | 17 | func (c cPool) alloc() *cStack { 18 | select { 19 | case cs := <-c: 20 | return cs 21 | default: 22 | return nil 23 | } 24 | } 25 | 26 | func (c cPool) release(cs *cStack) { 27 | select { 28 | case c <- cs: 29 | default: 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/hooks/papertrail/papertrail_test.go: -------------------------------------------------------------------------------- 1 | package logrus_papertrail 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | 7 | "github.com/Sirupsen/logrus" 8 | "github.com/stvp/go-udp-testing" 9 | ) 10 | 11 | func TestWritingToUDP(t *testing.T) { 12 | port := 16661 13 | udp.SetAddr(fmt.Sprintf(":%d", port)) 14 | 15 | hook, err := NewPapertrailHook("localhost", port, "test") 16 | if err != nil { 17 | t.Errorf("Unable to connect to local UDP server.") 18 | } 19 | 20 | log := logrus.New() 21 | log.Hooks.Add(hook) 22 | 23 | udp.ShouldReceive(t, "foo", func() { 24 | log.Info("foo") 25 | }) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/graceful/einhorn.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package graceful 4 | 5 | import ( 6 | "os" 7 | "strconv" 8 | "syscall" 9 | ) 10 | 11 | func init() { 12 | // This is a little unfortunate: goji/bind already knows whether we're 13 | // running under einhorn, but we don't want to introduce a dependency 14 | // between the two packages. Since the check is short enough, inlining 15 | // it here seems "fine." 16 | mpid, err := strconv.Atoi(os.Getenv("EINHORN_MASTER_PID")) 17 | if err != nil || mpid != os.Getppid() { 18 | return 19 | } 20 | stdSignals = append(stdSignals, syscall.SIGUSR2) 21 | } 22 | -------------------------------------------------------------------------------- /gluon-collector/test/json.go: -------------------------------------------------------------------------------- 1 | package test 2 | 3 | var ( 4 | defectNodeinfo = `{ 5 | "nodeinfo": { 6 | "hostname": "dus0 (Mapserver)", 7 | "node_id": "dus0", 8 | "owner": { 9 | "contact": "xxx" 10 | }, 11 | "software": { 12 | "firmware": { 13 | "base": "ArchLinux", 14 | "release": "rolling" 15 | } 16 | }, 17 | "system": { 18 | "site_code": "ffdus" 19 | } 20 | } 21 | } 22 | ` 23 | defectStatistics = ` 24 | { 25 | "statistics": { 26 | "node_id": "dus0" 27 | } 28 | } 29 | ` 30 | ) 31 | -------------------------------------------------------------------------------- /vendor/github.com/go-martini/martini/env.go: -------------------------------------------------------------------------------- 1 | package martini 2 | 3 | import ( 4 | "os" 5 | ) 6 | 7 | // Envs 8 | const ( 9 | Dev string = "development" 10 | Prod string = "production" 11 | Test string = "test" 12 | ) 13 | 14 | // Env is the environment that Martini is executing in. The MARTINI_ENV is read on initialization to set this variable. 15 | var Env = Dev 16 | var Root string 17 | 18 | func setENV(e string) { 19 | if len(e) > 0 { 20 | Env = e 21 | } 22 | } 23 | 24 | func init() { 25 | setENV(os.Getenv("MARTINI_ENV")) 26 | var err error 27 | Root, err = os.Getwd() 28 | if err != nil { 29 | panic(err) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/examples/http/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/bugsnag/bugsnag-go" 5 | "log" 6 | "net/http" 7 | ) 8 | 9 | func main() { 10 | 11 | http.HandleFunc("/", Get) 12 | 13 | bugsnag.Configure(bugsnag.Configuration{ 14 | APIKey: "066f5ad3590596f9aa8d601ea89af845", 15 | }) 16 | 17 | log.Println("Serving on 9001") 18 | http.ListenAndServe(":9001", bugsnag.Handler(nil)) 19 | } 20 | 21 | func Get(w http.ResponseWriter, r *http.Request) { 22 | w.WriteHeader(200) 23 | w.Write([]byte("OK\n")) 24 | 25 | var a struct{} 26 | crash(a) 27 | } 28 | 29 | func crash(a interface{}) string { 30 | return a.(string) 31 | } 32 | -------------------------------------------------------------------------------- /gluon-collector/data/boltstore_test.go: -------------------------------------------------------------------------------- 1 | package data 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | 7 | log "github.com/Sirupsen/logrus" 8 | 9 | "github.com/stretchr/testify/assert" 10 | ) 11 | 12 | func TestStoringNodeinfo(t *testing.T) { 13 | log.SetLevel(log.ErrorLevel) 14 | assert := assert.New(t) 15 | 16 | dbPath := "./bolt.db" 17 | defer os.RemoveAll(dbPath) 18 | 19 | store, err := NewBoltStore(dbPath) 20 | assert.Nil(err) 21 | assert.NotNil(store) 22 | nodeinfo := NodeInfo{ 23 | NodeId: "a", 24 | } 25 | store.PutNodeInfo(nodeinfo) 26 | result, err := store.GetNodeInfo("a") 27 | assert.Nil(err) 28 | assert.Equal("a", result.NodeId) 29 | store.Close() 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/tobi/airbrake-go/README: -------------------------------------------------------------------------------- 1 | Config 2 | ====== 3 | 4 | set airbrake.Endpoint and airbrake.ApiKey globals 5 | 6 | Methods 7 | ======= 8 | 9 | airbrake.Error(err) reports an error 10 | 11 | airbrake.RequestError(err, *http.Request) can be used to add more context if you are in a http context 12 | 13 | 14 | You can also automatically have this library report panics, use this method: 15 | 16 | airbrake.CapturePanic(*http.Request) 17 | 18 | 19 | example: 20 | 21 | func serve(w http.ResponseWriter, r *http.Request) { 22 | defer airbrake.CapturePanic(r) 23 | 24 | [...] 25 | 26 | panic("Oh no :-(") // will be recorded by airbrake 27 | 28 | } -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/web/middleware/subrouter_test.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "net/http" 5 | "net/http/httptest" 6 | "testing" 7 | 8 | "github.com/zenazn/goji/web" 9 | ) 10 | 11 | func TestSubRouterMatch(t *testing.T) { 12 | m := web.New() 13 | m.Use(m.Router) 14 | 15 | m2 := web.New() 16 | m2.Use(SubRouter) 17 | m2.Get("/bar", func(w http.ResponseWriter, r *http.Request) {}) 18 | 19 | m.Get("/foo/*", m2) 20 | 21 | r, err := http.NewRequest("GET", "/foo/bar", nil) 22 | if err != nil { 23 | t.Fatal(err) 24 | } 25 | 26 | // This function will recurse forever if SubRouter + Match didn't work. 27 | m.ServeHTTP(httptest.NewRecorder(), r) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_openbsd.go: -------------------------------------------------------------------------------- 1 | package bolt 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | ) 7 | 8 | const ( 9 | msAsync = 1 << iota // perform asynchronous writes 10 | msSync // perform synchronous writes 11 | msInvalidate // invalidate cached data 12 | ) 13 | 14 | var odirect int 15 | 16 | func msync(db *DB) error { 17 | _, _, errno := syscall.Syscall(syscall.SYS_MSYNC, uintptr(unsafe.Pointer(db.data)), uintptr(db.datasz), msInvalidate) 18 | if errno != 0 { 19 | return errno 20 | } 21 | return nil 22 | } 23 | 24 | func fdatasync(db *DB) error { 25 | if db.data != nil { 26 | return msync(db) 27 | } 28 | return db.file.Sync() 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/osext/osext_procfs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux netbsd openbsd 6 | 7 | package osext 8 | 9 | import ( 10 | "errors" 11 | "os" 12 | "runtime" 13 | ) 14 | 15 | func executable() (string, error) { 16 | switch runtime.GOOS { 17 | case "linux": 18 | return os.Readlink("/proc/self/exe") 19 | case "netbsd": 20 | return os.Readlink("/proc/curproc/exe") 21 | case "openbsd": 22 | return os.Readlink("/proc/curproc/file") 23 | } 24 | return "", errors.New("ExecPath not implemented for " + runtime.GOOS) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog_test.go: -------------------------------------------------------------------------------- 1 | package logrus_syslog 2 | 3 | import ( 4 | "github.com/Sirupsen/logrus" 5 | "log/syslog" 6 | "testing" 7 | ) 8 | 9 | func TestLocalhostAddAndPrint(t *testing.T) { 10 | log := logrus.New() 11 | hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") 12 | 13 | if err != nil { 14 | t.Errorf("Unable to connect to local syslog.") 15 | } 16 | 17 | log.Hooks.Add(hook) 18 | 19 | for _, level := range hook.Levels() { 20 | if len(log.Hooks[level]) != 1 { 21 | t.Errorf("SyslogHook was not added. The length of log.Hooks[%v]: %v", level, len(log.Hooks[level])) 22 | } 23 | } 24 | 25 | log.Info("Congratulations!") 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/oxtoacart/bpool/bufferpool_test.go: -------------------------------------------------------------------------------- 1 | package bpool 2 | 3 | import ( 4 | "bytes" 5 | "testing" 6 | ) 7 | 8 | func TestBufferPool(t *testing.T) { 9 | var size int = 4 10 | 11 | bufPool := NewBufferPool(size) 12 | 13 | // Test Get/Put 14 | b := bufPool.Get() 15 | bufPool.Put(b) 16 | 17 | // Add some additional buffers beyond the pool size. 18 | for i := 0; i < size*2; i++ { 19 | bufPool.Put(bytes.NewBuffer([]byte{})) 20 | } 21 | 22 | // Close the channel so we can iterate over it. 23 | close(bufPool.c) 24 | 25 | // Check the size of the pool. 26 | if len(bufPool.c) != size { 27 | t.Fatalf("bufferpool size invalid: got %v want %v", len(bufPool.c), size) 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_notwindows.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2011 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build linux darwin freebsd openbsd netbsd dragonfly 7 | 8 | package logrus 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | // IsTerminal returns true if stderr's file descriptor is a terminal. 16 | func IsTerminal() bool { 17 | fd := syscall.Stderr 18 | var termios Termios 19 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 20 | return err == 0 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build arm64 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 21 | B syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | B syscall·RawSyscall6(SB) 25 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger. 3 | 4 | 5 | The simplest way to use Logrus is simply the package-level exported logger: 6 | 7 | package main 8 | 9 | import ( 10 | log "github.com/Sirupsen/logrus" 11 | ) 12 | 13 | func main() { 14 | log.WithFields(log.Fields{ 15 | "animal": "walrus", 16 | "number": 1, 17 | "size": 10, 18 | }).Info("A walrus appears") 19 | } 20 | 21 | Output: 22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 23 | 24 | For a full guide visit https://github.com/Sirupsen/logrus 25 | */ 26 | package logrus 27 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/writer.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "bufio" 5 | "io" 6 | "runtime" 7 | ) 8 | 9 | func (logger *Logger) Writer() *io.PipeWriter { 10 | reader, writer := io.Pipe() 11 | 12 | go logger.writerScanner(reader) 13 | runtime.SetFinalizer(writer, writerFinalizer) 14 | 15 | return writer 16 | } 17 | 18 | func (logger *Logger) writerScanner(reader *io.PipeReader) { 19 | scanner := bufio.NewScanner(reader) 20 | for scanner.Scan() { 21 | logger.Print(scanner.Text()) 22 | } 23 | if err := scanner.Err(); err != nil { 24 | logger.Errorf("Error while reading from Writer: %s", err) 25 | } 26 | reader.Close() 27 | } 28 | 29 | func writerFinalizer(writer *io.PipeWriter) { 30 | writer.Close() 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + uitoa(uint(-val)) 12 | } 13 | return uitoa(uint(val)) 14 | } 15 | 16 | func uitoa(val uint) string { 17 | var buf [32]byte // big enough for int64 18 | i := len(buf) - 1 19 | for val >= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/app/views/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{.title}} 6 | 7 | 8 | 9 | 10 | {{range .moreStyles}} 11 | 12 | {{end}} 13 | {{range .moreScripts}} 14 | 15 | {{end}} 16 | 17 | 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,race linux,race freebsd,race 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/negroni/recovery_test.go: -------------------------------------------------------------------------------- 1 | package negroni 2 | 3 | import ( 4 | "bytes" 5 | "log" 6 | "net/http" 7 | "net/http/httptest" 8 | "testing" 9 | ) 10 | 11 | func TestRecovery(t *testing.T) { 12 | buff := bytes.NewBufferString("") 13 | recorder := httptest.NewRecorder() 14 | 15 | rec := NewRecovery() 16 | rec.Logger = log.New(buff, "[negroni] ", 0) 17 | 18 | n := New() 19 | // replace log for testing 20 | n.Use(rec) 21 | n.UseHandler(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { 22 | panic("here is a panic!") 23 | })) 24 | n.ServeHTTP(recorder, (*http.Request)(nil)) 25 | expect(t, recorder.Code, http.StatusInternalServerError) 26 | refute(t, recorder.Body.Len(), 0) 27 | refute(t, len(buff.String()), 0) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/go-martini/martini/logger_test.go: -------------------------------------------------------------------------------- 1 | package martini 2 | 3 | import ( 4 | "bytes" 5 | "log" 6 | "net/http" 7 | "net/http/httptest" 8 | "testing" 9 | ) 10 | 11 | func Test_Logger(t *testing.T) { 12 | buff := bytes.NewBufferString("") 13 | recorder := httptest.NewRecorder() 14 | 15 | m := New() 16 | // replace log for testing 17 | m.Map(log.New(buff, "[martini] ", 0)) 18 | m.Use(Logger()) 19 | m.Use(func(res http.ResponseWriter) { 20 | res.WriteHeader(http.StatusNotFound) 21 | }) 22 | 23 | req, err := http.NewRequest("GET", "http://localhost:3000/foobar", nil) 24 | if err != nil { 25 | t.Error(err) 26 | } 27 | 28 | m.ServeHTTP(recorder, req) 29 | expect(t, recorder.Code, http.StatusNotFound) 30 | refute(t, len(buff.String()), 0) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/AUTHORS.md: -------------------------------------------------------------------------------- 1 | The Prometheus project was started by Matt T. Proud (emeritus) and 2 | Julius Volz in 2012. 3 | 4 | Maintainers of this repository: 5 | 6 | * Tobias Schmidt 7 | 8 | The following individuals have contributed code to this repository 9 | (listed in alphabetical order): 10 | 11 | * Armen Baghumian 12 | * Bjoern Rabenstein 13 | * David Cournapeau 14 | * Ji-Hoon, Seol 15 | * Jonas Große Sundrup 16 | * Julius Volz 17 | * Matthias Rampke 18 | * Nicky Gerritsen 19 | * Rémi Audebert 20 | * Tobias Schmidt 21 | -------------------------------------------------------------------------------- /utils/utils.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "bytes" 5 | "compress/flate" 6 | "compress/gzip" 7 | "io/ioutil" 8 | "os" 9 | ) 10 | 11 | func DecompressGZip(in []byte) (data []byte, err error) { 12 | ir := bytes.NewReader(in) 13 | r, err := gzip.NewReader(ir) 14 | if err != nil { 15 | return 16 | } 17 | defer r.Close() 18 | data, err = ioutil.ReadAll(r) 19 | return 20 | } 21 | 22 | func Deflate(in []byte) (data []byte, err error) { 23 | ir := bytes.NewReader(in) 24 | r := flate.NewReader(ir) 25 | if err != nil { 26 | return 27 | } 28 | defer r.Close() 29 | data, err = ioutil.ReadAll(r) 30 | return 31 | } 32 | 33 | func FileExists(path string) bool { 34 | if _, err := os.Stat(path); os.IsNotExist(err) { 35 | return false 36 | } 37 | return true 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_windows.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2011 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build windows 7 | 8 | package logrus 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | var kernel32 = syscall.NewLazyDLL("kernel32.dll") 16 | 17 | var ( 18 | procGetConsoleMode = kernel32.NewProc("GetConsoleMode") 19 | ) 20 | 21 | // IsTerminal returns true if stderr's file descriptor is a terminal. 22 | func IsTerminal() bool { 23 | fd := syscall.Stderr 24 | var st uint32 25 | r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0) 26 | return r != 0 && e == 0 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/revel/revel/libs.go: -------------------------------------------------------------------------------- 1 | package revel 2 | 3 | import ( 4 | "crypto/hmac" 5 | "crypto/sha1" 6 | "encoding/hex" 7 | "io" 8 | ) 9 | 10 | // Sign a given string with the app-configured secret key. 11 | // If no secret key is set, returns the empty string. 12 | // Return the signature in base64 (URLEncoding). 13 | func Sign(message string) string { 14 | if len(secretKey) == 0 { 15 | return "" 16 | } 17 | mac := hmac.New(sha1.New, secretKey) 18 | io.WriteString(mac, message) 19 | return hex.EncodeToString(mac.Sum(nil)) 20 | } 21 | 22 | // Verify returns true if the given signature is correct for the given message. 23 | // e.g. it matches what we generate with Sign() 24 | func Verify(message, sig string) bool { 25 | return hmac.Equal([]byte(sig), []byte(Sign(message))) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64 ppc64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for ppc64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_3: -------------------------------------------------------------------------------- 1 | 2 | # TYPE my_summary summary 3 | my_summary{n1="val1",quantile="0.5"} 110 4 | decoy -1 -2 5 | my_summary{n1="val1",quantile="0.9"} 140 1 6 | my_summary_count{n1="val1"} 42 7 | # Latest timestamp wins in case of a summary. 8 | my_summary_sum{n1="val1"} 4711 2 9 | fake_sum{n1="val1"} 2001 10 | # TYPE another_summary summary 11 | another_summary_count{n2="val2",n1="val1"} 20 12 | my_summary_count{n2="val2",n1="val1"} 5 5 13 | another_summary{n1="val1",n2="val2",quantile=".3"} -1.2 14 | my_summary_sum{n1="val2"} 08 15 15 | my_summary{n1="val3", quantile="0.2"} 4711 16 | my_summary{n1="val1",n2="val2",quantile="-12.34",} NaN 17 | # some 18 | # funny comments 19 | # HELP 20 | # HELP 21 | # HELP my_summary 22 | # HELP my_summary 23 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/fixtures/net/ip_vs: -------------------------------------------------------------------------------- 1 | IP Virtual Server version 1.2.1 (size=4096) 2 | Prot LocalAddress:Port Scheduler Flags 3 | -> RemoteAddress:Port Forward Weight ActiveConn InActConn 4 | TCP C0A80016:0CEA wlc 5 | -> C0A85216:0CEA Tunnel 100 248 2 6 | -> C0A85318:0CEA Tunnel 100 248 2 7 | -> C0A85315:0CEA Tunnel 100 248 1 8 | TCP C0A80039:0CEA wlc 9 | -> C0A85416:0CEA Tunnel 0 0 0 10 | -> C0A85215:0CEA Tunnel 100 1499 0 11 | -> C0A83215:0CEA Tunnel 100 1498 0 12 | TCP C0A80037:0CEA wlc 13 | -> C0A8321A:0CEA Tunnel 0 0 0 14 | -> C0A83120:0CEA Tunnel 100 0 0 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for arm, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 23 | B syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 26 | B syscall·RawSyscall6(SB) 27 | 28 | TEXT ·seek(SB),NOSPLIT,$0-32 29 | B syscall·seek(SB) 30 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/examples/hook/hook.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/Sirupsen/logrus" 5 | "github.com/Sirupsen/logrus/hooks/airbrake" 6 | ) 7 | 8 | var log = logrus.New() 9 | 10 | func init() { 11 | log.Formatter = new(logrus.TextFormatter) // default 12 | log.Hooks.Add(airbrake.NewHook("https://example.com", "xyz", "development")) 13 | } 14 | 15 | func main() { 16 | log.WithFields(logrus.Fields{ 17 | "animal": "walrus", 18 | "size": 10, 19 | }).Info("A group of walrus emerges from the ocean") 20 | 21 | log.WithFields(logrus.Fields{ 22 | "omg": true, 23 | "number": 122, 24 | }).Warn("The group's number increased tremendously!") 25 | 26 | log.WithFields(logrus.Fields{ 27 | "omg": true, 28 | "number": 100, 29 | }).Fatal("The ice breaks!") 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 Matt T. Proud 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package pbutil provides record length-delimited Protocol Buffer streaming. 16 | package pbutil 17 | -------------------------------------------------------------------------------- /vendor/github.com/getsentry/raven-go/examples_test.go: -------------------------------------------------------------------------------- 1 | package raven 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | "net/http" 7 | ) 8 | 9 | func Example() { 10 | // ... i.e. raisedErr is incoming error 11 | var raisedErr error 12 | // sentry DSN generated by Sentry server 13 | var sentryDSN string 14 | // r is a request performed when error occured 15 | var r *http.Request 16 | client, err := New(sentryDSN) 17 | if err != nil { 18 | log.Fatal(err) 19 | } 20 | trace := NewStacktrace(0, 2, nil) 21 | packet := NewPacket(raisedErr.Error(), NewException(raisedErr, trace), NewHttp(r)) 22 | eventID, ch := client.Capture(packet, nil) 23 | if err = <-ch; err != nil { 24 | log.Fatal(err) 25 | } 26 | message := fmt.Sprintf("Captured error with id %s: %q", eventID, raisedErr) 27 | log.Println(message) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/goji/param/error_helpers.go: -------------------------------------------------------------------------------- 1 | package param 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | "log" 7 | ) 8 | 9 | // Testing log.Fatal in tests is... not a thing. Allow tests to stub it out. 10 | var pebkacTesting bool 11 | 12 | const errPrefix = "param/parse: " 13 | const yourFault = " This is a bug in your use of the param library." 14 | 15 | // Problem exists between keyboard and chair. This function is used in cases of 16 | // programmer error, i.e. an inappropriate use of the param library, to 17 | // immediately force the program to halt with a hopefully helpful error message. 18 | func pebkac(format string, a ...interface{}) { 19 | err := errors.New(errPrefix + fmt.Sprintf(format, a...) + yourFault) 20 | if pebkacTesting { 21 | panic(err) 22 | } else { 23 | log.Fatal(err) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/panicwrap.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package bugsnag 4 | 5 | import ( 6 | "github.com/bugsnag/panicwrap" 7 | "github.com/bugsnag/bugsnag-go/errors" 8 | ) 9 | 10 | // NOTE: this function does not return when you call it, instead it 11 | // re-exec()s the current process with panic monitoring. 12 | func defaultPanicHandler() { 13 | defer defaultNotifier.dontPanic() 14 | 15 | err := panicwrap.BasicMonitor(func(output string) { 16 | toNotify, err := errors.ParsePanic(output) 17 | 18 | if err != nil { 19 | defaultNotifier.Config.log("bugsnag.handleUncaughtPanic: %v", err) 20 | } 21 | Notify(toNotify, SeverityError, Configuration{Synchronous: true}) 22 | }) 23 | 24 | if err != nil { 25 | defaultNotifier.Config.log("bugsnag.handleUncaughtPanic: %v", err) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/model/model.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | // Package model contains common data structures that are shared across 15 | // Prometheus componenets and libraries. 16 | package model 17 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/web/middleware/envinit.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/zenazn/goji/web" 7 | ) 8 | 9 | type envInit struct { 10 | c *web.C 11 | h http.Handler 12 | } 13 | 14 | func (e envInit) ServeHTTP(w http.ResponseWriter, r *http.Request) { 15 | if e.c.Env == nil { 16 | e.c.Env = make(map[interface{}]interface{}) 17 | } 18 | e.h.ServeHTTP(w, r) 19 | } 20 | 21 | // EnvInit is a middleware that allocates an environment map if it is nil. While 22 | // it's impossible in general to ensure that Env is never nil in a middleware 23 | // stack, in most common cases placing this middleware at the top of the stack 24 | // will eliminate the need for repetative nil checks. 25 | func EnvInit(c *web.C, h http.Handler) http.Handler { 26 | return envInit{c, h} 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/github.com/go-martini/martini/logger.go: -------------------------------------------------------------------------------- 1 | package martini 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | "time" 7 | ) 8 | 9 | // Logger returns a middleware handler that logs the request as it goes in and the response as it goes out. 10 | func Logger() Handler { 11 | return func(res http.ResponseWriter, req *http.Request, c Context, log *log.Logger) { 12 | start := time.Now() 13 | 14 | addr := req.Header.Get("X-Real-IP") 15 | if addr == "" { 16 | addr = req.Header.Get("X-Forwarded-For") 17 | if addr == "" { 18 | addr = req.RemoteAddr 19 | } 20 | } 21 | 22 | log.Printf("Started %s %s for %s", req.Method, req.URL.Path, addr) 23 | 24 | rw := res.(ResponseWriter) 25 | c.Next() 26 | 27 | log.Printf("Completed %v %s in %v\n", rw.Status(), http.StatusText(rw.Status()), time.Since(start)) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_dragonfly_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-32 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-44 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-56 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-32 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-44 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for AMD64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 23 | JMP syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 26 | JMP syscall·RawSyscall6(SB) 27 | 28 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16 29 | JMP syscall·gettimeofday(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/negroni/logger_test.go: -------------------------------------------------------------------------------- 1 | package negroni 2 | 3 | import ( 4 | "bytes" 5 | "log" 6 | "net/http" 7 | "net/http/httptest" 8 | "testing" 9 | ) 10 | 11 | func Test_Logger(t *testing.T) { 12 | buff := bytes.NewBufferString("") 13 | recorder := httptest.NewRecorder() 14 | 15 | l := NewLogger() 16 | l.Logger = log.New(buff, "[negroni] ", 0) 17 | 18 | n := New() 19 | // replace log for testing 20 | n.Use(l) 21 | n.UseHandler(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { 22 | rw.WriteHeader(http.StatusNotFound) 23 | })) 24 | 25 | req, err := http.NewRequest("GET", "http://localhost:3000/foobar", nil) 26 | if err != nil { 27 | t.Error(err) 28 | } 29 | 30 | n.ServeHTTP(recorder, req) 31 | expect(t, recorder.Code, http.StatusNotFound) 32 | refute(t, len(buff.String()), 0) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/cache2go/benchmark_test.go: -------------------------------------------------------------------------------- 1 | package cache2go 2 | 3 | import ( 4 | "sync" 5 | "sync/atomic" 6 | "testing" 7 | "time" 8 | ) 9 | 10 | func BenchmarkNotFoundAdd(b *testing.B) { 11 | table := Cache("testNotFoundAdd") 12 | 13 | var finish sync.WaitGroup 14 | var added int32 15 | var idle int32 16 | 17 | fn := func(id int) { 18 | for i := 0; i < b.N; i++ { 19 | if table.NotFoundAdd(i, 0, i+id) { 20 | atomic.AddInt32(&added, 1) 21 | } else { 22 | atomic.AddInt32(&idle, 1) 23 | } 24 | time.Sleep(0) 25 | } 26 | finish.Done() 27 | } 28 | 29 | finish.Add(10) 30 | go fn(0x0000) 31 | go fn(0x1100) 32 | go fn(0x2200) 33 | go fn(0x3300) 34 | go fn(0x4400) 35 | go fn(0x5500) 36 | go fn(0x6600) 37 | go fn(0x7700) 38 | go fn(0x8800) 39 | go fn(0x9900) 40 | finish.Wait() 41 | 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-64 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-112 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-64 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/bind/systemd.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package bind 4 | 5 | import ( 6 | "os" 7 | "syscall" 8 | ) 9 | 10 | const systemdMinFd = 3 11 | 12 | var systemdNumFds int 13 | 14 | // Unfortunately this can't be a normal init function, because their execution 15 | // order is undefined, and we need to run before the init() in bind.go. 16 | func systemdInit() { 17 | pid, err := envInt("LISTEN_PID") 18 | if err != nil || pid != os.Getpid() { 19 | return 20 | } 21 | 22 | systemdNumFds, err = envInt("LISTEN_FDS") 23 | if err != nil { 24 | systemdNumFds = 0 25 | return 26 | } 27 | 28 | // Prevent fds from leaking to our children 29 | for i := 0; i < systemdNumFds; i++ { 30 | syscall.CloseOnExec(systemdMinFd + i) 31 | } 32 | } 33 | 34 | func usingSystemd() bool { 35 | return systemdNumFds > 0 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/negroni/doc.go: -------------------------------------------------------------------------------- 1 | // Package negroni is an idiomatic approach to web middleware in Go. It is tiny, non-intrusive, and encourages use of net/http Handlers. 2 | // 3 | // If you like the idea of Martini, but you think it contains too much magic, then Negroni is a great fit. 4 | // 5 | // For a full guide visit http://github.com/codegangsta/negroni 6 | // 7 | // package main 8 | // 9 | // import ( 10 | // "github.com/codegangsta/negroni" 11 | // "net/http" 12 | // "fmt" 13 | // ) 14 | // 15 | // func main() { 16 | // mux := http.NewServeMux() 17 | // mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) { 18 | // fmt.Fprintf(w, "Welcome to the home page!") 19 | // }) 20 | // 21 | // n := negroni.Classic() 22 | // n.UseHandler(mux) 23 | // n.Run(":3000") 24 | // } 25 | package negroni 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm64,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for AMD64, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/negroni/logger.go: -------------------------------------------------------------------------------- 1 | package negroni 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | "os" 7 | "time" 8 | ) 9 | 10 | // Logger is a middleware handler that logs the request as it goes in and the response as it goes out. 11 | type Logger struct { 12 | // Logger inherits from log.Logger used to log messages with the Logger middleware 13 | *log.Logger 14 | } 15 | 16 | // NewLogger returns a new Logger instance 17 | func NewLogger() *Logger { 18 | return &Logger{log.New(os.Stdout, "[negroni] ", 0)} 19 | } 20 | 21 | func (l *Logger) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) { 22 | start := time.Now() 23 | l.Printf("Started %s %s", r.Method, r.URL.Path) 24 | 25 | next(rw, r) 26 | 27 | res := rw.(ResponseWriter) 28 | l.Printf("Completed %v %s in %v", res.Status(), http.StatusText(res.Status()), time.Since(start)) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin freebsd openbsd netbsd dragonfly 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build darwin dragonfly freebsd linux netbsd openbsd 8 | 9 | package unix 10 | 11 | import "unsafe" 12 | 13 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 14 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. 15 | var fcntl64Syscall uintptr = SYS_FCNTL 16 | 17 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 18 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 19 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 20 | if errno == 0 { 21 | return nil 22 | } 23 | return errno 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/cache2go/cache.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Simple caching library with expiration capabilities 3 | * Copyright (c) 2012, Radu Ioan Fericean 4 | * 2013, Christian Muehlhaeuser 5 | * 6 | * For license see LICENSE.txt 7 | */ 8 | 9 | package cache2go 10 | 11 | import ( 12 | "sync" 13 | ) 14 | 15 | var ( 16 | cache = make(map[string]*CacheTable) 17 | mutex sync.RWMutex 18 | ) 19 | 20 | // Returns the existing cache table with given name or creates a new one 21 | // if the table does not exist yet. 22 | func Cache(table string) *CacheTable { 23 | mutex.RLock() 24 | t, ok := cache[table] 25 | mutex.RUnlock() 26 | 27 | if !ok { 28 | t = &CacheTable{ 29 | name: table, 30 | items: make(map[interface{}]*CacheItem), 31 | } 32 | 33 | mutex.Lock() 34 | cache[table] = t 35 | mutex.Unlock() 36 | } 37 | 38 | return t 39 | } 40 | -------------------------------------------------------------------------------- /gluon-collector/scheduler/scheduler_test.go: -------------------------------------------------------------------------------- 1 | package scheduler 2 | 3 | import ( 4 | "testing" 5 | "time" 6 | 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func TestJobScheduling(t *testing.T) { 11 | assert := assert.New(t) 12 | 13 | executed := false 14 | now := time.Now() 15 | executionCount := 0 16 | job := NewJob(time.Second*1, func() { 17 | then := time.Now() 18 | diff := then.Unix() - now.Unix() 19 | assert.False(diff < 1, "Less than a second has passed. Diff %d", diff) 20 | assert.False(diff >= 2, "Two or more seconds have passed. Diff %d", diff) 21 | executed = true 22 | now = time.Now() 23 | executionCount = executionCount + 1 24 | }, false) 25 | time.Sleep(time.Second * 3) 26 | job.Stop() 27 | assert.True(executed, "The scheduler has NOT been executed") 28 | assert.True(2 <= executionCount, "The scheduler has only been executed twice or less time") 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/getsentry/raven-go/docs/index.rst: -------------------------------------------------------------------------------- 1 | .. sentry:edition:: self 2 | 3 | Raven Go 4 | ======== 5 | 6 | .. sentry:edition: hosted, on-premise 7 | 8 | .. class:: platform-go 9 | 10 | Go 11 | == 12 | 13 | Raven-Go provides a Sentry client implementation for the Go programming 14 | language. 15 | 16 | Installation 17 | ------------ 18 | 19 | Raven-Go can be installed like any other Go library through ``go get``:: 20 | 21 | $ go get github.com/getsentry/raven-go 22 | 23 | Minimal Example 24 | --------------- 25 | 26 | .. sourcecode:: go 27 | 28 | package main 29 | 30 | import ( 31 | "github.com/getsentry/raven-go" 32 | ) 33 | 34 | func main() { 35 | raven.SetDSN("___DSN___") 36 | 37 | _, err := DoSomethingThatFails() 38 | if err != nil { 39 | raven.CaptureErrorAndWait(err, nil); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/web/router_middleware_test.go: -------------------------------------------------------------------------------- 1 | package web 2 | 3 | import ( 4 | "net/http" 5 | "net/http/httptest" 6 | "testing" 7 | ) 8 | 9 | func TestRouterMiddleware(t *testing.T) { 10 | t.Parallel() 11 | 12 | m := New() 13 | ch := make(chan string, 1) 14 | m.Get("/a", chHandler(ch, "a")) 15 | m.Get("/b", chHandler(ch, "b")) 16 | m.Use(m.Router) 17 | m.Use(func(c *C, h http.Handler) http.Handler { 18 | fn := func(w http.ResponseWriter, r *http.Request) { 19 | m := GetMatch(*c) 20 | if rp := m.RawPattern(); rp != "/a" { 21 | t.Fatalf("RawPattern was not /a: %v", rp) 22 | } 23 | r.URL.Path = "/b" 24 | h.ServeHTTP(w, r) 25 | } 26 | return http.HandlerFunc(fn) 27 | }) 28 | 29 | r, _ := http.NewRequest("GET", "/a", nil) 30 | w := httptest.NewRecorder() 31 | m.ServeHTTP(w, r) 32 | if v := <-ch; v != "a" { 33 | t.Errorf("Routing was not frozen! %s", v) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/getsentry/raven-go/exception_test.go: -------------------------------------------------------------------------------- 1 | package raven 2 | 3 | import ( 4 | "errors" 5 | "testing" 6 | ) 7 | 8 | var newExceptionTests = []struct { 9 | err error 10 | Exception 11 | }{ 12 | {errors.New("foobar"), Exception{Value: "foobar", Type: "*errors.errorString"}}, 13 | {errors.New("bar: foobar"), Exception{Value: "foobar", Type: "*errors.errorString", Module: "bar"}}, 14 | } 15 | 16 | func TestNewException(t *testing.T) { 17 | for _, test := range newExceptionTests { 18 | actual := NewException(test.err, nil) 19 | if actual.Value != test.Value { 20 | t.Errorf("incorrect Value: got %s, want %s", actual.Value, test.Value) 21 | } 22 | if actual.Type != test.Type { 23 | t.Errorf("incorrect Type: got %s, want %s", actual.Type, test.Type) 24 | } 25 | if actual.Module != test.Module { 26 | t.Errorf("incorrect Module: got %s, want %s", actual.Module, test.Module) 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/examples/appengine/mylogs.txt: -------------------------------------------------------------------------------- 1 | 2601:9:8480:11d2:7909:b2e5:3722:ef57 - - [08/Jul/2014:01:16:25 -0700] "GET / HTTP/1.1" 500 0 - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36" 2 | 2601:9:8480:11d2:7909:b2e5:3722:ef57 - - [08/Jul/2014:01:16:25 -0700] "GET /favicon.ico HTTP/1.1" 500 0 - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36" 3 | 2601:9:8480:11d2:7909:b2e5:3722:ef57 - - [08/Jul/2014:01:18:20 -0700] "GET / HTTP/1.1" 500 0 - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36" 4 | 2601:9:8480:11d2:7909:b2e5:3722:ef57 - - [08/Jul/2014:01:18:20 -0700] "GET /favicon.ico HTTP/1.1" 500 0 - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36" 5 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mksysnum_darwin.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | # 6 | # Generate system call table for Darwin from sys/syscall.h 7 | 8 | use strict; 9 | 10 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { 11 | print STDERR "GOARCH or GOOS not defined in environment\n"; 12 | exit 1; 13 | } 14 | 15 | my $command = "mksysnum_darwin.pl " . join(' ', @ARGV); 16 | 17 | print <){ 29 | if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){ 30 | my $name = $1; 31 | my $num = $2; 32 | $name =~ y/a-z/A-Z/; 33 | print " SYS_$name = $num;" 34 | } 35 | } 36 | 37 | print < 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Ben Johnson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/negroni/recovery.go: -------------------------------------------------------------------------------- 1 | package negroni 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | "net/http" 7 | "os" 8 | "runtime" 9 | ) 10 | 11 | // Recovery is a Negroni middleware that recovers from any panics and writes a 500 if there was one. 12 | type Recovery struct { 13 | Logger *log.Logger 14 | PrintStack bool 15 | StackAll bool 16 | StackSize int 17 | } 18 | 19 | // NewRecovery returns a new instance of Recovery 20 | func NewRecovery() *Recovery { 21 | return &Recovery{ 22 | Logger: log.New(os.Stdout, "[negroni] ", 0), 23 | PrintStack: true, 24 | StackAll: false, 25 | StackSize: 1024 * 8, 26 | } 27 | } 28 | 29 | func (rec *Recovery) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) { 30 | defer func() { 31 | if err := recover(); err != nil { 32 | rw.WriteHeader(http.StatusInternalServerError) 33 | stack := make([]byte, rec.StackSize) 34 | stack = stack[:runtime.Stack(stack, rec.StackAll)] 35 | 36 | f := "PANIC: %s\n%s" 37 | rec.Logger.Printf(f, err, stack) 38 | 39 | if rec.PrintStack { 40 | fmt.Fprintf(rw, f, err, stack) 41 | } 42 | } 43 | }() 44 | 45 | next(rw, r) 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/fixtures/mdstat: -------------------------------------------------------------------------------- 1 | Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 2 | md3 : active raid6 sda1[8] sdh1[7] sdg1[6] sdf1[5] sde1[11] sdd1[3] sdc1[10] sdb1[9] 3 | 5853468288 blocks super 1.2 level 6, 64k chunk, algorithm 2 [8/8] [UUUUUUUU] 4 | 5 | md127 : active raid1 sdi2[0] sdj2[1] 6 | 312319552 blocks [2/2] [UU] 7 | 8 | md0 : active raid1 sdk[2](S) sdi1[0] sdj1[1] 9 | 248896 blocks [2/2] [UU] 10 | 11 | md4 : inactive raid1 sda3[0] sdb3[1] 12 | 4883648 blocks [2/2] [UU] 13 | 14 | md6 : active raid1 sdb2[2] sda2[0] 15 | 195310144 blocks [2/1] [U_] 16 | [=>...................] recovery = 8.5% (16775552/195310144) finish=17.0min speed=259783K/sec 17 | 18 | md8 : active raid1 sdb1[1] sda1[0] 19 | 195310144 blocks [2/2] [UU] 20 | [=>...................] resync = 8.5% (16775552/195310144) finish=17.0min speed=259783K/sec 21 | 22 | md7 : active raid6 sdb1[0] sde1[3] sdd1[2] sdc1[1] 23 | 7813735424 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/3] [U_UU] 24 | bitmap: 0/30 pages [0KB], 65536KB chunk 25 | 26 | unused devices: 27 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/goji.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package goji provides an out-of-box web server with reasonable defaults. 3 | 4 | Example: 5 | package main 6 | 7 | import ( 8 | "fmt" 9 | "net/http" 10 | 11 | "github.com/zenazn/goji" 12 | "github.com/zenazn/goji/web" 13 | ) 14 | 15 | func hello(c web.C, w http.ResponseWriter, r *http.Request) { 16 | fmt.Fprintf(w, "Hello, %s!", c.URLParams["name"]) 17 | } 18 | 19 | func main() { 20 | goji.Get("/hello/:name", hello) 21 | goji.Serve() 22 | } 23 | 24 | This package exists purely as a convenience to programmers who want to get 25 | started as quickly as possible. It draws almost all of its code from goji's 26 | subpackages, the most interesting of which is goji/web, and where most of the 27 | documentation for the web framework lives. 28 | 29 | A side effect of this package's ease-of-use is the fact that it is opinionated. 30 | If you don't like (or have outgrown) its opinions, it should be straightforward 31 | to use the APIs of goji's subpackages to reimplement things to your liking. Both 32 | methods of using this library are equally well supported. 33 | 34 | Goji requires Go 1.2 or newer. 35 | */ 36 | package goji 37 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/inject/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Jeremy Saenz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/go-martini/martini/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Jeremy Saenz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/martini-contrib/render/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Jeremy Saenz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Simon Eskildsen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/negroni/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Jeremy Saenz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/goji/param/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, 2015 Carl Jackson (carl@avtok.com) 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/justinas/alice/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Justinas Stankevicius 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, 2015 Carl Jackson (carl@avtok.com) 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/panicwrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Mitchell Hashimoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/revel/revel/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2012 Rob Figueiredo 2 | All Rights Reserved. 3 | 4 | MIT LICENSE 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | this software and associated documentation files (the "Software"), to deal in 8 | the Software without restriction, including without limitation the rights to 9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | the Software, and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/cache2go/examples/callbacks/callbacks.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "github.com/muesli/cache2go" 6 | ) 7 | 8 | func main() { 9 | cache := cache2go.Cache("myCache") 10 | 11 | // This callback will be triggered every time a new item 12 | // gets added to the cache. 13 | cache.SetAddedItemCallback(func(entry *cache2go.CacheItem) { 14 | fmt.Println("Added:", entry.Key(), entry.Data(), entry.CreatedOn()) 15 | }) 16 | // This callback will be triggered every time an item 17 | // is about to be removed from the cache. 18 | cache.SetAboutToDeleteItemCallback(func(entry *cache2go.CacheItem) { 19 | fmt.Println("Deleting:", entry.Key(), entry.Data(), entry.CreatedOn()) 20 | }) 21 | 22 | // Caching a new item will execute the AddedItem callback. 23 | cache.Add("someKey", 0, "This is a test!") 24 | 25 | // Let's retrieve the item from the cache 26 | res, err := cache.Value("someKey") 27 | if err == nil { 28 | fmt.Println("Found value in cache:", res.Data()) 29 | } else { 30 | fmt.Println("Error retrieving value from cache:", err) 31 | } 32 | 33 | // Deleting the item will execute the AboutToDeleteItem callback. 34 | cache.Delete("someKey") 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/robfig/pathtree/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2013 Rob Figueiredo 2 | All Rights Reserved. 3 | 4 | MIT LICENSE 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | this software and associated documentation files (the "Software"), to deal in 8 | the Software without restriction, including without limitation the rights to 9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | the Software, and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/oxtoacart/bpool/bytepool.go: -------------------------------------------------------------------------------- 1 | package bpool 2 | 3 | // BytePool implements a leaky pool of []byte in the form of a bounded 4 | // channel. 5 | type BytePool struct { 6 | c chan []byte 7 | w int 8 | } 9 | 10 | // NewBytePool creates a new BytePool bounded to the given maxSize, with new 11 | // byte arrays sized based on width. 12 | func NewBytePool(maxSize int, width int) (bp *BytePool) { 13 | return &BytePool{ 14 | c: make(chan []byte, maxSize), 15 | w: width, 16 | } 17 | } 18 | 19 | // Get gets a []byte from the BytePool, or creates a new one if none are 20 | // available in the pool. 21 | func (bp *BytePool) Get() (b []byte) { 22 | select { 23 | case b = <-bp.c: 24 | // reuse existing buffer 25 | default: 26 | // create new buffer 27 | b = make([]byte, bp.w) 28 | } 29 | return 30 | } 31 | 32 | // Put returns the given Buffer to the BytePool. 33 | func (bp *BytePool) Put(b []byte) { 34 | select { 35 | case bp.c <- b: 36 | // buffer went back into pool 37 | default: 38 | // buffer didn't go back into pool, just discard 39 | } 40 | } 41 | 42 | // Width returns the width of the byte arrays in this pool. 43 | func (bp *BytePool) Width() (n int) { 44 | return bp.w 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/web/mux_test.go: -------------------------------------------------------------------------------- 1 | package web 2 | 3 | import ( 4 | "net/http" 5 | "net/http/httptest" 6 | "testing" 7 | ) 8 | 9 | // Sanity check types 10 | var _ http.Handler = &Mux{} 11 | var _ Handler = &Mux{} 12 | 13 | // There's... really not a lot to do here. 14 | 15 | func TestIfItWorks(t *testing.T) { 16 | t.Parallel() 17 | 18 | m := New() 19 | ch := make(chan string, 1) 20 | 21 | m.Get("/hello/:name", func(c C, w http.ResponseWriter, r *http.Request) { 22 | greeting := "Hello " 23 | if c.Env != nil { 24 | if g, ok := c.Env["greeting"]; ok { 25 | greeting = g.(string) 26 | } 27 | } 28 | ch <- greeting + c.URLParams["name"] 29 | }) 30 | 31 | r, _ := http.NewRequest("GET", "/hello/carl", nil) 32 | m.ServeHTTP(httptest.NewRecorder(), r) 33 | out := <-ch 34 | if out != "Hello carl" { 35 | t.Errorf(`Unexpected response %q, expected "Hello carl"`, out) 36 | } 37 | 38 | r, _ = http.NewRequest("GET", "/hello/bob", nil) 39 | env := map[interface{}]interface{}{"greeting": "Yo "} 40 | m.ServeHTTPC(C{Env: env}, httptest.NewRecorder(), r) 41 | out = <-ch 42 | if out != "Yo bob" { 43 | t.Errorf(`Unexpected response %q, expected "Yo bob"`, out) 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_c.c: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #define _STRINGIFY2_(x) #x 12 | #define _STRINGIFY_(x) _STRINGIFY2_(x) 13 | #define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__) 14 | 15 | // Call syscall from C code because the gccgo support for calling from 16 | // Go to C does not support varargs functions. 17 | 18 | struct ret { 19 | uintptr_t r; 20 | uintptr_t err; 21 | }; 22 | 23 | struct ret 24 | gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) 25 | { 26 | struct ret r; 27 | 28 | errno = 0; 29 | r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); 30 | r.err = errno; 31 | return r; 32 | } 33 | 34 | // Define the use function in C so that it is not inlined. 35 | 36 | extern void use(void *) __asm__ (GOSYM_PREFIX GOPKGPATH ".use") __attribute__((noinline)); 37 | 38 | void 39 | use(void *p __attribute__ ((unused))) 40 | { 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/agtorre/gocolorize/LICENSE.txt: -------------------------------------------------------------------------------- 1 | # This is the MIT license 2 | 3 | # Copyright (c) 2013 Aaron G. Torres All rights reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a 6 | copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included 14 | in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /vendor/github.com/olebedev/config/LICENSE: -------------------------------------------------------------------------------- 1 | JSON or YAML configuration wrapper with convenient access methods 2 | Copyright (C) 2014 Oleg Lebedev 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the "Software"), 6 | to deal in the Software without restriction, including without limitation 7 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included 12 | in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 16 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 18 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 19 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/examples/basic/basic.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/Sirupsen/logrus" 5 | ) 6 | 7 | var log = logrus.New() 8 | 9 | func init() { 10 | log.Formatter = new(logrus.JSONFormatter) 11 | log.Formatter = new(logrus.TextFormatter) // default 12 | log.Level = logrus.DebugLevel 13 | } 14 | 15 | func main() { 16 | defer func() { 17 | err := recover() 18 | if err != nil { 19 | log.WithFields(logrus.Fields{ 20 | "omg": true, 21 | "err": err, 22 | "number": 100, 23 | }).Fatal("The ice breaks!") 24 | } 25 | }() 26 | 27 | log.WithFields(logrus.Fields{ 28 | "animal": "walrus", 29 | "number": 8, 30 | }).Debug("Started observing beach") 31 | 32 | log.WithFields(logrus.Fields{ 33 | "animal": "walrus", 34 | "size": 10, 35 | }).Info("A group of walrus emerges from the ocean") 36 | 37 | log.WithFields(logrus.Fields{ 38 | "omg": true, 39 | "number": 122, 40 | }).Warn("The group's number increased tremendously!") 41 | 42 | log.WithFields(logrus.Fields{ 43 | "temperature": -4, 44 | }).Debug("Temperature changes") 45 | 46 | log.WithFields(logrus.Fields{ 47 | "animal": "orca", 48 | "size": 9009, 49 | }).Panic("It's over 9000!") 50 | } 51 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/json_tags.go: -------------------------------------------------------------------------------- 1 | // The code is stripped from: 2 | // http://golang.org/src/pkg/encoding/json/tags.go?m=text 3 | 4 | package bugsnag 5 | 6 | import ( 7 | "strings" 8 | ) 9 | 10 | // tagOptions is the string following a comma in a struct field's "json" 11 | // tag, or the empty string. It does not include the leading comma. 12 | type tagOptions string 13 | 14 | // parseTag splits a struct field's json tag into its name and 15 | // comma-separated options. 16 | func parseTag(tag string) (string, tagOptions) { 17 | if idx := strings.Index(tag, ","); idx != -1 { 18 | return tag[:idx], tagOptions(tag[idx+1:]) 19 | } 20 | return tag, tagOptions("") 21 | } 22 | 23 | // Contains reports whether a comma-separated list of options 24 | // contains a particular substr flag. substr must be surrounded by a 25 | // string boundary or commas. 26 | func (o tagOptions) Contains(optionName string) bool { 27 | if len(o) == 0 { 28 | return false 29 | } 30 | s := string(o) 31 | for s != "" { 32 | var next string 33 | i := strings.Index(s, ",") 34 | if i >= 0 { 35 | s, next = s[:i], s[i+1:] 36 | } 37 | if s == optionName { 38 | return true 39 | } 40 | s = next 41 | } 42 | return false 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/revel/revel/filter.go: -------------------------------------------------------------------------------- 1 | package revel 2 | 3 | type Filter func(c *Controller, filterChain []Filter) 4 | 5 | // Filters is the default set of global filters. 6 | // It may be set by the application on initialization. 7 | var Filters = []Filter{ 8 | PanicFilter, // Recover from panics and display an error page instead. 9 | RouterFilter, // Use the routing table to select the right Action. 10 | FilterConfiguringFilter, // A hook for adding or removing per-Action filters. 11 | ParamsFilter, // Parse parameters into Controller.Params. 12 | SessionFilter, // Restore and write the session cookie. 13 | FlashFilter, // Restore and write the flash cookie. 14 | ValidationFilter, // Restore kept validation errors and save new ones from cookie. 15 | I18nFilter, // Resolve the requested language. 16 | InterceptorFilter, // Run interceptors around the action. 17 | CompressFilter, // Compress the result. 18 | ActionInvoker, // Invoke the action. 19 | } 20 | 21 | // NilFilter and NilChain are helpful in writing filter tests. 22 | var ( 23 | NilFilter = func(_ *Controller, _ []Filter) {} 24 | NilChain = []Filter{NilFilter} 25 | ) 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,openbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = nsec / 1e9 15 | ts.Nsec = nsec % 1e9 16 | return 17 | } 18 | 19 | func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } 20 | 21 | func NsecToTimeval(nsec int64) (tv Timeval) { 22 | nsec += 999 // round up to microsecond 23 | tv.Usec = nsec % 1e9 / 1e3 24 | tv.Sec = nsec / 1e9 25 | return 26 | } 27 | 28 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 29 | k.Ident = uint64(fd) 30 | k.Filter = int16(mode) 31 | k.Flags = uint16(flags) 32 | } 33 | 34 | func (iov *Iovec) SetLen(length int) { 35 | iov.Len = uint64(length) 36 | } 37 | 38 | func (msghdr *Msghdr) SetControllen(length int) { 39 | msghdr.Controllen = uint32(length) 40 | } 41 | 42 | func (cmsg *Cmsghdr) SetLen(length int) { 43 | cmsg.Len = uint32(length) 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/zenazn/goji/web/match_test.go: -------------------------------------------------------------------------------- 1 | package web 2 | 3 | import ( 4 | "net/http" 5 | "regexp" 6 | "testing" 7 | ) 8 | 9 | var rawPatterns = []PatternType{ 10 | "/hello/:name", 11 | regexp.MustCompile("^/hello/(?P[^/]+)$"), 12 | testPattern{}, 13 | } 14 | 15 | func TestRawPattern(t *testing.T) { 16 | t.Parallel() 17 | 18 | for _, p := range rawPatterns { 19 | m := Match{Pattern: ParsePattern(p)} 20 | if rp := m.RawPattern(); rp != p { 21 | t.Errorf("got %#v, expected %#v", rp, p) 22 | } 23 | } 24 | } 25 | 26 | type httpHandlerOnly struct{} 27 | 28 | func (httpHandlerOnly) ServeHTTP(w http.ResponseWriter, r *http.Request) {} 29 | 30 | type handlerOnly struct{} 31 | 32 | func (handlerOnly) ServeHTTPC(c C, w http.ResponseWriter, r *http.Request) {} 33 | 34 | var rawHandlers = []HandlerType{ 35 | func(w http.ResponseWriter, r *http.Request) {}, 36 | func(c C, w http.ResponseWriter, r *http.Request) {}, 37 | httpHandlerOnly{}, 38 | handlerOnly{}, 39 | } 40 | 41 | func TestRawHandler(t *testing.T) { 42 | t.Parallel() 43 | 44 | for _, h := range rawHandlers { 45 | m := Match{Handler: parseHandler(h)} 46 | if rh := m.RawHandler(); !funcEqual(rh, h) { 47 | t.Errorf("got %#v, expected %#v", rh, h) 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Socket control messages 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // UnixCredentials encodes credentials into a socket control message 12 | // for sending to another process. This can be used for 13 | // authentication. 14 | func UnixCredentials(ucred *Ucred) []byte { 15 | b := make([]byte, CmsgSpace(SizeofUcred)) 16 | h := (*Cmsghdr)(unsafe.Pointer(&b[0])) 17 | h.Level = SOL_SOCKET 18 | h.Type = SCM_CREDENTIALS 19 | h.SetLen(CmsgLen(SizeofUcred)) 20 | *((*Ucred)(cmsgData(h))) = *ucred 21 | return b 22 | } 23 | 24 | // ParseUnixCredentials decodes a socket control message that contains 25 | // credentials in a Ucred structure. To receive such a message, the 26 | // SO_PASSCRED option must be enabled on the socket. 27 | func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) { 28 | if m.Header.Level != SOL_SOCKET { 29 | return nil, EINVAL 30 | } 31 | if m.Header.Type != SCM_CREDENTIALS { 32 | return nil, EINVAL 33 | } 34 | ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0])) 35 | return &ucred, nil 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | // Build only when actually fuzzing 15 | // +build gofuzz 16 | 17 | package expfmt 18 | 19 | import "bytes" 20 | 21 | // Fuzz text metric parser with with github.com/dvyukov/go-fuzz: 22 | // 23 | // go-fuzz-build github.com/prometheus/client_golang/text 24 | // go-fuzz -bin text-fuzz.zip -workdir fuzz 25 | // 26 | // Further input samples should go in the folder fuzz/corpus. 27 | func Fuzz(in []byte) int { 28 | parser := TextParser{} 29 | _, err := parser.TextToMetricFamilies(bytes.NewReader(in)) 30 | 31 | if err != nil { 32 | return 0 33 | } 34 | 35 | return 1 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,netbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int32(nsec % 1e9) 16 | return 17 | } 18 | 19 | func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } 20 | 21 | func NsecToTimeval(nsec int64) (tv Timeval) { 22 | nsec += 999 // round up to microsecond 23 | tv.Usec = int32(nsec % 1e9 / 1e3) 24 | tv.Sec = int64(nsec / 1e9) 25 | return 26 | } 27 | 28 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 29 | k.Ident = uint32(fd) 30 | k.Filter = uint32(mode) 31 | k.Flags = uint32(flags) 32 | } 33 | 34 | func (iov *Iovec) SetLen(length int) { 35 | iov.Len = uint32(length) 36 | } 37 | 38 | func (msghdr *Msghdr) SetControllen(length int) { 39 | msghdr.Controllen = uint32(length) 40 | } 41 | 42 | func (cmsg *Cmsghdr) SetLen(length int) { 43 | cmsg.Len = uint32(length) 44 | } 45 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,netbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int32(nsec % 1e9) 16 | return 17 | } 18 | 19 | func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } 20 | 21 | func NsecToTimeval(nsec int64) (tv Timeval) { 22 | nsec += 999 // round up to microsecond 23 | tv.Usec = int32(nsec % 1e9 / 1e3) 24 | tv.Sec = int64(nsec / 1e9) 25 | return 26 | } 27 | 28 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 29 | k.Ident = uint32(fd) 30 | k.Filter = uint32(mode) 31 | k.Flags = uint32(flags) 32 | } 33 | 34 | func (iov *Iovec) SetLen(length int) { 35 | iov.Len = uint32(length) 36 | } 37 | 38 | func (msghdr *Msghdr) SetControllen(length int) { 39 | msghdr.Controllen = uint32(length) 40 | } 41 | 42 | func (cmsg *Cmsghdr) SetLen(length int) { 43 | cmsg.Len = uint32(length) 44 | } 45 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,openbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int32(nsec % 1e9) 16 | return 17 | } 18 | 19 | func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } 20 | 21 | func NsecToTimeval(nsec int64) (tv Timeval) { 22 | nsec += 999 // round up to microsecond 23 | tv.Usec = int32(nsec % 1e9 / 1e3) 24 | tv.Sec = int64(nsec / 1e9) 25 | return 26 | } 27 | 28 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 29 | k.Ident = uint32(fd) 30 | k.Filter = int16(mode) 31 | k.Flags = uint16(flags) 32 | } 33 | 34 | func (iov *Iovec) SetLen(length int) { 35 | iov.Len = uint32(length) 36 | } 37 | 38 | func (msghdr *Msghdr) SetControllen(length int) { 39 | msghdr.Controllen = uint32(length) 40 | } 41 | 42 | func (cmsg *Cmsghdr) SetLen(length int) { 43 | cmsg.Len = uint32(length) 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/hooks.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | // A hook to be fired when logging on the logging levels returned from 4 | // `Levels()` on your implementation of the interface. Note that this is not 5 | // fired in a goroutine or a channel with workers, you should handle such 6 | // functionality yourself if your call is non-blocking and you don't wish for 7 | // the logging calls for levels returned from `Levels()` to block. 8 | type Hook interface { 9 | Levels() []Level 10 | Fire(*Entry) error 11 | } 12 | 13 | // Internal type for storing the hooks on a logger instance. 14 | type LevelHooks map[Level][]Hook 15 | 16 | // Add a hook to an instance of logger. This is called with 17 | // `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface. 18 | func (hooks LevelHooks) Add(hook Hook) { 19 | for _, level := range hook.Levels() { 20 | hooks[level] = append(hooks[level], hook) 21 | } 22 | } 23 | 24 | // Fire all the hooks for the passed level. Used by `entry.log` to fire 25 | // appropriate hooks for a log entry. 26 | func (hooks LevelHooks) Fire(level Level, entry *Entry) error { 27 | for _, hook := range hooks[level] { 28 | if err := hook.Fire(entry); err != nil { 29 | return err 30 | } 31 | } 32 | 33 | return nil 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/conf/app.conf: -------------------------------------------------------------------------------- 1 | app.name=revelapp 2 | app.secret=80ytgNbBeB0X4mfEYybT4QRXKEoYHoaGAIgZkIB7Z8cEVJjZJOPZupIoluJBMorr 3 | http.addr= 4 | http.port=9000 5 | http.ssl=false 6 | http.sslcert= 7 | http.sslkey= 8 | cookie.httponly=false 9 | cookie.prefix=REVEL 10 | cookie.secure=false 11 | format.date=01/02/2006 12 | format.datetime=01/02/2006 15:04 13 | results.chunked=false 14 | 15 | log.trace.prefix = "TRACE " 16 | log.info.prefix = "INFO " 17 | log.warn.prefix = "WARN " 18 | log.error.prefix = "ERROR " 19 | 20 | # The default language of this application. 21 | i18n.default_language=en 22 | 23 | module.static=github.com/revel/revel/modules/static 24 | 25 | bugsnag.apikey=066f5ad3590596f9aa8d601ea89af845 26 | 27 | [dev] 28 | mode.dev=true 29 | results.pretty=true 30 | watch=true 31 | 32 | module.testrunner = github.com/revel/revel/modules/testrunner 33 | 34 | log.trace.output = off 35 | log.info.output = stderr 36 | log.warn.output = stderr 37 | log.error.output = stderr 38 | 39 | [prod] 40 | mode.dev=false 41 | results.pretty=false 42 | watch=false 43 | 44 | module.testrunner = 45 | 46 | log.trace.output = off 47 | log.info.output = off 48 | log.warn.output = %(app.name)s.log 49 | log.error.output = %(app.name)s.log 50 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,netbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int64(nsec % 1e9) 16 | return 17 | } 18 | 19 | func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } 20 | 21 | func NsecToTimeval(nsec int64) (tv Timeval) { 22 | nsec += 999 // round up to microsecond 23 | tv.Usec = int32(nsec % 1e9 / 1e3) 24 | tv.Sec = int64(nsec / 1e9) 25 | return 26 | } 27 | 28 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 29 | k.Ident = uint64(fd) 30 | k.Filter = uint32(mode) 31 | k.Flags = uint32(flags) 32 | } 33 | 34 | func (iov *Iovec) SetLen(length int) { 35 | iov.Len = uint64(length) 36 | } 37 | 38 | func (msghdr *Msghdr) SetControllen(length int) { 39 | msghdr.Controllen = uint32(length) 40 | } 41 | 42 | func (cmsg *Cmsghdr) SetLen(length int) { 43 | cmsg.Len = uint32(length) 44 | } 45 | -------------------------------------------------------------------------------- /gluon-collector/main_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | 7 | log "github.com/Sirupsen/logrus" 8 | "github.com/ffdo/node-informant/gluon-collector/data" 9 | "github.com/ffdo/node-informant/gluon-collector/meshviewer" 10 | "github.com/ffdo/node-informant/gluon-collector/test" 11 | "github.com/stretchr/testify/assert" 12 | ) 13 | 14 | func TestCompletePipe(t *testing.T) { 15 | assert := assert.New(t) 16 | log.SetLevel(log.ErrorLevel) 17 | store := data.NewSimpleInMemoryStore() 18 | test.ExecuteCompletePipe(t, store) 19 | 20 | graphGenerator := &meshviewer.GraphGenerator{Store: store} 21 | nodesGenerator := &meshviewer.NodesJsonGenerator{Store: store} 22 | 23 | graph := graphGenerator.GenerateGraph() 24 | assert.NotNil(graph) 25 | assert.Equal(169, len(graph.Batadv.Nodes)) 26 | assert.Equal(66, len(graph.Batadv.Links)) 27 | 28 | nodes := nodesGenerator.GetNodesJson() 29 | assert.NotNil(nodes) 30 | } 31 | 32 | func TestCompletePipeWithBoltStore(t *testing.T) { 33 | assert := assert.New(t) 34 | log.SetLevel(log.ErrorLevel) 35 | dbPath := "./bolt.db" 36 | defer os.RemoveAll(dbPath) 37 | store, err := data.NewBoltStore(dbPath) 38 | assert.Nil(err) 39 | assert.NotNil(store) 40 | test.ExecuteCompletePipe(t, store) 41 | store.Close() 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | # 6 | # Generate system call table for DragonFly from master list 7 | # (for example, /usr/src/sys/kern/syscalls.master). 8 | 9 | use strict; 10 | 11 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { 12 | print STDERR "GOARCH or GOOS not defined in environment\n"; 13 | exit 1; 14 | } 15 | 16 | my $command = "mksysnum_dragonfly.pl " . join(' ', @ARGV); 17 | 18 | print <){ 30 | if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){ 31 | my $num = $1; 32 | my $proto = $2; 33 | my $name = "SYS_$3"; 34 | $name =~ y/a-z/A-Z/; 35 | 36 | # There are multiple entries for enosys and nosys, so comment them out. 37 | if($name =~ /^SYS_E?NOSYS$/){ 38 | $name = "// $name"; 39 | } 40 | if($name eq 'SYS_SYS_EXIT'){ 41 | $name = 'SYS_EXIT'; 42 | } 43 | 44 | print " $name = $num; // $proto\n"; 45 | } 46 | } 47 | 48 | print <){ 30 | if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){ 31 | my $num = $1; 32 | my $proto = $3; 33 | my $name = $4; 34 | $name =~ y/a-z/A-Z/; 35 | 36 | # There are multiple entries for enosys and nosys, so comment them out. 37 | if($name =~ /^SYS_E?NOSYS$/){ 38 | $name = "// $name"; 39 | } 40 | if($name eq 'SYS_SYS_EXIT'){ 41 | $name = 'SYS_EXIT'; 42 | } 43 | 44 | print " $name = $num; // $proto\n"; 45 | } 46 | } 47 | 48 | print </io. 9 | type ProcIO struct { 10 | // Chars read. 11 | RChar uint64 12 | // Chars written. 13 | WChar uint64 14 | // Read syscalls. 15 | SyscR uint64 16 | // Write syscalls. 17 | SyscW uint64 18 | // Bytes read. 19 | ReadBytes uint64 20 | // Bytes written. 21 | WriteBytes uint64 22 | // Bytes written, but taking into account truncation. See 23 | // Documentation/filesystems/proc.txt in the kernel sources for 24 | // detailed explanation. 25 | CancelledWriteBytes int64 26 | } 27 | 28 | // NewIO creates a new ProcIO instance from a given Proc instance. 29 | func (p Proc) NewIO() (ProcIO, error) { 30 | pio := ProcIO{} 31 | 32 | f, err := p.open("io") 33 | if err != nil { 34 | return pio, err 35 | } 36 | defer f.Close() 37 | 38 | data, err := ioutil.ReadAll(f) 39 | if err != nil { 40 | return pio, err 41 | } 42 | 43 | ioFormat := "rchar: %d\nwchar: %d\nsyscr: %d\nsyscw: %d\n" + 44 | "read_bytes: %d\nwrite_bytes: %d\n" + 45 | "cancelled_write_bytes: %d\n" 46 | 47 | _, err = fmt.Sscanf(string(data), ioFormat, &pio.RChar, &pio.WChar, &pio.SyscR, 48 | &pio.SyscW, &pio.ReadBytes, &pio.WriteBytes, &pio.CancelledWriteBytes) 49 | if err != nil { 50 | return pio, err 51 | } 52 | 53 | return pio, nil 54 | } 55 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/formatters/logstash/logstash_test.go: -------------------------------------------------------------------------------- 1 | package logstash 2 | 3 | import ( 4 | "bytes" 5 | "encoding/json" 6 | "github.com/Sirupsen/logrus" 7 | "github.com/stretchr/testify/assert" 8 | "testing" 9 | ) 10 | 11 | func TestLogstashFormatter(t *testing.T) { 12 | assert := assert.New(t) 13 | 14 | lf := LogstashFormatter{Type: "abc"} 15 | 16 | fields := logrus.Fields{ 17 | "message": "def", 18 | "level": "ijk", 19 | "type": "lmn", 20 | "one": 1, 21 | "pi": 3.14, 22 | "bool": true, 23 | } 24 | 25 | entry := logrus.WithFields(fields) 26 | entry.Message = "msg" 27 | entry.Level = logrus.InfoLevel 28 | 29 | b, _ := lf.Format(entry) 30 | 31 | var data map[string]interface{} 32 | dec := json.NewDecoder(bytes.NewReader(b)) 33 | dec.UseNumber() 34 | dec.Decode(&data) 35 | 36 | // base fields 37 | assert.Equal(json.Number("1"), data["@version"]) 38 | assert.NotEmpty(data["@timestamp"]) 39 | assert.Equal("abc", data["type"]) 40 | assert.Equal("msg", data["message"]) 41 | assert.Equal("info", data["level"]) 42 | 43 | // substituted fields 44 | assert.Equal("def", data["fields.message"]) 45 | assert.Equal("ijk", data["fields.level"]) 46 | assert.Equal("lmn", data["fields.type"]) 47 | 48 | // formats 49 | assert.Equal(json.Number("1"), data["one"]) 50 | assert.Equal(json.Number("3.14"), data["pi"]) 51 | assert.Equal(true, data["bool"]) 52 | } 53 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/fixtures/26232/limits: -------------------------------------------------------------------------------- 1 | Limit Soft Limit Hard Limit Units 2 | Max cpu time unlimited unlimited seconds 3 | Max file size unlimited unlimited bytes 4 | Max data size unlimited unlimited bytes 5 | Max stack size 8388608 unlimited bytes 6 | Max core file size 0 unlimited bytes 7 | Max resident set unlimited unlimited bytes 8 | Max processes 29436 29436 processes 9 | Max open files 1024 4096 files 10 | Max locked memory 65536 65536 bytes 11 | Max address space unlimited unlimited bytes 12 | Max file locks unlimited unlimited locks 13 | Max pending signals 29436 29436 signals 14 | Max msgqueue size 819200 819200 bytes 15 | Max nice priority 0 0 16 | Max realtime priority 0 0 17 | Max realtime timeout unlimited unlimited us 18 | -------------------------------------------------------------------------------- /vendor/github.com/olebedev/config/README.md: -------------------------------------------------------------------------------- 1 | # Config [![wercker status](https://app.wercker.com/status/b4e8561d9a711afcb016bf0018e83897/s/ "wercker status")](https://app.wercker.com/project/bykey/b4e8561d9a711afcb016bf0018e83897) [![GoDoc](https://godoc.org/github.com/olebedev/config?status.png)](https://godoc.org/github.com/olebedev/config) 2 | 3 | Package config provides convenient access methods to configuration 4 | stored as JSON or YAML. 5 | 6 | This is a fork of the [original version](https://github.com/moraes/config). 7 | This version extends the functionality of the original without losing compatibility. 8 | Major features added: 9 | 10 | - [`Set(path string, value interface{}) error`](http://godoc.org/github.com/olebedev/config#Config.Set) method 11 | - [`Env() *config.Config`](http://godoc.org/github.com/olebedev/config#Config.Env) method, for OS environment variables parsing 12 | - [`Flag() *config.Config`](http://godoc.org/github.com/olebedev/config#Config.Flag) method, for command line arguments parsing 13 | - [`U*`](https://godoc.org/github.com/olebedev/config#Config.UBool) methods 14 | - [`Copy(...path) (*config.config, error)`](https://godoc.org/github.com/olebedev/config#Config.Copy) method 15 | - [`Extend(*config.Config) (*config.Config, error)`](https://godoc.org/github.com/olebedev/config#Config.Extend) method 16 | 17 | Example and more information you can find [here](http://godoc.org/github.com/olebedev/config). 18 | -------------------------------------------------------------------------------- /gluon-collector/receiver_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net" 5 | "testing" 6 | "time" 7 | 8 | "github.com/ffdo/node-informant/announced" 9 | "github.com/ffdo/node-informant/gluon-collector/test" 10 | "github.com/stretchr/testify/assert" 11 | ) 12 | 13 | var ( 14 | additionalData = []announced.Response{ 15 | announced.Response{ 16 | ClientAddr: &net.UDPAddr{ 17 | IP: net.ParseIP("fe80::1001:bcad"), 18 | Port: 4242, 19 | }, 20 | Payload: []byte("Additional payload"), 21 | }, 22 | } 23 | ) 24 | 25 | func TestMultiReceiver(t *testing.T) { 26 | assert := assert.New(t) 27 | 28 | testReceiver1 := &test.TestDataReceiver{test.TestData} 29 | testReceiver2 := &test.TestDataReceiver{additionalData} 30 | 31 | multiReceiver := NewMultiReceiver(testReceiver1, testReceiver2) 32 | 33 | totalPacketCount := len(test.TestData) + len(additionalData) 34 | packetFound := false 35 | i := 0 36 | go multiReceiver.Receive(func(packet announced.Response) { 37 | i = i + 1 38 | payloadString := string(packet.Payload) 39 | if payloadString == "Additional payload" { 40 | packetFound = true 41 | } 42 | }) 43 | testReceiver1.Close() 44 | testReceiver2.Close() 45 | for i < totalPacketCount { 46 | time.Sleep(time.Millisecond * 1) 47 | } 48 | assert.Equal(totalPacketCount, i, "Received less packets than we fed through 2 receiver") 49 | assert.True(packetFound, "Didn't found the additional payload") 50 | } 51 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/Makefile: -------------------------------------------------------------------------------- 1 | TEST=. 2 | BENCH=. 3 | COVERPROFILE=/tmp/c.out 4 | BRANCH=`git rev-parse --abbrev-ref HEAD` 5 | COMMIT=`git rev-parse --short HEAD` 6 | GOLDFLAGS="-X main.branch $(BRANCH) -X main.commit $(COMMIT)" 7 | 8 | default: build 9 | 10 | bench: 11 | go test -v -test.run=NOTHINCONTAINSTHIS -test.bench=$(BENCH) 12 | 13 | # http://cloc.sourceforge.net/ 14 | cloc: 15 | @cloc --not-match-f='Makefile|_test.go' . 16 | 17 | cover: fmt 18 | go test -coverprofile=$(COVERPROFILE) -test.run=$(TEST) $(COVERFLAG) . 19 | go tool cover -html=$(COVERPROFILE) 20 | rm $(COVERPROFILE) 21 | 22 | cpuprofile: fmt 23 | @go test -c 24 | @./bolt.test -test.v -test.run=$(TEST) -test.cpuprofile cpu.prof 25 | 26 | # go get github.com/kisielk/errcheck 27 | errcheck: 28 | @echo "=== errcheck ===" 29 | @errcheck github.com/boltdb/bolt 30 | 31 | fmt: 32 | @go fmt ./... 33 | 34 | get: 35 | @go get -d ./... 36 | 37 | build: get 38 | @mkdir -p bin 39 | @go build -ldflags=$(GOLDFLAGS) -a -o bin/bolt ./cmd/bolt 40 | 41 | test: fmt 42 | @go get github.com/stretchr/testify/assert 43 | @echo "=== TESTS ===" 44 | @go test -v -cover -test.run=$(TEST) 45 | @echo "" 46 | @echo "" 47 | @echo "=== CLI ===" 48 | @go test -v -test.run=$(TEST) ./cmd/bolt 49 | @echo "" 50 | @echo "" 51 | @echo "=== RACE DETECTOR ===" 52 | @go test -v -race -test.run="TestSimulate_(100op|1000op)" 53 | 54 | .PHONY: bench cloc cover cpuprofile fmt memprofile test 55 | -------------------------------------------------------------------------------- /vendor/github.com/go-martini/martini/return_handler.go: -------------------------------------------------------------------------------- 1 | package martini 2 | 3 | import ( 4 | "github.com/codegangsta/inject" 5 | "net/http" 6 | "reflect" 7 | ) 8 | 9 | // ReturnHandler is a service that Martini provides that is called 10 | // when a route handler returns something. The ReturnHandler is 11 | // responsible for writing to the ResponseWriter based on the values 12 | // that are passed into this function. 13 | type ReturnHandler func(Context, []reflect.Value) 14 | 15 | func defaultReturnHandler() ReturnHandler { 16 | return func(ctx Context, vals []reflect.Value) { 17 | rv := ctx.Get(inject.InterfaceOf((*http.ResponseWriter)(nil))) 18 | res := rv.Interface().(http.ResponseWriter) 19 | var responseVal reflect.Value 20 | if len(vals) > 1 && vals[0].Kind() == reflect.Int { 21 | res.WriteHeader(int(vals[0].Int())) 22 | responseVal = vals[1] 23 | } else if len(vals) > 0 { 24 | responseVal = vals[0] 25 | } 26 | if canDeref(responseVal) { 27 | responseVal = responseVal.Elem() 28 | } 29 | if isByteSlice(responseVal) { 30 | res.Write(responseVal.Bytes()) 31 | } else { 32 | res.Write([]byte(responseVal.String())) 33 | } 34 | } 35 | } 36 | 37 | func isByteSlice(val reflect.Value) bool { 38 | return val.Kind() == reflect.Slice && val.Type().Elem().Kind() == reflect.Uint8 39 | } 40 | 41 | func canDeref(val reflect.Value) bool { 42 | return val.Kind() == reflect.Interface || val.Kind() == reflect.Ptr 43 | } 44 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/LICENSE.libyaml: -------------------------------------------------------------------------------- 1 | The following files were ported to Go from C files of libyaml, and thus 2 | are still covered by their original copyright and license: 3 | 4 | apic.go 5 | emitterc.go 6 | parserc.go 7 | readerc.go 8 | scannerc.go 9 | writerc.go 10 | yamlh.go 11 | yamlprivateh.go 12 | 13 | Copyright (c) 2006 Kirill Simonov 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of 16 | this software and associated documentation files (the "Software"), to deal in 17 | the Software without restriction, including without limitation the rights to 18 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 19 | of the Software, and to permit persons to whom the Software is furnished to do 20 | so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 0.9.0 (Unreleased) 2 | 3 | * logrus/text_formatter: don't emit empty msg 4 | * logrus/hooks/airbrake: move out of main repository 5 | * logrus/hooks/sentry: move out of main repository 6 | * logrus/hooks/papertrail: move out of main repository 7 | * logrus/hooks/bugsnag: move out of main repository 8 | 9 | # 0.8.7 10 | 11 | * logrus/core: fix possible race (#216) 12 | * logrus/doc: small typo fixes and doc improvements 13 | 14 | 15 | # 0.8.6 16 | 17 | * hooks/raven: allow passing an initialized client 18 | 19 | # 0.8.5 20 | 21 | * logrus/core: revert #208 22 | 23 | # 0.8.4 24 | 25 | * formatter/text: fix data race (#218) 26 | 27 | # 0.8.3 28 | 29 | * logrus/core: fix entry log level (#208) 30 | * logrus/core: improve performance of text formatter by 40% 31 | * logrus/core: expose `LevelHooks` type 32 | * logrus/core: add support for DragonflyBSD and NetBSD 33 | * formatter/text: print structs more verbosely 34 | 35 | # 0.8.2 36 | 37 | * logrus: fix more Fatal family functions 38 | 39 | # 0.8.1 40 | 41 | * logrus: fix not exiting on `Fatalf` and `Fatalln` 42 | 43 | # 0.8.0 44 | 45 | * logrus: defaults to stderr instead of stdout 46 | * hooks/sentry: add special field for `*http.Request` 47 | * formatter/text: ignore Windows for colors 48 | 49 | # 0.7.3 50 | 51 | * formatter/\*: allow configuration of timestamp layout 52 | 53 | # 0.7.2 54 | 55 | * formatter/text: Add configuration option for time format (#158) 56 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/stat.go: -------------------------------------------------------------------------------- 1 | package procfs 2 | 3 | import ( 4 | "bufio" 5 | "fmt" 6 | "strconv" 7 | "strings" 8 | ) 9 | 10 | // Stat represents kernel/system statistics. 11 | type Stat struct { 12 | // Boot time in seconds since the Epoch. 13 | BootTime int64 14 | } 15 | 16 | // NewStat returns kernel/system statistics read from /proc/stat. 17 | func NewStat() (Stat, error) { 18 | fs, err := NewFS(DefaultMountPoint) 19 | if err != nil { 20 | return Stat{}, err 21 | } 22 | 23 | return fs.NewStat() 24 | } 25 | 26 | // NewStat returns an information about current kernel/system statistics. 27 | func (fs FS) NewStat() (Stat, error) { 28 | f, err := fs.open("stat") 29 | if err != nil { 30 | return Stat{}, err 31 | } 32 | defer f.Close() 33 | 34 | s := bufio.NewScanner(f) 35 | for s.Scan() { 36 | line := s.Text() 37 | if !strings.HasPrefix(line, "btime") { 38 | continue 39 | } 40 | fields := strings.Fields(line) 41 | if len(fields) != 2 { 42 | return Stat{}, fmt.Errorf("couldn't parse %s line %s", f.Name(), line) 43 | } 44 | i, err := strconv.ParseInt(fields[1], 10, 32) 45 | if err != nil { 46 | return Stat{}, fmt.Errorf("couldn't parse %s: %s", fields[1], err) 47 | } 48 | return Stat{BootTime: i}, nil 49 | } 50 | if err := s.Err(); err != nil { 51 | return Stat{}, fmt.Errorf("couldn't parse %s: %s", f.Name(), err) 52 | } 53 | 54 | return Stat{}, fmt.Errorf("couldn't parse %s, missing btime", f.Name()) 55 | } 56 | -------------------------------------------------------------------------------- /vendor/github.com/oxtoacart/bpool/sizedbufferpool_test.go: -------------------------------------------------------------------------------- 1 | package bpool 2 | 3 | import ( 4 | "bytes" 5 | "testing" 6 | ) 7 | 8 | // TestSizedBufferPool checks that over-sized buffers are released and that new 9 | // buffers are created in their place. 10 | func TestSizedBufferPool(t *testing.T) { 11 | 12 | var size int = 4 13 | var capacity int = 1024 14 | 15 | bufPool := NewSizedBufferPool(size, capacity) 16 | 17 | b := bufPool.Get() 18 | 19 | // Check the cap before we use the buffer. 20 | if cap(b.Bytes()) != capacity { 21 | t.Fatalf("buffer capacity incorrect: got %v want %v", cap(b.Bytes()), 22 | capacity) 23 | } 24 | 25 | // Grow the buffer beyond our capacity and return it to the pool 26 | b.Grow(capacity * 3) 27 | bufPool.Put(b) 28 | 29 | // Add some additional buffers to fill up the pool. 30 | for i := 0; i < size; i++ { 31 | bufPool.Put(bytes.NewBuffer(make([]byte, 0, bufPool.a*2))) 32 | } 33 | 34 | // Check that oversized buffers are being replaced. 35 | if len(bufPool.c) < size { 36 | t.Fatalf("buffer pool too small: got %v want %v", len(bufPool.c), size) 37 | } 38 | 39 | // Close the channel so we can iterate over it. 40 | close(bufPool.c) 41 | 42 | // Check that there are buffers of the correct capacity in the pool. 43 | for buffer := range bufPool.c { 44 | if cap(buffer.Bytes()) != bufPool.a { 45 | t.Fatalf("returned buffers wrong capacity: got %v want %v", 46 | cap(buffer.Bytes()), capacity) 47 | } 48 | } 49 | 50 | } 51 | --------------------------------------------------------------------------------