├── .dockerignore ├── .gitignore ├── .promu.yml ├── .travis.yml ├── Dockerfile ├── Gopkg.lock ├── Gopkg.toml ├── LICENSE ├── Makefile ├── README.md ├── VERSION ├── exporter.go ├── jvm.go ├── main.go ├── mbeans.go ├── mbeans_test.go ├── release.sh ├── struct.go ├── utils ├── json-solr-response-generator.sh └── solr-responses │ ├── 5 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6 │ ├── admin-cores.json │ └── mbeans.json │ ├── 7 │ ├── admin-cores.json │ └── mbeans.json │ ├── 5.3 │ ├── admin-cores.json │ └── mbeans.json │ ├── 5.4.1 │ ├── admin-cores.json │ └── mbeans.json │ ├── 5.4 │ ├── admin-cores.json │ └── mbeans.json │ ├── 5.5.3 │ ├── admin-cores.json │ └── mbeans.json │ ├── 5.5.4 │ ├── admin-cores.json │ └── mbeans.json │ ├── 5.5.5 │ ├── admin-cores.json │ └── mbeans.json │ ├── 5.5 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.0.1 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.0 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.1.0 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.1 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.2.1 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.2 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.3.0 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.3 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.4.0 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.4.1 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.4.2 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.4 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.5.0 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.5.1 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.5 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.6.0 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.6.1 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.6.2 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.6.3 │ ├── admin-cores.json │ └── mbeans.json │ ├── 6.6 │ ├── admin-cores.json │ └── mbeans.json │ ├── 7.0.0 │ ├── admin-cores.json │ └── mbeans.json │ ├── 7.0.1 │ ├── admin-cores.json │ └── mbeans.json │ ├── 7.0 │ ├── admin-cores.json │ └── mbeans.json │ ├── 7.1.0 │ ├── admin-cores.json │ └── mbeans.json │ ├── 7.1 │ ├── admin-cores.json │ └── mbeans.json │ ├── 7.2.0 │ ├── admin-cores.json │ └── mbeans.json │ ├── 7.2.1 │ ├── admin-cores.json │ └── mbeans.json │ ├── 7.2 │ ├── admin-cores.json │ └── mbeans.json │ ├── 7.3.0 │ ├── admin-cores.json │ └── mbeans.json │ └── 7.3 │ ├── admin-cores.json │ └── mbeans.json └── vendor ├── github.com ├── Sirupsen │ └── logrus │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── alt_exit.go │ │ ├── doc.go │ │ ├── entry.go │ │ ├── exported.go │ │ ├── formatter.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── hooks.go │ │ ├── json_formatter.go │ │ ├── logger.go │ │ ├── logger_test.go │ │ ├── logrus.go │ │ ├── terminal_check_appengine.go │ │ ├── terminal_check_js.go │ │ ├── terminal_check_notappengine.go │ │ ├── terminal_check_windows.go │ │ ├── terminal_notwindows.go │ │ ├── terminal_windows.go │ │ ├── text_formatter.go │ │ └── writer.go ├── alecthomas │ ├── template │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc.go │ │ ├── example_test.go │ │ ├── examplefiles_test.go │ │ ├── examplefunc_test.go │ │ ├── exec.go │ │ ├── exec_test.go │ │ ├── funcs.go │ │ ├── helper.go │ │ ├── multi_test.go │ │ ├── parse │ │ │ ├── lex.go │ │ │ ├── lex_test.go │ │ │ ├── node.go │ │ │ ├── parse.go │ │ │ └── parse_test.go │ │ ├── template.go │ │ └── testdata │ │ │ ├── file1.tmpl │ │ │ ├── file2.tmpl │ │ │ ├── tmpl1.tmpl │ │ │ └── tmpl2.tmpl │ └── units │ │ ├── COPYING │ │ ├── README.md │ │ ├── bytes.go │ │ ├── bytes_test.go │ │ ├── doc.go │ │ ├── si.go │ │ └── util.go ├── beorn7 │ └── perks │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── histogram │ │ ├── bench_test.go │ │ ├── histogram.go │ │ └── histogram_test.go │ │ ├── quantile │ │ ├── bench_test.go │ │ ├── example_test.go │ │ ├── exampledata.txt │ │ ├── stream.go │ │ └── stream_test.go │ │ └── topk │ │ ├── topk.go │ │ └── topk_test.go ├── blang │ └── semver │ │ ├── .gx │ │ └── lastpubver │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── examples │ │ └── main.go │ │ ├── json.go │ │ ├── json_test.go │ │ ├── package.json │ │ ├── range.go │ │ ├── range_test.go │ │ ├── semver.go │ │ ├── semver_test.go │ │ ├── sort.go │ │ ├── sort_test.go │ │ ├── sql.go │ │ └── sql_test.go ├── golang │ └── protobuf │ │ ├── .github │ │ └── ISSUE_TEMPLATE │ │ │ ├── bug_report.md │ │ │ ├── feature_request.md │ │ │ └── question.md │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── conformance │ │ ├── Makefile │ │ ├── conformance.go │ │ ├── conformance.sh │ │ ├── failure_list_go.txt │ │ ├── internal │ │ │ └── conformance_proto │ │ │ │ ├── conformance.pb.go │ │ │ │ └── conformance.proto │ │ └── test.sh │ │ ├── descriptor │ │ ├── descriptor.go │ │ └── descriptor_test.go │ │ ├── jsonpb │ │ ├── jsonpb.go │ │ ├── jsonpb_test.go │ │ └── jsonpb_test_proto │ │ │ ├── more_test_objects.pb.go │ │ │ ├── more_test_objects.proto │ │ │ ├── test_objects.pb.go │ │ │ └── test_objects.proto │ │ ├── proto │ │ ├── all_test.go │ │ ├── any_test.go │ │ ├── clone.go │ │ ├── clone_test.go │ │ ├── decode.go │ │ ├── decode_test.go │ │ ├── discard.go │ │ ├── discard_test.go │ │ ├── encode.go │ │ ├── encode_test.go │ │ ├── equal.go │ │ ├── equal_test.go │ │ ├── extensions.go │ │ ├── extensions_test.go │ │ ├── lib.go │ │ ├── map_test.go │ │ ├── message_set.go │ │ ├── message_set_test.go │ │ ├── pointer_reflect.go │ │ ├── pointer_unsafe.go │ │ ├── properties.go │ │ ├── proto3_proto │ │ │ ├── proto3.pb.go │ │ │ └── proto3.proto │ │ ├── proto3_test.go │ │ ├── size2_test.go │ │ ├── size_test.go │ │ ├── table_marshal.go │ │ ├── table_merge.go │ │ ├── table_unmarshal.go │ │ ├── test_proto │ │ │ ├── test.pb.go │ │ │ └── test.proto │ │ ├── text.go │ │ ├── text_parser.go │ │ ├── text_parser_test.go │ │ └── text_test.go │ │ ├── protoc-gen-go │ │ ├── descriptor │ │ │ ├── descriptor.pb.go │ │ │ └── descriptor.proto │ │ ├── doc.go │ │ ├── generator │ │ │ ├── generator.go │ │ │ ├── internal │ │ │ │ └── remap │ │ │ │ │ ├── remap.go │ │ │ │ │ └── remap_test.go │ │ │ └── name_test.go │ │ ├── golden_test.go │ │ ├── grpc │ │ │ └── grpc.go │ │ ├── link_grpc.go │ │ ├── main.go │ │ ├── plugin │ │ │ ├── plugin.pb.go │ │ │ ├── plugin.pb.golden │ │ │ └── plugin.proto │ │ └── testdata │ │ │ ├── deprecated │ │ │ ├── deprecated.pb.go │ │ │ └── deprecated.proto │ │ │ ├── extension_base │ │ │ ├── extension_base.pb.go │ │ │ └── extension_base.proto │ │ │ ├── extension_extra │ │ │ ├── extension_extra.pb.go │ │ │ └── extension_extra.proto │ │ │ ├── extension_test.go │ │ │ ├── extension_user │ │ │ ├── extension_user.pb.go │ │ │ └── extension_user.proto │ │ │ ├── grpc │ │ │ ├── grpc.pb.go │ │ │ └── grpc.proto │ │ │ ├── import_public │ │ │ ├── a.pb.go │ │ │ ├── a.proto │ │ │ ├── b.pb.go │ │ │ ├── b.proto │ │ │ └── sub │ │ │ │ ├── a.pb.go │ │ │ │ ├── a.proto │ │ │ │ ├── b.pb.go │ │ │ │ └── b.proto │ │ │ ├── import_public_test.go │ │ │ ├── imports │ │ │ ├── fmt │ │ │ │ ├── m.pb.go │ │ │ │ └── m.proto │ │ │ ├── test_a_1 │ │ │ │ ├── m1.pb.go │ │ │ │ ├── m1.proto │ │ │ │ ├── m2.pb.go │ │ │ │ └── m2.proto │ │ │ ├── test_a_2 │ │ │ │ ├── m3.pb.go │ │ │ │ ├── m3.proto │ │ │ │ ├── m4.pb.go │ │ │ │ └── m4.proto │ │ │ ├── test_b_1 │ │ │ │ ├── m1.pb.go │ │ │ │ ├── m1.proto │ │ │ │ ├── m2.pb.go │ │ │ │ └── m2.proto │ │ │ ├── test_import_a1m1.pb.go │ │ │ ├── test_import_a1m1.proto │ │ │ ├── test_import_a1m2.pb.go │ │ │ ├── test_import_a1m2.proto │ │ │ ├── test_import_all.pb.go │ │ │ └── test_import_all.proto │ │ │ ├── main_test.go │ │ │ ├── multi │ │ │ ├── multi1.pb.go │ │ │ ├── multi1.proto │ │ │ ├── multi2.pb.go │ │ │ ├── multi2.proto │ │ │ ├── multi3.pb.go │ │ │ └── multi3.proto │ │ │ ├── my_test │ │ │ ├── test.pb.go │ │ │ └── test.proto │ │ │ └── proto3 │ │ │ ├── proto3.pb.go │ │ │ └── proto3.proto │ │ ├── ptypes │ │ ├── any.go │ │ ├── any │ │ │ ├── any.pb.go │ │ │ └── any.proto │ │ ├── any_test.go │ │ ├── doc.go │ │ ├── duration.go │ │ ├── duration │ │ │ ├── duration.pb.go │ │ │ └── duration.proto │ │ ├── duration_test.go │ │ ├── empty │ │ │ ├── empty.pb.go │ │ │ └── empty.proto │ │ ├── struct │ │ │ ├── struct.pb.go │ │ │ └── struct.proto │ │ ├── timestamp.go │ │ ├── timestamp │ │ │ ├── timestamp.pb.go │ │ │ └── timestamp.proto │ │ ├── timestamp_test.go │ │ └── wrappers │ │ │ ├── wrappers.pb.go │ │ │ └── wrappers.proto │ │ └── regenerate.sh ├── konsorten │ └── go-windows-terminal-sequences │ │ ├── LICENSE │ │ ├── README.md │ │ ├── go.mod │ │ ├── sequences.go │ │ └── sequences_test.go ├── matttproud │ └── golang_protobuf_extensions │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile.TRAVIS │ │ ├── NOTICE │ │ ├── README.md │ │ ├── ext │ │ └── moved.go │ │ ├── pbtest │ │ └── deleted.go │ │ ├── pbutil │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── all_test.go │ │ ├── decode.go │ │ ├── decode_test.go │ │ ├── doc.go │ │ ├── encode.go │ │ └── encode_test.go │ │ └── testdata │ │ ├── README.THIRD_PARTY │ │ ├── test.pb.go │ │ └── test.proto ├── prometheus │ ├── client_golang │ │ ├── .github │ │ │ └── ISSUE_TEMPLATE.md │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── Dockerfile │ │ ├── LICENSE │ │ ├── MAINTAINERS.md │ │ ├── Makefile │ │ ├── Makefile.common │ │ ├── NOTICE │ │ ├── README.md │ │ ├── VERSION │ │ ├── api │ │ │ ├── client.go │ │ │ ├── client_test.go │ │ │ └── prometheus │ │ │ │ └── v1 │ │ │ │ ├── api.go │ │ │ │ └── api_test.go │ │ ├── examples │ │ │ ├── random │ │ │ │ └── main.go │ │ │ └── simple │ │ │ │ └── main.go │ │ └── prometheus │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── benchmark_test.go │ │ │ ├── collector.go │ │ │ ├── collector_test.go │ │ │ ├── counter.go │ │ │ ├── counter_test.go │ │ │ ├── desc.go │ │ │ ├── desc_test.go │ │ │ ├── doc.go │ │ │ ├── example_clustermanager_test.go │ │ │ ├── example_timer_complex_test.go │ │ │ ├── example_timer_gauge_test.go │ │ │ ├── example_timer_test.go │ │ │ ├── examples_test.go │ │ │ ├── expvar_collector.go │ │ │ ├── expvar_collector_test.go │ │ │ ├── fnv.go │ │ │ ├── gauge.go │ │ │ ├── gauge_test.go │ │ │ ├── go_collector.go │ │ │ ├── go_collector_test.go │ │ │ ├── graphite │ │ │ ├── bridge.go │ │ │ └── bridge_test.go │ │ │ ├── histogram.go │ │ │ ├── histogram_test.go │ │ │ ├── http.go │ │ │ ├── http_test.go │ │ │ ├── internal │ │ │ └── metric.go │ │ │ ├── labels.go │ │ │ ├── metric.go │ │ │ ├── metric_test.go │ │ │ ├── observer.go │ │ │ ├── process_collector.go │ │ │ ├── process_collector_test.go │ │ │ ├── promauto │ │ │ └── auto.go │ │ │ ├── promhttp │ │ │ ├── delegator.go │ │ │ ├── delegator_1_8.go │ │ │ ├── delegator_pre_1_8.go │ │ │ ├── http.go │ │ │ ├── http_test.go │ │ │ ├── instrument_client.go │ │ │ ├── instrument_client_1_8.go │ │ │ ├── instrument_client_1_8_test.go │ │ │ ├── instrument_server.go │ │ │ └── instrument_server_test.go │ │ │ ├── push │ │ │ ├── deprecated.go │ │ │ ├── example_add_from_gatherer_test.go │ │ │ ├── examples_test.go │ │ │ ├── push.go │ │ │ └── push_test.go │ │ │ ├── registry.go │ │ │ ├── registry_test.go │ │ │ ├── summary.go │ │ │ ├── summary_test.go │ │ │ ├── testutil │ │ │ ├── testutil.go │ │ │ └── testutil_test.go │ │ │ ├── timer.go │ │ │ ├── timer_test.go │ │ │ ├── untyped.go │ │ │ ├── value.go │ │ │ ├── value_test.go │ │ │ ├── vec.go │ │ │ ├── vec_test.go │ │ │ ├── wrap.go │ │ │ └── wrap_test.go │ ├── client_model │ │ ├── .gitignore │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── MAINTAINERS.md │ │ ├── Makefile │ │ ├── NOTICE │ │ ├── README.md │ │ ├── cpp │ │ │ ├── metrics.pb.cc │ │ │ └── metrics.pb.h │ │ ├── go │ │ │ └── metrics.pb.go │ │ ├── metrics.proto │ │ ├── pom.xml │ │ ├── python │ │ │ └── prometheus │ │ │ │ ├── __init__.py │ │ │ │ └── client │ │ │ │ ├── __init__.py │ │ │ │ └── model │ │ │ │ ├── __init__.py │ │ │ │ └── metrics_pb2.py │ │ ├── ruby │ │ │ ├── .gitignore │ │ │ ├── Gemfile │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── Rakefile │ │ │ ├── lib │ │ │ │ └── prometheus │ │ │ │ │ └── client │ │ │ │ │ ├── model.rb │ │ │ │ │ └── model │ │ │ │ │ ├── metrics.pb.rb │ │ │ │ │ └── version.rb │ │ │ └── prometheus-client-model.gemspec │ │ ├── setup.py │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── client │ │ │ └── Metrics.java │ ├── common │ │ ├── .travis.yml │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── MAINTAINERS.md │ │ ├── NOTICE │ │ ├── README.md │ │ ├── config │ │ │ ├── config.go │ │ │ ├── http_config.go │ │ │ ├── http_config_test.go │ │ │ ├── testdata │ │ │ │ ├── barney-no-pass.key │ │ │ │ ├── barney.crt │ │ │ │ ├── basic-auth-password │ │ │ │ ├── bearer.token │ │ │ │ ├── http.conf.basic-auth.good.yaml │ │ │ │ ├── http.conf.basic-auth.no-password.yaml │ │ │ │ ├── http.conf.basic-auth.no-username.yaml │ │ │ │ ├── http.conf.basic-auth.too-much.bad.yaml │ │ │ │ ├── http.conf.bearer-token-and-file-set.bad.yml │ │ │ │ ├── http.conf.empty.bad.yml │ │ │ │ ├── http.conf.good.yml │ │ │ │ ├── http.conf.invalid-bearer-token-file.bad.yml │ │ │ │ ├── server.crt │ │ │ │ ├── server.key │ │ │ │ ├── tls-ca-chain.pem │ │ │ │ ├── tls_config.cert_no_key.bad.yml │ │ │ │ ├── tls_config.empty.good.yml │ │ │ │ ├── tls_config.insecure.good.yml │ │ │ │ ├── tls_config.invalid_field.bad.yml │ │ │ │ └── tls_config.key_no_cert.bad.yml │ │ │ └── tls_config_test.go │ │ ├── expfmt │ │ │ ├── bench_test.go │ │ │ ├── decode.go │ │ │ ├── decode_test.go │ │ │ ├── encode.go │ │ │ ├── expfmt.go │ │ │ ├── fuzz.go │ │ │ ├── fuzz │ │ │ │ └── corpus │ │ │ │ │ ├── from_test_parse_0 │ │ │ │ │ ├── from_test_parse_1 │ │ │ │ │ ├── from_test_parse_2 │ │ │ │ │ ├── from_test_parse_3 │ │ │ │ │ ├── from_test_parse_4 │ │ │ │ │ ├── from_test_parse_error_0 │ │ │ │ │ ├── from_test_parse_error_1 │ │ │ │ │ ├── from_test_parse_error_10 │ │ │ │ │ ├── from_test_parse_error_11 │ │ │ │ │ ├── from_test_parse_error_12 │ │ │ │ │ ├── from_test_parse_error_13 │ │ │ │ │ ├── from_test_parse_error_14 │ │ │ │ │ ├── from_test_parse_error_15 │ │ │ │ │ ├── from_test_parse_error_16 │ │ │ │ │ ├── from_test_parse_error_17 │ │ │ │ │ ├── from_test_parse_error_18 │ │ │ │ │ ├── from_test_parse_error_19 │ │ │ │ │ ├── from_test_parse_error_2 │ │ │ │ │ ├── from_test_parse_error_3 │ │ │ │ │ ├── from_test_parse_error_4 │ │ │ │ │ ├── from_test_parse_error_5 │ │ │ │ │ ├── from_test_parse_error_6 │ │ │ │ │ ├── from_test_parse_error_7 │ │ │ │ │ ├── from_test_parse_error_8 │ │ │ │ │ ├── from_test_parse_error_9 │ │ │ │ │ └── minimal │ │ │ ├── testdata │ │ │ │ ├── json2 │ │ │ │ ├── json2_bad │ │ │ │ ├── protobuf │ │ │ │ ├── protobuf.gz │ │ │ │ ├── text │ │ │ │ └── text.gz │ │ │ ├── text_create.go │ │ │ ├── text_create_test.go │ │ │ ├── text_parse.go │ │ │ └── text_parse_test.go │ │ ├── internal │ │ │ └── bitbucket.org │ │ │ │ └── ww │ │ │ │ └── goautoneg │ │ │ │ ├── README.txt │ │ │ │ ├── autoneg.go │ │ │ │ └── autoneg_test.go │ │ ├── log │ │ │ ├── eventlog_formatter.go │ │ │ ├── log.go │ │ │ ├── log_test.go │ │ │ ├── syslog_formatter.go │ │ │ └── syslog_formatter_test.go │ │ ├── model │ │ │ ├── alert.go │ │ │ ├── alert_test.go │ │ │ ├── fingerprinting.go │ │ │ ├── fnv.go │ │ │ ├── labels.go │ │ │ ├── labels_test.go │ │ │ ├── labelset.go │ │ │ ├── metric.go │ │ │ ├── metric_test.go │ │ │ ├── model.go │ │ │ ├── signature.go │ │ │ ├── signature_test.go │ │ │ ├── silence.go │ │ │ ├── silence_test.go │ │ │ ├── time.go │ │ │ ├── time_test.go │ │ │ ├── value.go │ │ │ └── value_test.go │ │ ├── promlog │ │ │ ├── flag │ │ │ │ └── flag.go │ │ │ └── log.go │ │ ├── route │ │ │ ├── route.go │ │ │ └── route_test.go │ │ └── version │ │ │ └── info.go │ └── procfs │ │ ├── .circleci │ │ └── config.yml │ │ ├── .gitignore │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── MAINTAINERS.md │ │ ├── Makefile │ │ ├── NOTICE │ │ ├── README.md │ │ ├── bcache │ │ ├── bcache.go │ │ ├── get.go │ │ └── get_test.go │ │ ├── buddyinfo.go │ │ ├── buddyinfo_test.go │ │ ├── doc.go │ │ ├── fixtures.ttar │ │ ├── fs.go │ │ ├── fs_test.go │ │ ├── internal │ │ └── util │ │ │ ├── parse.go │ │ │ └── sysreadfile_linux.go │ │ ├── ipvs.go │ │ ├── ipvs_test.go │ │ ├── mdstat.go │ │ ├── mdstat_test.go │ │ ├── mountstats.go │ │ ├── mountstats_test.go │ │ ├── net_dev.go │ │ ├── net_dev_test.go │ │ ├── nfs │ │ ├── nfs.go │ │ ├── parse.go │ │ ├── parse_nfs.go │ │ ├── parse_nfs_test.go │ │ ├── parse_nfsd.go │ │ └── parse_nfsd_test.go │ │ ├── proc.go │ │ ├── proc_io.go │ │ ├── proc_io_test.go │ │ ├── proc_limits.go │ │ ├── proc_limits_test.go │ │ ├── proc_ns.go │ │ ├── proc_ns_test.go │ │ ├── proc_stat.go │ │ ├── proc_stat_test.go │ │ ├── proc_test.go │ │ ├── scripts │ │ └── check_license.sh │ │ ├── stat.go │ │ ├── stat_test.go │ │ ├── sysfs │ │ ├── .gitignore │ │ ├── doc.go │ │ ├── fixtures.ttar │ │ ├── fs.go │ │ ├── fs_test.go │ │ ├── net_class.go │ │ ├── net_class_test.go │ │ ├── system_cpu.go │ │ └── system_cpu_test.go │ │ ├── ttar │ │ ├── xfrm.go │ │ ├── xfrm_test.go │ │ └── xfs │ │ ├── parse.go │ │ ├── parse_test.go │ │ └── xfs.go └── sirupsen │ └── logrus │ ├── .gitignore │ ├── .travis.yml │ ├── alt_exit_test.go │ ├── appveyor.yml │ ├── entry_test.go │ ├── example_basic_test.go │ ├── example_hook_test.go │ ├── formatter_bench_test.go │ ├── hook_test.go │ ├── hooks │ ├── syslog │ │ ├── README.md │ │ ├── syslog.go │ │ └── syslog_test.go │ └── test │ │ ├── test.go │ │ └── test_test.go │ ├── json_formatter_test.go │ ├── logger_bench_test.go │ ├── logrus_test.go │ └── text_formatter_test.go ├── golang.org └── x │ ├── crypto │ ├── .gitattributes │ ├── .gitignore │ ├── AUTHORS │ ├── CONTRIBUTING.md │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── README.md │ ├── acme │ │ ├── acme.go │ │ ├── acme_test.go │ │ ├── autocert │ │ │ ├── autocert.go │ │ │ ├── autocert_test.go │ │ │ ├── cache.go │ │ │ ├── cache_test.go │ │ │ ├── example_test.go │ │ │ ├── internal │ │ │ │ └── acmetest │ │ │ │ │ └── ca.go │ │ │ ├── listener.go │ │ │ ├── renewal.go │ │ │ └── renewal_test.go │ │ ├── http.go │ │ ├── http_test.go │ │ ├── jws.go │ │ ├── jws_test.go │ │ ├── types.go │ │ └── types_test.go │ ├── argon2 │ │ ├── argon2.go │ │ ├── argon2_test.go │ │ ├── blake2b.go │ │ ├── blamka_amd64.go │ │ ├── blamka_amd64.s │ │ ├── blamka_generic.go │ │ └── blamka_ref.go │ ├── bcrypt │ │ ├── base64.go │ │ ├── bcrypt.go │ │ └── bcrypt_test.go │ ├── blake2b │ │ ├── blake2b.go │ │ ├── blake2bAVX2_amd64.go │ │ ├── blake2bAVX2_amd64.s │ │ ├── blake2b_amd64.go │ │ ├── blake2b_amd64.s │ │ ├── blake2b_generic.go │ │ ├── blake2b_ref.go │ │ ├── blake2b_test.go │ │ ├── blake2x.go │ │ └── register.go │ ├── blake2s │ │ ├── blake2s.go │ │ ├── blake2s_386.go │ │ ├── blake2s_386.s │ │ ├── blake2s_amd64.go │ │ ├── blake2s_amd64.s │ │ ├── blake2s_generic.go │ │ ├── blake2s_ref.go │ │ ├── blake2s_test.go │ │ ├── blake2x.go │ │ └── register.go │ ├── blowfish │ │ ├── block.go │ │ ├── blowfish_test.go │ │ ├── cipher.go │ │ └── const.go │ ├── bn256 │ │ ├── bn256.go │ │ ├── bn256_test.go │ │ ├── constants.go │ │ ├── curve.go │ │ ├── example_test.go │ │ ├── gfp12.go │ │ ├── gfp2.go │ │ ├── gfp6.go │ │ ├── optate.go │ │ └── twist.go │ ├── cast5 │ │ ├── cast5.go │ │ └── cast5_test.go │ ├── chacha20poly1305 │ │ ├── chacha20poly1305.go │ │ ├── chacha20poly1305_amd64.go │ │ ├── chacha20poly1305_amd64.s │ │ ├── chacha20poly1305_generic.go │ │ ├── chacha20poly1305_noasm.go │ │ ├── chacha20poly1305_test.go │ │ ├── chacha20poly1305_vectors_test.go │ │ └── xchacha20poly1305.go │ ├── codereview.cfg │ ├── cryptobyte │ │ ├── asn1.go │ │ ├── asn1 │ │ │ └── asn1.go │ │ ├── asn1_test.go │ │ ├── builder.go │ │ ├── cryptobyte_test.go │ │ ├── example_test.go │ │ └── string.go │ ├── curve25519 │ │ ├── const_amd64.h │ │ ├── const_amd64.s │ │ ├── cswap_amd64.s │ │ ├── curve25519.go │ │ ├── curve25519_test.go │ │ ├── doc.go │ │ ├── freeze_amd64.s │ │ ├── ladderstep_amd64.s │ │ ├── mont25519_amd64.go │ │ ├── mul_amd64.s │ │ └── square_amd64.s │ ├── ed25519 │ │ ├── ed25519.go │ │ ├── ed25519_test.go │ │ ├── internal │ │ │ └── edwards25519 │ │ │ │ ├── const.go │ │ │ │ └── edwards25519.go │ │ └── testdata │ │ │ └── sign.input.gz │ ├── hkdf │ │ ├── example_test.go │ │ ├── hkdf.go │ │ └── hkdf_test.go │ ├── internal │ │ ├── chacha20 │ │ │ ├── chacha_generic.go │ │ │ ├── chacha_noasm.go │ │ │ ├── chacha_s390x.go │ │ │ ├── chacha_s390x.s │ │ │ ├── chacha_test.go │ │ │ ├── vectors_test.go │ │ │ └── xor.go │ │ └── subtle │ │ │ ├── aliasing.go │ │ │ ├── aliasing_appengine.go │ │ │ └── aliasing_test.go │ ├── md4 │ │ ├── example_test.go │ │ ├── md4.go │ │ ├── md4_test.go │ │ └── md4block.go │ ├── nacl │ │ ├── auth │ │ │ ├── auth.go │ │ │ ├── auth_test.go │ │ │ └── example_test.go │ │ ├── box │ │ │ ├── box.go │ │ │ ├── box_test.go │ │ │ └── example_test.go │ │ ├── secretbox │ │ │ ├── example_test.go │ │ │ ├── secretbox.go │ │ │ └── secretbox_test.go │ │ └── sign │ │ │ ├── sign.go │ │ │ └── sign_test.go │ ├── ocsp │ │ ├── ocsp.go │ │ └── ocsp_test.go │ ├── openpgp │ │ ├── armor │ │ │ ├── armor.go │ │ │ ├── armor_test.go │ │ │ └── encode.go │ │ ├── canonical_text.go │ │ ├── canonical_text_test.go │ │ ├── clearsign │ │ │ ├── clearsign.go │ │ │ └── clearsign_test.go │ │ ├── elgamal │ │ │ ├── elgamal.go │ │ │ └── elgamal_test.go │ │ ├── errors │ │ │ └── errors.go │ │ ├── keys.go │ │ ├── keys_data_test.go │ │ ├── keys_test.go │ │ ├── packet │ │ │ ├── compressed.go │ │ │ ├── compressed_test.go │ │ │ ├── config.go │ │ │ ├── encrypted_key.go │ │ │ ├── encrypted_key_test.go │ │ │ ├── literal.go │ │ │ ├── ocfb.go │ │ │ ├── ocfb_test.go │ │ │ ├── one_pass_signature.go │ │ │ ├── opaque.go │ │ │ ├── opaque_test.go │ │ │ ├── packet.go │ │ │ ├── packet_test.go │ │ │ ├── private_key.go │ │ │ ├── private_key_test.go │ │ │ ├── public_key.go │ │ │ ├── public_key_test.go │ │ │ ├── public_key_v3.go │ │ │ ├── public_key_v3_test.go │ │ │ ├── reader.go │ │ │ ├── signature.go │ │ │ ├── signature_test.go │ │ │ ├── signature_v3.go │ │ │ ├── signature_v3_test.go │ │ │ ├── symmetric_key_encrypted.go │ │ │ ├── symmetric_key_encrypted_test.go │ │ │ ├── symmetrically_encrypted.go │ │ │ ├── symmetrically_encrypted_test.go │ │ │ ├── userattribute.go │ │ │ ├── userattribute_test.go │ │ │ ├── userid.go │ │ │ └── userid_test.go │ │ ├── read.go │ │ ├── read_test.go │ │ ├── s2k │ │ │ ├── s2k.go │ │ │ └── s2k_test.go │ │ ├── write.go │ │ └── write_test.go │ ├── otr │ │ ├── libotr_test_helper.c │ │ ├── otr.go │ │ ├── otr_test.go │ │ └── smp.go │ ├── pbkdf2 │ │ ├── pbkdf2.go │ │ └── pbkdf2_test.go │ ├── pkcs12 │ │ ├── bmp-string.go │ │ ├── bmp-string_test.go │ │ ├── crypto.go │ │ ├── crypto_test.go │ │ ├── errors.go │ │ ├── internal │ │ │ └── rc2 │ │ │ │ ├── bench_test.go │ │ │ │ ├── rc2.go │ │ │ │ └── rc2_test.go │ │ ├── mac.go │ │ ├── mac_test.go │ │ ├── pbkdf.go │ │ ├── pbkdf_test.go │ │ ├── pkcs12.go │ │ ├── pkcs12_test.go │ │ └── safebags.go │ ├── poly1305 │ │ ├── poly1305.go │ │ ├── poly1305_test.go │ │ ├── sum_amd64.go │ │ ├── sum_amd64.s │ │ ├── sum_arm.go │ │ ├── sum_arm.s │ │ ├── sum_noasm.go │ │ ├── sum_ref.go │ │ ├── sum_s390x.go │ │ ├── sum_s390x.s │ │ ├── sum_vmsl_s390x.s │ │ └── vectors_test.go │ ├── ripemd160 │ │ ├── ripemd160.go │ │ ├── ripemd160_test.go │ │ └── ripemd160block.go │ ├── salsa20 │ │ ├── salsa │ │ │ ├── hsalsa20.go │ │ │ ├── salsa2020_amd64.s │ │ │ ├── salsa208.go │ │ │ ├── salsa20_amd64.go │ │ │ ├── salsa20_ref.go │ │ │ └── salsa_test.go │ │ ├── salsa20.go │ │ └── salsa20_test.go │ ├── scrypt │ │ ├── example_test.go │ │ ├── scrypt.go │ │ └── scrypt_test.go │ ├── sha3 │ │ ├── doc.go │ │ ├── hashes.go │ │ ├── hashes_generic.go │ │ ├── keccakf.go │ │ ├── keccakf_amd64.go │ │ ├── keccakf_amd64.s │ │ ├── register.go │ │ ├── sha3.go │ │ ├── sha3_s390x.go │ │ ├── sha3_s390x.s │ │ ├── sha3_test.go │ │ ├── shake.go │ │ ├── shake_generic.go │ │ ├── testdata │ │ │ └── keccakKats.json.deflate │ │ ├── xor.go │ │ ├── xor_generic.go │ │ └── xor_unaligned.go │ ├── ssh │ │ ├── agent │ │ │ ├── client.go │ │ │ ├── client_test.go │ │ │ ├── example_test.go │ │ │ ├── forward.go │ │ │ ├── keyring.go │ │ │ ├── keyring_test.go │ │ │ ├── server.go │ │ │ ├── server_test.go │ │ │ └── testdata_test.go │ │ ├── benchmark_test.go │ │ ├── buffer.go │ │ ├── buffer_test.go │ │ ├── certs.go │ │ ├── certs_test.go │ │ ├── channel.go │ │ ├── cipher.go │ │ ├── cipher_test.go │ │ ├── client.go │ │ ├── client_auth.go │ │ ├── client_auth_test.go │ │ ├── client_test.go │ │ ├── common.go │ │ ├── connection.go │ │ ├── doc.go │ │ ├── example_test.go │ │ ├── handshake.go │ │ ├── handshake_test.go │ │ ├── kex.go │ │ ├── kex_test.go │ │ ├── keys.go │ │ ├── keys_test.go │ │ ├── knownhosts │ │ │ ├── knownhosts.go │ │ │ └── knownhosts_test.go │ │ ├── mac.go │ │ ├── mempipe_test.go │ │ ├── messages.go │ │ ├── messages_test.go │ │ ├── mux.go │ │ ├── mux_test.go │ │ ├── server.go │ │ ├── session.go │ │ ├── session_test.go │ │ ├── streamlocal.go │ │ ├── tcpip.go │ │ ├── tcpip_test.go │ │ ├── terminal │ │ │ ├── terminal.go │ │ │ ├── terminal_test.go │ │ │ ├── util.go │ │ │ ├── util_bsd.go │ │ │ ├── util_linux.go │ │ │ ├── util_plan9.go │ │ │ ├── util_solaris.go │ │ │ └── util_windows.go │ │ ├── test │ │ │ ├── agent_unix_test.go │ │ │ ├── banner_test.go │ │ │ ├── cert_test.go │ │ │ ├── dial_unix_test.go │ │ │ ├── doc.go │ │ │ ├── forward_unix_test.go │ │ │ ├── multi_auth_test.go │ │ │ ├── session_test.go │ │ │ ├── sshd_test_pw.c │ │ │ ├── test_unix_test.go │ │ │ └── testdata_test.go │ │ ├── testdata │ │ │ ├── doc.go │ │ │ └── keys.go │ │ ├── testdata_test.go │ │ ├── transport.go │ │ └── transport_test.go │ ├── tea │ │ ├── cipher.go │ │ └── tea_test.go │ ├── twofish │ │ ├── twofish.go │ │ └── twofish_test.go │ ├── xtea │ │ ├── block.go │ │ ├── cipher.go │ │ └── xtea_test.go │ └── xts │ │ ├── xts.go │ │ └── xts_test.go │ └── sys │ ├── .gitattributes │ ├── .gitignore │ ├── AUTHORS │ ├── CONTRIBUTING.md │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── README.md │ ├── codereview.cfg │ ├── cpu │ ├── cpu.go │ ├── cpu_arm.go │ ├── cpu_arm64.go │ ├── cpu_gc_x86.go │ ├── cpu_gccgo.c │ ├── cpu_gccgo.go │ ├── cpu_mips64x.go │ ├── cpu_mipsx.go │ ├── cpu_ppc64x.go │ ├── cpu_s390x.go │ ├── cpu_test.go │ ├── cpu_x86.go │ └── cpu_x86.s │ ├── plan9 │ ├── asm.s │ ├── asm_plan9_386.s │ ├── asm_plan9_amd64.s │ ├── asm_plan9_arm.s │ ├── const_plan9.go │ ├── dir_plan9.go │ ├── env_plan9.go │ ├── errors_plan9.go │ ├── mkall.sh │ ├── mkerrors.sh │ ├── mksyscall.pl │ ├── mksysnum_plan9.sh │ ├── pwd_go15_plan9.go │ ├── pwd_plan9.go │ ├── race.go │ ├── race0.go │ ├── str.go │ ├── syscall.go │ ├── syscall_plan9.go │ ├── syscall_test.go │ ├── zsyscall_plan9_386.go │ ├── zsyscall_plan9_amd64.go │ ├── zsyscall_plan9_arm.go │ └── zsysnum_plan9.go │ ├── unix │ ├── .gitignore │ ├── README.md │ ├── affinity_linux.go │ ├── aliases.go │ ├── asm_aix_ppc64.s │ ├── asm_darwin_386.s │ ├── asm_darwin_amd64.s │ ├── asm_darwin_arm.s │ ├── asm_darwin_arm64.s │ ├── asm_dragonfly_amd64.s │ ├── asm_freebsd_386.s │ ├── asm_freebsd_amd64.s │ ├── asm_freebsd_arm.s │ ├── asm_linux_386.s │ ├── asm_linux_amd64.s │ ├── asm_linux_arm.s │ ├── asm_linux_arm64.s │ ├── asm_linux_mips64x.s │ ├── asm_linux_mipsx.s │ ├── asm_linux_ppc64x.s │ ├── asm_linux_s390x.s │ ├── asm_netbsd_386.s │ ├── asm_netbsd_amd64.s │ ├── asm_netbsd_arm.s │ ├── asm_openbsd_386.s │ ├── asm_openbsd_amd64.s │ ├── asm_openbsd_arm.s │ ├── asm_solaris_amd64.s │ ├── bluetooth_linux.go │ ├── cap_freebsd.go │ ├── constants.go │ ├── creds_test.go │ ├── dev_aix_ppc.go │ ├── dev_aix_ppc64.go │ ├── dev_darwin.go │ ├── dev_dragonfly.go │ ├── dev_freebsd.go │ ├── dev_linux.go │ ├── dev_linux_test.go │ ├── dev_netbsd.go │ ├── dev_openbsd.go │ ├── dirent.go │ ├── endian_big.go │ ├── endian_little.go │ ├── env_unix.go │ ├── errors_freebsd_386.go │ ├── errors_freebsd_amd64.go │ ├── errors_freebsd_arm.go │ ├── example_test.go │ ├── export_test.go │ ├── fcntl.go │ ├── fcntl_linux_32bit.go │ ├── gccgo.go │ ├── gccgo_c.c │ ├── gccgo_linux_amd64.go │ ├── ioctl.go │ ├── linux │ │ ├── Dockerfile │ │ ├── mkall.go │ │ ├── mksysnum.pl │ │ └── types.go │ ├── mkall.sh │ ├── mkerrors.sh │ ├── mkpost.go │ ├── mksyscall.pl │ ├── mksyscall_aix_ppc.pl │ ├── mksyscall_aix_ppc64.pl │ ├── mksyscall_solaris.pl │ ├── mksysctl_openbsd.pl │ ├── mksysnum_darwin.pl │ ├── mksysnum_dragonfly.pl │ ├── mksysnum_freebsd.pl │ ├── mksysnum_netbsd.pl │ ├── mksysnum_openbsd.pl │ ├── mmap_unix_test.go │ ├── openbsd_pledge.go │ ├── openbsd_test.go │ ├── openbsd_unveil.go │ ├── pagesize_unix.go │ ├── race.go │ ├── race0.go │ ├── sockcmsg_linux.go │ ├── sockcmsg_unix.go │ ├── str.go │ ├── syscall.go │ ├── syscall_aix.go │ ├── syscall_aix_ppc.go │ ├── syscall_aix_ppc64.go │ ├── syscall_aix_test.go │ ├── syscall_bsd.go │ ├── syscall_bsd_test.go │ ├── syscall_darwin.go │ ├── syscall_darwin_386.go │ ├── syscall_darwin_amd64.go │ ├── syscall_darwin_arm.go │ ├── syscall_darwin_arm64.go │ ├── syscall_darwin_test.go │ ├── syscall_dragonfly.go │ ├── syscall_dragonfly_amd64.go │ ├── syscall_freebsd.go │ ├── syscall_freebsd_386.go │ ├── syscall_freebsd_amd64.go │ ├── syscall_freebsd_arm.go │ ├── syscall_freebsd_test.go │ ├── syscall_linux.go │ ├── syscall_linux_386.go │ ├── syscall_linux_amd64.go │ ├── syscall_linux_amd64_gc.go │ ├── syscall_linux_arm.go │ ├── syscall_linux_arm64.go │ ├── syscall_linux_gc.go │ ├── syscall_linux_gc_386.go │ ├── syscall_linux_gccgo_386.go │ ├── syscall_linux_gccgo_arm.go │ ├── syscall_linux_mips64x.go │ ├── syscall_linux_mipsx.go │ ├── syscall_linux_ppc64x.go │ ├── syscall_linux_riscv64.go │ ├── syscall_linux_s390x.go │ ├── syscall_linux_sparc64.go │ ├── syscall_linux_test.go │ ├── syscall_netbsd.go │ ├── syscall_netbsd_386.go │ ├── syscall_netbsd_amd64.go │ ├── syscall_netbsd_arm.go │ ├── syscall_netbsd_test.go │ ├── syscall_openbsd.go │ ├── syscall_openbsd_386.go │ ├── syscall_openbsd_amd64.go │ ├── syscall_openbsd_arm.go │ ├── syscall_openbsd_test.go │ ├── syscall_solaris.go │ ├── syscall_solaris_amd64.go │ ├── syscall_solaris_test.go │ ├── syscall_test.go │ ├── syscall_unix.go │ ├── syscall_unix_gc.go │ ├── syscall_unix_test.go │ ├── timestruct.go │ ├── timestruct_test.go │ ├── types_aix.go │ ├── types_darwin.go │ ├── types_dragonfly.go │ ├── types_freebsd.go │ ├── types_netbsd.go │ ├── types_openbsd.go │ ├── types_solaris.go │ ├── xattr_bsd.go │ ├── xattr_test.go │ ├── zerrors_aix_ppc.go │ ├── zerrors_aix_ppc64.go │ ├── zerrors_darwin_386.go │ ├── zerrors_darwin_amd64.go │ ├── zerrors_darwin_arm.go │ ├── zerrors_darwin_arm64.go │ ├── zerrors_dragonfly_amd64.go │ ├── zerrors_freebsd_386.go │ ├── zerrors_freebsd_amd64.go │ ├── zerrors_freebsd_arm.go │ ├── zerrors_linux_386.go │ ├── zerrors_linux_amd64.go │ ├── zerrors_linux_arm.go │ ├── zerrors_linux_arm64.go │ ├── zerrors_linux_mips.go │ ├── zerrors_linux_mips64.go │ ├── zerrors_linux_mips64le.go │ ├── zerrors_linux_mipsle.go │ ├── zerrors_linux_ppc64.go │ ├── zerrors_linux_ppc64le.go │ ├── zerrors_linux_riscv64.go │ ├── zerrors_linux_s390x.go │ ├── zerrors_linux_sparc64.go │ ├── zerrors_netbsd_386.go │ ├── zerrors_netbsd_amd64.go │ ├── zerrors_netbsd_arm.go │ ├── zerrors_openbsd_386.go │ ├── zerrors_openbsd_amd64.go │ ├── zerrors_openbsd_arm.go │ ├── zerrors_solaris_amd64.go │ ├── zptrace386_linux.go │ ├── zptracearm_linux.go │ ├── zptracemips_linux.go │ ├── zptracemipsle_linux.go │ ├── zsyscall_aix_ppc.go │ ├── zsyscall_aix_ppc64.go │ ├── zsyscall_aix_ppc64_gc.go │ ├── zsyscall_aix_ppc64_gccgo.go │ ├── zsyscall_darwin_386.go │ ├── zsyscall_darwin_amd64.go │ ├── zsyscall_darwin_arm.go │ ├── zsyscall_darwin_arm64.go │ ├── zsyscall_dragonfly_amd64.go │ ├── zsyscall_freebsd_386.go │ ├── zsyscall_freebsd_amd64.go │ ├── zsyscall_freebsd_arm.go │ ├── zsyscall_linux_386.go │ ├── zsyscall_linux_amd64.go │ ├── zsyscall_linux_arm.go │ ├── zsyscall_linux_arm64.go │ ├── zsyscall_linux_mips.go │ ├── zsyscall_linux_mips64.go │ ├── zsyscall_linux_mips64le.go │ ├── zsyscall_linux_mipsle.go │ ├── zsyscall_linux_ppc64.go │ ├── zsyscall_linux_ppc64le.go │ ├── zsyscall_linux_riscv64.go │ ├── zsyscall_linux_s390x.go │ ├── zsyscall_linux_sparc64.go │ ├── zsyscall_netbsd_386.go │ ├── zsyscall_netbsd_amd64.go │ ├── zsyscall_netbsd_arm.go │ ├── zsyscall_openbsd_386.go │ ├── zsyscall_openbsd_amd64.go │ ├── zsyscall_openbsd_arm.go │ ├── zsyscall_solaris_amd64.go │ ├── zsysctl_openbsd_386.go │ ├── zsysctl_openbsd_amd64.go │ ├── zsysctl_openbsd_arm.go │ ├── zsysnum_darwin_386.go │ ├── zsysnum_darwin_amd64.go │ ├── zsysnum_darwin_arm.go │ ├── zsysnum_darwin_arm64.go │ ├── zsysnum_dragonfly_amd64.go │ ├── zsysnum_freebsd_386.go │ ├── zsysnum_freebsd_amd64.go │ ├── zsysnum_freebsd_arm.go │ ├── zsysnum_linux_386.go │ ├── zsysnum_linux_amd64.go │ ├── zsysnum_linux_arm.go │ ├── zsysnum_linux_arm64.go │ ├── zsysnum_linux_mips.go │ ├── zsysnum_linux_mips64.go │ ├── zsysnum_linux_mips64le.go │ ├── zsysnum_linux_mipsle.go │ ├── zsysnum_linux_ppc64.go │ ├── zsysnum_linux_ppc64le.go │ ├── zsysnum_linux_riscv64.go │ ├── zsysnum_linux_s390x.go │ ├── zsysnum_linux_sparc64.go │ ├── zsysnum_netbsd_386.go │ ├── zsysnum_netbsd_amd64.go │ ├── zsysnum_netbsd_arm.go │ ├── zsysnum_openbsd_386.go │ ├── zsysnum_openbsd_amd64.go │ ├── zsysnum_openbsd_arm.go │ ├── ztypes_aix_ppc.go │ ├── ztypes_aix_ppc64.go │ ├── ztypes_darwin_386.go │ ├── ztypes_darwin_amd64.go │ ├── ztypes_darwin_arm.go │ ├── ztypes_darwin_arm64.go │ ├── ztypes_dragonfly_amd64.go │ ├── ztypes_freebsd_386.go │ ├── ztypes_freebsd_amd64.go │ ├── ztypes_freebsd_arm.go │ ├── ztypes_linux_386.go │ ├── ztypes_linux_amd64.go │ ├── ztypes_linux_arm.go │ ├── ztypes_linux_arm64.go │ ├── ztypes_linux_mips.go │ ├── ztypes_linux_mips64.go │ ├── ztypes_linux_mips64le.go │ ├── ztypes_linux_mipsle.go │ ├── ztypes_linux_ppc64.go │ ├── ztypes_linux_ppc64le.go │ ├── ztypes_linux_riscv64.go │ ├── ztypes_linux_s390x.go │ ├── ztypes_linux_sparc64.go │ ├── ztypes_netbsd_386.go │ ├── ztypes_netbsd_amd64.go │ ├── ztypes_netbsd_arm.go │ ├── ztypes_openbsd_386.go │ ├── ztypes_openbsd_amd64.go │ ├── ztypes_openbsd_arm.go │ └── ztypes_solaris_amd64.go │ └── windows │ ├── aliases.go │ ├── asm_windows_386.s │ ├── asm_windows_amd64.s │ ├── asm_windows_arm.s │ ├── dll_windows.go │ ├── env_windows.go │ ├── eventlog.go │ ├── exec_windows.go │ ├── memory_windows.go │ ├── mksyscall.go │ ├── race.go │ ├── race0.go │ ├── registry │ ├── export_test.go │ ├── key.go │ ├── mksyscall.go │ ├── registry_test.go │ ├── syscall.go │ ├── value.go │ └── zsyscall_windows.go │ ├── security_windows.go │ ├── service.go │ ├── str.go │ ├── svc │ ├── debug │ │ ├── log.go │ │ └── service.go │ ├── event.go │ ├── eventlog │ │ ├── install.go │ │ ├── log.go │ │ └── log_test.go │ ├── example │ │ ├── beep.go │ │ ├── install.go │ │ ├── main.go │ │ ├── manage.go │ │ └── service.go │ ├── go12.c │ ├── go12.go │ ├── go13.go │ ├── mgr │ │ ├── config.go │ │ ├── mgr.go │ │ ├── mgr_test.go │ │ ├── recovery.go │ │ └── service.go │ ├── security.go │ ├── service.go │ ├── svc_test.go │ ├── sys_386.s │ ├── sys_amd64.s │ └── sys_arm.s │ ├── syscall.go │ ├── syscall_test.go │ ├── syscall_windows.go │ ├── syscall_windows_test.go │ ├── types_windows.go │ ├── types_windows_386.go │ ├── types_windows_amd64.go │ ├── types_windows_arm.go │ └── zsyscall_windows.go └── gopkg.in └── alecthomas └── kingpin.v2 ├── .travis.yml ├── COPYING ├── README.md ├── _examples ├── chat1 │ └── main.go ├── chat2 │ └── main.go ├── completion │ └── main.go ├── curl │ └── main.go ├── modular │ └── main.go └── ping │ └── main.go ├── actions.go ├── app.go ├── app_test.go ├── args.go ├── args_test.go ├── cmd.go ├── cmd └── genvalues │ └── main.go ├── cmd_test.go ├── completions.go ├── completions_test.go ├── doc.go ├── envar.go ├── examples_test.go ├── flags.go ├── flags_test.go ├── global.go ├── guesswidth.go ├── guesswidth_unix.go ├── model.go ├── parser.go ├── parser_test.go ├── parsers.go ├── parsers_test.go ├── templates.go ├── usage.go ├── usage_test.go ├── values.go ├── values.json ├── values_generated.go └── values_test.go /.dockerignore: -------------------------------------------------------------------------------- 1 | utils/ -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .build 2 | solr_exporter 3 | *.tar.gz 4 | *-stamp 5 | .idea 6 | .tarballs 7 | *~ 8 | prometheus-solr-exporter 9 | solr_exporter 10 | -------------------------------------------------------------------------------- /.promu.yml: -------------------------------------------------------------------------------- 1 | repository: 2 | path: github.com/noony/prometheus-solr-exporter 3 | build: 4 | binaries: 5 | - name: solr_exporter 6 | flags: -a -tags netgo 7 | ldflags: | 8 | -X {{repoPath}}/vendor/github.com/prometheus/common/version.Version={{.Version}} 9 | -X {{repoPath}}/vendor/github.com/prometheus/common/version.Revision={{.Revision}} 10 | -X {{repoPath}}/vendor/github.com/prometheus/common/version.Branch={{.Branch}} 11 | -X {{repoPath}}/vendor/github.com/prometheus/common/version.BuildUser={{user}}@{{host}} 12 | -X {{repoPath}}/vendor/github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}} 13 | tarball: 14 | files: 15 | - LICENSE 16 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 1.8.3 3 | 4 | script: 5 | - make test 6 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM quay.io/prometheus/busybox:latest 2 | MAINTAINER noony 3 | 4 | COPY solr_exporter /bin/solr_exporter 5 | 6 | ENTRYPOINT ["/bin/solr_exporter"] 7 | EXPOSE 9231 -------------------------------------------------------------------------------- /Gopkg.toml: -------------------------------------------------------------------------------- 1 | 2 | # Gopkg.toml example 3 | # 4 | # Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md 5 | # for detailed Gopkg.toml documentation. 6 | # 7 | # required = ["github.com/user/thing/cmd/thing"] 8 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 9 | # 10 | # [[constraint]] 11 | # name = "github.com/user/project" 12 | # version = "1.0.0" 13 | # 14 | # [[constraint]] 15 | # name = "github.com/user/project2" 16 | # branch = "dev" 17 | # source = "github.com/myfork/project2" 18 | # 19 | # [[override]] 20 | # name = "github.com/x/y" 21 | # version = "2.4.0" 22 | 23 | 24 | [[constraint]] 25 | name = "github.com/blang/semver" 26 | version = "3.5.1" 27 | 28 | [[constraint]] 29 | name = "github.com/prometheus/client_golang" 30 | version = "0.9.0" 31 | 32 | [[constraint]] 33 | branch = "master" 34 | name = "github.com/prometheus/common" 35 | 36 | [[constraint]] 37 | name = "gopkg.in/alecthomas/kingpin.v2" 38 | version = "2.2.6" 39 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 0.0.14 2 | -------------------------------------------------------------------------------- /release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -rf .build .tarballs 4 | 5 | VERSION=$(cat VERSION) 6 | 7 | echo "Version : $VERSION" 8 | 9 | make build 10 | promu crossbuild 11 | promu crossbuild tarballs 12 | promu checksum .tarballs 13 | promu release .tarballs 14 | 15 | rm solr_exporter 16 | ln -s .build/linux-amd64/solr_exporter solr_exporter 17 | 18 | make docker DOCKER_IMAGE_NAME=noony/prometheus-solr-exporter DOCKER_IMAGE_TAG=v$VERSION 19 | docker login 20 | docker tag "noony/prometheus-solr-exporter:v$VERSION" "noony/prometheus-solr-exporter:latest" 21 | docker push noony/prometheus-solr-exporter -------------------------------------------------------------------------------- /utils/solr-responses/5.3/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":0},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted/","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:41:06.388Z","uptime":4609,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@498dccfb; maxCacheMB=48.0 maxMergeSizeMB=4.0)","userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/5.4.1/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":1},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:40:32.241Z","uptime":4499,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@222fa522; maxCacheMB=48.0 maxMergeSizeMB=4.0)","userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/5.4/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":0},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:40:16.419Z","uptime":4445,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@411bce95; maxCacheMB=48.0 maxMergeSizeMB=4.0)","userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/5.5.3/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":0},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:34:54.097Z","uptime":4486,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@233df68c; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/5.5.4/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":0},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:29:49.67Z","uptime":4062,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@11e3002f; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/5.5.5/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":0},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:24:00.129Z","uptime":4602,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@1c5d3a2b; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/5.5/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":1},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:23:43.919Z","uptime":4394,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@1302de9e; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/5/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":1},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:23:28.086Z","uptime":5069,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@44f962a8; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.0.1/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":2},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:39:25.601Z","uptime":4682,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@40473a7; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.0/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":3},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:39:07.946Z","uptime":4649,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@79f60b87; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.1.0/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":1},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:38:31.085Z","uptime":5513,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@54b33dd1; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.1/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":1},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:38:10.326Z","uptime":5185,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@8f658e4; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.2.1/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":1},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:36:55.242Z","uptime":5476,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@6acc11e5; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.2/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":0},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:36:36.429Z","uptime":4361,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@402dc0d9; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.3.0/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":0},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:27:20.885Z","uptime":4516,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@11f0a61; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.3/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":1},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:27:03.564Z","uptime":4594,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@746f50b1; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.4.0/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":2},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:36:01.378Z","uptime":4868,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.solr.core.MetricsDirectoryFactory$MetricsDirectory:MetricsDirectory(NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@67206bd3; maxCacheMB=48.0 maxMergeSizeMB=4.0))","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.4.1/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":2},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:34:10.885Z","uptime":6262,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.solr.core.MetricsDirectoryFactory$MetricsDirectory:MetricsDirectory(NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@2bd6fa70; maxCacheMB=48.0 maxMergeSizeMB=4.0))","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.4.2/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":1},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:28:02.012Z","uptime":5133,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@453bb1b; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.4/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":1},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:27:41.553Z","uptime":5564,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@429b091d; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.5.0/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":2},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:33:13.170Z","uptime":5042,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@78118c94; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.5.1/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":2},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:28:38.920Z","uptime":4703,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@7b1cc5fc; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.5/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":0},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:28:21.315Z","uptime":4954,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@7b1cc5fc; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.6.0/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":0},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:32:13.903Z","uptime":4710,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@277e1bf2; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.6.1/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":6},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:30:27.495Z","uptime":4820,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@447f3d1; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.6.2/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":1},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:26:43.823Z","uptime":4750,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@187adc69; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.6.3/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":1},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:25:02.875Z","uptime":6101,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@7d240420; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6.6/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":4},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:24:38.297Z","uptime":5263,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@2d999819; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /utils/solr-responses/6/admin-cores.json: -------------------------------------------------------------------------------- 1 | {"responseHeader":{"status":0,"QTime":1},"initFailures":{},"status":{"gettingstarted":{"name":"gettingstarted","instanceDir":"/opt/solr/server/solr/gettingstarted","dataDir":"/opt/solr/server/solr/gettingstarted/data/","config":"solrconfig.xml","schema":"managed-schema","startTime":"2018-04-17T08:24:19.038Z","uptime":5058,"index":{"numDocs":0,"maxDoc":0,"deletedDocs":0,"indexHeapUsageBytes":0,"version":2,"segmentCount":0,"current":true,"hasDeletions":false,"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/opt/solr/server/solr/gettingstarted/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@51b565d3; maxCacheMB=48.0 maxMergeSizeMB=4.0)","segmentsFile":"segments_1","segmentsFileSizeInBytes":71,"userData":{},"sizeInBytes":71,"size":"71 bytes"}}}} 2 | -------------------------------------------------------------------------------- /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/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/sirupsen/logrus 2 | 3 | require ( 4 | github.com/davecgh/go-spew v1.1.1 // indirect 5 | github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe 6 | github.com/pmezard/go-difflib v1.0.0 // indirect 7 | github.com/stretchr/testify v1.2.2 8 | golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 9 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/logger_test.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "bytes" 5 | "encoding/json" 6 | "fmt" 7 | "testing" 8 | 9 | "github.com/stretchr/testify/require" 10 | ) 11 | 12 | func TestFieldValueError(t *testing.T) { 13 | buf := &bytes.Buffer{} 14 | l := &Logger{ 15 | Out: buf, 16 | Formatter: new(JSONFormatter), 17 | Hooks: make(LevelHooks), 18 | Level: DebugLevel, 19 | } 20 | l.WithField("func", func() {}).Info("test") 21 | fmt.Println(buf.String()) 22 | var data map[string]interface{} 23 | json.Unmarshal(buf.Bytes(), &data) 24 | _, ok := data[FieldKeyLogrusError] 25 | require.True(t, ok) 26 | } 27 | 28 | func TestNoFieldValueError(t *testing.T) { 29 | buf := &bytes.Buffer{} 30 | l := &Logger{ 31 | Out: buf, 32 | Formatter: new(JSONFormatter), 33 | Hooks: make(LevelHooks), 34 | Level: DebugLevel, 35 | } 36 | l.WithField("str", "str").Info("test") 37 | fmt.Println(buf.String()) 38 | var data map[string]interface{} 39 | json.Unmarshal(buf.Bytes(), &data) 40 | _, ok := data[FieldKeyLogrusError] 41 | require.False(t, ok) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_check_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_check_js.go: -------------------------------------------------------------------------------- 1 | // +build js 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return false 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_check_notappengine.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,!windows 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | 9 | "golang.org/x/crypto/ssh/terminal" 10 | ) 11 | 12 | func checkIfTerminal(w io.Writer) bool { 13 | switch v := w.(type) { 14 | case *os.File: 15 | return terminal.IsTerminal(int(v.Fd())) 16 | default: 17 | return false 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_check_windows.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,windows 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | "syscall" 9 | ) 10 | 11 | func checkIfTerminal(w io.Writer) bool { 12 | switch v := w.(type) { 13 | case *os.File: 14 | var mode uint32 15 | err := syscall.GetConsoleMode(syscall.Handle(v.Fd()), &mode) 16 | return err == nil 17 | default: 18 | return false 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_notwindows.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package logrus 4 | 5 | import "io" 6 | 7 | func initTerminal(w io.Writer) { 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_windows.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,windows 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | "syscall" 9 | 10 | sequences "github.com/konsorten/go-windows-terminal-sequences" 11 | ) 12 | 13 | func initTerminal(w io.Writer) { 14 | switch v := w.(type) { 15 | case *os.File: 16 | sequences.EnableVirtualTerminalProcessing(syscall.Handle(v.Fd()), true) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/template/README.md: -------------------------------------------------------------------------------- 1 | # Go's `text/template` package with newline elision 2 | 3 | This is a fork of Go 1.4's [text/template](http://golang.org/pkg/text/template/) package with one addition: a backslash immediately after a closing delimiter will delete all subsequent newlines until a non-newline. 4 | 5 | eg. 6 | 7 | ``` 8 | {{if true}}\ 9 | hello 10 | {{end}}\ 11 | ``` 12 | 13 | Will result in: 14 | 15 | ``` 16 | hello\n 17 | ``` 18 | 19 | Rather than: 20 | 21 | ``` 22 | \n 23 | hello\n 24 | \n 25 | ``` 26 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/template/testdata/file1.tmpl: -------------------------------------------------------------------------------- 1 | {{define "x"}}TEXT{{end}} 2 | {{define "dotV"}}{{.V}}{{end}} 3 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/template/testdata/file2.tmpl: -------------------------------------------------------------------------------- 1 | {{define "dot"}}{{.}}{{end}} 2 | {{define "nested"}}{{template "dot" .}}{{end}} 3 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/template/testdata/tmpl1.tmpl: -------------------------------------------------------------------------------- 1 | template1 2 | {{define "x"}}x{{end}} 3 | {{template "y"}} 4 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/template/testdata/tmpl2.tmpl: -------------------------------------------------------------------------------- 1 | template2 2 | {{define "y"}}y{{end}} 3 | {{template "x"}} 4 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/units/README.md: -------------------------------------------------------------------------------- 1 | # Units - Helpful unit multipliers and functions for Go 2 | 3 | The goal of this package is to have functionality similar to the [time](http://golang.org/pkg/time/) package. 4 | 5 | It allows for code like this: 6 | 7 | ```go 8 | n, err := ParseBase2Bytes("1KB") 9 | // n == 1024 10 | n = units.Mebibyte * 512 11 | ``` 12 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/units/doc.go: -------------------------------------------------------------------------------- 1 | // Package units provides helpful unit multipliers and functions for Go. 2 | // 3 | // The goal of this package is to have functionality similar to the time [1] package. 4 | // 5 | // 6 | // [1] http://golang.org/pkg/time/ 7 | // 8 | // It allows for code like this: 9 | // 10 | // n, err := ParseBase2Bytes("1KB") 11 | // // n == 1024 12 | // n = units.Mebibyte * 512 13 | package units 14 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/units/si.go: -------------------------------------------------------------------------------- 1 | package units 2 | 3 | // SI units. 4 | type SI int64 5 | 6 | // SI unit multiples. 7 | const ( 8 | Kilo SI = 1000 9 | Mega = Kilo * 1000 10 | Giga = Mega * 1000 11 | Tera = Giga * 1000 12 | Peta = Tera * 1000 13 | Exa = Peta * 1000 14 | ) 15 | 16 | func MakeUnitMap(suffix, shortSuffix string, scale int64) map[string]float64 { 17 | return map[string]float64{ 18 | shortSuffix: 1, 19 | "K" + suffix: float64(scale), 20 | "M" + suffix: float64(scale * scale), 21 | "G" + suffix: float64(scale * scale * scale), 22 | "T" + suffix: float64(scale * scale * scale * scale), 23 | "P" + suffix: float64(scale * scale * scale * scale * scale), 24 | "E" + suffix: float64(scale * scale * scale * scale * scale * scale), 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/beorn7/perks/.gitignore: -------------------------------------------------------------------------------- 1 | *.test 2 | *.prof 3 | -------------------------------------------------------------------------------- /vendor/github.com/beorn7/perks/histogram/bench_test.go: -------------------------------------------------------------------------------- 1 | package histogram 2 | 3 | import ( 4 | "math/rand" 5 | "testing" 6 | ) 7 | 8 | func BenchmarkInsert10Bins(b *testing.B) { 9 | b.StopTimer() 10 | h := New(10) 11 | b.StartTimer() 12 | for i := 0; i < b.N; i++ { 13 | f := rand.ExpFloat64() 14 | h.Insert(f) 15 | } 16 | } 17 | 18 | func BenchmarkInsert100Bins(b *testing.B) { 19 | b.StopTimer() 20 | h := New(100) 21 | b.StartTimer() 22 | for i := 0; i < b.N; i++ { 23 | f := rand.ExpFloat64() 24 | h.Insert(f) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/beorn7/perks/histogram/histogram_test.go: -------------------------------------------------------------------------------- 1 | package histogram 2 | 3 | import ( 4 | "math/rand" 5 | "testing" 6 | ) 7 | 8 | func TestHistogram(t *testing.T) { 9 | const numPoints = 1e6 10 | const maxBins = 3 11 | 12 | h := New(maxBins) 13 | for i := 0; i < numPoints; i++ { 14 | f := rand.ExpFloat64() 15 | h.Insert(f) 16 | } 17 | 18 | bins := h.Bins() 19 | if g := len(bins); g > maxBins { 20 | t.Fatalf("got %d bins, wanted <= %d", g, maxBins) 21 | } 22 | 23 | for _, b := range bins { 24 | t.Logf("%+v", b) 25 | } 26 | 27 | if g := count(h.Bins()); g != numPoints { 28 | t.Fatalf("binned %d points, wanted %d", g, numPoints) 29 | } 30 | } 31 | 32 | func count(bins Bins) int { 33 | binCounts := 0 34 | for _, b := range bins { 35 | binCounts += b.Count 36 | } 37 | return binCounts 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/blang/semver/.gx/lastpubver: -------------------------------------------------------------------------------- 1 | 3.5.1: QmYRGECuvQnRX73fcvPnGbYijBcGN2HbKZQ7jh26qmLiHG 2 | -------------------------------------------------------------------------------- /vendor/github.com/blang/semver/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | matrix: 3 | include: 4 | - go: 1.4.3 5 | - go: 1.5.4 6 | - go: 1.6.3 7 | - go: 1.7 8 | - go: tip 9 | allow_failures: 10 | - go: tip 11 | install: 12 | - go get golang.org/x/tools/cmd/cover 13 | - go get github.com/mattn/goveralls 14 | script: 15 | - echo "Test and track coverage" ; $HOME/gopath/bin/goveralls -package "." -service=travis-ci 16 | -repotoken $COVERALLS_TOKEN 17 | - echo "Build examples" ; cd examples && go build 18 | - echo "Check if gofmt'd" ; diff -u <(echo -n) <(gofmt -d -s .) 19 | env: 20 | global: 21 | secure: HroGEAUQpVq9zX1b1VIkraLiywhGbzvNnTZq2TMxgK7JHP8xqNplAeF1izrR2i4QLL9nsY+9WtYss4QuPvEtZcVHUobw6XnL6radF7jS1LgfYZ9Y7oF+zogZ2I5QUMRLGA7rcxQ05s7mKq3XZQfeqaNts4bms/eZRefWuaFZbkw= 22 | -------------------------------------------------------------------------------- /vendor/github.com/blang/semver/json.go: -------------------------------------------------------------------------------- 1 | package semver 2 | 3 | import ( 4 | "encoding/json" 5 | ) 6 | 7 | // MarshalJSON implements the encoding/json.Marshaler interface. 8 | func (v Version) MarshalJSON() ([]byte, error) { 9 | return json.Marshal(v.String()) 10 | } 11 | 12 | // UnmarshalJSON implements the encoding/json.Unmarshaler interface. 13 | func (v *Version) UnmarshalJSON(data []byte) (err error) { 14 | var versionString string 15 | 16 | if err = json.Unmarshal(data, &versionString); err != nil { 17 | return 18 | } 19 | 20 | *v, err = Parse(versionString) 21 | 22 | return 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/blang/semver/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "blang", 3 | "bugs": { 4 | "URL": "https://github.com/blang/semver/issues", 5 | "url": "https://github.com/blang/semver/issues" 6 | }, 7 | "gx": { 8 | "dvcsimport": "github.com/blang/semver" 9 | }, 10 | "gxVersion": "0.10.0", 11 | "language": "go", 12 | "license": "MIT", 13 | "name": "semver", 14 | "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", 15 | "version": "3.5.1" 16 | } 17 | 18 | -------------------------------------------------------------------------------- /vendor/github.com/blang/semver/sort.go: -------------------------------------------------------------------------------- 1 | package semver 2 | 3 | import ( 4 | "sort" 5 | ) 6 | 7 | // Versions represents multiple versions. 8 | type Versions []Version 9 | 10 | // Len returns length of version collection 11 | func (s Versions) Len() int { 12 | return len(s) 13 | } 14 | 15 | // Swap swaps two versions inside the collection by its indices 16 | func (s Versions) Swap(i, j int) { 17 | s[i], s[j] = s[j], s[i] 18 | } 19 | 20 | // Less checks if version at index i is less than version at index j 21 | func (s Versions) Less(i, j int) bool { 22 | return s[i].LT(s[j]) 23 | } 24 | 25 | // Sort sorts a slice of versions 26 | func Sort(versions []Version) { 27 | sort.Sort(Versions(versions)) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/blang/semver/sort_test.go: -------------------------------------------------------------------------------- 1 | package semver 2 | 3 | import ( 4 | "reflect" 5 | "testing" 6 | ) 7 | 8 | func TestSort(t *testing.T) { 9 | v100, _ := Parse("1.0.0") 10 | v010, _ := Parse("0.1.0") 11 | v001, _ := Parse("0.0.1") 12 | versions := []Version{v010, v100, v001} 13 | Sort(versions) 14 | 15 | correct := []Version{v001, v010, v100} 16 | if !reflect.DeepEqual(versions, correct) { 17 | t.Fatalf("Sort returned wrong order: %s", versions) 18 | } 19 | } 20 | 21 | func BenchmarkSort(b *testing.B) { 22 | v100, _ := Parse("1.0.0") 23 | v010, _ := Parse("0.1.0") 24 | v001, _ := Parse("0.0.1") 25 | b.ReportAllocs() 26 | b.ResetTimer() 27 | for n := 0; n < b.N; n++ { 28 | Sort([]Version{v010, v100, v001}) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/blang/semver/sql.go: -------------------------------------------------------------------------------- 1 | package semver 2 | 3 | import ( 4 | "database/sql/driver" 5 | "fmt" 6 | ) 7 | 8 | // Scan implements the database/sql.Scanner interface. 9 | func (v *Version) Scan(src interface{}) (err error) { 10 | var str string 11 | switch src := src.(type) { 12 | case string: 13 | str = src 14 | case []byte: 15 | str = string(src) 16 | default: 17 | return fmt.Errorf("Version.Scan: cannot convert %T to string.", src) 18 | } 19 | 20 | if t, err := Parse(str); err == nil { 21 | *v = t 22 | } 23 | 24 | return 25 | } 26 | 27 | // Value implements the database/sql/driver.Valuer interface. 28 | func (v Version) Value() (driver.Value, error) { 29 | return v.String(), nil 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/blang/semver/sql_test.go: -------------------------------------------------------------------------------- 1 | package semver 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | type scanTest struct { 8 | val interface{} 9 | shouldError bool 10 | expected string 11 | } 12 | 13 | var scanTests = []scanTest{ 14 | {"1.2.3", false, "1.2.3"}, 15 | {[]byte("1.2.3"), false, "1.2.3"}, 16 | {7, true, ""}, 17 | {7e4, true, ""}, 18 | {true, true, ""}, 19 | } 20 | 21 | func TestScanString(t *testing.T) { 22 | for _, tc := range scanTests { 23 | s := &Version{} 24 | err := s.Scan(tc.val) 25 | if tc.shouldError { 26 | if err == nil { 27 | t.Fatalf("Scan did not return an error on %v (%T)", tc.val, tc.val) 28 | } 29 | } else { 30 | if err != nil { 31 | t.Fatalf("Scan returned an unexpected error: %s (%T) on %v (%T)", tc.val, tc.val, tc.val, tc.val) 32 | } 33 | if val, _ := s.Value(); val != tc.expected { 34 | t.Errorf("Wrong Value returned, expected %q, got %q", tc.expected, val) 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **What version of protobuf and what language are you using?** 8 | Version: (e.g., `v1.1.0`, `89a0c16f`, etc) 9 | 10 | **What did you do?** 11 | If possible, provide a recipe for reproducing the error. 12 | A complete runnable program is good with `.proto` and `.go` source code. 13 | 14 | **What did you expect to see?** 15 | 16 | **What did you see instead?** 17 | 18 | Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs). 19 | 20 | **Anything else we should know about your project / environment?** 21 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: Questions and troubleshooting 4 | 5 | --- 6 | 7 | 8 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.[568ao] 3 | *.ao 4 | *.so 5 | *.pyc 6 | ._* 7 | .nfs.* 8 | [568a].out 9 | *~ 10 | *.orig 11 | core 12 | _obj 13 | _test 14 | _testmain.go 15 | 16 | # Conformance test output and transient files. 17 | conformance/failing_tests.txt 18 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | go: 4 | - 1.6.x 5 | - 1.10.x 6 | - 1.x 7 | 8 | install: 9 | - go get -v -d google.golang.org/grpc 10 | - go get -v -d -t github.com/golang/protobuf/... 11 | - curl -L https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip -o /tmp/protoc.zip 12 | - unzip /tmp/protoc.zip -d "$HOME"/protoc 13 | - mkdir -p "$HOME"/src && ln -s "$HOME"/protoc "$HOME"/src/protobuf 14 | 15 | env: 16 | - PATH=$HOME/protoc/bin:$PATH 17 | 18 | script: 19 | - make all 20 | - make regenerate 21 | # TODO(tamird): When https://github.com/travis-ci/gimme/pull/130 is 22 | # released, make this look for "1.x". 23 | - if [[ "$TRAVIS_GO_VERSION" == 1.10* ]]; then 24 | if [[ "$(git status --porcelain 2>&1)" != "" ]]; then 25 | git status >&2; 26 | git diff -a >&2; 27 | exit 1; 28 | fi; 29 | echo "git status is clean."; 30 | fi; 31 | - make test 32 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/conformance/conformance.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd $(dirname $0) 4 | exec go run conformance.go $* 5 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/conformance/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PROTOBUF_ROOT=$1 4 | CONFORMANCE_ROOT=$1/conformance 5 | CONFORMANCE_TEST_RUNNER=$CONFORMANCE_ROOT/conformance-test-runner 6 | 7 | cd $(dirname $0) 8 | 9 | if [[ $PROTOBUF_ROOT == "" ]]; then 10 | echo "usage: test.sh " >/dev/stderr 11 | exit 1 12 | fi 13 | 14 | if [[ ! -x $CONFORMANCE_TEST_RUNNER ]]; then 15 | echo "SKIP: conformance test runner not installed" >/dev/stderr 16 | exit 0 17 | fi 18 | 19 | a=$CONFORMANCE_ROOT/conformance.proto 20 | b=internal/conformance_proto/conformance.proto 21 | if [[ $(diff $a $b) != "" ]]; then 22 | cp $a $b 23 | echo "WARNING: conformance.proto is out of date" >/dev/stderr 24 | fi 25 | 26 | $CONFORMANCE_TEST_RUNNER --failure_list failure_list_go.txt ./conformance.sh 27 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/descriptor/descriptor_test.go: -------------------------------------------------------------------------------- 1 | package descriptor_test 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | 7 | "github.com/golang/protobuf/descriptor" 8 | tpb "github.com/golang/protobuf/proto/test_proto" 9 | protobuf "github.com/golang/protobuf/protoc-gen-go/descriptor" 10 | ) 11 | 12 | func TestMessage(t *testing.T) { 13 | var msg *protobuf.DescriptorProto 14 | fd, md := descriptor.ForMessage(msg) 15 | if pkg, want := fd.GetPackage(), "google.protobuf"; pkg != want { 16 | t.Errorf("descriptor.ForMessage(%T).GetPackage() = %q; want %q", msg, pkg, want) 17 | } 18 | if name, want := md.GetName(), "DescriptorProto"; name != want { 19 | t.Fatalf("descriptor.ForMessage(%T).GetName() = %q; want %q", msg, name, want) 20 | } 21 | } 22 | 23 | func Example_options() { 24 | var msg *tpb.MyMessageSet 25 | _, md := descriptor.ForMessage(msg) 26 | if md.GetOptions().GetMessageSetWireFormat() { 27 | fmt.Printf("%v uses option message_set_wire_format.\n", md.GetName()) 28 | } 29 | 30 | // Output: 31 | // MyMessageSet uses option message_set_wire_format. 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/konsorten/go-windows-terminal-sequences/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/konsorten/go-windows-terminal-sequences 2 | -------------------------------------------------------------------------------- /vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package sequences 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | var ( 11 | kernel32Dll *syscall.LazyDLL = syscall.NewLazyDLL("Kernel32.dll") 12 | setConsoleMode *syscall.LazyProc = kernel32Dll.NewProc("SetConsoleMode") 13 | ) 14 | 15 | func EnableVirtualTerminalProcessing(stream syscall.Handle, enable bool) error { 16 | const ENABLE_VIRTUAL_TERMINAL_PROCESSING uint32 = 0x4 17 | 18 | var mode uint32 19 | err := syscall.GetConsoleMode(syscall.Stdout, &mode) 20 | if err != nil { 21 | return err 22 | } 23 | 24 | if enable { 25 | mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING 26 | } else { 27 | mode &^= ENABLE_VIRTUAL_TERMINAL_PROCESSING 28 | } 29 | 30 | ret, _, err := setConsoleMode.Call(uintptr(unsafe.Pointer(stream)), uintptr(mode)) 31 | if ret == 0 { 32 | return err 33 | } 34 | 35 | return nil 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/matttproud/golang_protobuf_extensions/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.5 5 | - 1.6 6 | - tip 7 | 8 | script: make -f Makefile.TRAVIS 9 | -------------------------------------------------------------------------------- /vendor/github.com/matttproud/golang_protobuf_extensions/Makefile.TRAVIS: -------------------------------------------------------------------------------- 1 | all: build cover test vet 2 | 3 | build: 4 | go build -v ./... 5 | 6 | cover: test 7 | $(MAKE) -C pbutil cover 8 | 9 | test: build 10 | go test -v ./... 11 | 12 | vet: build 13 | go vet -v ./... 14 | 15 | .PHONY: build cover test vet 16 | -------------------------------------------------------------------------------- /vendor/github.com/matttproud/golang_protobuf_extensions/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2012 Matt T. Proud (matt.proud@gmail.com) 2 | -------------------------------------------------------------------------------- /vendor/github.com/matttproud/golang_protobuf_extensions/README.md: -------------------------------------------------------------------------------- 1 | # Overview 2 | This repository provides various Protocol Buffer extensions for the Go 3 | language (golang), namely support for record length-delimited message 4 | streaming. 5 | 6 | | Java | Go | 7 | | ------------------------------ | --------------------- | 8 | | MessageLite#parseDelimitedFrom | pbutil.ReadDelimited | 9 | | MessageLite#writeDelimitedTo | pbutil.WriteDelimited | 10 | 11 | Because [Code Review 9102043](https://codereview.appspot.com/9102043/) is 12 | destined to never be merged into mainline (i.e., never be promoted to formal 13 | [goprotobuf features](https://github.com/golang/protobuf)), this repository 14 | will live here in the wild. 15 | 16 | # Documentation 17 | We have [generated Go Doc documentation](http://godoc.org/github.com/matttproud/golang_protobuf_extensions/pbutil) here. 18 | 19 | # Testing 20 | [![Build Status](https://travis-ci.org/matttproud/golang_protobuf_extensions.png?branch=master)](https://travis-ci.org/matttproud/golang_protobuf_extensions) 21 | -------------------------------------------------------------------------------- /vendor/github.com/matttproud/golang_protobuf_extensions/ext/moved.go: -------------------------------------------------------------------------------- 1 | // Package ext moved to a new location: github.com/matttproud/golang_protobuf_extensions/pbutil. 2 | package ext 3 | -------------------------------------------------------------------------------- /vendor/github.com/matttproud/golang_protobuf_extensions/pbtest/deleted.go: -------------------------------------------------------------------------------- 1 | // Package pbtest is deleted for the time being, because upstream Protocol Buffer 3 may have rendered quick.Value-based blackbox generation impossible. 2 | package pbtest 3 | -------------------------------------------------------------------------------- /vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/.gitignore: -------------------------------------------------------------------------------- 1 | cover.dat 2 | -------------------------------------------------------------------------------- /vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | 3 | cover: 4 | go test -cover -v -coverprofile=cover.dat ./... 5 | go tool cover -func cover.dat 6 | 7 | .PHONY: cover 8 | -------------------------------------------------------------------------------- /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/matttproud/golang_protobuf_extensions/testdata/README.THIRD_PARTY: -------------------------------------------------------------------------------- 1 | test.pb.go and test.proto are third-party data. 2 | 3 | SOURCE: https://github.com/golang/protobuf 4 | REVISION: bf531ff1a004f24ee53329dfd5ce0b41bfdc17df 5 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Examples 11 | /examples/simple/simple 12 | /examples/random/random 13 | 14 | # Architecture specific extensions/prefixes 15 | *.[568vq] 16 | [568vq].out 17 | 18 | *.cgo1.go 19 | *.cgo2.c 20 | _cgo_defun.c 21 | _cgo_gotypes.go 22 | _cgo_export.* 23 | 24 | _testmain.go 25 | 26 | *.exe 27 | 28 | *~ 29 | *# 30 | .build 31 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - 1.7.x # See README.md for current minimum version. 6 | - 1.8.x 7 | - 1.9.x 8 | - 1.10.x 9 | - 1.11.x 10 | 11 | script: 12 | - make check_license style unused test-short 13 | - if [[ ! $TRAVIS_GO_VERSION =~ ^1\.(7|8|9)\.[x0-9]+$ ]]; then make staticcheck; fi 14 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Prometheus uses GitHub to manage reviews of pull requests. 4 | 5 | * If you have a trivial fix or improvement, go ahead and create a pull request, 6 | addressing (with `@...`) the maintainer of this repository (see 7 | [MAINTAINERS.md](MAINTAINERS.md)) in the description of the pull request. 8 | 9 | * If you plan to do something more involved, first discuss your ideas 10 | on our [mailing list](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers). 11 | This will avoid unnecessary work and surely give you and us a good deal 12 | of inspiration. 13 | 14 | * Relevant coding style guidelines are the [Go Code Review 15 | Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) 16 | and the _Formatting and style_ section of Peter Bourgon's [Go: Best 17 | Practices for Production 18 | Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style). 19 | 20 | * Be sure to sign off on the [DCO](https://github.com/probot/dco#how-it-works) 21 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | * Krasi Georgiev for `api/...` 2 | * Björn Rabenstein for everything else 3 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/NOTICE: -------------------------------------------------------------------------------- 1 | Prometheus instrumentation library for Go applications 2 | Copyright 2012-2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | SoundCloud Ltd. (http://soundcloud.com/). 6 | 7 | 8 | The following components are included in this product: 9 | 10 | perks - a fork of https://github.com/bmizerany/perks 11 | https://github.com/beorn7/perks 12 | Copyright 2013-2015 Blake Mizerany, Björn Rabenstein 13 | See https://github.com/beorn7/perks/blob/master/README.md for license details. 14 | 15 | Go support for Protocol Buffers - Google's data interchange format 16 | http://github.com/golang/protobuf/ 17 | Copyright 2010 The Go Authors 18 | See source code for license details. 19 | 20 | Support for streaming Protocol Buffer messages for the Go language (golang). 21 | https://github.com/matttproud/golang_protobuf_extensions 22 | Copyright 2013 Matt T. Proud 23 | Licensed under the Apache License, Version 2.0 24 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/VERSION: -------------------------------------------------------------------------------- 1 | 0.9.0 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/prometheus/.gitignore: -------------------------------------------------------------------------------- 1 | command-line-arguments.test 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/prometheus/README.md: -------------------------------------------------------------------------------- 1 | See [![go-doc](https://godoc.org/github.com/prometheus/client_golang/prometheus?status.svg)](https://godoc.org/github.com/prometheus/client_golang/prometheus). 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/prometheus/desc_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 prometheus 15 | 16 | import ( 17 | "testing" 18 | ) 19 | 20 | func TestNewDescInvalidLabelValues(t *testing.T) { 21 | desc := NewDesc( 22 | "sample_label", 23 | "sample label", 24 | nil, 25 | Labels{"a": "\xFF"}, 26 | ) 27 | if desc.err == nil { 28 | t.Errorf("NewDesc: expected error because: %s", desc.err) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Prometheus uses GitHub to manage reviews of pull requests. 4 | 5 | * If you have a trivial fix or improvement, go ahead and create a pull request, 6 | addressing (with `@...`) the maintainer of this repository (see 7 | [MAINTAINERS.md](MAINTAINERS.md)) in the description of the pull request. 8 | 9 | * If you plan to do something more involved, first discuss your ideas 10 | on our [mailing list](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers). 11 | This will avoid unnecessary work and surely give you and us a good deal 12 | of inspiration. 13 | 14 | * Relevant coding style guidelines are the [Go Code Review 15 | Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) 16 | and the _Formatting and style_ section of Peter Bourgon's [Go: Best 17 | Practices for Production 18 | Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style). 19 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | * Björn Rabenstein 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/NOTICE: -------------------------------------------------------------------------------- 1 | Data model artifacts for Prometheus. 2 | Copyright 2012-2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | SoundCloud Ltd. (http://soundcloud.com/). 6 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/README.md: -------------------------------------------------------------------------------- 1 | # Background 2 | Under most circumstances, manually downloading this repository should never 3 | be required. 4 | 5 | # Prerequisites 6 | # Base 7 | * [Google Protocol Buffers](https://developers.google.com/protocol-buffers) 8 | 9 | ## Java 10 | * [Apache Maven](http://maven.apache.org) 11 | * [Prometheus Maven Repository](https://github.com/prometheus/io.prometheus-maven-repository) checked out into ../io.prometheus-maven-repository 12 | 13 | ## Go 14 | * [Go](http://golang.org) 15 | * [goprotobuf](https://code.google.com/p/goprotobuf) 16 | 17 | ## Ruby 18 | * [Ruby](https://www.ruby-lang.org) 19 | * [bundler](https://rubygems.org/gems/bundler) 20 | 21 | # Building 22 | $ make 23 | 24 | # Getting Started 25 | * The Go source code is periodically indexed: [Go Protocol Buffer Model](http://godoc.org/github.com/prometheus/client_model/go). 26 | * All of the core developers are accessible via the [Prometheus Developers Mailinglist](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers). 27 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/python/prometheus/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Prometheus Team 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 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/python/prometheus/client/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Prometheus Team 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 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/python/prometheus/client/model/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Prometheus Team 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 | __all__ = ['metrics_pb2'] 15 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/ruby/.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | .bundle 3 | Gemfile.lock 4 | pkg 5 | vendor/bundle 6 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/ruby/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # Specify your gem's dependencies in prometheus-client-model.gemspec 4 | gemspec 5 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/ruby/Makefile: -------------------------------------------------------------------------------- 1 | VENDOR_BUNDLE = vendor/bundle 2 | 3 | build: $(VENDOR_BUNDLE)/.bundled 4 | BEEFCAKE_NAMESPACE=Prometheus::Client protoc --beefcake_out lib/prometheus/client/model -I .. ../metrics.proto 5 | 6 | $(VENDOR_BUNDLE): 7 | mkdir -p $@ 8 | 9 | $(VENDOR_BUNDLE)/.bundled: $(VENDOR_BUNDLE) Gemfile 10 | bundle install --quiet --path $< 11 | @touch $@ 12 | 13 | clean: 14 | -rm -f lib/prometheus/client/model/metrics.pb.rb 15 | -rm -rf $(VENDOR_BUNDLE) 16 | 17 | .PHONY: build clean 18 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/ruby/README.md: -------------------------------------------------------------------------------- 1 | # Prometheus Ruby client model 2 | 3 | Data model artifacts for the [Prometheus Ruby client][1]. 4 | 5 | ## Installation 6 | 7 | gem install prometheus-client-model 8 | 9 | ## Usage 10 | 11 | Build the artifacts from the protobuf specification: 12 | 13 | make build 14 | 15 | While this Gem's main purpose is to define the Prometheus data types for the 16 | [client][1], it's possible to use it without the client to decode a stream of 17 | delimited protobuf messages: 18 | 19 | ```ruby 20 | require 'open-uri' 21 | require 'prometheus/client/model' 22 | 23 | CONTENT_TYPE = 'application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited' 24 | 25 | stream = open('http://localhost:9090/metrics', 'Accept' => CONTENT_TYPE).read 26 | while family = Prometheus::Client::MetricFamily.read_delimited(stream) 27 | puts family 28 | end 29 | ``` 30 | 31 | [1]: https://github.com/prometheus/client_ruby 32 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/ruby/Rakefile: -------------------------------------------------------------------------------- 1 | require "bundler/gem_tasks" 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/ruby/lib/prometheus/client/model.rb: -------------------------------------------------------------------------------- 1 | require 'prometheus/client/model/metrics.pb' 2 | require 'prometheus/client/model/version' 3 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/ruby/lib/prometheus/client/model/version.rb: -------------------------------------------------------------------------------- 1 | module Prometheus 2 | module Client 3 | module Model 4 | VERSION = '0.1.0' 5 | end 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/ruby/prometheus-client-model.gemspec: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | lib = File.expand_path('../lib', __FILE__) 3 | $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) 4 | require 'prometheus/client/model/version' 5 | 6 | Gem::Specification.new do |spec| 7 | spec.name = 'prometheus-client-model' 8 | spec.version = Prometheus::Client::Model::VERSION 9 | spec.authors = ['Tobias Schmidt'] 10 | spec.email = ['tobidt@gmail.com'] 11 | spec.summary = 'Data model artifacts for the Prometheus Ruby client' 12 | spec.homepage = 'https://github.com/prometheus/client_model/tree/master/ruby' 13 | spec.license = 'Apache 2.0' 14 | 15 | spec.files = %w[README.md LICENSE] + Dir.glob('{lib/**/*}') 16 | spec.require_paths = ['lib'] 17 | 18 | spec.add_dependency 'beefcake', '>= 0.4.0' 19 | 20 | spec.add_development_dependency 'bundler', '~> 1.3' 21 | spec.add_development_dependency 'rake' 22 | end 23 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | from setuptools import setup 4 | 5 | setup( 6 | name = 'prometheus_client_model', 7 | version = '0.0.1', 8 | author = 'Matt T. Proud', 9 | author_email = 'matt.proud@gmail.com', 10 | description = 'Data model artifacts for the Prometheus client.', 11 | license = 'Apache License 2.0', 12 | url = 'http://github.com/prometheus/client_model', 13 | packages = ['prometheus', 'prometheus/client', 'prometheus/client/model'], 14 | package_dir = {'': 'python'}, 15 | requires = ['protobuf(==2.4.1)'], 16 | platforms = 'Platform Independent', 17 | classifiers = ['Development Status :: 3 - Alpha', 18 | 'Intended Audience :: Developers', 19 | 'Intended Audience :: System Administrators', 20 | 'License :: OSI Approved :: Apache Software License', 21 | 'Operating System :: OS Independent', 22 | 'Topic :: Software Development :: Testing', 23 | 'Topic :: System :: Monitoring']) 24 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: go 4 | go: 5 | - 1.7.5 6 | - tip 7 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Prometheus uses GitHub to manage reviews of pull requests. 4 | 5 | * If you have a trivial fix or improvement, go ahead and create a pull request, 6 | addressing (with `@...`) the maintainer of this repository (see 7 | [MAINTAINERS.md](MAINTAINERS.md)) in the description of the pull request. 8 | 9 | * If you plan to do something more involved, first discuss your ideas 10 | on our [mailing list](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers). 11 | This will avoid unnecessary work and surely give you and us a good deal 12 | of inspiration. 13 | 14 | * Relevant coding style guidelines are the [Go Code Review 15 | Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) 16 | and the _Formatting and style_ section of Peter Bourgon's [Go: Best 17 | Practices for Production 18 | Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style). 19 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | * Fabian Reinartz 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/NOTICE: -------------------------------------------------------------------------------- 1 | Common libraries shared by Prometheus Go components. 2 | Copyright 2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | SoundCloud Ltd. (http://soundcloud.com/). 6 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/README.md: -------------------------------------------------------------------------------- 1 | # Common 2 | [![Build Status](https://travis-ci.org/prometheus/common.svg)](https://travis-ci.org/prometheus/common) 3 | 4 | This repository contains Go libraries that are shared across Prometheus 5 | components and libraries. 6 | 7 | * **config**: Common configuration structures 8 | * **expfmt**: Decoding and encoding for the exposition format 9 | * **log**: A logging wrapper around [logrus](https://github.com/sirupsen/logrus) 10 | * **model**: Shared data structures 11 | * **route**: A routing wrapper around [httprouter](https://github.com/julienschmidt/httprouter) using `context.Context` 12 | * **version**: Version information and metrics 13 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/config/testdata/basic-auth-password: -------------------------------------------------------------------------------- 1 | foobar 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/config/testdata/bearer.token: -------------------------------------------------------------------------------- 1 | theanswertothegreatquestionoflifetheuniverseandeverythingisfortytwo 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/config/testdata/http.conf.basic-auth.good.yaml: -------------------------------------------------------------------------------- 1 | basic_auth: 2 | username: user 3 | password_file: testdata/basic-auth-password 4 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/config/testdata/http.conf.basic-auth.no-password.yaml: -------------------------------------------------------------------------------- 1 | basic_auth: 2 | username: user 3 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/config/testdata/http.conf.basic-auth.no-username.yaml: -------------------------------------------------------------------------------- 1 | basic_auth: 2 | password: secret 3 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/config/testdata/http.conf.basic-auth.too-much.bad.yaml: -------------------------------------------------------------------------------- 1 | basic_auth: 2 | username: user 3 | password: foo 4 | password_file: testdata/basic-auth-password 5 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/config/testdata/http.conf.bearer-token-and-file-set.bad.yml: -------------------------------------------------------------------------------- 1 | basic_auth: 2 | username: username 3 | password: "mysecret" 4 | bearer_token: mysecret 5 | bearer_token_file: file 6 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/config/testdata/http.conf.empty.bad.yml: -------------------------------------------------------------------------------- 1 | basic_auth: 2 | username: username 3 | password: mysecret 4 | bearer_token_file: file 5 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/config/testdata/http.conf.good.yml: -------------------------------------------------------------------------------- 1 | basic_auth: 2 | username: username 3 | password: "mysecret" 4 | proxy_url: "http://remote.host" 5 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/config/testdata/http.conf.invalid-bearer-token-file.bad.yml: -------------------------------------------------------------------------------- 1 | bearer_token_file: file 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/config/testdata/tls_config.cert_no_key.bad.yml: -------------------------------------------------------------------------------- 1 | cert_file: somefile 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/config/testdata/tls_config.empty.good.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noony/prometheus-solr-exporter/8849336f38c81c9290f90dce464cbc8e6b0b3e5a/vendor/github.com/prometheus/common/config/testdata/tls_config.empty.good.yml -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/config/testdata/tls_config.insecure.good.yml: -------------------------------------------------------------------------------- 1 | insecure_skip_verify: true 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/config/testdata/tls_config.invalid_field.bad.yml: -------------------------------------------------------------------------------- 1 | something_invalid: true 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/config/testdata/tls_config.key_no_cert.bad.yml: -------------------------------------------------------------------------------- 1 | key_file: somefile 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_0: -------------------------------------------------------------------------------- 1 | 2 | 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/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/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/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/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_0: -------------------------------------------------------------------------------- 1 | bla 3.14 -------------------------------------------------------------------------------- /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_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_12: -------------------------------------------------------------------------------- 1 | 2 | # HELP metric one 3 | # HELP metric two 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_14: -------------------------------------------------------------------------------- 1 | 2 | metric 4.12 3 | # TYPE metric counter 4 | -------------------------------------------------------------------------------- /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_16: -------------------------------------------------------------------------------- 1 | 2 | # TYPE met-ric 3 | -------------------------------------------------------------------------------- /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_18: -------------------------------------------------------------------------------- 1 | {label="bla"} 3.14 2 -------------------------------------------------------------------------------- /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/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_2: -------------------------------------------------------------------------------- 1 | 2 | metric{label="new 3 | line"} 3.14 4 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/fuzz/corpus/from_test_parse_error_3: -------------------------------------------------------------------------------- 1 | metric{@="bla"} 3.14 -------------------------------------------------------------------------------- /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_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_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_8: -------------------------------------------------------------------------------- 1 | metric{label="bla"+} 3.14 -------------------------------------------------------------------------------- /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/prometheus/common/expfmt/fuzz/corpus/minimal: -------------------------------------------------------------------------------- 1 | m{} 0 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/testdata/json2: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "baseLabels": { 4 | "__name__": "rpc_calls_total", 5 | "job": "batch_job" 6 | }, 7 | "docstring": "RPC calls.", 8 | "metric": { 9 | "type": "counter", 10 | "value": [ 11 | { 12 | "labels": { 13 | "service": "zed" 14 | }, 15 | "value": 25 16 | }, 17 | { 18 | "labels": { 19 | "service": "bar" 20 | }, 21 | "value": 24 22 | } 23 | ] 24 | } 25 | }, 26 | { 27 | "baseLabels": { 28 | "__name__": "rpc_latency_microseconds" 29 | }, 30 | "docstring": "RPC latency.", 31 | "metric": { 32 | "type": "histogram", 33 | "value": [ 34 | { 35 | "labels": { 36 | "service": "foo" 37 | }, 38 | "value": { 39 | "0.010000": 15, 40 | "0.990000": 17 41 | } 42 | } 43 | ] 44 | } 45 | } 46 | ] 47 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/testdata/json2_bad: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "baseLabels": { 4 | "__name__": "rpc_calls_total", 5 | "job": "batch_job" 6 | }, 7 | "docstring": "RPC calls.", 8 | "metric": { 9 | "type": "counter", 10 | "value": [ 11 | { 12 | "labels": { 13 | "servic|e": "zed" 14 | }, 15 | "value": 25 16 | }, 17 | { 18 | "labels": { 19 | "service": "bar" 20 | }, 21 | "value": 24 22 | } 23 | ] 24 | } 25 | }, 26 | { 27 | "baseLabels": { 28 | "__name__": "rpc_latency_microseconds" 29 | }, 30 | "docstring": "RPC latency.", 31 | "metric": { 32 | "type": "histogram", 33 | "value": [ 34 | { 35 | "labels": { 36 | "service": "foo" 37 | }, 38 | "value": { 39 | "0.010000": 15, 40 | "0.990000": 17 41 | } 42 | } 43 | ] 44 | } 45 | } 46 | ] 47 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/testdata/protobuf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noony/prometheus-solr-exporter/8849336f38c81c9290f90dce464cbc8e6b0b3e5a/vendor/github.com/prometheus/common/expfmt/testdata/protobuf -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/testdata/protobuf.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noony/prometheus-solr-exporter/8849336f38c81c9290f90dce464cbc8e6b0b3e5a/vendor/github.com/prometheus/common/expfmt/testdata/protobuf.gz -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/expfmt/testdata/text.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noony/prometheus-solr-exporter/8849336f38c81c9290f90dce464cbc8e6b0b3e5a/vendor/github.com/prometheus/common/expfmt/testdata/text.gz -------------------------------------------------------------------------------- /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 components and libraries. 16 | package model 17 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/.gitignore: -------------------------------------------------------------------------------- 1 | /fixtures/ 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Prometheus uses GitHub to manage reviews of pull requests. 4 | 5 | * If you have a trivial fix or improvement, go ahead and create a pull request, 6 | addressing (with `@...`) the maintainer of this repository (see 7 | [MAINTAINERS.md](MAINTAINERS.md)) in the description of the pull request. 8 | 9 | * If you plan to do something more involved, first discuss your ideas 10 | on our [mailing list](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers). 11 | This will avoid unnecessary work and surely give you and us a good deal 12 | of inspiration. 13 | 14 | * Relevant coding style guidelines are the [Go Code Review 15 | Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) 16 | and the _Formatting and style_ section of Peter Bourgon's [Go: Best 17 | Practices for Production 18 | Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style). 19 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | * Tobias Schmidt 2 | -------------------------------------------------------------------------------- /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/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 | [![Go Report Card](https://goreportcard.com/badge/github.com/prometheus/procfs)](https://goreportcard.com/report/github.com/prometheus/procfs) 12 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/scripts/check_license.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2018 The Prometheus Authors 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | check_license() { 17 | local file="" 18 | for file in $(find . -type f -iname '*.go' ! -path './vendor/*'); do 19 | head -n3 "${file}" | grep -Eq "(Copyright|generated|GENERATED)" || echo " ${file}" 20 | done 21 | } 22 | 23 | licRes=$(check_license) 24 | 25 | if [ -n "${licRes}" ]; then 26 | echo "license header checking failed:" 27 | echo "${licRes}" 28 | exit 255 29 | fi 30 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/sysfs/.gitignore: -------------------------------------------------------------------------------- 1 | fixtures/ 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/sysfs/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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 sysfs provides functions to retrieve system and kernel metrics 15 | // from the pseudo-filesystem sys. 16 | package sysfs 17 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | platform: x64 3 | clone_folder: c:\gopath\src\github.com\sirupsen\logrus 4 | environment: 5 | GOPATH: c:\gopath 6 | branches: 7 | only: 8 | - master 9 | install: 10 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 11 | - go version 12 | build_script: 13 | - go get -t 14 | - go test 15 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/hooks/syslog/syslog_test.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!nacl,!plan9 2 | 3 | package syslog 4 | 5 | import ( 6 | "log/syslog" 7 | "testing" 8 | 9 | "github.com/sirupsen/logrus" 10 | ) 11 | 12 | func TestLocalhostAddAndPrint(t *testing.T) { 13 | log := logrus.New() 14 | hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") 15 | 16 | if err != nil { 17 | t.Errorf("Unable to connect to local syslog.") 18 | } 19 | 20 | log.Hooks.Add(hook) 21 | 22 | for _, level := range hook.Levels() { 23 | if len(log.Hooks[level]) != 1 { 24 | t.Errorf("SyslogHook was not added. The length of log.Hooks[%v]: %v", level, len(log.Hooks[level])) 25 | } 26 | } 27 | 28 | log.Info("Congratulations!") 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/.gitattributes: -------------------------------------------------------------------------------- 1 | # Treat all files in this repo as binary, with no git magic updating 2 | # line endings. Windows users contributing to Go will need to use a 3 | # modern version of git and editors capable of LF line endings. 4 | # 5 | # We'll prevent accidental CRLF line endings from entering the repo 6 | # via the git-review gofmt checks. 7 | # 8 | # See golang.org/issue/9281 9 | 10 | * -text 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/.gitignore: -------------------------------------------------------------------------------- 1 | # Add no patterns to .hgignore except for files generated by the build. 2 | last-change 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at https://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Go 2 | 3 | Go is an open source project. 4 | 5 | It is the work of hundreds of contributors. We appreciate your help! 6 | 7 | ## Filing issues 8 | 9 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: 10 | 11 | 1. What version of Go are you using (`go version`)? 12 | 2. What operating system and processor architecture are you using? 13 | 3. What did you do? 14 | 4. What did you expect to see? 15 | 5. What did you see instead? 16 | 17 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. 18 | The gophers there will answer or ask you to file an issue if you've tripped over a bug. 19 | 20 | ## Contributing code 21 | 22 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) 23 | before sending patches. 24 | 25 | Unless otherwise noted, the Go source files are distributed under 26 | the BSD-style license found in the LICENSE file. 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at https://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/README.md: -------------------------------------------------------------------------------- 1 | # Go Cryptography 2 | 3 | This repository holds supplementary Go cryptography libraries. 4 | 5 | ## Download/Install 6 | 7 | The easiest way to install is to run `go get -u golang.org/x/crypto/...`. You 8 | can also manually git clone the repository to `$GOPATH/src/golang.org/x/crypto`. 9 | 10 | ## Report Issues / Send Patches 11 | 12 | This repository uses Gerrit for code changes. To learn how to submit changes to 13 | this repository, see https://golang.org/doc/contribute.html. 14 | 15 | The main issue tracker for the crypto repository is located at 16 | https://github.com/golang/go/issues. Prefix your issue with "x/crypto:" in the 17 | subject line, so it is easy to find. 18 | 19 | Note that contributions to the cryptography package receive additional scrutiny 20 | due to their sensitive nature. Patches may take longer than normal to receive 21 | feedback. 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/acme/autocert/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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 autocert_test 6 | 7 | import ( 8 | "fmt" 9 | "log" 10 | "net/http" 11 | 12 | "golang.org/x/crypto/acme/autocert" 13 | ) 14 | 15 | func ExampleNewListener() { 16 | mux := http.NewServeMux() 17 | mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { 18 | fmt.Fprintf(w, "Hello, TLS user! Your config: %+v", r.TLS) 19 | }) 20 | log.Fatal(http.Serve(autocert.NewListener("example.com"), mux)) 21 | } 22 | 23 | func ExampleManager() { 24 | m := &autocert.Manager{ 25 | Cache: autocert.DirCache("secret-dir"), 26 | Prompt: autocert.AcceptTOS, 27 | HostPolicy: autocert.HostWhitelist("example.org", "www.example.org"), 28 | } 29 | s := &http.Server{ 30 | Addr: ":https", 31 | TLSConfig: m.TLSConfig(), 32 | } 33 | s.ListenAndServeTLS("", "") 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/argon2/blamka_ref.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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 appengine gccgo 6 | 7 | package argon2 8 | 9 | func processBlock(out, in1, in2 *block) { 10 | processBlockGeneric(out, in1, in2, false) 11 | } 12 | 13 | func processBlockXOR(out, in1, in2 *block) { 14 | processBlockGeneric(out, in1, in2, true) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/bcrypt/base64.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 | package bcrypt 6 | 7 | import "encoding/base64" 8 | 9 | const alphabet = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" 10 | 11 | var bcEncoding = base64.NewEncoding(alphabet) 12 | 13 | func base64Encode(src []byte) []byte { 14 | n := bcEncoding.EncodedLen(len(src)) 15 | dst := make([]byte, n) 16 | bcEncoding.Encode(dst, src) 17 | for dst[n-1] == '=' { 18 | n-- 19 | } 20 | return dst[:n] 21 | } 22 | 23 | func base64Decode(src []byte) ([]byte, error) { 24 | numOfEquals := 4 - (len(src) % 4) 25 | for i := 0; i < numOfEquals; i++ { 26 | src = append(src, '=') 27 | } 28 | 29 | dst := make([]byte, bcEncoding.DecodedLen(len(src))) 30 | n, err := bcEncoding.Decode(dst, src) 31 | if err != nil { 32 | return nil, err 33 | } 34 | return dst[:n], nil 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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.7,amd64,!gccgo,!appengine 6 | 7 | package blake2b 8 | 9 | import "golang.org/x/sys/cpu" 10 | 11 | func init() { 12 | useAVX2 = cpu.X86.HasAVX2 13 | useAVX = cpu.X86.HasAVX 14 | useSSE4 = cpu.X86.HasSSE41 15 | } 16 | 17 | //go:noescape 18 | func hashBlocksAVX2(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) 19 | 20 | //go:noescape 21 | func hashBlocksAVX(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) 22 | 23 | //go:noescape 24 | func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) 25 | 26 | func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) { 27 | switch { 28 | case useAVX2: 29 | hashBlocksAVX2(h, c, flag, blocks) 30 | case useAVX: 31 | hashBlocksAVX(h, c, flag, blocks) 32 | case useSSE4: 33 | hashBlocksSSE4(h, c, flag, blocks) 34 | default: 35 | hashBlocksGeneric(h, c, flag, blocks) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2b/blake2b_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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.7,amd64,!gccgo,!appengine 6 | 7 | package blake2b 8 | 9 | import "golang.org/x/sys/cpu" 10 | 11 | func init() { 12 | useSSE4 = cpu.X86.HasSSE41 13 | } 14 | 15 | //go:noescape 16 | func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) 17 | 18 | func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) { 19 | if useSSE4 { 20 | hashBlocksSSE4(h, c, flag, blocks) 21 | } else { 22 | hashBlocksGeneric(h, c, flag, blocks) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2b/blake2b_ref.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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 appengine gccgo 6 | 7 | package blake2b 8 | 9 | func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) { 10 | hashBlocksGeneric(h, c, flag, blocks) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2b/register.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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.9 6 | 7 | package blake2b 8 | 9 | import ( 10 | "crypto" 11 | "hash" 12 | ) 13 | 14 | func init() { 15 | newHash256 := func() hash.Hash { 16 | h, _ := New256(nil) 17 | return h 18 | } 19 | newHash384 := func() hash.Hash { 20 | h, _ := New384(nil) 21 | return h 22 | } 23 | 24 | newHash512 := func() hash.Hash { 25 | h, _ := New512(nil) 26 | return h 27 | } 28 | 29 | crypto.RegisterHash(crypto.BLAKE2b_256, newHash256) 30 | crypto.RegisterHash(crypto.BLAKE2b_384, newHash384) 31 | crypto.RegisterHash(crypto.BLAKE2b_512, newHash512) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2s/blake2s_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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,!gccgo,!appengine 6 | 7 | package blake2s 8 | 9 | import "golang.org/x/sys/cpu" 10 | 11 | var ( 12 | useSSE4 = false 13 | useSSSE3 = cpu.X86.HasSSSE3 14 | useSSE2 = cpu.X86.HasSSE2 15 | ) 16 | 17 | //go:noescape 18 | func hashBlocksSSE2(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) 19 | 20 | //go:noescape 21 | func hashBlocksSSSE3(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) 22 | 23 | func hashBlocks(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) { 24 | switch { 25 | case useSSSE3: 26 | hashBlocksSSSE3(h, c, flag, blocks) 27 | case useSSE2: 28 | hashBlocksSSE2(h, c, flag, blocks) 29 | default: 30 | hashBlocksGeneric(h, c, flag, blocks) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2s/blake2s_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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,!gccgo,!appengine 6 | 7 | package blake2s 8 | 9 | import "golang.org/x/sys/cpu" 10 | 11 | var ( 12 | useSSE4 = cpu.X86.HasSSE41 13 | useSSSE3 = cpu.X86.HasSSSE3 14 | useSSE2 = cpu.X86.HasSSE2 15 | ) 16 | 17 | //go:noescape 18 | func hashBlocksSSE2(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) 19 | 20 | //go:noescape 21 | func hashBlocksSSSE3(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) 22 | 23 | //go:noescape 24 | func hashBlocksSSE4(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) 25 | 26 | func hashBlocks(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) { 27 | switch { 28 | case useSSE4: 29 | hashBlocksSSE4(h, c, flag, blocks) 30 | case useSSSE3: 31 | hashBlocksSSSE3(h, c, flag, blocks) 32 | case useSSE2: 33 | hashBlocksSSE2(h, c, flag, blocks) 34 | default: 35 | hashBlocksGeneric(h, c, flag, blocks) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2s/blake2s_ref.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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,!386 gccgo appengine 6 | 7 | package blake2s 8 | 9 | var ( 10 | useSSE4 = false 11 | useSSSE3 = false 12 | useSSE2 = false 13 | ) 14 | 15 | func hashBlocks(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) { 16 | hashBlocksGeneric(h, c, flag, blocks) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/blake2s/register.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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.9 6 | 7 | package blake2s 8 | 9 | import ( 10 | "crypto" 11 | "hash" 12 | ) 13 | 14 | func init() { 15 | newHash256 := func() hash.Hash { 16 | h, _ := New256(nil) 17 | return h 18 | } 19 | 20 | crypto.RegisterHash(crypto.BLAKE2s_256, newHash256) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_noasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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 !go1.7 gccgo appengine 6 | 7 | package chacha20poly1305 8 | 9 | func (c *chacha20poly1305) seal(dst, nonce, plaintext, additionalData []byte) []byte { 10 | return c.sealGeneric(dst, nonce, plaintext, additionalData) 11 | } 12 | 13 | func (c *chacha20poly1305) open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) { 14 | return c.openGeneric(dst, nonce, ciphertext, additionalData) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/const_amd64.h: -------------------------------------------------------------------------------- 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 | // This code was translated into a form compatible with 6a from the public 6 | // domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html 7 | 8 | #define REDMASK51 0x0007FFFFFFFFFFFF 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/const_amd64.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 | // This code was translated into a form compatible with 6a from the public 6 | // domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html 7 | 8 | // +build amd64,!gccgo,!appengine 9 | 10 | // These constants cannot be encoded in non-MOVQ immediates. 11 | // We access them directly from memory instead. 12 | 13 | DATA ·_121666_213(SB)/8, $996687872 14 | GLOBL ·_121666_213(SB), 8, $8 15 | 16 | DATA ·_2P0(SB)/8, $0xFFFFFFFFFFFDA 17 | GLOBL ·_2P0(SB), 8, $8 18 | 19 | DATA ·_2P1234(SB)/8, $0xFFFFFFFFFFFFE 20 | GLOBL ·_2P1234(SB), 8, $8 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/curve25519_test.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 curve25519 6 | 7 | import ( 8 | "fmt" 9 | "testing" 10 | ) 11 | 12 | const expectedHex = "89161fde887b2b53de549af483940106ecc114d6982daa98256de23bdf77661a" 13 | 14 | func TestBaseScalarMult(t *testing.T) { 15 | var a, b [32]byte 16 | in := &a 17 | out := &b 18 | a[0] = 1 19 | 20 | for i := 0; i < 200; i++ { 21 | ScalarBaseMult(out, in) 22 | in, out = out, in 23 | } 24 | 25 | result := fmt.Sprintf("%x", in[:]) 26 | if result != expectedHex { 27 | t.Errorf("incorrect result: got %s, want %s", result, expectedHex) 28 | } 29 | } 30 | 31 | func BenchmarkScalarBaseMult(b *testing.B) { 32 | var in, out [32]byte 33 | in[0] = 1 34 | 35 | b.SetBytes(32) 36 | for i := 0; i < b.N; i++ { 37 | ScalarBaseMult(&out, &in) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ed25519/testdata/sign.input.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noony/prometheus-solr-exporter/8849336f38c81c9290f90dce464cbc8e6b0b3e5a/vendor/golang.org/x/crypto/ed25519/testdata/sign.input.gz -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/internal/chacha20/chacha_noasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 !s390x gccgo appengine 6 | 7 | package chacha20 8 | 9 | const ( 10 | bufSize = 64 11 | haveAsm = false 12 | ) 13 | 14 | func (*Cipher) xorKeyStreamAsm(dst, src []byte) { 15 | panic("not implemented") 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/internal/chacha20/chacha_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 s390x,!gccgo,!appengine 6 | 7 | package chacha20 8 | 9 | var haveAsm = hasVectorFacility() 10 | 11 | const bufSize = 256 12 | 13 | // hasVectorFacility reports whether the machine supports the vector 14 | // facility (vx). 15 | // Implementation in asm_s390x.s. 16 | func hasVectorFacility() bool 17 | 18 | // xorKeyStreamVX is an assembly implementation of XORKeyStream. It must only 19 | // be called when the vector facility is available. 20 | // Implementation in asm_s390x.s. 21 | //go:noescape 22 | func xorKeyStreamVX(dst, src []byte, key *[8]uint32, nonce *[3]uint32, counter *uint32, buf *[256]byte, len *int) 23 | 24 | func (c *Cipher) xorKeyStreamAsm(dst, src []byte) { 25 | xorKeyStreamVX(dst, src, &c.key, &c.nonce, &c.counter, &c.buf, &c.len) 26 | } 27 | 28 | // EXRL targets, DO NOT CALL! 29 | func mvcSrcToBuf() 30 | func mvcBufToDst() 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/md4/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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 md4_test 6 | 7 | import ( 8 | "fmt" 9 | "io" 10 | 11 | "golang.org/x/crypto/md4" 12 | ) 13 | 14 | func ExampleNew() { 15 | h := md4.New() 16 | data := "These pretzels are making me thirsty." 17 | io.WriteString(h, data) 18 | fmt.Printf("%x", h.Sum(nil)) 19 | // Output: 48c4e365090b30a32f084c4888deceaa 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/pkcs12/errors.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 | package pkcs12 6 | 7 | import "errors" 8 | 9 | var ( 10 | // ErrDecryption represents a failure to decrypt the input. 11 | ErrDecryption = errors.New("pkcs12: decryption error, incorrect padding") 12 | 13 | // ErrIncorrectPassword is returned when an incorrect password is detected. 14 | // Usually, P12/PFX data is signed to be able to verify the password. 15 | ErrIncorrectPassword = errors.New("pkcs12: decryption password incorrect") 16 | ) 17 | 18 | // NotImplementedError indicates that the input is not currently supported. 19 | type NotImplementedError string 20 | 21 | func (e NotImplementedError) Error() string { 22 | return "pkcs12: " + string(e) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/pkcs12/internal/rc2/bench_test.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 | package rc2 6 | 7 | import ( 8 | "testing" 9 | ) 10 | 11 | func BenchmarkEncrypt(b *testing.B) { 12 | r, _ := New([]byte{0, 0, 0, 0, 0, 0, 0, 0}, 64) 13 | b.ResetTimer() 14 | var src [8]byte 15 | for i := 0; i < b.N; i++ { 16 | r.Encrypt(src[:], src[:]) 17 | } 18 | } 19 | 20 | func BenchmarkDecrypt(b *testing.B) { 21 | r, _ := New([]byte{0, 0, 0, 0, 0, 0, 0, 0}, 64) 22 | b.ResetTimer() 23 | var src [8]byte 24 | for i := 0; i < b.N; i++ { 25 | r.Decrypt(src[:], src[:]) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/poly1305/sum_amd64.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 amd64,!gccgo,!appengine 6 | 7 | package poly1305 8 | 9 | // This function is implemented in sum_amd64.s 10 | //go:noescape 11 | func poly1305(out *[16]byte, m *byte, mlen uint64, key *[32]byte) 12 | 13 | // Sum generates an authenticator for m using a one-time key and puts the 14 | // 16-byte result into out. Authenticating two different messages with the same 15 | // key allows an attacker to forge messages at will. 16 | func Sum(out *[16]byte, m []byte, key *[32]byte) { 17 | var mPtr *byte 18 | if len(m) > 0 { 19 | mPtr = &m[0] 20 | } 21 | poly1305(out, mPtr, uint64(len(m)), key) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/poly1305/sum_arm.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 arm,!gccgo,!appengine,!nacl 6 | 7 | package poly1305 8 | 9 | // This function is implemented in sum_arm.s 10 | //go:noescape 11 | func poly1305_auth_armv6(out *[16]byte, m *byte, mlen uint32, key *[32]byte) 12 | 13 | // Sum generates an authenticator for m using a one-time key and puts the 14 | // 16-byte result into out. Authenticating two different messages with the same 15 | // key allows an attacker to forge messages at will. 16 | func Sum(out *[16]byte, m []byte, key *[32]byte) { 17 | var mPtr *byte 18 | if len(m) > 0 { 19 | mPtr = &m[0] 20 | } 21 | poly1305_auth_armv6(out, mPtr, uint32(len(m)), key) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/poly1305/sum_noasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 s390x,!go1.11 !arm,!amd64,!s390x gccgo appengine nacl 6 | 7 | package poly1305 8 | 9 | // Sum generates an authenticator for msg using a one-time key and puts the 10 | // 16-byte result into out. Authenticating two different messages with the same 11 | // key allows an attacker to forge messages at will. 12 | func Sum(out *[TagSize]byte, msg []byte, key *[32]byte) { 13 | sumGeneric(out, msg, key) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.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 amd64,!appengine,!gccgo 6 | 7 | package salsa 8 | 9 | // This function is implemented in salsa2020_amd64.s. 10 | 11 | //go:noescape 12 | 13 | func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte) 14 | 15 | // XORKeyStream crypts bytes from in to out using the given key and counters. 16 | // In and out must overlap entirely or not at all. Counter 17 | // contains the raw salsa20 counter bytes (both nonce and block counter). 18 | func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { 19 | if len(in) == 0 { 20 | return 21 | } 22 | _ = out[len(in)-1] 23 | salsa2020XORKeyStream(&out[0], &in[0], uint64(len(in)), &counter[0], &key[0]) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/scrypt/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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 scrypt_test 6 | 7 | import ( 8 | "encoding/base64" 9 | "fmt" 10 | "log" 11 | 12 | "golang.org/x/crypto/scrypt" 13 | ) 14 | 15 | func Example() { 16 | // DO NOT use this salt value; generate your own random salt. 8 bytes is 17 | // a good length. 18 | salt := []byte{0xc8, 0x28, 0xf2, 0x58, 0xa7, 0x6a, 0xad, 0x7b} 19 | 20 | dk, err := scrypt.Key([]byte("some password"), salt, 1<<15, 8, 1, 32) 21 | if err != nil { 22 | log.Fatal(err) 23 | } 24 | fmt.Println(base64.StdEncoding.EncodeToString(dk)) 25 | // Output: lGnMz8io0AUkfzn6Pls1qX20Vs7PGN6sbYQ2TQgY12M= 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/hashes_generic.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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 appengine !s390x 6 | 7 | package sha3 8 | 9 | import ( 10 | "hash" 11 | ) 12 | 13 | // new224Asm returns an assembly implementation of SHA3-224 if available, 14 | // otherwise it returns nil. 15 | func new224Asm() hash.Hash { return nil } 16 | 17 | // new256Asm returns an assembly implementation of SHA3-256 if available, 18 | // otherwise it returns nil. 19 | func new256Asm() hash.Hash { return nil } 20 | 21 | // new384Asm returns an assembly implementation of SHA3-384 if available, 22 | // otherwise it returns nil. 23 | func new384Asm() hash.Hash { return nil } 24 | 25 | // new512Asm returns an assembly implementation of SHA3-512 if available, 26 | // otherwise it returns nil. 27 | func new512Asm() hash.Hash { return nil } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/keccakf_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 amd64,!appengine,!gccgo 6 | 7 | package sha3 8 | 9 | // This function is implemented in keccakf_amd64.s. 10 | 11 | //go:noescape 12 | 13 | func keccakF1600(a *[25]uint64) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/register.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 sha3 8 | 9 | import ( 10 | "crypto" 11 | ) 12 | 13 | func init() { 14 | crypto.RegisterHash(crypto.SHA3_224, New224) 15 | crypto.RegisterHash(crypto.SHA3_256, New256) 16 | crypto.RegisterHash(crypto.SHA3_384, New384) 17 | crypto.RegisterHash(crypto.SHA3_512, New512) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/shake_generic.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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 appengine !s390x 6 | 7 | package sha3 8 | 9 | // newShake128Asm returns an assembly implementation of SHAKE-128 if available, 10 | // otherwise it returns nil. 11 | func newShake128Asm() ShakeHash { 12 | return nil 13 | } 14 | 15 | // newShake256Asm returns an assembly implementation of SHAKE-256 if available, 16 | // otherwise it returns nil. 17 | func newShake256Asm() ShakeHash { 18 | return nil 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/testdata/keccakKats.json.deflate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noony/prometheus-solr-exporter/8849336f38c81c9290f90dce464cbc8e6b0b3e5a/vendor/golang.org/x/crypto/sha3/testdata/keccakKats.json.deflate -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/xor.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 !amd64,!386,!ppc64le appengine 6 | 7 | package sha3 8 | 9 | var ( 10 | xorIn = xorInGeneric 11 | copyOut = copyOutGeneric 12 | xorInUnaligned = xorInGeneric 13 | copyOutUnaligned = copyOutGeneric 14 | ) 15 | 16 | const xorImplementationUnaligned = "generic" 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/xor_generic.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 | package sha3 6 | 7 | import "encoding/binary" 8 | 9 | // xorInGeneric xors the bytes in buf into the state; it 10 | // makes no non-portable assumptions about memory layout 11 | // or alignment. 12 | func xorInGeneric(d *state, buf []byte) { 13 | n := len(buf) / 8 14 | 15 | for i := 0; i < n; i++ { 16 | a := binary.LittleEndian.Uint64(buf) 17 | d.a[i] ^= a 18 | buf = buf[8:] 19 | } 20 | } 21 | 22 | // copyOutGeneric copies ulint64s to a byte buffer. 23 | func copyOutGeneric(d *state, b []byte) { 24 | for i := 0; len(b) >= 8; i++ { 25 | binary.LittleEndian.PutUint64(b, d.a[i]) 26 | b = b[8:] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/doc.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 | /* 6 | Package ssh implements an SSH client and server. 7 | 8 | SSH is a transport security protocol, an authentication protocol and a 9 | family of application protocols. The most typical application level 10 | protocol is a remote shell and this is specifically implemented. However, 11 | the multiplexed nature of SSH is exposed to users that wish to support 12 | others. 13 | 14 | References: 15 | [PROTOCOL.certkeys]: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.certkeys?rev=HEAD 16 | [SSH-PARAMETERS]: http://www.iana.org/assignments/ssh-parameters/ssh-parameters.xml#ssh-parameters-1 17 | 18 | This package does not fall under the stability promise of the Go language itself, 19 | so its API may be changed when pressing needs arise. 20 | */ 21 | package ssh // import "golang.org/x/crypto/ssh" 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/tcpip_test.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 | package ssh 6 | 7 | import ( 8 | "testing" 9 | ) 10 | 11 | func TestAutoPortListenBroken(t *testing.T) { 12 | broken := "SSH-2.0-OpenSSH_5.9hh11" 13 | works := "SSH-2.0-OpenSSH_6.1" 14 | if !isBrokenOpenSSHVersion(broken) { 15 | t.Errorf("version %q not marked as broken", broken) 16 | } 17 | if isBrokenOpenSSHVersion(works) { 18 | t.Errorf("version %q marked as broken", works) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_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 darwin dragonfly freebsd netbsd openbsd 6 | 7 | package terminal 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TIOCGETA 12 | const ioctlWriteTermios = unix.TIOCSETA 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_linux.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 | package terminal 6 | 7 | import "golang.org/x/sys/unix" 8 | 9 | const ioctlReadTermios = unix.TCGETS 10 | const ioctlWriteTermios = unix.TCSETS 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/test/banner_test.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 darwin dragonfly freebsd linux netbsd openbsd 6 | 7 | package test 8 | 9 | import ( 10 | "testing" 11 | ) 12 | 13 | func TestBannerCallbackAgainstOpenSSH(t *testing.T) { 14 | server := newServer(t) 15 | defer server.Shutdown() 16 | 17 | clientConf := clientConfig() 18 | 19 | var receivedBanner string 20 | clientConf.BannerCallback = func(message string) error { 21 | receivedBanner = message 22 | return nil 23 | } 24 | 25 | conn := server.Dial(clientConf) 26 | defer conn.Close() 27 | 28 | expected := "Server Banner" 29 | if receivedBanner != expected { 30 | t.Fatalf("got %v; want %v", receivedBanner, expected) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/test/doc.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 test contains integration tests for the 6 | // golang.org/x/crypto/ssh package. 7 | package test // import "golang.org/x/crypto/ssh/test" 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/testdata/doc.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 | // This package contains test data shared between the various subpackages of 6 | // the golang.org/x/crypto/ssh package. Under no circumstance should 7 | // this data be used for production code. 8 | package testdata // import "golang.org/x/crypto/ssh/testdata" 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/.gitattributes: -------------------------------------------------------------------------------- 1 | # Treat all files in this repo as binary, with no git magic updating 2 | # line endings. Windows users contributing to Go will need to use a 3 | # modern version of git and editors capable of LF line endings. 4 | # 5 | # We'll prevent accidental CRLF line endings from entering the repo 6 | # via the git-review gofmt checks. 7 | # 8 | # See golang.org/issue/9281 9 | 10 | * -text 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/.gitignore: -------------------------------------------------------------------------------- 1 | # Add no patterns to .hgignore except for files generated by the build. 2 | last-change 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Go 2 | 3 | Go is an open source project. 4 | 5 | It is the work of hundreds of contributors. We appreciate your help! 6 | 7 | ## Filing issues 8 | 9 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: 10 | 11 | 1. What version of Go are you using (`go version`)? 12 | 2. What operating system and processor architecture are you using? 13 | 3. What did you do? 14 | 4. What did you expect to see? 15 | 5. What did you see instead? 16 | 17 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. 18 | The gophers there will answer or ask you to file an issue if you've tripped over a bug. 19 | 20 | ## Contributing code 21 | 22 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) 23 | before sending patches. 24 | 25 | Unless otherwise noted, the Go source files are distributed under 26 | the BSD-style license found in the LICENSE file. 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/README.md: -------------------------------------------------------------------------------- 1 | # sys 2 | 3 | This repository holds supplemental Go packages for low-level interactions with 4 | the operating system. 5 | 6 | ## Download/Install 7 | 8 | The easiest way to install is to run `go get -u golang.org/x/sys`. You can 9 | also manually git clone the repository to `$GOPATH/src/golang.org/x/sys`. 10 | 11 | ## Report Issues / Send Patches 12 | 13 | This repository uses Gerrit for code changes. To learn how to submit changes to 14 | this repository, see https://golang.org/doc/contribute.html. 15 | 16 | The main issue tracker for the sys repository is located at 17 | https://github.com/golang/go/issues. Prefix your issue with "x/sys:" in the 18 | subject line, so it is easy to find. 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 cpu 6 | 7 | const cacheLineSize = 32 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 cpu 6 | 7 | const cacheLineSize = 64 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_x86.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 amd64 amd64p32 6 | // +build !gccgo 7 | 8 | package cpu 9 | 10 | // cpuid is implemented in cpu_x86.s for gc compiler 11 | // and in cpu_gccgo.c for gccgo. 12 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) 13 | 14 | // xgetbv with ecx = 0 is implemented in cpu_x86.s for gc compiler 15 | // and in cpu_gccgo.c for gccgo. 16 | func xgetbv() (eax, edx uint32) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gccgo.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 amd64 amd64p32 6 | // +build gccgo 7 | 8 | package cpu 9 | 10 | //extern gccgoGetCpuidCount 11 | func gccgoGetCpuidCount(eaxArg, ecxArg uint32, eax, ebx, ecx, edx *uint32) 12 | 13 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) { 14 | var a, b, c, d uint32 15 | gccgoGetCpuidCount(eaxArg, ecxArg, &a, &b, &c, &d) 16 | return a, b, c, d 17 | } 18 | 19 | //extern gccgoXgetbv 20 | func gccgoXgetbv(eax, edx *uint32) 21 | 22 | func xgetbv() (eax, edx uint32) { 23 | var a, d uint32 24 | gccgoXgetbv(&a, &d) 25 | return a, d 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_mips64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 mips64 mips64le 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 32 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_mipsx.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 mips mipsle 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 32 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 ppc64 ppc64le 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 128 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 cpu 6 | 7 | const cacheLineSize = 256 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 cpu_test 6 | 7 | import ( 8 | "runtime" 9 | "testing" 10 | 11 | "golang.org/x/sys/cpu" 12 | ) 13 | 14 | func TestAMD64minimalFeatures(t *testing.T) { 15 | if runtime.GOARCH == "amd64" { 16 | if !cpu.X86.HasSSE2 { 17 | t.Fatal("HasSSE2 expected true, got false") 18 | } 19 | } 20 | } 21 | 22 | func TestAVX2hasAVX(t *testing.T) { 23 | if runtime.GOARCH == "amd64" { 24 | if cpu.X86.HasAVX2 && !cpu.X86.HasAVX { 25 | t.Fatal("HasAVX expected true, got false") 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_x86.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 amd64 amd64p32 6 | // +build !gccgo 7 | 8 | #include "textflag.h" 9 | 10 | // func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) 11 | TEXT ·cpuid(SB), NOSPLIT, $0-24 12 | MOVL eaxArg+0(FP), AX 13 | MOVL ecxArg+4(FP), CX 14 | CPUID 15 | MOVL AX, eax+8(FP) 16 | MOVL BX, ebx+12(FP) 17 | MOVL CX, ecx+16(FP) 18 | MOVL DX, edx+20(FP) 19 | RET 20 | 21 | // func xgetbv() (eax, edx uint32) 22 | TEXT ·xgetbv(SB),NOSPLIT,$0-8 23 | MOVL $0, CX 24 | XGETBV 25 | MOVL AX, eax+0(FP) 26 | MOVL DX, edx+4(FP) 27 | RET 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/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 | #include "textflag.h" 6 | 7 | TEXT ·use(SB),NOSPLIT,$0 8 | RET 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_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 | #include "textflag.h" 6 | 7 | // 8 | // System call support for 386, Plan 9 9 | // 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-32 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-44 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 21 | JMP syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 24 | JMP syscall·RawSyscall6(SB) 25 | 26 | TEXT ·seek(SB),NOSPLIT,$0-36 27 | JMP syscall·seek(SB) 28 | 29 | TEXT ·exit(SB),NOSPLIT,$4-4 30 | JMP syscall·exit(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_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 | #include "textflag.h" 6 | 7 | // 8 | // System call support for amd64, Plan 9 9 | // 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-64 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 21 | JMP syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | JMP syscall·RawSyscall6(SB) 25 | 26 | TEXT ·seek(SB),NOSPLIT,$0-56 27 | JMP syscall·seek(SB) 28 | 29 | TEXT ·exit(SB),NOSPLIT,$8-8 30 | JMP syscall·exit(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_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 | #include "textflag.h" 6 | 7 | // System call support for plan9 on arm 8 | 9 | // Just jump to package syscall's implementation for all these functions. 10 | // The runtime may know about them. 11 | 12 | TEXT ·Syscall(SB),NOSPLIT,$0-32 13 | JMP syscall·Syscall(SB) 14 | 15 | TEXT ·Syscall6(SB),NOSPLIT,$0-44 16 | JMP syscall·Syscall6(SB) 17 | 18 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 19 | JMP syscall·RawSyscall(SB) 20 | 21 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 22 | JMP syscall·RawSyscall6(SB) 23 | 24 | TEXT ·seek(SB),NOSPLIT,$0-36 25 | JMP syscall·exit(SB) 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/env_plan9.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 | // Plan 9 environment variables. 6 | 7 | package plan9 8 | 9 | import ( 10 | "syscall" 11 | ) 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 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 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 | COMMAND="mksysnum_plan9.sh $@" 7 | 8 | cat <= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/syscall_test.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 plan9 6 | 7 | package plan9_test 8 | 9 | import ( 10 | "testing" 11 | 12 | "golang.org/x/sys/plan9" 13 | ) 14 | 15 | func testSetGetenv(t *testing.T, key, value string) { 16 | err := plan9.Setenv(key, value) 17 | if err != nil { 18 | t.Fatalf("Setenv failed to set %q: %v", value, err) 19 | } 20 | newvalue, found := plan9.Getenv(key) 21 | if !found { 22 | t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value) 23 | } 24 | if newvalue != value { 25 | t.Fatalf("Getenv(%v) = %q; want %q", key, newvalue, value) 26 | } 27 | } 28 | 29 | func TestEnv(t *testing.T) { 30 | testSetGetenv(t, "TESTENV", "AVALUE") 31 | // make sure TESTENV gets set to "", not deleted 32 | testSetGetenv(t, "TESTENV", "") 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build go1.9 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | type Signal = syscall.Signal 13 | type Errno = syscall.Errno 14 | type SysProcAttr = syscall.SysProcAttr 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /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_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_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/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/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-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_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_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_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_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_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_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/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/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/golang.org/x/sys/unix/asm_openbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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, 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 | 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_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-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | ) 27 | 28 | // Socketoption Level 29 | const ( 30 | SOL_BLUETOOTH = 0x112 31 | SOL_HCI = 0x0 32 | SOL_L2CAP = 0x6 33 | SOL_RFCOMM = 0x12 34 | SOL_SCO = 0x11 35 | ) 36 | -------------------------------------------------------------------------------- /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 aix 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/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 aix 6 | // +build ppc 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used by AIX. 10 | 11 | package unix 12 | 13 | // Major returns the major component of a Linux device number. 14 | func Major(dev uint64) uint32 { 15 | return uint32((dev >> 16) & 0xffff) 16 | } 17 | 18 | // Minor returns the minor component of a Linux device number. 19 | func Minor(dev uint64) uint32 { 20 | return uint32(dev & 0xffff) 21 | } 22 | 23 | // Mkdev returns a Linux device number generated from the given major and minor 24 | // components. 25 | func Mkdev(major, minor uint32) uint64 { 26 | return uint64(((major) << 16) | (minor)) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 aix 6 | // +build ppc64 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used AIX. 10 | 11 | package unix 12 | 13 | // Major returns the major component of a Linux device number. 14 | func Major(dev uint64) uint32 { 15 | return uint32((dev & 0x3fffffff00000000) >> 32) 16 | } 17 | 18 | // Minor returns the minor component of a Linux device number. 19 | func Minor(dev uint64) uint32 { 20 | return uint32((dev & 0x00000000ffffffff) >> 0) 21 | } 22 | 23 | // Mkdev returns a Linux device number generated from the given major and minor 24 | // components. 25 | func Mkdev(major, minor uint32) uint64 { 26 | var DEVNO64 uint64 27 | DEVNO64 = 0x8000000000000000 28 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dirent.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 aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // ParseDirent parses up to max directory entries in buf, 12 | // appending the names to names. It returns the number of 13 | // bytes consumed from buf, the number of entries added 14 | // to names, and the new names slice. 15 | func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { 16 | return syscall.ParseDirent(buf, max, names) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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 ppc64 s390x mips mips64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /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 aix 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 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix_test 8 | 9 | import ( 10 | "log" 11 | "os" 12 | 13 | "golang.org/x/sys/unix" 14 | ) 15 | 16 | func ExampleExec() { 17 | err := unix.Exec("/bin/ls", []string{"ls", "-al"}, os.Environ()) 18 | log.Fatal(err) 19 | } 20 | 21 | func ExampleFlock() { 22 | f, _ := os.Create("example.lock") 23 | if err := unix.Flock(int(f.Fd()), unix.LOCK_EX); err != nil { 24 | log.Fatal(err) 25 | } 26 | // Do work here that requires the lock. When finished, release the lock: 27 | if err := unix.Flock(int(f.Fd()), unix.LOCK_UN); err != nil { 28 | log.Fatal(err) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/export_test.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 aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | var Itoa = itoa 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm linux,mips linux,mipsle 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/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/golang.org/x/sys/unix/ioctl.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | import "runtime" 10 | 11 | // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument. 12 | // 13 | // To change fd's window size, the req argument should be TIOCSWINSZ. 14 | func IoctlSetWinsize(fd int, req uint, value *Winsize) error { 15 | // TODO: if we get the chance, remove the req parameter and 16 | // hardcode TIOCSWINSZ. 17 | err := ioctlSetWinsize(fd, req, value) 18 | runtime.KeepAlive(value) 19 | return err 20 | } 21 | 22 | // IoctlSetTermios performs an ioctl on fd with a *Termios. 23 | // 24 | // The req value will usually be TCSETA or TIOCSETA. 25 | func IoctlSetTermios(fd int, req uint, value *Termios) error { 26 | // TODO: if we get the chance, remove the req parameter. 27 | err := ioctlSetTermios(fd, req, value) 28 | runtime.KeepAlive(value) 29 | return err 30 | } 31 | -------------------------------------------------------------------------------- /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 <= 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/golang.org/x/sys/unix/syscall_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 aix 6 | // +build ppc64 7 | 8 | package unix 9 | 10 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) 11 | //sysnb Setrlimit(resource int, rlim *Rlimit) (err error) 12 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek 13 | 14 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64 15 | 16 | func setTimespec(sec, nsec int64) Timespec { 17 | return Timespec{Sec: sec, Nsec: nsec} 18 | } 19 | 20 | func setTimeval(sec, usec int64) Timeval { 21 | return Timeval{Sec: int64(sec), Usec: int32(usec)} 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (cmsg *Cmsghdr) SetLen(length int) { 33 | cmsg.Len = uint32(length) 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_darwin_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 unix_test 6 | 7 | // stringsFromByteSlice converts a sequence of attributes to a []string. 8 | // On Darwin, each entry is a NULL-terminated string. 9 | func stringsFromByteSlice(buf []byte) []string { 10 | var result []string 11 | off := 0 12 | for i, b := range buf { 13 | if b == 0 { 14 | result = append(result, string(buf[off:i])) 15 | off = i + 1 16 | } 17 | } 18 | return result 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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,linux 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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,!gccgo 6 | 7 | package unix 8 | 9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 11 | 12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 13 | // fail. 14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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,!gccgo,386 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | 15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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,gccgo,arm 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | -------------------------------------------------------------------------------- /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 setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /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 setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /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 setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 unix_test 6 | 7 | import ( 8 | "testing" 9 | 10 | "golang.org/x/sys/unix" 11 | ) 12 | 13 | // stringsFromByteSlice converts a sequence of attributes to a []string. 14 | // On NetBSD, each entry consists of a single byte containing the length 15 | // of the attribute name, followed by the attribute name. 16 | // The name is _not_ NULL-terminated. 17 | func stringsFromByteSlice(buf []byte) []string { 18 | var result []string 19 | i := 0 20 | for i < len(buf) { 21 | next := i + 1 + int(buf[i]) 22 | result = append(result, string(buf[i+1:next])) 23 | i = next 24 | } 25 | return result 26 | } 27 | 28 | func TestSysctlClockinfo(t *testing.T) { 29 | ci, err := unix.SysctlClockinfo("kern.clockrate") 30 | if err != nil { 31 | t.Fatal(err) 32 | } 33 | t.Logf("tick = %v, tickadj = %v, hz = %v, profhz = %v, stathz = %v", 34 | ci.Tick, ci.Tickadj, ci.Hz, ci.Profhz, ci.Stathz) 35 | } 36 | -------------------------------------------------------------------------------- /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 setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/386 the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | -------------------------------------------------------------------------------- /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 setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/arm the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_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,solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (cmsg *Cmsghdr) SetLen(length int) { 22 | cmsg.Len = uint32(length) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 windows 6 | // +build go1.9 7 | 8 | package windows 9 | 10 | import "syscall" 11 | 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_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 | // 6 | // System calls for 386, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-16 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-12 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_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 | // 6 | // System calls for amd64, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-32 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-24 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 | #include "textflag.h" 6 | 7 | TEXT ·getprocaddress(SB),NOSPLIT,$0 8 | B syscall·getprocaddress(SB) 9 | 10 | TEXT ·loadlibrary(SB),NOSPLIT,$0 11 | B syscall·loadlibrary(SB) 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/env_windows.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 | // Windows environment variables. 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | func Getenv(key string) (value string, found bool) { 12 | return syscall.Getenv(key) 13 | } 14 | 15 | func Setenv(key, value string) error { 16 | return syscall.Setenv(key, value) 17 | } 18 | 19 | func Clearenv() { 20 | syscall.Clearenv() 21 | } 22 | 23 | func Environ() []string { 24 | return syscall.Environ() 25 | } 26 | 27 | func Unsetenv(key string) error { 28 | return syscall.Unsetenv(key) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.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 windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/memory_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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 windows 6 | 7 | const ( 8 | MEM_COMMIT = 0x00001000 9 | MEM_RESERVE = 0x00002000 10 | MEM_DECOMMIT = 0x00004000 11 | MEM_RELEASE = 0x00008000 12 | MEM_RESET = 0x00080000 13 | MEM_TOP_DOWN = 0x00100000 14 | MEM_WRITE_WATCH = 0x00200000 15 | MEM_PHYSICAL = 0x00400000 16 | MEM_RESET_UNDO = 0x01000000 17 | MEM_LARGE_PAGES = 0x20000000 18 | 19 | PAGE_NOACCESS = 0x01 20 | PAGE_READONLY = 0x02 21 | PAGE_READWRITE = 0x04 22 | PAGE_WRITECOPY = 0x08 23 | PAGE_EXECUTE_READ = 0x20 24 | PAGE_EXECUTE_READWRITE = 0x40 25 | PAGE_EXECUTE_WRITECOPY = 0x80 26 | ) 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.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 | package windows 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/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 windows,race 6 | 7 | package windows 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/golang.org/x/sys/windows/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 windows,!race 6 | 7 | package windows 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/golang.org/x/sys/windows/registry/export_test.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 windows 6 | 7 | package registry 8 | 9 | func (k Key) SetValue(name string, valtype uint32, data []byte) error { 10 | return k.setValue(name, valtype, data) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/registry/mksyscall.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 | package registry 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go syscall.go 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/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 windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/svc/example/beep.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 windows 6 | 7 | package main 8 | 9 | import ( 10 | "syscall" 11 | ) 12 | 13 | // BUG(brainman): MessageBeep Windows api is broken on Windows 7, 14 | // so this example does not beep when runs as service on Windows 7. 15 | 16 | var ( 17 | beepFunc = syscall.MustLoadDLL("user32.dll").MustFindProc("MessageBeep") 18 | ) 19 | 20 | func beep() { 21 | beepFunc.Call(0xffffffff) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/svc/go12.c: -------------------------------------------------------------------------------- 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 windows 6 | // +build !go1.3 7 | 8 | // copied from pkg/runtime 9 | typedef unsigned int uint32; 10 | typedef unsigned long long int uint64; 11 | #ifdef _64BIT 12 | typedef uint64 uintptr; 13 | #else 14 | typedef uint32 uintptr; 15 | #endif 16 | 17 | // from sys_386.s or sys_amd64.s 18 | void ·servicemain(void); 19 | 20 | void 21 | ·getServiceMain(uintptr *r) 22 | { 23 | *r = (uintptr)·servicemain; 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/svc/go12.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 windows 6 | // +build !go1.3 7 | 8 | package svc 9 | 10 | // from go12.c 11 | func getServiceMain(r *uintptr) 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/svc/go13.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 windows 6 | // +build go1.3 7 | 8 | package svc 9 | 10 | import "unsafe" 11 | 12 | const ptrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ideal const 13 | 14 | // Should be a built-in for unsafe.Pointer? 15 | func add(p unsafe.Pointer, x uintptr) unsafe.Pointer { 16 | return unsafe.Pointer(uintptr(p) + x) 17 | } 18 | 19 | // funcPC returns the entry PC of the function f. 20 | // It assumes that f is a func value. Otherwise the behavior is undefined. 21 | func funcPC(f interface{}) uintptr { 22 | return **(**uintptr)(add(unsafe.Pointer(&f), ptrSize)) 23 | } 24 | 25 | // from sys_386.s and sys_amd64.s 26 | func servicectlhandler(ctl uint32) uintptr 27 | func servicemain(argc uint32, argv **uint16) 28 | 29 | func getServiceMain(r *uintptr) { 30 | *r = funcPC(servicemain) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/svc/sys_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 windows 6 | 7 | #include "textflag.h" 8 | 9 | // func servicemain(argc uint32, argv **uint16) 10 | TEXT ·servicemain(SB),NOSPLIT|NOFRAME,$0 11 | MOVM.DB.W [R4, R14], (R13) // push {r4, lr} 12 | MOVW R13, R4 13 | BIC $0x7, R13 // alignment for ABI 14 | 15 | MOVW R0, ·sArgc(SB) 16 | MOVW R1, ·sArgv(SB) 17 | 18 | MOVW ·sName(SB), R0 19 | MOVW ·ctlHandlerExProc(SB), R1 20 | MOVW $0, R2 21 | MOVW ·cRegisterServiceCtrlHandlerExW(SB), R3 22 | BL (R3) 23 | CMP $0, R0 24 | BEQ exit 25 | MOVW R0, ·ssHandle(SB) 26 | 27 | MOVW ·goWaitsH(SB), R0 28 | MOVW ·cSetEvent(SB), R1 29 | BL (R1) 30 | 31 | MOVW ·cWaitsH(SB), R0 32 | MOVW $-1, R1 33 | MOVW ·cWaitForSingleObject(SB), R2 34 | BL (R2) 35 | 36 | exit: 37 | MOVW R4, R13 // free extra stack space 38 | MOVM.IA.W (R13), [R4, R15] // pop {r4, pc} 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_386.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 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_amd64.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 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | -------------------------------------------------------------------------------- /vendor/gopkg.in/alecthomas/kingpin.v2/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | install: go get -t -v ./... 4 | go: 1.2 5 | -------------------------------------------------------------------------------- /vendor/gopkg.in/alecthomas/kingpin.v2/_examples/chat1/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | 6 | "gopkg.in/alecthomas/kingpin.v2" 7 | ) 8 | 9 | var ( 10 | debug = kingpin.Flag("debug", "Enable debug mode.").Bool() 11 | timeout = kingpin.Flag("timeout", "Timeout waiting for ping.").Default("5s").OverrideDefaultFromEnvar("PING_TIMEOUT").Short('t').Duration() 12 | ip = kingpin.Arg("ip", "IP address to ping.").Required().IP() 13 | count = kingpin.Arg("count", "Number of packets to send").Int() 14 | ) 15 | 16 | func main() { 17 | kingpin.Version("0.0.1") 18 | kingpin.Parse() 19 | fmt.Printf("Would ping: %s with timeout %s and count %d", *ip, *timeout, *count) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/gopkg.in/alecthomas/kingpin.v2/_examples/modular/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | 7 | "gopkg.in/alecthomas/kingpin.v2" 8 | ) 9 | 10 | // Context for "ls" command 11 | type LsCommand struct { 12 | All bool 13 | } 14 | 15 | func (l *LsCommand) run(c *kingpin.ParseContext) error { 16 | fmt.Printf("all=%v\n", l.All) 17 | return nil 18 | } 19 | 20 | func configureLsCommand(app *kingpin.Application) { 21 | c := &LsCommand{} 22 | ls := app.Command("ls", "List files.").Action(c.run) 23 | ls.Flag("all", "List all files.").Short('a').BoolVar(&c.All) 24 | } 25 | 26 | func main() { 27 | app := kingpin.New("modular", "My modular application.") 28 | configureLsCommand(app) 29 | kingpin.MustParse(app.Parse(os.Args[1:])) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/gopkg.in/alecthomas/kingpin.v2/_examples/ping/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | 6 | "gopkg.in/alecthomas/kingpin.v2" 7 | ) 8 | 9 | var ( 10 | debug = kingpin.Flag("debug", "Enable debug mode.").Bool() 11 | timeout = kingpin.Flag("timeout", "Timeout waiting for ping.").OverrideDefaultFromEnvar("PING_TIMEOUT").Required().Short('t').Duration() 12 | ip = kingpin.Arg("ip", "IP address to ping.").Required().IP() 13 | count = kingpin.Arg("count", "Number of packets to send").Int() 14 | ) 15 | 16 | func main() { 17 | kingpin.Version("0.0.1") 18 | kingpin.Parse() 19 | fmt.Printf("Would ping: %s with timeout %s and count %d", *ip, *timeout, *count) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/gopkg.in/alecthomas/kingpin.v2/completions.go: -------------------------------------------------------------------------------- 1 | package kingpin 2 | 3 | // HintAction is a function type who is expected to return a slice of possible 4 | // command line arguments. 5 | type HintAction func() []string 6 | type completionsMixin struct { 7 | hintActions []HintAction 8 | builtinHintActions []HintAction 9 | } 10 | 11 | func (a *completionsMixin) addHintAction(action HintAction) { 12 | a.hintActions = append(a.hintActions, action) 13 | } 14 | 15 | // Allow adding of HintActions which are added internally, ie, EnumVar 16 | func (a *completionsMixin) addHintActionBuiltin(action HintAction) { 17 | a.builtinHintActions = append(a.builtinHintActions, action) 18 | } 19 | 20 | func (a *completionsMixin) resolveCompletions() []string { 21 | var hints []string 22 | 23 | options := a.builtinHintActions 24 | if len(a.hintActions) > 0 { 25 | // User specified their own hintActions. Use those instead. 26 | options = a.hintActions 27 | } 28 | 29 | for _, hintAction := range options { 30 | hints = append(hints, hintAction()...) 31 | } 32 | return hints 33 | } 34 | -------------------------------------------------------------------------------- /vendor/gopkg.in/alecthomas/kingpin.v2/guesswidth.go: -------------------------------------------------------------------------------- 1 | // +build appengine !linux,!freebsd,!darwin,!dragonfly,!netbsd,!openbsd 2 | 3 | package kingpin 4 | 5 | import "io" 6 | 7 | func guessWidth(w io.Writer) int { 8 | return 80 9 | } 10 | -------------------------------------------------------------------------------- /vendor/gopkg.in/alecthomas/kingpin.v2/guesswidth_unix.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,linux freebsd darwin dragonfly netbsd openbsd 2 | 3 | package kingpin 4 | 5 | import ( 6 | "io" 7 | "os" 8 | "strconv" 9 | "syscall" 10 | "unsafe" 11 | ) 12 | 13 | func guessWidth(w io.Writer) int { 14 | // check if COLUMNS env is set to comply with 15 | // http://pubs.opengroup.org/onlinepubs/009604499/basedefs/xbd_chap08.html 16 | colsStr := os.Getenv("COLUMNS") 17 | if colsStr != "" { 18 | if cols, err := strconv.Atoi(colsStr); err == nil { 19 | return cols 20 | } 21 | } 22 | 23 | if t, ok := w.(*os.File); ok { 24 | fd := t.Fd() 25 | var dimensions [4]uint16 26 | 27 | if _, _, err := syscall.Syscall6( 28 | syscall.SYS_IOCTL, 29 | uintptr(fd), 30 | uintptr(syscall.TIOCGWINSZ), 31 | uintptr(unsafe.Pointer(&dimensions)), 32 | 0, 0, 0, 33 | ); err == 0 { 34 | return int(dimensions[1]) 35 | } 36 | } 37 | return 80 38 | } 39 | --------------------------------------------------------------------------------