├── .editorconfig ├── .gitignore ├── Gopkg.lock ├── Gopkg.toml ├── LICENSE ├── README.md ├── api ├── client │ └── client.go └── handlers │ ├── delete_entry.go │ ├── find_keys.go │ ├── get_entry.go │ └── put_entry.go ├── cmd ├── kvstorecli │ ├── cmd │ │ ├── delete.go │ │ ├── get.go │ │ ├── keys.go │ │ ├── put.go │ │ └── root.go │ └── main.go └── kvstored │ └── main.go ├── doc.go ├── gen ├── client │ ├── kv │ │ ├── delete_entry_parameters.go │ │ ├── delete_entry_responses.go │ │ ├── find_keys_parameters.go │ │ ├── find_keys_responses.go │ │ ├── get_entry_parameters.go │ │ ├── get_entry_responses.go │ │ ├── kv_client.go │ │ ├── put_entry_parameters.go │ │ └── put_entry_responses.go │ └── kvstore_client.go ├── models │ └── error.go └── restapi │ ├── configure_kvstore.go │ ├── doc.go │ ├── embedded_spec.go │ ├── operations │ ├── kv │ │ ├── delete_entry.go │ │ ├── delete_entry_parameters.go │ │ ├── delete_entry_responses.go │ │ ├── delete_entry_urlbuilder.go │ │ ├── find_keys.go │ │ ├── find_keys_parameters.go │ │ ├── find_keys_responses.go │ │ ├── find_keys_urlbuilder.go │ │ ├── get_entry.go │ │ ├── get_entry_parameters.go │ │ ├── get_entry_responses.go │ │ ├── get_entry_urlbuilder.go │ │ ├── put_entry.go │ │ ├── put_entry_parameters.go │ │ ├── put_entry_responses.go │ │ └── put_entry_urlbuilder.go │ └── kvstore_api.go │ └── server.go ├── persist ├── goleveldb.go ├── iface.go ├── types.go ├── types_gen.go └── types_gen_test.go ├── runtime.go ├── swagger └── swagger.yml └── vendor ├── github.com ├── OneOfOne │ └── xxhash │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── go.mod │ │ ├── xxhash.go │ │ ├── xxhash_go17.go │ │ ├── xxhash_safe.go │ │ └── xxhash_unsafe.go ├── PuerkitoBio │ ├── purell │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ └── purell.go │ └── urlesc │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ └── urlesc.go ├── armon │ └── consul-api │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── acl.go │ │ ├── agent.go │ │ ├── api.go │ │ ├── catalog.go │ │ ├── event.go │ │ ├── health.go │ │ ├── kv.go │ │ ├── session.go │ │ └── status.go ├── asaskevich │ └── govalidator │ │ ├── .travis.yml │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── arrays.go │ │ ├── converter.go │ │ ├── error.go │ │ ├── numerics.go │ │ ├── patterns.go │ │ ├── types.go │ │ ├── utils.go │ │ ├── validator.go │ │ └── wercker.yml ├── casualjim │ ├── go-app │ │ ├── .dockerignore │ │ ├── .drone.sec │ │ ├── .drone.yml │ │ ├── .gitignore │ │ ├── Dockerfile.ci │ │ ├── LICENSE │ │ ├── README.md │ │ ├── application.go │ │ ├── doc.go │ │ ├── docker-compose.yml │ │ ├── logging │ │ │ ├── doc.go │ │ │ ├── formatters.go │ │ │ ├── hooks.go │ │ │ ├── log.go │ │ │ ├── registry.go │ │ │ └── writers.go │ │ ├── module.go │ │ └── tracing │ │ │ ├── doc.go │ │ │ └── tracer.go │ └── middlewares │ │ ├── LICENSE │ │ ├── README.md │ │ ├── audit.go │ │ ├── default.go │ │ ├── gzip.go │ │ ├── healthchecks.go │ │ ├── profiling.go │ │ └── recovery.go ├── coreos │ ├── etcd │ │ ├── Documentation │ │ │ └── README.md │ │ ├── LICENSE │ │ ├── NOTICE │ │ ├── client │ │ │ ├── README.md │ │ │ ├── auth_role.go │ │ │ ├── auth_user.go │ │ │ ├── cancelreq.go │ │ │ ├── client.go │ │ │ ├── cluster_error.go │ │ │ ├── curl.go │ │ │ ├── discover.go │ │ │ ├── doc.go │ │ │ ├── keys.generated.go │ │ │ ├── keys.go │ │ │ ├── members.go │ │ │ └── util.go │ │ ├── cmd │ │ │ ├── etcd │ │ │ ├── etcdctl │ │ │ ├── functional │ │ │ └── tools │ │ ├── pkg │ │ │ ├── pathutil │ │ │ │ └── path.go │ │ │ ├── srv │ │ │ │ └── srv.go │ │ │ └── types │ │ │ │ ├── doc.go │ │ │ │ ├── id.go │ │ │ │ ├── set.go │ │ │ │ ├── slice.go │ │ │ │ ├── urls.go │ │ │ │ └── urlsmap.go │ │ └── version │ │ │ └── version.go │ └── go-semver │ │ ├── LICENSE │ │ └── semver │ │ ├── semver.go │ │ └── sort.go ├── docker │ └── go-units │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── MAINTAINERS │ │ ├── README.md │ │ ├── circle.yml │ │ ├── duration.go │ │ ├── size.go │ │ └── ulimit.go ├── fsnotify │ └── fsnotify │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── fen.go │ │ ├── fsnotify.go │ │ ├── inotify.go │ │ ├── inotify_poller.go │ │ ├── kqueue.go │ │ ├── open_mode_bsd.go │ │ ├── open_mode_darwin.go │ │ └── windows.go ├── go-openapi │ ├── analysis │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── .travis.yml │ │ ├── CODE_OF_CONDUCT.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── analyzer.go │ │ ├── debug.go │ │ ├── doc.go │ │ ├── fixer.go │ │ ├── flatten.go │ │ ├── mixin.go │ │ └── schema.go │ ├── errors │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CODE_OF_CONDUCT.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── api.go │ │ ├── auth.go │ │ ├── doc.go │ │ ├── headers.go │ │ ├── middleware.go │ │ ├── parsing.go │ │ └── schema.go │ ├── jsonpointer │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CODE_OF_CONDUCT.md │ │ ├── LICENSE │ │ ├── README.md │ │ └── pointer.go │ ├── jsonreference │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CODE_OF_CONDUCT.md │ │ ├── LICENSE │ │ ├── README.md │ │ └── reference.go │ ├── loads │ │ ├── .drone.sec │ │ ├── .drone.yml │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CODE_OF_CONDUCT.md │ │ ├── LICENSE │ │ ├── README.md │ │ └── spec.go │ ├── runtime │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CODE_OF_CONDUCT.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bytestream.go │ │ ├── client │ │ │ ├── auth_info.go │ │ │ ├── keepalive.go │ │ │ ├── request.go │ │ │ ├── response.go │ │ │ └── runtime.go │ │ ├── client_auth_info.go │ │ ├── client_operation.go │ │ ├── client_request.go │ │ ├── client_response.go │ │ ├── constants.go │ │ ├── discard.go │ │ ├── file.go │ │ ├── flagext │ │ │ └── byte_size.go │ │ ├── headers.go │ │ ├── interfaces.go │ │ ├── json.go │ │ ├── logger │ │ │ ├── logger.go │ │ │ └── standard.go │ │ ├── middleware │ │ │ ├── context.go │ │ │ ├── denco │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── router.go │ │ │ │ ├── server.go │ │ │ │ └── util.go │ │ │ ├── doc.go │ │ │ ├── go18.go │ │ │ ├── header │ │ │ │ └── header.go │ │ │ ├── negotiate.go │ │ │ ├── not_implemented.go │ │ │ ├── operation.go │ │ │ ├── parameter.go │ │ │ ├── pre_go18.go │ │ │ ├── redoc.go │ │ │ ├── request.go │ │ │ ├── router.go │ │ │ ├── security.go │ │ │ ├── spec.go │ │ │ ├── untyped │ │ │ │ └── api.go │ │ │ └── validation.go │ │ ├── request.go │ │ ├── security │ │ │ ├── authenticator.go │ │ │ └── authorizer.go │ │ ├── statuses.go │ │ ├── text.go │ │ ├── values.go │ │ └── xml.go │ ├── spec │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── .travis.yml │ │ ├── CODE_OF_CONDUCT.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bindata.go │ │ ├── contact_info.go │ │ ├── debug.go │ │ ├── expander.go │ │ ├── external_docs.go │ │ ├── header.go │ │ ├── info.go │ │ ├── items.go │ │ ├── license.go │ │ ├── operation.go │ │ ├── parameter.go │ │ ├── path_item.go │ │ ├── paths.go │ │ ├── ref.go │ │ ├── response.go │ │ ├── responses.go │ │ ├── schema.go │ │ ├── security_scheme.go │ │ ├── spec.go │ │ ├── swagger.go │ │ ├── tag.go │ │ └── xml_object.go │ ├── strfmt │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── .travis.yml │ │ ├── CODE_OF_CONDUCT.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bson.go │ │ ├── date.go │ │ ├── default.go │ │ ├── doc.go │ │ ├── duration.go │ │ ├── format.go │ │ └── time.go │ ├── swag │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── .travis.yml │ │ ├── CODE_OF_CONDUCT.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── convert.go │ │ ├── convert_types.go │ │ ├── json.go │ │ ├── loading.go │ │ ├── net.go │ │ ├── path.go │ │ ├── post_go18.go │ │ ├── post_go19.go │ │ ├── pre_go18.go │ │ ├── pre_go19.go │ │ ├── util.go │ │ └── yaml.go │ └── validate │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── .travis.yml │ │ ├── CODE_OF_CONDUCT.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── debug.go │ │ ├── default_validator.go │ │ ├── doc.go │ │ ├── example_validator.go │ │ ├── formats.go │ │ ├── helpers.go │ │ ├── object_validator.go │ │ ├── options.go │ │ ├── result.go │ │ ├── rexp.go │ │ ├── schema.go │ │ ├── schema_messages.go │ │ ├── schema_props.go │ │ ├── slice_validator.go │ │ ├── spec.go │ │ ├── spec_messages.go │ │ ├── type.go │ │ ├── update-fixtures.sh │ │ ├── validator.go │ │ └── values.go ├── golang │ └── snappy │ │ ├── .gitignore │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── README │ │ ├── decode.go │ │ ├── decode_amd64.go │ │ ├── decode_amd64.s │ │ ├── decode_other.go │ │ ├── encode.go │ │ ├── encode_amd64.go │ │ ├── encode_amd64.s │ │ ├── encode_other.go │ │ └── snappy.go ├── hashicorp │ └── hcl │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── decoder.go │ │ ├── hcl.go │ │ ├── hcl │ │ ├── ast │ │ │ ├── ast.go │ │ │ └── walk.go │ │ ├── parser │ │ │ ├── error.go │ │ │ └── parser.go │ │ ├── printer │ │ │ ├── nodes.go │ │ │ └── printer.go │ │ ├── scanner │ │ │ └── scanner.go │ │ ├── strconv │ │ │ └── quote.go │ │ └── token │ │ │ ├── position.go │ │ │ └── token.go │ │ ├── json │ │ ├── parser │ │ │ ├── flatten.go │ │ │ └── parser.go │ │ ├── scanner │ │ │ └── scanner.go │ │ └── token │ │ │ ├── position.go │ │ │ └── token.go │ │ ├── lex.go │ │ └── parse.go ├── inconshreveable │ └── mousetrap │ │ ├── LICENSE │ │ ├── README.md │ │ ├── trap_others.go │ │ ├── trap_windows.go │ │ └── trap_windows_1.4.go ├── jessevdk │ └── go-flags │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── arg.go │ │ ├── check_crosscompile.sh │ │ ├── closest.go │ │ ├── command.go │ │ ├── completion.go │ │ ├── convert.go │ │ ├── error.go │ │ ├── flags.go │ │ ├── group.go │ │ ├── help.go │ │ ├── ini.go │ │ ├── man.go │ │ ├── multitag.go │ │ ├── option.go │ │ ├── optstyle_other.go │ │ ├── optstyle_windows.go │ │ ├── parser.go │ │ ├── termsize.go │ │ ├── termsize_nosysioctl.go │ │ ├── tiocgwinsz_bsdish.go │ │ ├── tiocgwinsz_linux.go │ │ └── tiocgwinsz_other.go ├── justinas │ └── alice │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ └── chain.go ├── kardianos │ └── osext │ │ ├── LICENSE │ │ ├── README.md │ │ ├── osext.go │ │ ├── osext_go18.go │ │ ├── osext_plan9.go │ │ ├── osext_procfs.go │ │ ├── osext_sysctl.go │ │ └── osext_windows.go ├── magiconair │ └── properties │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── decode.go │ │ ├── doc.go │ │ ├── integrate.go │ │ ├── lex.go │ │ ├── load.go │ │ ├── parser.go │ │ ├── properties.go │ │ └── rangecheck.go ├── mailru │ └── easyjson │ │ ├── LICENSE │ │ ├── buffer │ │ └── pool.go │ │ ├── jlexer │ │ ├── bytestostr.go │ │ ├── bytestostr_nounsafe.go │ │ ├── error.go │ │ └── lexer.go │ │ └── jwriter │ │ └── writer.go ├── mitchellh │ └── mapstructure │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── decode_hooks.go │ │ ├── error.go │ │ └── mapstructure.go ├── pelletier │ └── go-toml │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── benchmark.json │ │ ├── benchmark.sh │ │ ├── benchmark.toml │ │ ├── benchmark.yml │ │ ├── doc.go │ │ ├── example-crlf.toml │ │ ├── example.toml │ │ ├── fuzz.go │ │ ├── fuzz.sh │ │ ├── keysparsing.go │ │ ├── lexer.go │ │ ├── marshal.go │ │ ├── marshal_test.toml │ │ ├── parser.go │ │ ├── position.go │ │ ├── test.sh │ │ ├── token.go │ │ ├── toml.go │ │ ├── tomltree_create.go │ │ └── tomltree_write.go ├── philhofer │ └── fwd │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── reader.go │ │ ├── writer.go │ │ ├── writer_appengine.go │ │ └── writer_unsafe.go ├── rcrowley │ └── go-metrics │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── counter.go │ │ ├── debug.go │ │ ├── ewma.go │ │ ├── gauge.go │ │ ├── gauge_float64.go │ │ ├── graphite.go │ │ ├── healthcheck.go │ │ ├── histogram.go │ │ ├── json.go │ │ ├── log.go │ │ ├── memory.md │ │ ├── meter.go │ │ ├── metrics.go │ │ ├── opentsdb.go │ │ ├── registry.go │ │ ├── runtime.go │ │ ├── runtime_cgo.go │ │ ├── runtime_gccpufraction.go │ │ ├── runtime_no_cgo.go │ │ ├── runtime_no_gccpufraction.go │ │ ├── sample.go │ │ ├── syslog.go │ │ ├── timer.go │ │ ├── validate.sh │ │ └── writer.go ├── sirupsen │ └── logrus │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── alt_exit.go │ │ ├── appveyor.yml │ │ ├── doc.go │ │ ├── entry.go │ │ ├── exported.go │ │ ├── formatter.go │ │ ├── hooks.go │ │ ├── json_formatter.go │ │ ├── logger.go │ │ ├── logrus.go │ │ ├── terminal_bsd.go │ │ ├── terminal_check_appengine.go │ │ ├── terminal_check_notappengine.go │ │ ├── terminal_linux.go │ │ ├── text_formatter.go │ │ └── writer.go ├── spf13 │ ├── afero │ │ ├── .travis.yml │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── afero.go │ │ ├── appveyor.yml │ │ ├── basepath.go │ │ ├── cacheOnReadFs.go │ │ ├── const_bsds.go │ │ ├── const_win_unix.go │ │ ├── copyOnWriteFs.go │ │ ├── httpFs.go │ │ ├── ioutil.go │ │ ├── lstater.go │ │ ├── match.go │ │ ├── mem │ │ │ ├── dir.go │ │ │ ├── dirmap.go │ │ │ └── file.go │ │ ├── memmap.go │ │ ├── os.go │ │ ├── path.go │ │ ├── readonlyfs.go │ │ ├── regexpfs.go │ │ ├── unionFile.go │ │ └── util.go │ ├── cast │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── cast.go │ │ └── caste.go │ ├── cobra │ │ ├── .gitignore │ │ ├── .mailmap │ │ ├── .travis.yml │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── args.go │ │ ├── bash_completions.go │ │ ├── bash_completions.md │ │ ├── cobra.go │ │ ├── cobra │ │ │ └── cmd │ │ │ │ └── testdata │ │ │ │ └── LICENSE.golden │ │ ├── command.go │ │ ├── command_notwin.go │ │ ├── command_win.go │ │ └── zsh_completions.go │ ├── jwalterweatherman │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── default_notepad.go │ │ ├── log_counter.go │ │ └── notepad.go │ ├── pflag │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bool.go │ │ ├── bool_slice.go │ │ ├── bytes.go │ │ ├── count.go │ │ ├── duration.go │ │ ├── duration_slice.go │ │ ├── flag.go │ │ ├── float32.go │ │ ├── float64.go │ │ ├── golangflag.go │ │ ├── int.go │ │ ├── int16.go │ │ ├── int32.go │ │ ├── int64.go │ │ ├── int8.go │ │ ├── int_slice.go │ │ ├── ip.go │ │ ├── ip_slice.go │ │ ├── ipmask.go │ │ ├── ipnet.go │ │ ├── string.go │ │ ├── string_array.go │ │ ├── string_slice.go │ │ ├── uint.go │ │ ├── uint16.go │ │ ├── uint32.go │ │ ├── uint64.go │ │ ├── uint8.go │ │ └── uint_slice.go │ └── viper │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── flags.go │ │ ├── remote │ │ └── remote.go │ │ ├── util.go │ │ └── viper.go ├── syndtr │ └── goleveldb │ │ ├── LICENSE │ │ └── leveldb │ │ ├── batch.go │ │ ├── cache │ │ ├── cache.go │ │ └── lru.go │ │ ├── comparer.go │ │ ├── comparer │ │ ├── bytes_comparer.go │ │ └── comparer.go │ │ ├── db.go │ │ ├── db_compaction.go │ │ ├── db_iter.go │ │ ├── db_snapshot.go │ │ ├── db_state.go │ │ ├── db_transaction.go │ │ ├── db_util.go │ │ ├── db_write.go │ │ ├── doc.go │ │ ├── errors.go │ │ ├── errors │ │ └── errors.go │ │ ├── filter.go │ │ ├── filter │ │ ├── bloom.go │ │ └── filter.go │ │ ├── iterator │ │ ├── array_iter.go │ │ ├── indexed_iter.go │ │ ├── iter.go │ │ └── merged_iter.go │ │ ├── journal │ │ └── journal.go │ │ ├── key.go │ │ ├── memdb │ │ └── memdb.go │ │ ├── opt │ │ └── options.go │ │ ├── options.go │ │ ├── session.go │ │ ├── session_compaction.go │ │ ├── session_record.go │ │ ├── session_util.go │ │ ├── storage.go │ │ ├── storage │ │ ├── file_storage.go │ │ ├── file_storage_nacl.go │ │ ├── file_storage_plan9.go │ │ ├── file_storage_solaris.go │ │ ├── file_storage_unix.go │ │ ├── file_storage_windows.go │ │ ├── mem_storage.go │ │ └── storage.go │ │ ├── table.go │ │ ├── table │ │ ├── reader.go │ │ ├── table.go │ │ └── writer.go │ │ ├── util.go │ │ ├── util │ │ ├── buffer.go │ │ ├── buffer_pool.go │ │ ├── crc32.go │ │ ├── hash.go │ │ ├── range.go │ │ └── util.go │ │ └── version.go ├── tinylib │ └── msgp │ │ ├── LICENSE │ │ └── msgp │ │ ├── advise_linux.go │ │ ├── advise_other.go │ │ ├── appengine.go │ │ ├── circular.go │ │ ├── defs.go │ │ ├── edit.go │ │ ├── elsize.go │ │ ├── errors.go │ │ ├── extension.go │ │ ├── file.go │ │ ├── file_port.go │ │ ├── integers.go │ │ ├── json.go │ │ ├── json_bytes.go │ │ ├── number.go │ │ ├── read.go │ │ ├── read_bytes.go │ │ ├── size.go │ │ ├── unsafe.go │ │ ├── write.go │ │ └── write_bytes.go ├── ugorji │ └── go │ │ ├── LICENSE │ │ └── codec │ │ ├── 0doc.go │ │ ├── README.md │ │ ├── binc.go │ │ ├── cbor.go │ │ ├── decode.go │ │ ├── encode.go │ │ ├── fast-path.generated.go │ │ ├── fast-path.go.tmpl │ │ ├── fast-path.not.go │ │ ├── gen-dec-array.go.tmpl │ │ ├── gen-dec-map.go.tmpl │ │ ├── gen-helper.generated.go │ │ ├── gen-helper.go.tmpl │ │ ├── gen.generated.go │ │ ├── gen.go │ │ ├── goversion_arrayof_gte_go15.go │ │ ├── goversion_arrayof_lt_go15.go │ │ ├── goversion_makemap_gte_go19.go │ │ ├── goversion_makemap_lt_go19.go │ │ ├── goversion_unsupported_lt_go14.go │ │ ├── goversion_vendor_eq_go15.go │ │ ├── goversion_vendor_eq_go16.go │ │ ├── goversion_vendor_gte_go17.go │ │ ├── goversion_vendor_lt_go15.go │ │ ├── helper.go │ │ ├── helper_internal.go │ │ ├── helper_not_unsafe.go │ │ ├── helper_unsafe.go │ │ ├── json.go │ │ ├── mammoth-test.go.tmpl │ │ ├── msgpack.go │ │ ├── noop.go │ │ ├── rpc.go │ │ ├── simple.go │ │ ├── test-cbor-goldens.json │ │ ├── test.py │ │ ├── time.go │ │ ├── xml.go │ │ └── z.go └── xordataexchange │ └── crypt │ ├── LICENSE │ ├── backend │ ├── backend.go │ ├── consul │ │ └── consul.go │ └── etcd │ │ └── etcd.go │ ├── config │ ├── README.md │ └── config.go │ └── encoding │ └── secconf │ └── secconf.go ├── golang.org └── x │ ├── crypto │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── cast5 │ │ └── cast5.go │ ├── openpgp │ │ ├── armor │ │ │ ├── armor.go │ │ │ └── encode.go │ │ ├── canonical_text.go │ │ ├── elgamal │ │ │ └── elgamal.go │ │ ├── errors │ │ │ └── errors.go │ │ ├── keys.go │ │ ├── packet │ │ │ ├── compressed.go │ │ │ ├── config.go │ │ │ ├── encrypted_key.go │ │ │ ├── literal.go │ │ │ ├── ocfb.go │ │ │ ├── one_pass_signature.go │ │ │ ├── opaque.go │ │ │ ├── packet.go │ │ │ ├── private_key.go │ │ │ ├── public_key.go │ │ │ ├── public_key_v3.go │ │ │ ├── reader.go │ │ │ ├── signature.go │ │ │ ├── signature_v3.go │ │ │ ├── symmetric_key_encrypted.go │ │ │ ├── symmetrically_encrypted.go │ │ │ ├── userattribute.go │ │ │ └── userid.go │ │ ├── read.go │ │ ├── s2k │ │ │ └── s2k.go │ │ └── write.go │ └── ssh │ │ └── terminal │ │ ├── terminal.go │ │ ├── util.go │ │ ├── util_bsd.go │ │ ├── util_linux.go │ │ ├── util_plan9.go │ │ ├── util_solaris.go │ │ └── util_windows.go │ ├── net │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── context │ │ ├── context.go │ │ ├── ctxhttp │ │ │ ├── ctxhttp.go │ │ │ └── ctxhttp_pre17.go │ │ ├── go17.go │ │ ├── go19.go │ │ ├── pre_go17.go │ │ └── pre_go19.go │ ├── idna │ │ ├── idna.go │ │ ├── punycode.go │ │ ├── tables.go │ │ ├── trie.go │ │ └── trieval.go │ └── netutil │ │ └── listen.go │ ├── sys │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── unix │ │ ├── .gitignore │ │ ├── README.md │ │ ├── affinity_linux.go │ │ ├── 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 │ │ ├── dev_darwin.go │ │ ├── dev_dragonfly.go │ │ ├── dev_freebsd.go │ │ ├── dev_linux.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 │ │ ├── fcntl.go │ │ ├── fcntl_linux_32bit.go │ │ ├── gccgo.go │ │ ├── gccgo_c.c │ │ ├── gccgo_linux_amd64.go │ │ ├── mkall.sh │ │ ├── mkerrors.sh │ │ ├── mkpost.go │ │ ├── mksyscall.pl │ │ ├── mksyscall_solaris.pl │ │ ├── mksysctl_openbsd.pl │ │ ├── mksysnum_darwin.pl │ │ ├── mksysnum_dragonfly.pl │ │ ├── mksysnum_freebsd.pl │ │ ├── mksysnum_netbsd.pl │ │ ├── mksysnum_openbsd.pl │ │ ├── openbsd_pledge.go │ │ ├── pagesize_unix.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── sockcmsg_linux.go │ │ ├── sockcmsg_unix.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_bsd.go │ │ ├── syscall_darwin.go │ │ ├── syscall_darwin_386.go │ │ ├── syscall_darwin_amd64.go │ │ ├── syscall_darwin_arm.go │ │ ├── syscall_darwin_arm64.go │ │ ├── syscall_dragonfly.go │ │ ├── syscall_dragonfly_amd64.go │ │ ├── syscall_freebsd.go │ │ ├── syscall_freebsd_386.go │ │ ├── syscall_freebsd_amd64.go │ │ ├── syscall_freebsd_arm.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_s390x.go │ │ ├── syscall_linux_sparc64.go │ │ ├── syscall_netbsd.go │ │ ├── syscall_netbsd_386.go │ │ ├── syscall_netbsd_amd64.go │ │ ├── syscall_netbsd_arm.go │ │ ├── syscall_openbsd.go │ │ ├── syscall_openbsd_386.go │ │ ├── syscall_openbsd_amd64.go │ │ ├── syscall_openbsd_arm.go │ │ ├── syscall_solaris.go │ │ ├── syscall_solaris_amd64.go │ │ ├── syscall_unix.go │ │ ├── syscall_unix_gc.go │ │ ├── timestruct.go │ │ ├── types_darwin.go │ │ ├── types_dragonfly.go │ │ ├── types_freebsd.go │ │ ├── types_netbsd.go │ │ ├── types_openbsd.go │ │ ├── types_solaris.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_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_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_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_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_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_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 │ │ ├── asm_windows_386.s │ │ ├── asm_windows_amd64.s │ │ ├── dll_windows.go │ │ ├── env_windows.go │ │ ├── eventlog.go │ │ ├── exec_windows.go │ │ ├── memory_windows.go │ │ ├── mksyscall.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── security_windows.go │ │ ├── service.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_windows.go │ │ ├── types_windows.go │ │ ├── types_windows_386.go │ │ ├── types_windows_amd64.go │ │ └── zsyscall_windows.go │ └── text │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── collate │ ├── build │ │ ├── builder.go │ │ ├── colelem.go │ │ ├── contract.go │ │ ├── order.go │ │ ├── table.go │ │ └── trie.go │ ├── collate.go │ ├── index.go │ ├── maketables.go │ ├── option.go │ ├── sort.go │ └── tables.go │ ├── internal │ ├── colltab │ │ ├── collelem.go │ │ ├── colltab.go │ │ ├── contract.go │ │ ├── iter.go │ │ ├── numeric.go │ │ ├── table.go │ │ ├── trie.go │ │ └── weighter.go │ ├── gen │ │ ├── code.go │ │ └── gen.go │ ├── tag │ │ └── tag.go │ ├── triegen │ │ ├── compact.go │ │ ├── print.go │ │ └── triegen.go │ └── ucd │ │ └── ucd.go │ ├── language │ ├── Makefile │ ├── common.go │ ├── coverage.go │ ├── doc.go │ ├── gen.go │ ├── gen_common.go │ ├── gen_index.go │ ├── go1_1.go │ ├── go1_2.go │ ├── index.go │ ├── language.go │ ├── lookup.go │ ├── match.go │ ├── parse.go │ ├── tables.go │ └── tags.go │ ├── secure │ └── bidirule │ │ ├── bidirule.go │ │ ├── bidirule10.0.0.go │ │ └── bidirule9.0.0.go │ ├── transform │ └── transform.go │ ├── unicode │ ├── bidi │ │ ├── bidi.go │ │ ├── bracket.go │ │ ├── core.go │ │ ├── gen.go │ │ ├── gen_ranges.go │ │ ├── gen_trieval.go │ │ ├── prop.go │ │ ├── tables10.0.0.go │ │ ├── tables9.0.0.go │ │ └── trieval.go │ ├── cldr │ │ ├── base.go │ │ ├── cldr.go │ │ ├── collate.go │ │ ├── decode.go │ │ ├── makexml.go │ │ ├── resolve.go │ │ ├── slice.go │ │ └── xml.go │ ├── norm │ │ ├── composition.go │ │ ├── forminfo.go │ │ ├── input.go │ │ ├── iter.go │ │ ├── maketables.go │ │ ├── normalize.go │ │ ├── readwriter.go │ │ ├── tables10.0.0.go │ │ ├── tables9.0.0.go │ │ ├── transform.go │ │ ├── trie.go │ │ └── triegen.go │ └── rangetable │ │ ├── gen.go │ │ ├── merge.go │ │ ├── rangetable.go │ │ ├── tables10.0.0.go │ │ └── tables9.0.0.go │ └── width │ ├── gen.go │ ├── gen_common.go │ ├── gen_trieval.go │ ├── kind_string.go │ ├── tables10.0.0.go │ ├── tables9.0.0.go │ ├── transform.go │ ├── trieval.go │ └── width.go └── gopkg.in ├── mgo.v2 ├── LICENSE ├── bson │ ├── LICENSE │ ├── bson.go │ ├── decimal.go │ ├── decode.go │ ├── encode.go │ └── json.go └── internal │ └── json │ ├── LICENSE │ ├── decode.go │ ├── encode.go │ ├── extension.go │ ├── fold.go │ ├── indent.go │ ├── scanner.go │ ├── stream.go │ └── tags.go └── yaml.v2 ├── .travis.yml ├── LICENSE ├── LICENSE.libyaml ├── NOTICE ├── README.md ├── apic.go ├── decode.go ├── emitterc.go ├── encode.go ├── go.mod ├── parserc.go ├── readerc.go ├── resolve.go ├── scannerc.go ├── sorter.go ├── writerc.go ├── yaml.go ├── yamlh.go └── yamlprivateh.go /.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | indent_style = space 9 | indent_size = 2 10 | trim_trailing_whitespace = true 11 | 12 | # default to UTF-8 for most files 13 | [*.{js,py,go,scala,rb,java,html,css,less,sass,md}] 14 | charset = utf-8 15 | 16 | # Tab indentation (no size specified) 17 | [{Makefile,*.mk,*.go}] 18 | indent_style = tab 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | 23 | # Matches the exact files either package.json or .travis.yml 24 | [{package.json,.travis.yml}] 25 | indent_style = space 26 | indent_size = 2 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | db 2 | ./kvstored 3 | ./kvstorecli 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright © 2016 Ivan Porto Carrero 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /cmd/kvstorecli/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "github.com/go-openapi/kvstore/cmd/kvstorecli/cmd" 4 | 5 | func main() { 6 | cmd.Execute() 7 | } 8 | -------------------------------------------------------------------------------- /doc.go: -------------------------------------------------------------------------------- 1 | // Package kvstore represents a key/value database 2 | package kvstore 3 | 4 | //go:generate swagger generate client -A kvstore -t gen -f ./swagger/swagger.yml 5 | //go:generate swagger generate server --exclude-main -A kvstore -t gen -f ./swagger/swagger.yml 6 | //go:generate msgp -file ./persist/types.go 7 | -------------------------------------------------------------------------------- /gen/restapi/doc.go: -------------------------------------------------------------------------------- 1 | // Code generated by go-swagger; DO NOT EDIT. 2 | 3 | /* 4 | Package restapi K/V store 5 | K/V store is a simple single node store for retrieving key/value information 6 | 7 | 8 | Schemes: 9 | http 10 | Host: localhost 11 | BasePath: / 12 | Version: 0.0.1 13 | License: MIT https://github.com/go-openapi/kvstore/blob/master/LICENSE 14 | Contact: Ivan Porto Carrero 15 | 16 | Consumes: 17 | - application/json 18 | - application/octet-stream 19 | 20 | Produces: 21 | - application/json 22 | - application/octet-stream 23 | 24 | swagger:meta 25 | */ 26 | package restapi 27 | -------------------------------------------------------------------------------- /persist/types.go: -------------------------------------------------------------------------------- 1 | package persist 2 | 3 | // Value returned from a persistence medium 4 | type Value struct { 5 | Value []byte 6 | Version uint64 7 | LastUpdated int64 8 | _ struct{} 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/OneOfOne/xxhash/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | *.pprof 3 | cmap2/ 4 | cache/ 5 | -------------------------------------------------------------------------------- /vendor/github.com/OneOfOne/xxhash/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | go: 5 | - 1.8 6 | - 1.9 7 | - "1.10" 8 | - master 9 | 10 | script: 11 | - go test -tags safe ./... 12 | - go test ./... 13 | -------------------------------------------------------------------------------- /vendor/github.com/OneOfOne/xxhash/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/OneOfOne/xxhash 2 | -------------------------------------------------------------------------------- /vendor/github.com/PuerkitoBio/purell/.gitignore: -------------------------------------------------------------------------------- 1 | *.sublime-* 2 | .DS_Store 3 | *.swp 4 | *.swo 5 | tags 6 | -------------------------------------------------------------------------------- /vendor/github.com/PuerkitoBio/purell/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.4 5 | - 1.5 6 | - 1.6 7 | - tip 8 | -------------------------------------------------------------------------------- /vendor/github.com/PuerkitoBio/urlesc/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.4.x 5 | - 1.5.x 6 | - 1.6.x 7 | - 1.7.x 8 | - 1.8.x 9 | - tip 10 | 11 | install: 12 | - go build . 13 | 14 | script: 15 | - go test -v 16 | -------------------------------------------------------------------------------- /vendor/github.com/PuerkitoBio/urlesc/README.md: -------------------------------------------------------------------------------- 1 | urlesc [![Build Status](https://travis-ci.org/PuerkitoBio/urlesc.svg?branch=master)](https://travis-ci.org/PuerkitoBio/urlesc) [![GoDoc](http://godoc.org/github.com/PuerkitoBio/urlesc?status.svg)](http://godoc.org/github.com/PuerkitoBio/urlesc) 2 | ====== 3 | 4 | Package urlesc implements query escaping as per RFC 3986. 5 | 6 | It contains some parts of the net/url package, modified so as to allow 7 | some reserved characters incorrectly escaped by net/url (see [issue 5684](https://github.com/golang/go/issues/5684)). 8 | 9 | ## Install 10 | 11 | go get github.com/PuerkitoBio/urlesc 12 | 13 | ## License 14 | 15 | Go license (BSD-3-Clause) 16 | 17 | -------------------------------------------------------------------------------- /vendor/github.com/armon/consul-api/.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 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | -------------------------------------------------------------------------------- /vendor/github.com/armon/consul-api/README.md: -------------------------------------------------------------------------------- 1 | consul-api 2 | ========== 3 | 4 | *DEPRECATED* Please use [consul api package](https://github.com/hashicorp/consul/tree/master/api) instead. 5 | Godocs for that package [are here](http://godoc.org/github.com/hashicorp/consul/api). 6 | 7 | This package provides the `consulapi` package which attempts to 8 | provide programmatic access to the full Consul API. 9 | 10 | Currently, all of the Consul APIs included in version 0.4 are supported. 11 | 12 | Documentation 13 | ============= 14 | 15 | The full documentation is available on [Godoc](http://godoc.org/github.com/armon/consul-api) 16 | 17 | Usage 18 | ===== 19 | 20 | Below is an example of using the Consul client: 21 | 22 | ```go 23 | // Get a new client, with KV endpoints 24 | client, _ := consulapi.NewClient(consulapi.DefaultConfig()) 25 | kv := client.KV() 26 | 27 | // PUT a new KV pair 28 | p := &consulapi.KVPair{Key: "foo", Value: []byte("test")} 29 | _, err := kv.Put(p, nil) 30 | if err != nil { 31 | panic(err) 32 | } 33 | 34 | // Lookup the pair 35 | pair, _, err := kv.Get("foo", nil) 36 | if err != nil { 37 | panic(err) 38 | } 39 | fmt.Printf("KV: %v", pair) 40 | 41 | ``` 42 | 43 | -------------------------------------------------------------------------------- /vendor/github.com/armon/consul-api/status.go: -------------------------------------------------------------------------------- 1 | package consulapi 2 | 3 | // Status can be used to query the Status endpoints 4 | type Status struct { 5 | c *Client 6 | } 7 | 8 | // Status returns a handle to the status endpoints 9 | func (c *Client) Status() *Status { 10 | return &Status{c} 11 | } 12 | 13 | // Leader is used to query for a known leader 14 | func (s *Status) Leader() (string, error) { 15 | r := s.c.newRequest("GET", "/v1/status/leader") 16 | _, resp, err := requireOK(s.c.doRequest(r)) 17 | if err != nil { 18 | return "", err 19 | } 20 | defer resp.Body.Close() 21 | 22 | var leader string 23 | if err := decodeBody(resp, &leader); err != nil { 24 | return "", err 25 | } 26 | return leader, nil 27 | } 28 | 29 | // Peers is used to query for a known raft peers 30 | func (s *Status) Peers() ([]string, error) { 31 | r := s.c.newRequest("GET", "/v1/status/peers") 32 | _, resp, err := requireOK(s.c.doRequest(r)) 33 | if err != nil { 34 | return nil, err 35 | } 36 | defer resp.Body.Close() 37 | 38 | var peers []string 39 | if err := decodeBody(resp, &peers); err != nil { 40 | return nil, err 41 | } 42 | return peers, nil 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/asaskevich/govalidator/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.1 5 | - 1.2 6 | - 1.3 7 | - 1.4 8 | - 1.5 9 | - 1.6 10 | - tip 11 | 12 | notifications: 13 | email: 14 | - bwatas@gmail.com 15 | -------------------------------------------------------------------------------- /vendor/github.com/asaskevich/govalidator/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Alex Saskevich 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /vendor/github.com/asaskevich/govalidator/error.go: -------------------------------------------------------------------------------- 1 | package govalidator 2 | 3 | import "strings" 4 | 5 | // Errors is an array of multiple errors and conforms to the error interface. 6 | type Errors []error 7 | 8 | // Errors returns itself. 9 | func (es Errors) Errors() []error { 10 | return es 11 | } 12 | 13 | func (es Errors) Error() string { 14 | var errs []string 15 | for _, e := range es { 16 | errs = append(errs, e.Error()) 17 | } 18 | return strings.Join(errs, ";") 19 | } 20 | 21 | // Error encapsulates a name, an error and whether there's a custom error message or not. 22 | type Error struct { 23 | Name string 24 | Err error 25 | CustomErrorMessageExists bool 26 | 27 | // Validator indicates the name of the validator that failed 28 | Validator string 29 | } 30 | 31 | func (e Error) Error() string { 32 | if e.CustomErrorMessageExists { 33 | return e.Err.Error() 34 | } 35 | return e.Name + ": " + e.Err.Error() 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/asaskevich/govalidator/wercker.yml: -------------------------------------------------------------------------------- 1 | box: golang 2 | build: 3 | steps: 4 | - setup-go-workspace 5 | 6 | - script: 7 | name: go get 8 | code: | 9 | go version 10 | go get -t ./... 11 | 12 | - script: 13 | name: go test 14 | code: | 15 | go test -race ./... 16 | -------------------------------------------------------------------------------- /vendor/github.com/casualjim/go-app/.drone.sec: -------------------------------------------------------------------------------- 1 | eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.Yz1nq4UH4-d7kMkLX0jfm7OCzvKUzWy35jeQU0MXIO0TBEJlJ2x9aA4itGNBfgC1a13db4xpfthrLQgVl2IOVpUUvQGVINcCUbqDTlJqbXX9kYoSVzQ5twjGa4zXHncwm8OE8HqJ4UzrtWzUAPonPbHMlnK6Kro-JsV38LBlLiIAw2PF3WxhxW3RZBeAaz_WGQbJ8cxwUlvyKFlGoCVaxUYgODw_lx4WpOWhTU9gyDPqCm332RdbEjGjMY8Xf_6rMRrSOGpJZPHE-b3plqWFZzqKse2UhsAcBqTCefZtlpn1kDOU1ddova1m0bnp4idkrEah5NfNcUBJ4JIuwCK6Fg.tJBQ6_tmrkj50iZI.uexqQtAz6fIlINxNjuqiTXKeq5B4X1Dhy3s5s9fr74tlXvwEiomp7SBsjFKJyvpSDjsROFagcTnV6aig2XBYJDmsOozqaZ9IieBiyynm9Jt41ODyH3vJE106iaNXLai9Brw6SSOaiDXt8rRu9TQ3TJBBmizDmCSEmvdJPs4W_W3Vxp-Zy5D1k0sjzBRYpNG-DSO_Z3pWvGLSabKbrMugsdTBVfskY-kHiFh1eB3LlfryrKceYC1ht0XP0tGMmfUAIYtSdq9zRT9LkPt5yOU3fYolUK5WNdgzuV9I7SSl9IGR5iDz_I_JJ-QX4V4cHpZqRdcspoTgcO20cMaVVCMrgYw4zdulVB82iSUtzYJr__SIZl-AcZD-4WuJ__q67MUGBJjX12OR5mv7N2p4zmSyL3xZT0O8v39S_jAY_4ONQ43hWTILkddYcWuTO7ZXISKnE4A8-cS4zZ81GF_jaojGs_G2o_-rocYx5kF09nOJtfA7BIcqxvn1dU8nWqi8eJ9rcHf4_jYJbySYrjd7NwssqSehhD9CITH_jPYyH4YzC88Dz4UeM75zC4p5uxDLIwDmVmovzmdXaKHhRf_9HLkn82cWFGddL_gudLRGzH9lv22vw86-MyJL-A1L8oULk7gIXGM.82mVkBgVVWIzFAFsM4A7bw -------------------------------------------------------------------------------- /vendor/github.com/casualjim/go-app/Dockerfile.ci: -------------------------------------------------------------------------------- 1 | FROM golang:1.7 2 | 3 | RUN apt-get update -yqq &&\ 4 | apt-get install -yqq haveged rsyslog gnupg2 &&\ 5 | go get -u github.com/axw/gocov/gocov &&\ 6 | go get -u gopkg.in/matm/v1/gocov-html &&\ 7 | go get -u github.com/cee-dub/go-junit-report 8 | -------------------------------------------------------------------------------- /vendor/github.com/casualjim/go-app/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Ivan Porto Carrero 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /vendor/github.com/casualjim/go-app/doc.go: -------------------------------------------------------------------------------- 1 | /*Package app provides an application level context 2 | 3 | This provides you with a logger, a tracer and a viper config. 4 | */ 5 | package app 6 | -------------------------------------------------------------------------------- /vendor/github.com/casualjim/go-app/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | consul: 4 | image: consul 5 | ports: 6 | - "8400:8400" 7 | - "8500:8500" 8 | command: agent -server -dev -client 0.0.0.0 9 | etcd: 10 | image: quay.io/coreos/etcd 11 | ports: 12 | - "2379:2379" 13 | command: etcd --listen-client-urls 'http://0.0.0.0:2379' --advertise-client-urls 'http://localhost:2379' -------------------------------------------------------------------------------- /vendor/github.com/casualjim/go-app/tracing/doc.go: -------------------------------------------------------------------------------- 1 | /*Package tracing implements a super simple tracer/profiler based on go-metrics. 2 | 3 | var tracer = NewTracer("", nil, nil) 4 | 5 | func TraceThis() { 6 | defer tracer.Trace()() 7 | // do work here 8 | } 9 | 10 | func FunctionWithUglyName() { 11 | defer tracer.Trace("PrettyName")() 12 | // do work here 13 | } 14 | 15 | You will then be able to get information about timings for methods. When you don't specify a key, the package 16 | will walk the stack to find out the method name you want to trace. So if you don't want to incur that cost, use a key. 17 | 18 | When used with the github.com/casualjim/middlewares package you can get a JSON document 19 | with the report from /audit/metrics. 20 | */ 21 | package tracing 22 | -------------------------------------------------------------------------------- /vendor/github.com/casualjim/middlewares/README.md: -------------------------------------------------------------------------------- 1 | # Middlewares 2 | 3 | Some common middlewares I use in multiple projects 4 | 5 | Contains: 6 | 7 | * Gzip: gzips responses 8 | * Audit: go-metric capturing with yammer metrics compatible output 9 | * Healthchecks: go-metrics healthchecks with yammer metrics compatible output 10 | * Profiling: use pprof 11 | * Recovery: handle panics -------------------------------------------------------------------------------- /vendor/github.com/casualjim/middlewares/default.go: -------------------------------------------------------------------------------- 1 | package middlewares 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/justinas/alice" 7 | ) 8 | 9 | // DefaultStack sets up the default middlewares 10 | func DefaultStack(appInfo AppInfo, lgr Logger, orig http.Handler) http.Handler { 11 | return alice.New( 12 | NewRecoveryMW(appInfo.Name, lgr), 13 | NewAuditMW(appInfo, lgr), 14 | NewProfiler, 15 | NewHealthChecksMW(appInfo.BasePath), 16 | GzipMW(DefaultCompression), 17 | ).Then(orig) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/casualjim/middlewares/profiling.go: -------------------------------------------------------------------------------- 1 | package middlewares 2 | 3 | import ( 4 | "net/http" 5 | pprof "net/http/pprof" 6 | "strings" 7 | ) 8 | 9 | // Profiler exposes net/http/pprof as a middleware 10 | type Profiler struct { 11 | next http.Handler 12 | } 13 | 14 | // NewProfiler creates a middleware for profiling 15 | func NewProfiler(next http.Handler) http.Handler { 16 | return &Profiler{next} 17 | } 18 | 19 | func (p *Profiler) ServeHTTP(rw http.ResponseWriter, r *http.Request) { 20 | if !strings.HasPrefix(r.URL.Path, "/debug/pprof") { 21 | p.next.ServeHTTP(rw, r) 22 | return 23 | } 24 | 25 | switch r.URL.Path { 26 | case "/debug/pprof/cmdline": 27 | pprof.Cmdline(rw, r) 28 | return 29 | case "/debug/pprof/profile": 30 | pprof.Profile(rw, r) 31 | return 32 | case "/debug/pprof/symbol": 33 | pprof.Symbol(rw, r) 34 | return 35 | default: 36 | pprof.Index(rw, r) 37 | return 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/coreos/etcd/Documentation/README.md: -------------------------------------------------------------------------------- 1 | docs.md -------------------------------------------------------------------------------- /vendor/github.com/coreos/etcd/NOTICE: -------------------------------------------------------------------------------- 1 | CoreOS Project 2 | Copyright 2014 CoreOS, Inc 3 | 4 | This product includes software developed at CoreOS, Inc. 5 | (http://www.coreos.com/). 6 | -------------------------------------------------------------------------------- /vendor/github.com/coreos/etcd/client/cancelreq.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 | // borrowed from golang/net/context/ctxhttp/cancelreq.go 6 | 7 | package client 8 | 9 | import "net/http" 10 | 11 | func requestCanceler(tr CancelableTransport, req *http.Request) func() { 12 | ch := make(chan struct{}) 13 | req.Cancel = ch 14 | 15 | return func() { 16 | close(ch) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/coreos/etcd/client/cluster_error.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The etcd Authors 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 client 16 | 17 | import "fmt" 18 | 19 | type ClusterError struct { 20 | Errors []error 21 | } 22 | 23 | func (ce *ClusterError) Error() string { 24 | s := ErrClusterUnavailable.Error() 25 | for i, e := range ce.Errors { 26 | s += fmt.Sprintf("; error #%d: %s\n", i, e) 27 | } 28 | return s 29 | } 30 | 31 | func (ce *ClusterError) Detail() string { 32 | s := "" 33 | for i, e := range ce.Errors { 34 | s += fmt.Sprintf("error #%d: %s\n", i, e) 35 | } 36 | return s 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/coreos/etcd/cmd/etcd: -------------------------------------------------------------------------------- 1 | ../ -------------------------------------------------------------------------------- /vendor/github.com/coreos/etcd/cmd/etcdctl: -------------------------------------------------------------------------------- 1 | ../etcdctl -------------------------------------------------------------------------------- /vendor/github.com/coreos/etcd/cmd/functional: -------------------------------------------------------------------------------- 1 | ../functional -------------------------------------------------------------------------------- /vendor/github.com/coreos/etcd/cmd/tools: -------------------------------------------------------------------------------- 1 | ../tools -------------------------------------------------------------------------------- /vendor/github.com/coreos/etcd/pkg/pathutil/path.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 pathutil implements utility functions for handling slash-separated 6 | // paths. 7 | package pathutil 8 | 9 | import "path" 10 | 11 | // CanonicalURLPath returns the canonical url path for p, which follows the rules: 12 | // 1. the path always starts with "/" 13 | // 2. replace multiple slashes with a single slash 14 | // 3. replace each '.' '..' path name element with equivalent one 15 | // 4. keep the trailing slash 16 | // The function is borrowed from stdlib http.cleanPath in server.go. 17 | func CanonicalURLPath(p string) string { 18 | if p == "" { 19 | return "/" 20 | } 21 | if p[0] != '/' { 22 | p = "/" + p 23 | } 24 | np := path.Clean(p) 25 | // path.Clean removes trailing slash except for root, 26 | // put the trailing slash back if necessary. 27 | if p[len(p)-1] == '/' && np != "/" { 28 | np += "/" 29 | } 30 | return np 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/coreos/etcd/pkg/types/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The etcd Authors 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 types declares various data types and implements type-checking 16 | // functions. 17 | package types 18 | -------------------------------------------------------------------------------- /vendor/github.com/coreos/etcd/pkg/types/slice.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The etcd Authors 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 types 16 | 17 | // Uint64Slice implements sort interface 18 | type Uint64Slice []uint64 19 | 20 | func (p Uint64Slice) Len() int { return len(p) } 21 | func (p Uint64Slice) Less(i, j int) bool { return p[i] < p[j] } 22 | func (p Uint64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } 23 | -------------------------------------------------------------------------------- /vendor/github.com/coreos/go-semver/semver/sort.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2015 CoreOS, Inc. 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 semver 16 | 17 | import ( 18 | "sort" 19 | ) 20 | 21 | type Versions []*Version 22 | 23 | func (s Versions) Len() int { 24 | return len(s) 25 | } 26 | 27 | func (s Versions) Swap(i, j int) { 28 | s[i], s[j] = s[j], s[i] 29 | } 30 | 31 | func (s Versions) Less(i, j int) bool { 32 | return s[i].LessThan(*s[j]) 33 | } 34 | 35 | // Sort sorts the given slice of Version 36 | func Sort(versions []*Version) { 37 | sort.Sort(Versions(versions)) 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-units/README.md: -------------------------------------------------------------------------------- 1 | [![GoDoc](https://godoc.org/github.com/docker/go-units?status.svg)](https://godoc.org/github.com/docker/go-units) 2 | 3 | # Introduction 4 | 5 | go-units is a library to transform human friendly measurements into machine friendly values. 6 | 7 | ## Usage 8 | 9 | See the [docs in godoc](https://godoc.org/github.com/docker/go-units) for examples and documentation. 10 | 11 | ## Copyright and license 12 | 13 | Copyright © 2015 Docker, Inc. 14 | 15 | go-units is licensed under the Apache License, Version 2.0. 16 | See [LICENSE](LICENSE) for the full text of the license. 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-units/circle.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | post: 3 | # install golint 4 | - go get github.com/golang/lint/golint 5 | 6 | test: 7 | pre: 8 | # run analysis before tests 9 | - go vet ./... 10 | - test -z "$(golint ./... | tee /dev/stderr)" 11 | - test -z "$(gofmt -s -l . | tee /dev/stderr)" 12 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | indent_size = 4 6 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/.gitignore: -------------------------------------------------------------------------------- 1 | # Setup a Global .gitignore for OS and editor generated files: 2 | # https://help.github.com/articles/ignoring-files 3 | # git config --global core.excludesfile ~/.gitignore_global 4 | 5 | .vagrant 6 | *.sublime-project 7 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - 1.8.x 6 | - 1.9.x 7 | - tip 8 | 9 | matrix: 10 | allow_failures: 11 | - go: tip 12 | fast_finish: true 13 | 14 | before_script: 15 | - go get -u github.com/golang/lint/golint 16 | 17 | script: 18 | - go test -v --race ./... 19 | 20 | after_script: 21 | - test -z "$(gofmt -s -l -w . | tee /dev/stderr)" 22 | - test -z "$(golint ./... | tee /dev/stderr)" 23 | - go vet ./... 24 | 25 | os: 26 | - linux 27 | - osx 28 | 29 | notifications: 30 | email: false 31 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/fen.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 solaris 6 | 7 | package fsnotify 8 | 9 | import ( 10 | "errors" 11 | ) 12 | 13 | // Watcher watches a set of files, delivering events to a channel. 14 | type Watcher struct { 15 | Events chan Event 16 | Errors chan error 17 | } 18 | 19 | // NewWatcher establishes a new watcher with the underlying OS and begins waiting for events. 20 | func NewWatcher() (*Watcher, error) { 21 | return nil, errors.New("FEN based watcher not yet supported for fsnotify\n") 22 | } 23 | 24 | // Close removes all watches and closes the events channel. 25 | func (w *Watcher) Close() error { 26 | return nil 27 | } 28 | 29 | // Add starts watching the named file or directory (non-recursively). 30 | func (w *Watcher) Add(name string) error { 31 | return nil 32 | } 33 | 34 | // Remove stops watching the the named file or directory (non-recursively). 35 | func (w *Watcher) Remove(name string) error { 36 | return nil 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build freebsd openbsd netbsd dragonfly 6 | 7 | package fsnotify 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const openMode = unix.O_NONBLOCK | unix.O_RDONLY 12 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin 6 | 7 | package fsnotify 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | // note: this constant is not defined on BSD 12 | const openMode = unix.O_EVTONLY 13 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/analysis/.gitignore: -------------------------------------------------------------------------------- 1 | secrets.yml 2 | coverage.out 3 | .idea 4 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/analysis/.golangci.yml: -------------------------------------------------------------------------------- 1 | linters-settings: 2 | govet: 3 | check-shadowing: true 4 | golint: 5 | min-confidence: 0 6 | gocyclo: 7 | min-complexity: 30 8 | maligned: 9 | suggest-new: true 10 | dupl: 11 | threshold: 100 12 | goconst: 13 | min-len: 2 14 | min-occurrences: 4 15 | 16 | linters: 17 | enable-all: true 18 | disable: 19 | - maligned 20 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/analysis/README.md: -------------------------------------------------------------------------------- 1 | # OpenAPI initiative analysis [![Build Status](https://travis-ci.org/go-openapi/analysis.svg?branch=master)](https://travis-ci.org/go-openapi/analysis) [![codecov](https://codecov.io/gh/go-openapi/analysis/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/analysis) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) 2 | 3 | [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/analysis/master/LICENSE) 4 | [![GoDoc](https://godoc.org/github.com/go-openapi/analysis?status.svg)](http://godoc.org/github.com/go-openapi/analysis) 5 | [![GolangCI](https://golangci.com/badges/github.com/go-openapi/analysis.svg)](https://golangci.com) 6 | [![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/analysis)](https://goreportcard.com/report/github.com/go-openapi/analysis) 7 | 8 | 9 | A foundational library to analyze an OAI specification document for easier reasoning about the content. 10 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/errors/.gitignore: -------------------------------------------------------------------------------- 1 | secrets.yml 2 | coverage.out 3 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.7 4 | install: 5 | - go get -u github.com/stretchr/testify/assert 6 | script: 7 | - go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic ./... 8 | after_success: 9 | - bash <(curl -s https://codecov.io/bash) 10 | notifications: 11 | slack: 12 | secure: gZGp9NaHxi7zawlXJXKY92BGeDR1x0tbIcTyU5nMKLq0fhIaiEBJEeALwZ4VgqsSv3DytSSF5mLH8fevAM3ixE6hxjKQ+lQuf7V/w3btCN1CSWgoua5LOh1kTnqZQtJuRvO4pzoJcT3bJWBsVZ07VGNVzzJEy/zAKCHFqBUCXShw7QemlLBcYWFNqveTlvDIfCzvouoLnPoXwxEpkjxe9uz/ZKZgAnup/fXjC8RFctmgCnkCyvJTk0Y/fZCsufixJrJhshBWTnlrFCzRmgNkz2d+i1Ls3+MJ5EJJ2Tx/A5S63dL49J1f9Kr0AKHADmulSy8JNzIckKwbyFMYUecrsW+Lsu9DhnVMy1jj5pKsJDLRi2iIU3fXTMWbcyQbXjbbnBO2mPdP3Tzme75y4D9fc8hUPeyqVv2BU26NEbQ7EF2pKJ93OXvci7HlwRBgdJa8j6mP2LEDClcPQW00g7N/OZe0cTOMa8L5AwiBlbArwqt9wv6YLJoTG0wpDhzWsFvbCg5bJxe28Yn3fIDD0Lk1I7iSnBbp/5gzF19jmxqvcT8tHRkDL4xfjbENFTZjA5uB4Z4pj4WSyWQILLV/Jwhe3fi9uQwdviFHfj5pnVrmNUiGSOQL672K5wl2c3E9mGwejvsu2dfEz28n7Y/FUnOpY3/cBS0n27JJaerS0zMKNLE= 13 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/errors/README.md: -------------------------------------------------------------------------------- 1 | # OpenAPI errors [![Build Status](https://travis-ci.org/go-openapi/errors.svg?branch=master)](https://travis-ci.org/go-openapi/errors) [![codecov](https://codecov.io/gh/go-openapi/errors/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/errors) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) 2 | 3 | [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/errors/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/errors?status.svg)](http://godoc.org/github.com/go-openapi/errors) 4 | 5 | Shared errors used throughout the various libraries for the go-openapi toolkit -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/errors/auth.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 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 errors 16 | 17 | // Unauthenticated returns an unauthenticated error 18 | func Unauthenticated(scheme string) Error { 19 | return New(401, "unauthenticated for %s", scheme) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/errors/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 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 | /* 16 | 17 | Package errors provides an Error interface and several concrete types 18 | implementing this interface to manage API errors and JSON-schema validation 19 | errors. 20 | 21 | A middleware handler ServeError() is provided to serve the errors types 22 | it defines. 23 | 24 | It is used throughout the various go-openapi toolkit libraries 25 | (https://github.com/go-openapi). 26 | 27 | */ 28 | package errors 29 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/jsonpointer/.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | indent_style = space 9 | indent_size = 2 10 | trim_trailing_whitespace = true 11 | 12 | # Set default charset 13 | [*.{js,py,go,scala,rb,java,html,css,less,sass,md}] 14 | charset = utf-8 15 | 16 | # Tab indentation (no size specified) 17 | [*.go] 18 | indent_style = tab 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | 23 | # Matches the exact files either package.json or .travis.yml 24 | [{package.json,.travis.yml}] 25 | indent_style = space 26 | indent_size = 2 27 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/jsonpointer/.gitignore: -------------------------------------------------------------------------------- 1 | secrets.yml 2 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/jsonpointer/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - "1.8" 4 | - "1.9" 5 | - "1.10" 6 | install: 7 | - go get -u github.com/stretchr/testify/assert 8 | - go get -u github.com/go-openapi/swag 9 | script: 10 | - go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic ./... 11 | after_success: 12 | - bash <(curl -s https://codecov.io/bash) 13 | notifications: 14 | slack: 15 | secure: a5VgoiwB1G/AZqzmephPZIhEB9avMlsWSlVnM1dSAtYAwdrQHGTQxAmpOxYIoSPDhWNN5bfZmjd29++UlTwLcHSR+e0kJhH6IfDlsHj/HplNCJ9tyI0zYc7XchtdKgeMxMzBKCzgwFXGSbQGydXTliDNBo0HOzmY3cou/daMFTP60K+offcjS+3LRAYb1EroSRXZqrk1nuF/xDL3792DZUdPMiFR/L/Df6y74D6/QP4sTkTDFQitz4Wy/7jbsfj8dG6qK2zivgV6/l+w4OVjFkxVpPXogDWY10vVXNVynqxfJ7to2d1I9lNCHE2ilBCkWMIPdyJF7hjF8pKW+82yP4EzRh0vu8Xn0HT5MZpQxdRY/YMxNrWaG7SxsoEaO4q5uhgdzAqLYY3TRa7MjIK+7Ur+aqOeTXn6OKwVi0CjvZ6mIU3WUKSwiwkFZMbjRAkSb5CYwMEfGFO/z964xz83qGt6WAtBXNotqCQpTIiKtDHQeLOMfksHImCg6JLhQcWBVxamVgu0G3Pdh8Y6DyPnxraXY95+QDavbjqv7TeYT9T/FNnrkXaTTK0s4iWE5H4ACU0Qvz0wUYgfQrZv0/Hp7V17+rabUwnzYySHCy9SWX/7OV9Cfh31iMp9ZIffr76xmmThtOEqs8TrTtU6BWI3rWwvA9cXQipZTVtL0oswrGw= 16 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/jsonpointer/README.md: -------------------------------------------------------------------------------- 1 | # gojsonpointer [![Build Status](https://travis-ci.org/go-openapi/jsonpointer.svg?branch=master)](https://travis-ci.org/go-openapi/jsonpointer) [![codecov](https://codecov.io/gh/go-openapi/jsonpointer/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonpointer) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) 2 | 3 | [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonpointer/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/jsonpointer?status.svg)](http://godoc.org/github.com/go-openapi/jsonpointer) 4 | An implementation of JSON Pointer - Go language 5 | 6 | ## Status 7 | Completed YES 8 | 9 | Tested YES 10 | 11 | ## References 12 | http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07 13 | 14 | ### Note 15 | The 4.Evaluation part of the previous reference, starting with 'If the currently referenced value is a JSON array, the reference token MUST contain either...' is not implemented. 16 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/jsonreference/.gitignore: -------------------------------------------------------------------------------- 1 | secrets.yml 2 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/jsonreference/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - "1.8" 4 | - "1.9" 5 | - "1.10" 6 | install: 7 | - go get -u github.com/stretchr/testify/assert 8 | - go get -u github.com/PuerkitoBio/purell 9 | - go get -u github.com/go-openapi/jsonpointer 10 | script: 11 | - go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic ./... 12 | after_success: 13 | - bash <(curl -s https://codecov.io/bash) 14 | notifications: 15 | slack: 16 | secure: OpQG/36F7DSF00HLm9WZMhyqFCYYyYTsVDObW226cWiR8PWYiNfLZiSEvIzT1Gx4dDjhigKTIqcLhG34CkL5iNXDjm9Yyo2RYhQPlK8NErNqUEXuBqn4RqYHW48VGhEhOyDd4Ei0E2FN5ZbgpvHgtpkdZ6XDi64r3Ac89isP9aPHXQTuv2Jog6b4/OKKiUTftLcTIst0p4Cp3gqOJWf1wnoj+IadWiECNVQT6zb47IYjtyw6+uV8iUjTzdKcRB6Zc6b4Dq7JAg1Zd7Jfxkql3hlKp4PNlRf9Cy7y5iA3G7MLyg3FcPX5z2kmcyPt2jOTRMBWUJ5zIQpOxizAcN8WsT3WWBL5KbuYK6k0PzujrIDLqdxGpNmjkkMfDBT9cKmZpm2FdW+oZgPFJP+oKmAo4u4KJz/vjiPTXgQlN5bmrLuRMCp+AwC5wkIohTqWZVPE2TK6ZSnMYcg/W39s+RP/9mJoyryAvPSpBOLTI+biCgaUCTOAZxNTWpMFc3tPYntc41WWkdKcooZ9JA5DwfcaVFyTGQ3YXz+HvX6G1z/gW0Q/A4dBi9mj2iE1xm7tRTT+4VQ2AXFvSEI1HJpfPgYnwAtwOD1v3Qm2EUHk9sCdtEDR4wVGEPIVn44GnwFMnGKx9JWppMPYwFu3SVDdHt+E+LOlhZUply11Aa+IVrT2KUQ= 17 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/jsonreference/README.md: -------------------------------------------------------------------------------- 1 | # gojsonreference [![Build Status](https://travis-ci.org/go-openapi/jsonreference.svg?branch=master)](https://travis-ci.org/go-openapi/jsonreference) [![codecov](https://codecov.io/gh/go-openapi/jsonreference/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonreference) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) 2 | 3 | [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonreference/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/jsonreference?status.svg)](http://godoc.org/github.com/go-openapi/jsonreference) 4 | An implementation of JSON Reference - Go language 5 | 6 | ## Status 7 | Work in progress ( 90% done ) 8 | 9 | ## Dependencies 10 | https://github.com/go-openapi/jsonpointer 11 | 12 | ## References 13 | http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07 14 | 15 | http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03 16 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/loads/.drone.sec: -------------------------------------------------------------------------------- 1 | eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.xUjixvmMMeampw0Doyr_XLvcV5ICmDgDFmlcWqgmO84O3Hwn6dqbMkwOjpKMOyEJW_98b5Om5ED59IFt2S0T_OarlrsJL8jOK5fqxSMNXy2w8LfI-e5l1URverW41ofAVK8m9wK05q2BSJM_M6PyyODaQeDBiCVK1HreMZBlXpuUDVtBMPILQoga0eSZOsTR3DYEpZIS0A0Rsa5yIhMYR5d5-JMYqbqOCB7tNJ-BM83OzYgL7Hrz0J15kqaJmhQ-GJoMJDzOemSO9KxLCOfSPp11R_G3Mfd48xYnuiRuPOTakbOCLxuYviH6uoGVIOhnMyY9qKiDKbOn4BQUi1-igA.6qjQzq9nzAxRRKV_.z79R5cMFAEuEaAh6U9ykiL8oIqzMbs_I2C-hSFRh3HYRJ4fTB-9LrcbF0uASIOq7bBn4OQzW-0QFwYOs1uaawmrByGngV5d0afiZf_LBKcmTF2vtxRi_A_nxD-EHoPmh3lKBU5WNDe_8kLjEeS89HeyyFPuv5iQbqhzdqPFohHKVigwVqVYYLjB8GWQ4t7tC4c8l5rHanaXf71W0e3op2m8bebpZL0JPGhnULVA1oU27TYeLsO112JkIYtBwZxzvAs--bBFoKeGJWVMFzrKN68UACGZ9RFw0uGJbBmVC4-jRuIc6XpqeEqw3KG-rjFzkeEor3575qW-8kiXYqpub9SFUc3SSZkxJ8hB3SrnMBOuDUSenrXNpAbltmV3KAALzN3_bMBQuihwSRIn0Hg7-Dpni8BieMe44RMDvRu6p_71aeU_KW4V7Umy_h8gpIvQFuKGdTQH2ahsyCXL0ojqjMbVMdoWpDQTQ2_Fy8Qt_p2kJ8BgDo-1Akd4a6BNU2NGqsdnrJmtVKcTqLBadf9ylCwxHdGVrtNYORALSms2T6Q1s-poQnMjIwN8lnUD8ABUBpt4uVtrYkiWPVwrwywLQeiHhR-pboe_53kWDAx4Hy4rpbKsaxanYhy_bEbAYKb3aIUA.75GD4kRBCQdcGFYP1QYdCg -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/loads/.drone.yml: -------------------------------------------------------------------------------- 1 | clone: 2 | path: github.com/go-openapi/loads 3 | 4 | matrix: 5 | GO_VERSION: 6 | - "1.6" 7 | 8 | build: 9 | integration: 10 | image: golang:$$GO_VERSION 11 | pull: true 12 | environment: 13 | GOCOVMODE: "count" 14 | commands: 15 | - go get -u github.com/axw/gocov/gocov 16 | - go get -u gopkg.in/matm/v1/gocov-html 17 | - go get -u github.com/cee-dub/go-junit-report 18 | - go get -u github.com/stretchr/testify/assert 19 | - go get -u gopkg.in/yaml.v2 20 | - go get -u github.com/go-openapi/swag 21 | - go get -u github.com/go-openapi/analysis 22 | - go get -u github.com/go-openapi/spec 23 | - ./hack/build-drone.sh 24 | 25 | notify: 26 | slack: 27 | channel: bots 28 | webhook_url: $$SLACK_URL 29 | username: drone 30 | 31 | publish: 32 | coverage: 33 | server: https://coverage.vmware.run 34 | token: $$GITHUB_TOKEN 35 | # threshold: 70 36 | # must_increase: true 37 | when: 38 | matrix: 39 | GO_VERSION: "1.6" 40 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/loads/.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | indent_style = space 9 | indent_size = 2 10 | trim_trailing_whitespace = true 11 | 12 | # Set default charset 13 | [*.{js,py,go,scala,rb,java,html,css,less,sass,md}] 14 | charset = utf-8 15 | 16 | # Tab indentation (no size specified) 17 | [*.go] 18 | indent_style = tab 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | 23 | # Matches the exact files either package.json or .travis.yml 24 | [{package.json,.travis.yml}] 25 | indent_style = space 26 | indent_size = 2 27 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/loads/.gitignore: -------------------------------------------------------------------------------- 1 | secrets.yml 2 | coverage.out 3 | profile.cov 4 | profile.out 5 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/loads/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.8 4 | install: 5 | - go get -u github.com/stretchr/testify 6 | - go get -u github.com/go-openapi/analysis 7 | - go get -u github.com/go-openapi/spec 8 | - go get -u github.com/go-openapi/swag 9 | - go get -u gopkg.in/yaml.v2 10 | script: 11 | - ./hack/coverage 12 | after_success: 13 | - bash <(curl -s https://codecov.io/bash) 14 | notifications: 15 | slack: 16 | secure: OxkPwVp35qBTUilgWC8xykSj+sGMcj0h8IIOKD+Rflx2schZVlFfdYdyVBM+s9OqeOfvtuvnR9v1Ye2rPKAvcjWdC4LpRGUsgmItZaI6Um8Aj6+K9udCw5qrtZVfOVmRu8LieH//XznWWKdOultUuniW0MLqw5+II87Gd00RWbCGi0hk0PykHe7uK+PDA2BEbqyZ2WKKYCvfB3j+0nrFOHScXqnh0V05l2E83J4+Sgy1fsPy+1WdX58ZlNBG333ibaC1FS79XvKSmTgKRkx3+YBo97u6ZtUmJa5WZjf2OdLG3KIckGWAv6R5xgxeU31N0Ng8L332w/Edpp2O/M2bZwdnKJ8hJQikXIAQbICbr+lTDzsoNzMdEIYcHpJ5hjPbiUl3Bmd+Jnsjf5McgAZDiWIfpCKZ29tPCEkVwRsOCqkyPRMNMzHHmoja495P5jR+ODS7+J8RFg5xgcnOgpP9D4Wlhztlf5WyZMpkLxTUD+bZq2SRf50HfHFXTkfq22zPl3d1eq0yrLwh/Z/fWKkfb6SyysROL8y6s8u3dpFX1YHSg0BR6i913h4aoZw9B2BG27cafLLTwKYsp2dFo1PWl4O6u9giFJIeqwloZHLKKrwh0cBFhB7RH0I58asxkZpCH6uWjJierahmHe7iS+E6i+9oCHkOZ59hmCYNimIs3hM= 17 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/loads/README.md: -------------------------------------------------------------------------------- 1 | # Loads OAI specs [![Build Status](https://travis-ci.org/go-openapi/loads.svg?branch=master)](https://travis-ci.org/go-openapi/loads) [![codecov](https://codecov.io/gh/go-openapi/loads/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/loads) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) 2 | 3 | [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/loads/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/loads?status.svg)](http://godoc.org/github.com/go-openapi/loads) 4 | 5 | Loading of OAI specification documents from local or remote locations. 6 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/runtime/.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | indent_style = space 9 | indent_size = 2 10 | trim_trailing_whitespace = true 11 | 12 | # Set default charset 13 | [*.{js,py,go,scala,rb,java,html,css,less,sass,md}] 14 | charset = utf-8 15 | 16 | # Tab indentation (no size specified) 17 | [*.go] 18 | indent_style = tab 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | 23 | # Matches the exact files either package.json or .travis.yml 24 | [{package.json,.travis.yml}] 25 | indent_style = space 26 | indent_size = 2 27 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/runtime/.gitignore: -------------------------------------------------------------------------------- 1 | secrets.yml 2 | coverage.out 3 | *.cov 4 | *.out 5 | playground 6 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/runtime/README.md: -------------------------------------------------------------------------------- 1 | # runtime [![Build Status](https://travis-ci.org/go-openapi/runtime.svg?branch=client-context)](https://travis-ci.org/go-openapi/runtime) [![codecov](https://codecov.io/gh/go-openapi/runtime/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/runtime) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) 2 | 3 | [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/runtime/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/runtime?status.svg)](http://godoc.org/github.com/go-openapi/runtime) 4 | 5 | The runtime component for use in codegeneration or as untyped usage. 6 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/runtime/discard.go: -------------------------------------------------------------------------------- 1 | package runtime 2 | 3 | import "io" 4 | 5 | // DiscardConsumer does absolutely nothing, it's a black hole. 6 | var DiscardConsumer = ConsumerFunc(func(_ io.Reader, _ interface{}) error { return nil }) 7 | 8 | // DiscardProducer does absolutely nothing, it's a black hole. 9 | var DiscardProducer = ProducerFunc(func(_ io.Writer, _ interface{}) error { return nil }) 10 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/runtime/file.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 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 runtime 16 | 17 | import "mime/multipart" 18 | 19 | // File represents an uploaded file. 20 | type File struct { 21 | Data multipart.File 22 | Header *multipart.FileHeader 23 | } 24 | 25 | // Read bytes from the file 26 | func (f *File) Read(p []byte) (n int, err error) { 27 | return f.Data.Read(p) 28 | } 29 | 30 | // Close the file 31 | func (f *File) Close() error { 32 | return f.Data.Close() 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/runtime/flagext/byte_size.go: -------------------------------------------------------------------------------- 1 | package flagext 2 | 3 | import ( 4 | "github.com/docker/go-units" 5 | ) 6 | 7 | // ByteSize used to pass byte sizes to a go-flags CLI 8 | type ByteSize int 9 | 10 | // MarshalFlag implements go-flags Marshaller interface 11 | func (b ByteSize) MarshalFlag() (string, error) { 12 | return units.HumanSize(float64(b)), nil 13 | } 14 | 15 | // UnmarshalFlag implements go-flags Unmarshaller interface 16 | func (b *ByteSize) UnmarshalFlag(value string) error { 17 | sz, err := units.FromHumanSize(value) 18 | if err != nil { 19 | return err 20 | } 21 | *b = ByteSize(int(sz)) 22 | return nil 23 | } 24 | 25 | // String method for a bytesize (pflag value and stringer interface) 26 | func (b ByteSize) String() string { 27 | return units.HumanSize(float64(b)) 28 | } 29 | 30 | // Set the value of this bytesize (pflag value interfaces) 31 | func (b *ByteSize) Set(value string) error { 32 | return b.UnmarshalFlag(value) 33 | } 34 | 35 | // Type returns the type of the pflag value (pflag value interface) 36 | func (b *ByteSize) Type() string { 37 | return "byte-size" 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/runtime/logger/logger.go: -------------------------------------------------------------------------------- 1 | package logger 2 | 3 | import "os" 4 | 5 | type Logger interface { 6 | Printf(format string, args ...interface{}) 7 | Debugf(format string, args ...interface{}) 8 | } 9 | 10 | func DebugEnabled() bool { 11 | return os.Getenv("SWAGGER_DEBUG") != "" || os.Getenv("DEBUG") != "" 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/runtime/logger/standard.go: -------------------------------------------------------------------------------- 1 | package logger 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | ) 7 | 8 | type StandardLogger struct{} 9 | 10 | func (StandardLogger) Printf(format string, args ...interface{}) { 11 | if len(format) == 0 || format[len(format)-1] != '\n' { 12 | format += "\n" 13 | } 14 | fmt.Fprintf(os.Stderr, format, args...) 15 | } 16 | 17 | func (StandardLogger) Debugf(format string, args ...interface{}) { 18 | if len(format) == 0 || format[len(format)-1] != '\n' { 19 | format += "\n" 20 | } 21 | fmt.Fprintf(os.Stderr, format, args...) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/runtime/middleware/denco/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Naoya Inada 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/runtime/middleware/denco/util.go: -------------------------------------------------------------------------------- 1 | package denco 2 | 3 | // NextSeparator returns an index of next separator in path. 4 | func NextSeparator(path string, start int) int { 5 | for start < len(path) { 6 | if c := path[start]; c == '/' || c == TerminationCharacter { 7 | break 8 | } 9 | start++ 10 | } 11 | return start 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/runtime/middleware/go18.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package middleware 4 | 5 | import "net/url" 6 | 7 | func pathUnescape(path string) (string, error) { 8 | return url.PathUnescape(path) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/runtime/middleware/operation.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 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 middleware 16 | 17 | import "net/http" 18 | 19 | // NewOperationExecutor creates a context aware middleware that handles the operations after routing 20 | func NewOperationExecutor(ctx *Context) http.Handler { 21 | return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { 22 | // use context to lookup routes 23 | route, rCtx, _ := ctx.RouteInfo(r) 24 | if rCtx != nil { 25 | r = rCtx 26 | } 27 | 28 | route.Handler.ServeHTTP(rw, r) 29 | }) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/runtime/middleware/pre_go18.go: -------------------------------------------------------------------------------- 1 | // +build !go1.8 2 | 3 | package middleware 4 | 5 | import "net/url" 6 | 7 | func pathUnescape(path string) (string, error) { 8 | return url.QueryUnescape(path) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/runtime/security/authorizer.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 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 security 16 | 17 | import ( 18 | "net/http" 19 | 20 | "github.com/go-openapi/runtime" 21 | ) 22 | 23 | // Authorized provides a default implementation of the Authorizer interface where all 24 | // requests are authorized (successful) 25 | func Authorized() runtime.Authorizer { 26 | return runtime.AuthorizerFunc(func(_ *http.Request, _ interface{}) error { return nil }) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/runtime/values.go: -------------------------------------------------------------------------------- 1 | package runtime 2 | 3 | // Values typically represent parameters on a http request. 4 | type Values map[string][]string 5 | 6 | // GetOK returns the values collection for the given key. 7 | // When the key is present in the map it will return true for hasKey. 8 | // When the value is not empty it will return true for hasValue. 9 | func (v Values) GetOK(key string) (value []string, hasKey bool, hasValue bool) { 10 | value, hasKey = v[key] 11 | if !hasKey { 12 | return 13 | } 14 | if len(value) == 0 { 15 | return 16 | } 17 | hasValue = true 18 | return 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/spec/.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | indent_style = space 9 | indent_size = 2 10 | trim_trailing_whitespace = true 11 | 12 | # Set default charset 13 | [*.{js,py,go,scala,rb,java,html,css,less,sass,md}] 14 | charset = utf-8 15 | 16 | # Tab indentation (no size specified) 17 | [*.go] 18 | indent_style = tab 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | 23 | # Matches the exact files either package.json or .travis.yml 24 | [{package.json,.travis.yml}] 25 | indent_style = space 26 | indent_size = 2 27 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/spec/.gitignore: -------------------------------------------------------------------------------- 1 | secrets.yml 2 | coverage.out 3 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/spec/.golangci.yml: -------------------------------------------------------------------------------- 1 | linters-settings: 2 | govet: 3 | check-shadowing: true 4 | golint: 5 | min-confidence: 0 6 | gocyclo: 7 | min-complexity: 25 8 | maligned: 9 | suggest-new: true 10 | dupl: 11 | threshold: 100 12 | goconst: 13 | min-len: 2 14 | min-occurrences: 2 15 | 16 | linters: 17 | enable-all: true 18 | disable: 19 | - maligned 20 | - unparam 21 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/spec/README.md: -------------------------------------------------------------------------------- 1 | # OAI object model [![Build Status](https://travis-ci.org/go-openapi/spec.svg?branch=master)](https://travis-ci.org/go-openapi/spec) [![codecov](https://codecov.io/gh/go-openapi/spec/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/spec) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) 2 | 3 | [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/spec/master/LICENSE) 4 | [![GoDoc](https://godoc.org/github.com/go-openapi/spec?status.svg)](http://godoc.org/github.com/go-openapi/spec) 5 | [![GolangCI](https://golangci.com/badges/github.com/go-openapi/spec.svg)](https://golangci.com) 6 | [![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/spec)](https://goreportcard.com/report/github.com/go-openapi/spec) 7 | 8 | The object model for OpenAPI specification documents. 9 | 10 | Currently supports Swagger 2.0. 11 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/spec/contact_info.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 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 spec 16 | 17 | // ContactInfo contact information for the exposed API. 18 | // 19 | // For more information: http://goo.gl/8us55a#contactObject 20 | type ContactInfo struct { 21 | Name string `json:"name,omitempty"` 22 | URL string `json:"url,omitempty"` 23 | Email string `json:"email,omitempty"` 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/spec/external_docs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 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 spec 16 | 17 | // ExternalDocumentation allows referencing an external resource for 18 | // extended documentation. 19 | // 20 | // For more information: http://goo.gl/8us55a#externalDocumentationObject 21 | type ExternalDocumentation struct { 22 | Description string `json:"description,omitempty"` 23 | URL string `json:"url,omitempty"` 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/spec/license.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 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 spec 16 | 17 | // License information for the exposed API. 18 | // 19 | // For more information: http://goo.gl/8us55a#licenseObject 20 | type License struct { 21 | Name string `json:"name,omitempty"` 22 | URL string `json:"url,omitempty"` 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/strfmt/.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | indent_style = space 9 | indent_size = 2 10 | trim_trailing_whitespace = true 11 | 12 | # Set default charset 13 | [*.{js,py,go,scala,rb,java,html,css,less,sass,md}] 14 | charset = utf-8 15 | 16 | # Tab indentation (no size specified) 17 | [*.go] 18 | indent_style = tab 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | 23 | # Matches the exact files either package.json or .travis.yml 24 | [{package.json,.travis.yml}] 25 | indent_style = space 26 | indent_size = 2 27 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/strfmt/.gitignore: -------------------------------------------------------------------------------- 1 | secrets.yml 2 | coverage.out 3 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/strfmt/.golangci.yml: -------------------------------------------------------------------------------- 1 | linters-settings: 2 | govet: 3 | check-shadowing: true 4 | golint: 5 | min-confidence: 0 6 | gocyclo: 7 | min-complexity: 25 8 | maligned: 9 | suggest-new: true 10 | dupl: 11 | threshold: 100 12 | goconst: 13 | min-len: 2 14 | min-occurrences: 2 15 | 16 | linters: 17 | enable-all: true 18 | disable: 19 | - maligned 20 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/strfmt/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 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 strfmt contains custom string formats 16 | // 17 | // TODO: add info on how to define and register a custom format 18 | package strfmt 19 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | indent_style = space 9 | indent_size = 2 10 | trim_trailing_whitespace = true 11 | 12 | # Set default charset 13 | [*.{js,py,go,scala,rb,java,html,css,less,sass,md}] 14 | charset = utf-8 15 | 16 | # Tab indentation (no size specified) 17 | [*.go] 18 | indent_style = tab 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | 23 | # Matches the exact files either package.json or .travis.yml 24 | [{package.json,.travis.yml}] 25 | indent_style = space 26 | indent_size = 2 27 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/.gitignore: -------------------------------------------------------------------------------- 1 | secrets.yml 2 | vendor 3 | Godeps 4 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/.golangci.yml: -------------------------------------------------------------------------------- 1 | linters-settings: 2 | govet: 3 | check-shadowing: true 4 | golint: 5 | min-confidence: 0 6 | gocyclo: 7 | min-complexity: 25 8 | maligned: 9 | suggest-new: true 10 | dupl: 11 | threshold: 100 12 | goconst: 13 | min-len: 2 14 | min-occurrences: 2 15 | 16 | linters: 17 | enable-all: true 18 | disable: 19 | - maligned 20 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.8 4 | - 1.9.x 5 | - 1.10.x 6 | install: 7 | - go get -u github.com/stretchr/testify 8 | - go get -u github.com/mailru/easyjson 9 | - go get -u gopkg.in/yaml.v2 10 | script: 11 | - go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic ./... 12 | after_success: 13 | - bash <(curl -s https://codecov.io/bash) 14 | notifications: 15 | slack: 16 | secure: QUWvCkBBK09GF7YtEvHHVt70JOkdlNBG0nIKu/5qc4/nW5HP8I2w0SEf/XR2je0eED1Qe3L/AfMCWwrEj+IUZc3l4v+ju8X8R3Lomhme0Eb0jd1MTMCuPcBT47YCj0M7RON7vXtbFfm1hFJ/jLe5+9FXz0hpXsR24PJc5ZIi/ogNwkaPqG4BmndzecpSh0vc2FJPZUD9LT0I09REY/vXR0oQAalLkW0asGD5taHZTUZq/kBpsNxaAFrLM23i4mUcf33M5fjLpvx5LRICrX/57XpBrDh2TooBU6Qj3CgoY0uPRYUmSNxbVx1czNzl2JtEpb5yjoxfVPQeg0BvQM00G8LJINISR+ohrjhkZmAqchDupAX+yFrxTtORa78CtnIL6z/aTNlgwwVD8kvL/1pFA/JWYmKDmz93mV/+6wubGzNSQCstzjkFA4/iZEKewKUoRIAi/fxyscP6L/rCpmY/4llZZvrnyTqVbt6URWpopUpH4rwYqreXAtJxJsfBJIeSmUIiDIOMGkCTvyTEW3fWGmGoqWtSHLoaWDyAIGb7azb+KvfpWtEcoPFWfSWU+LGee0A/YsUhBl7ADB9A0CJEuR8q4BPpKpfLwPKSiKSAXL7zDkyjExyhtgqbSl2jS+rKIHOZNL8JkCcTP2MKMVd563C5rC5FMKqu3S9m2b6380E= 17 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/README.md: -------------------------------------------------------------------------------- 1 | # Swag [![Build Status](https://travis-ci.org/go-openapi/swag.svg?branch=master)](https://travis-ci.org/go-openapi/swag) [![codecov](https://codecov.io/gh/go-openapi/swag/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/swag) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) 2 | 3 | [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/swag/master/LICENSE) 4 | [![GoDoc](https://godoc.org/github.com/go-openapi/swag?status.svg)](http://godoc.org/github.com/go-openapi/swag) 5 | [![GolangCI](https://golangci.com/badges/github.com/go-openapi/swag.svg)](https://golangci.com) 6 | [![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/swag)](https://goreportcard.com/report/github.com/go-openapi/swag) 7 | 8 | Contains a bunch of helper functions: 9 | 10 | * convert between value and pointers for builtins 11 | * convert from string to builtin 12 | * fast json concatenation 13 | * search in path 14 | * load from file or http 15 | * name mangling 16 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/net.go: -------------------------------------------------------------------------------- 1 | package swag 2 | 3 | import ( 4 | "net" 5 | "strconv" 6 | ) 7 | 8 | // SplitHostPort splits a network address into a host and a port. 9 | // The port is -1 when there is no port to be found 10 | func SplitHostPort(addr string) (host string, port int, err error) { 11 | h, p, err := net.SplitHostPort(addr) 12 | if err != nil { 13 | return "", -1, err 14 | } 15 | if p == "" { 16 | return "", -1, &net.AddrError{Err: "missing port in address", Addr: addr} 17 | } 18 | 19 | pi, err := strconv.Atoi(p) 20 | if err != nil { 21 | return "", -1, err 22 | } 23 | return h, pi, nil 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/post_go18.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package swag 4 | 5 | import "net/url" 6 | 7 | func pathUnescape(path string) (string, error) { 8 | return url.PathUnescape(path) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/pre_go18.go: -------------------------------------------------------------------------------- 1 | // +build !go1.8 2 | 3 | package swag 4 | 5 | import "net/url" 6 | 7 | func pathUnescape(path string) (string, error) { 8 | return url.QueryUnescape(path) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/validate/.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | indent_style = space 9 | indent_size = 2 10 | trim_trailing_whitespace = true 11 | 12 | # Set default charset 13 | [*.{js,py,go,scala,rb,java,html,css,less,sass,md}] 14 | charset = utf-8 15 | 16 | # Tab indentation (no size specified) 17 | [*.go] 18 | indent_style = tab 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | 23 | # Matches the exact files either package.json or .travis.yml 24 | [{package.json,.travis.yml}] 25 | indent_style = space 26 | indent_size = 2 27 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/validate/.gitignore: -------------------------------------------------------------------------------- 1 | secrets.yml 2 | coverage.out 3 | *.cov 4 | *.out 5 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/validate/.golangci.yml: -------------------------------------------------------------------------------- 1 | linters-settings: 2 | govet: 3 | check-shadowing: true 4 | golint: 5 | min-confidence: 0 6 | gocyclo: 7 | min-complexity: 25 8 | maligned: 9 | suggest-new: true 10 | dupl: 11 | threshold: 100 12 | goconst: 13 | min-len: 2 14 | min-occurrences: 2 15 | 16 | linters: 17 | enable-all: true 18 | disable: 19 | - maligned 20 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/validate/README.md: -------------------------------------------------------------------------------- 1 | # Validation helpers [![Build Status](https://travis-ci.org/go-openapi/validate.svg?branch=master)](https://travis-ci.org/go-openapi/validate) [![codecov](https://codecov.io/gh/go-openapi/validate/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/validate) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) 2 | 3 | [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/validate/master/LICENSE) 4 | [![GoDoc](https://godoc.org/github.com/go-openapi/validate?status.svg)](http://godoc.org/github.com/go-openapi/validate) 5 | [![GolangCI](https://golangci.com/badges/github.com/go-openapi/validate.svg)](https://golangci.com) 6 | [![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/validate)](https://goreportcard.com/report/github.com/go-openapi/validate) 7 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/validate/update-fixtures.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu -o pipefail 4 | dir=$(git rev-parse --show-toplevel) 5 | scratch=$(mktemp -d -t tmp.XXXXXXXXXX) 6 | 7 | function finish { 8 | rm -rf "$scratch" 9 | } 10 | trap finish EXIT SIGHUP SIGINT SIGTERM 11 | 12 | cd "$scratch" 13 | git clone https://github.com/json-schema-org/JSON-Schema-Test-Suite Suite 14 | cp -r Suite/tests/draft4/* "$dir/fixtures/jsonschema_suite" 15 | cp -a Suite/remotes "$dir/fixtures/jsonschema_suite" 16 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/.gitignore: -------------------------------------------------------------------------------- 1 | cmd/snappytool/snappytool 2 | testdata/bench 3 | 4 | # These explicitly listed benchmark data files are for an obsolete version of 5 | # snappy_test.go. 6 | testdata/alice29.txt 7 | testdata/asyoulik.txt 8 | testdata/fireworks.jpeg 9 | testdata/geo.protodata 10 | testdata/html 11 | testdata/html_x_4 12 | testdata/kppkn.gtb 13 | testdata/lcet10.txt 14 | testdata/paper-100k.pdf 15 | testdata/plrabn12.txt 16 | testdata/urls.10K 17 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Snappy-Go authors for copyright purposes. 2 | # This file is distinct from the CONTRIBUTORS files. 3 | # See the latter for an explanation. 4 | 5 | # Names should be added to this file as 6 | # Name or Organization 7 | # The email address is not required for organizations. 8 | 9 | # Please keep the list sorted. 10 | 11 | Damian Gryski 12 | Google Inc. 13 | Jan Mercl <0xjnml@gmail.com> 14 | Rodolfo Carvalho 15 | Sebastien Binet 16 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/decode_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Snappy-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 !appengine 6 | // +build gc 7 | // +build !noasm 8 | 9 | package snappy 10 | 11 | // decode has the same semantics as in decode_other.go. 12 | // 13 | //go:noescape 14 | func decode(dst, src []byte) int 15 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/encode_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Snappy-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 !appengine 6 | // +build gc 7 | // +build !noasm 8 | 9 | package snappy 10 | 11 | // emitLiteral has the same semantics as in encode_other.go. 12 | // 13 | //go:noescape 14 | func emitLiteral(dst, lit []byte) int 15 | 16 | // emitCopy has the same semantics as in encode_other.go. 17 | // 18 | //go:noescape 19 | func emitCopy(dst []byte, offset, length int) int 20 | 21 | // extendMatch has the same semantics as in encode_other.go. 22 | // 23 | //go:noescape 24 | func extendMatch(src []byte, i, j int) int 25 | 26 | // encodeBlock has the same semantics as in encode_other.go. 27 | // 28 | //go:noescape 29 | func encodeBlock(dst, src []byte) (d int) 30 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/.gitignore: -------------------------------------------------------------------------------- 1 | y.output 2 | 3 | # ignore intellij files 4 | .idea 5 | *.iml 6 | *.ipr 7 | *.iws 8 | 9 | *.test 10 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: go 4 | 5 | go: 6 | - 1.x 7 | - tip 8 | 9 | branches: 10 | only: 11 | - master 12 | 13 | script: make test 14 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/Makefile: -------------------------------------------------------------------------------- 1 | TEST?=./... 2 | 3 | default: test 4 | 5 | fmt: generate 6 | go fmt ./... 7 | 8 | test: generate 9 | go get -t ./... 10 | go test $(TEST) $(TESTARGS) 11 | 12 | generate: 13 | go generate ./... 14 | 15 | updatedeps: 16 | go get -u golang.org/x/tools/cmd/stringer 17 | 18 | .PHONY: default generate test updatedeps 19 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "build-{branch}-{build}" 2 | image: Visual Studio 2015 3 | clone_folder: c:\gopath\src\github.com\hashicorp\hcl 4 | environment: 5 | GOPATH: c:\gopath 6 | init: 7 | - git config --global core.autocrlf false 8 | install: 9 | - cmd: >- 10 | echo %Path% 11 | 12 | go version 13 | 14 | go env 15 | 16 | go get -t ./... 17 | 18 | build_script: 19 | - cmd: go test -v ./... 20 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl.go: -------------------------------------------------------------------------------- 1 | // Package hcl decodes HCL into usable Go structures. 2 | // 3 | // hcl input can come in either pure HCL format or JSON format. 4 | // It can be parsed into an AST, and then decoded into a structure, 5 | // or it can be decoded directly from a string into a structure. 6 | // 7 | // If you choose to parse HCL into a raw AST, the benefit is that you 8 | // can write custom visitor implementations to implement custom 9 | // semantic checks. By default, HCL does not perform any semantic 10 | // checks. 11 | package hcl 12 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/error.go: -------------------------------------------------------------------------------- 1 | package parser 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/hashicorp/hcl/hcl/token" 7 | ) 8 | 9 | // PosError is a parse error that contains a position. 10 | type PosError struct { 11 | Pos token.Pos 12 | Err error 13 | } 14 | 15 | func (e *PosError) Error() string { 16 | return fmt.Sprintf("At %s: %s", e.Pos, e.Err) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/lex.go: -------------------------------------------------------------------------------- 1 | package hcl 2 | 3 | import ( 4 | "unicode" 5 | "unicode/utf8" 6 | ) 7 | 8 | type lexModeValue byte 9 | 10 | const ( 11 | lexModeUnknown lexModeValue = iota 12 | lexModeHcl 13 | lexModeJson 14 | ) 15 | 16 | // lexMode returns whether we're going to be parsing in JSON 17 | // mode or HCL mode. 18 | func lexMode(v []byte) lexModeValue { 19 | var ( 20 | r rune 21 | w int 22 | offset int 23 | ) 24 | 25 | for { 26 | r, w = utf8.DecodeRune(v[offset:]) 27 | offset += w 28 | if unicode.IsSpace(r) { 29 | continue 30 | } 31 | if r == '{' { 32 | return lexModeJson 33 | } 34 | break 35 | } 36 | 37 | return lexModeHcl 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/parse.go: -------------------------------------------------------------------------------- 1 | package hcl 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/hashicorp/hcl/hcl/ast" 7 | hclParser "github.com/hashicorp/hcl/hcl/parser" 8 | jsonParser "github.com/hashicorp/hcl/json/parser" 9 | ) 10 | 11 | // ParseBytes accepts as input byte slice and returns ast tree. 12 | // 13 | // Input can be either JSON or HCL 14 | func ParseBytes(in []byte) (*ast.File, error) { 15 | return parse(in) 16 | } 17 | 18 | // ParseString accepts input as a string and returns ast tree. 19 | func ParseString(input string) (*ast.File, error) { 20 | return parse([]byte(input)) 21 | } 22 | 23 | func parse(in []byte) (*ast.File, error) { 24 | switch lexMode(in) { 25 | case lexModeHcl: 26 | return hclParser.Parse(in) 27 | case lexModeJson: 28 | return jsonParser.Parse(in) 29 | } 30 | 31 | return nil, fmt.Errorf("unknown config format") 32 | } 33 | 34 | // Parse parses the given input and returns the root object. 35 | // 36 | // The input format can be either HCL or JSON. 37 | func Parse(input string) (*ast.File, error) { 38 | return parse([]byte(input)) 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/inconshreveable/mousetrap/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2014 Alan Shreve 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 | -------------------------------------------------------------------------------- /vendor/github.com/inconshreveable/mousetrap/README.md: -------------------------------------------------------------------------------- 1 | # mousetrap 2 | 3 | mousetrap is a tiny library that answers a single question. 4 | 5 | On a Windows machine, was the process invoked by someone double clicking on 6 | the executable file while browsing in explorer? 7 | 8 | ### Motivation 9 | 10 | Windows developers unfamiliar with command line tools will often "double-click" 11 | the executable for a tool. Because most CLI tools print the help and then exit 12 | when invoked without arguments, this is often very frustrating for those users. 13 | 14 | mousetrap provides a way to detect these invocations so that you can provide 15 | more helpful behavior and instructions on how to run the CLI tool. To see what 16 | this looks like, both from an organizational and a technical perspective, see 17 | https://inconshreveable.com/09-09-2014/sweat-the-small-stuff/ 18 | 19 | ### The interface 20 | 21 | The library exposes a single interface: 22 | 23 | func StartedByExplorer() (bool) 24 | -------------------------------------------------------------------------------- /vendor/github.com/inconshreveable/mousetrap/trap_others.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package mousetrap 4 | 5 | // StartedByExplorer returns true if the program was invoked by the user 6 | // double-clicking on the executable from explorer.exe 7 | // 8 | // It is conservative and returns false if any of the internal calls fail. 9 | // It does not guarantee that the program was run from a terminal. It only can tell you 10 | // whether it was launched from explorer.exe 11 | // 12 | // On non-Windows platforms, it always returns false. 13 | func StartedByExplorer() bool { 14 | return false 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/jessevdk/go-flags/arg.go: -------------------------------------------------------------------------------- 1 | package flags 2 | 3 | import ( 4 | "reflect" 5 | ) 6 | 7 | // Arg represents a positional argument on the command line. 8 | type Arg struct { 9 | // The name of the positional argument (used in the help) 10 | Name string 11 | 12 | // A description of the positional argument (used in the help) 13 | Description string 14 | 15 | // The minimal number of required positional arguments 16 | Required int 17 | 18 | // The maximum number of required positional arguments 19 | RequiredMaximum int 20 | 21 | value reflect.Value 22 | tag multiTag 23 | } 24 | 25 | func (a *Arg) isRemaining() bool { 26 | return a.value.Type().Kind() == reflect.Slice 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/jessevdk/go-flags/check_crosscompile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | echo '# linux arm7' 6 | GOARM=7 GOARCH=arm GOOS=linux go build 7 | echo '# linux arm5' 8 | GOARM=5 GOARCH=arm GOOS=linux go build 9 | echo '# windows 386' 10 | GOARCH=386 GOOS=windows go build 11 | echo '# windows amd64' 12 | GOARCH=amd64 GOOS=windows go build 13 | echo '# darwin' 14 | GOARCH=amd64 GOOS=darwin go build 15 | echo '# freebsd' 16 | GOARCH=amd64 GOOS=freebsd go build 17 | -------------------------------------------------------------------------------- /vendor/github.com/jessevdk/go-flags/termsize.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!plan9,!solaris,!appengine 2 | 3 | package flags 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | type winsize struct { 11 | row, col uint16 12 | xpixel, ypixel uint16 13 | } 14 | 15 | func getTerminalColumns() int { 16 | ws := winsize{} 17 | 18 | if tIOCGWINSZ != 0 { 19 | syscall.Syscall(syscall.SYS_IOCTL, 20 | uintptr(0), 21 | uintptr(tIOCGWINSZ), 22 | uintptr(unsafe.Pointer(&ws))) 23 | 24 | return int(ws.col) 25 | } 26 | 27 | return 80 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/jessevdk/go-flags/termsize_nosysioctl.go: -------------------------------------------------------------------------------- 1 | // +build windows plan9 solaris appengine 2 | 3 | package flags 4 | 5 | func getTerminalColumns() int { 6 | return 80 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/jessevdk/go-flags/tiocgwinsz_bsdish.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd netbsd openbsd 2 | 3 | package flags 4 | 5 | const ( 6 | tIOCGWINSZ = 0x40087468 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/github.com/jessevdk/go-flags/tiocgwinsz_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package flags 4 | 5 | const ( 6 | tIOCGWINSZ = 0x5413 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/github.com/jessevdk/go-flags/tiocgwinsz_other.go: -------------------------------------------------------------------------------- 1 | // +build !darwin,!freebsd,!netbsd,!openbsd,!linux 2 | 3 | package flags 4 | 5 | const ( 6 | tIOCGWINSZ = 0 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/github.com/justinas/alice/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | matrix: 4 | include: 5 | - go: 1.0.x 6 | - go: 1.1.x 7 | - go: 1.2.x 8 | - go: 1.3.x 9 | - go: 1.4.x 10 | - go: 1.5.x 11 | - go: 1.6.x 12 | - go: 1.7.x 13 | - go: 1.8.x 14 | - go: 1.9.x 15 | - go: tip 16 | allow_failures: 17 | - go: tip 18 | -------------------------------------------------------------------------------- /vendor/github.com/kardianos/osext/README.md: -------------------------------------------------------------------------------- 1 | ### Extensions to the "os" package. 2 | 3 | [![GoDoc](https://godoc.org/github.com/kardianos/osext?status.svg)](https://godoc.org/github.com/kardianos/osext) 4 | 5 | ## Find the current Executable and ExecutableFolder. 6 | 7 | As of go1.8 the Executable function may be found in `os`. The Executable function 8 | in the std lib `os` package is used if available. 9 | 10 | There is sometimes utility in finding the current executable file 11 | that is running. This can be used for upgrading the current executable 12 | or finding resources located relative to the executable file. Both 13 | working directory and the os.Args[0] value are arbitrary and cannot 14 | be relied on; os.Args[0] can be "faked". 15 | 16 | Multi-platform and supports: 17 | * Linux 18 | * OS X 19 | * Windows 20 | * Plan 9 21 | * BSDs. 22 | -------------------------------------------------------------------------------- /vendor/github.com/kardianos/osext/osext.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 | // Extensions to the standard "os" package. 6 | package osext // import "github.com/kardianos/osext" 7 | 8 | import "path/filepath" 9 | 10 | var cx, ce = executableClean() 11 | 12 | func executableClean() (string, error) { 13 | p, err := executable() 14 | return filepath.Clean(p), err 15 | } 16 | 17 | // Executable returns an absolute path that can be used to 18 | // re-invoke the current program. 19 | // It may not be valid after the current program exits. 20 | func Executable() (string, error) { 21 | return cx, ce 22 | } 23 | 24 | // Returns same path as Executable, returns just the folder 25 | // path. Excludes the executable name and any trailing slash. 26 | func ExecutableFolder() (string, error) { 27 | p, err := Executable() 28 | if err != nil { 29 | return "", err 30 | } 31 | 32 | return filepath.Dir(p), nil 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/kardianos/osext/osext_go18.go: -------------------------------------------------------------------------------- 1 | //+build go1.8,!openbsd 2 | 3 | package osext 4 | 5 | import "os" 6 | 7 | func executable() (string, error) { 8 | return os.Executable() 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/kardianos/osext/osext_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //+build !go1.8 6 | 7 | package osext 8 | 9 | import ( 10 | "os" 11 | "strconv" 12 | "syscall" 13 | ) 14 | 15 | func executable() (string, error) { 16 | f, err := os.Open("/proc/" + strconv.Itoa(os.Getpid()) + "/text") 17 | if err != nil { 18 | return "", err 19 | } 20 | defer f.Close() 21 | return syscall.Fd2path(int(f.Fd())) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/kardianos/osext/osext_procfs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.8,android !go1.8,linux !go1.8,netbsd !go1.8,solaris !go1.8,dragonfly 6 | 7 | package osext 8 | 9 | import ( 10 | "errors" 11 | "fmt" 12 | "os" 13 | "runtime" 14 | "strings" 15 | ) 16 | 17 | func executable() (string, error) { 18 | switch runtime.GOOS { 19 | case "linux", "android": 20 | const deletedTag = " (deleted)" 21 | execpath, err := os.Readlink("/proc/self/exe") 22 | if err != nil { 23 | return execpath, err 24 | } 25 | execpath = strings.TrimSuffix(execpath, deletedTag) 26 | execpath = strings.TrimPrefix(execpath, deletedTag) 27 | return execpath, nil 28 | case "netbsd": 29 | return os.Readlink("/proc/curproc/exe") 30 | case "dragonfly": 31 | return os.Readlink("/proc/curproc/file") 32 | case "solaris": 33 | return os.Readlink(fmt.Sprintf("/proc/%d/path/a.out", os.Getpid())) 34 | } 35 | return "", errors.New("ExecPath not implemented for " + runtime.GOOS) 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/kardianos/osext/osext_windows.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 !go1.8 6 | 7 | package osext 8 | 9 | import ( 10 | "syscall" 11 | "unicode/utf16" 12 | "unsafe" 13 | ) 14 | 15 | var ( 16 | kernel = syscall.MustLoadDLL("kernel32.dll") 17 | getModuleFileNameProc = kernel.MustFindProc("GetModuleFileNameW") 18 | ) 19 | 20 | // GetModuleFileName() with hModule = NULL 21 | func executable() (exePath string, err error) { 22 | return getModuleFileName() 23 | } 24 | 25 | func getModuleFileName() (string, error) { 26 | var n uint32 27 | b := make([]uint16, syscall.MAX_PATH) 28 | size := uint32(len(b)) 29 | 30 | r0, _, e1 := getModuleFileNameProc.Call(0, uintptr(unsafe.Pointer(&b[0])), uintptr(size)) 31 | n = uint32(r0) 32 | if n == 0 { 33 | return "", e1 34 | } 35 | return string(utf16.Decode(b[0:n])), nil 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/magiconair/properties/.gitignore: -------------------------------------------------------------------------------- 1 | *.sublime-project 2 | *.sublime-workspace 3 | *.un~ 4 | *.swp 5 | .idea/ 6 | *.iml 7 | -------------------------------------------------------------------------------- /vendor/github.com/magiconair/properties/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.4.x 4 | - 1.5.x 5 | - 1.6.x 6 | - 1.7.x 7 | - 1.8.x 8 | - 1.9.x 9 | - "1.10.x" 10 | - tip 11 | -------------------------------------------------------------------------------- /vendor/github.com/magiconair/properties/integrate.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Frank Schroeder. 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 properties 6 | 7 | import "flag" 8 | 9 | // MustFlag sets flags that are skipped by dst.Parse when p contains 10 | // the respective key for flag.Flag.Name. 11 | // 12 | // It's use is recommended with command line arguments as in: 13 | // flag.Parse() 14 | // p.MustFlag(flag.CommandLine) 15 | func (p *Properties) MustFlag(dst *flag.FlagSet) { 16 | m := make(map[string]*flag.Flag) 17 | dst.VisitAll(func(f *flag.Flag) { 18 | m[f.Name] = f 19 | }) 20 | dst.Visit(func(f *flag.Flag) { 21 | delete(m, f.Name) // overridden 22 | }) 23 | 24 | for name, f := range m { 25 | v, ok := p.Get(name) 26 | if !ok { 27 | continue 28 | } 29 | 30 | if err := f.Value.Set(v); err != nil { 31 | ErrorHandler(err) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/magiconair/properties/rangecheck.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Frank Schroeder. 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 properties 6 | 7 | import ( 8 | "fmt" 9 | "math" 10 | ) 11 | 12 | // make this a var to overwrite it in a test 13 | var is32Bit = ^uint(0) == math.MaxUint32 14 | 15 | // intRangeCheck checks if the value fits into the int type and 16 | // panics if it does not. 17 | func intRangeCheck(key string, v int64) int { 18 | if is32Bit && (v < math.MinInt32 || v > math.MaxInt32) { 19 | panic(fmt.Sprintf("Value %d for key %s out of range", v, key)) 20 | } 21 | return int(v) 22 | } 23 | 24 | // uintRangeCheck checks if the value fits into the uint type and 25 | // panics if it does not. 26 | func uintRangeCheck(key string, v uint64) uint { 27 | if is32Bit && v > math.MaxUint32 { 28 | panic(fmt.Sprintf("Value %d for key %s out of range", v, key)) 29 | } 30 | return uint(v) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/mailru/easyjson/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Mail.Ru Group 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /vendor/github.com/mailru/easyjson/jlexer/bytestostr.go: -------------------------------------------------------------------------------- 1 | // This file will only be included to the build if neither 2 | // easyjson_nounsafe nor appengine build tag is set. See README notes 3 | // for more details. 4 | 5 | //+build !easyjson_nounsafe 6 | //+build !appengine 7 | 8 | package jlexer 9 | 10 | import ( 11 | "reflect" 12 | "unsafe" 13 | ) 14 | 15 | // bytesToStr creates a string pointing at the slice to avoid copying. 16 | // 17 | // Warning: the string returned by the function should be used with care, as the whole input data 18 | // chunk may be either blocked from being freed by GC because of a single string or the buffer.Data 19 | // may be garbage-collected even when the string exists. 20 | func bytesToStr(data []byte) string { 21 | h := (*reflect.SliceHeader)(unsafe.Pointer(&data)) 22 | shdr := reflect.StringHeader{Data: h.Data, Len: h.Len} 23 | return *(*string)(unsafe.Pointer(&shdr)) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go: -------------------------------------------------------------------------------- 1 | // This file is included to the build if any of the buildtags below 2 | // are defined. Refer to README notes for more details. 3 | 4 | //+build easyjson_nounsafe appengine 5 | 6 | package jlexer 7 | 8 | // bytesToStr creates a string normally from []byte 9 | // 10 | // Note that this method is roughly 1.5x slower than using the 'unsafe' method. 11 | func bytesToStr(data []byte) string { 12 | return string(data) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/mailru/easyjson/jlexer/error.go: -------------------------------------------------------------------------------- 1 | package jlexer 2 | 3 | import "fmt" 4 | 5 | // LexerError implements the error interface and represents all possible errors that can be 6 | // generated during parsing the JSON data. 7 | type LexerError struct { 8 | Reason string 9 | Offset int 10 | Data string 11 | } 12 | 13 | func (l *LexerError) Error() string { 14 | return fmt.Sprintf("parse error: %s near offset %d of '%s'", l.Reason, l.Offset, l.Data) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.9.x 5 | - tip 6 | 7 | script: 8 | - go test 9 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/.gitignore: -------------------------------------------------------------------------------- 1 | test_program/test_program_bin 2 | fuzz/ 3 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | go: 4 | - 1.8.x 5 | - 1.9.x 6 | - 1.10.x 7 | - tip 8 | matrix: 9 | allow_failures: 10 | - go: tip 11 | fast_finish: true 12 | script: 13 | - if [ -n "$(go fmt ./...)" ]; then exit 1; fi 14 | - ./test.sh 15 | - ./benchmark.sh $TRAVIS_BRANCH https://github.com/$TRAVIS_REPO_SLUG.git 16 | before_install: 17 | - go get github.com/axw/gocov/gocov 18 | - go get github.com/mattn/goveralls 19 | - if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi 20 | branches: 21 | only: [master] 22 | after_success: 23 | - $HOME/gopath/bin/goveralls -service=travis-ci -coverprofile=coverage.out -repotoken $COVERALLS_TOKEN 24 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/benchmark.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | reference_ref=${1:-master} 6 | reference_git=${2:-.} 7 | 8 | if ! `hash benchstat 2>/dev/null`; then 9 | echo "Installing benchstat" 10 | go get golang.org/x/perf/cmd/benchstat 11 | go install golang.org/x/perf/cmd/benchstat 12 | fi 13 | 14 | tempdir=`mktemp -d /tmp/go-toml-benchmark-XXXXXX` 15 | ref_tempdir="${tempdir}/ref" 16 | ref_benchmark="${ref_tempdir}/benchmark-`echo -n ${reference_ref}|tr -s '/' '-'`.txt" 17 | local_benchmark="`pwd`/benchmark-local.txt" 18 | 19 | echo "=== ${reference_ref} (${ref_tempdir})" 20 | git clone ${reference_git} ${ref_tempdir} >/dev/null 2>/dev/null 21 | pushd ${ref_tempdir} >/dev/null 22 | git checkout ${reference_ref} >/dev/null 2>/dev/null 23 | go test -bench=. -benchmem | tee ${ref_benchmark} 24 | popd >/dev/null 25 | 26 | echo "" 27 | echo "=== local" 28 | go test -bench=. -benchmem | tee ${local_benchmark} 29 | 30 | echo "" 31 | echo "=== diff" 32 | benchstat -delta-test=none ${ref_benchmark} ${local_benchmark} -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/doc.go: -------------------------------------------------------------------------------- 1 | // Package toml is a TOML parser and manipulation library. 2 | // 3 | // This version supports the specification as described in 4 | // https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md 5 | // 6 | // Marshaling 7 | // 8 | // Go-toml can marshal and unmarshal TOML documents from and to data 9 | // structures. 10 | // 11 | // TOML document as a tree 12 | // 13 | // Go-toml can operate on a TOML document as a tree. Use one of the Load* 14 | // functions to parse TOML data and obtain a Tree instance, then one of its 15 | // methods to manipulate the tree. 16 | // 17 | // JSONPath-like queries 18 | // 19 | // The package github.com/pelletier/go-toml/query implements a system 20 | // similar to JSONPath to quickly retrieve elements of a TOML document using a 21 | // single expression. See the package documentation for more information. 22 | // 23 | package toml 24 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/example-crlf.toml: -------------------------------------------------------------------------------- 1 | # This is a TOML document. Boom. 2 | 3 | title = "TOML Example" 4 | 5 | [owner] 6 | name = "Tom Preston-Werner" 7 | organization = "GitHub" 8 | bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." 9 | dob = 1979-05-27T07:32:00Z # First class dates? Why not? 10 | 11 | [database] 12 | server = "192.168.1.1" 13 | ports = [ 8001, 8001, 8002 ] 14 | connection_max = 5000 15 | enabled = true 16 | 17 | [servers] 18 | 19 | # You can indent as you please. Tabs or spaces. TOML don't care. 20 | [servers.alpha] 21 | ip = "10.0.0.1" 22 | dc = "eqdc10" 23 | 24 | [servers.beta] 25 | ip = "10.0.0.2" 26 | dc = "eqdc10" 27 | 28 | [clients] 29 | data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it 30 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/example.toml: -------------------------------------------------------------------------------- 1 | # This is a TOML document. Boom. 2 | 3 | title = "TOML Example" 4 | 5 | [owner] 6 | name = "Tom Preston-Werner" 7 | organization = "GitHub" 8 | bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." 9 | dob = 1979-05-27T07:32:00Z # First class dates? Why not? 10 | 11 | [database] 12 | server = "192.168.1.1" 13 | ports = [ 8001, 8001, 8002 ] 14 | connection_max = 5000 15 | enabled = true 16 | 17 | [servers] 18 | 19 | # You can indent as you please. Tabs or spaces. TOML don't care. 20 | [servers.alpha] 21 | ip = "10.0.0.1" 22 | dc = "eqdc10" 23 | 24 | [servers.beta] 25 | ip = "10.0.0.2" 26 | dc = "eqdc10" 27 | 28 | [clients] 29 | data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it 30 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/fuzz.go: -------------------------------------------------------------------------------- 1 | // +build gofuzz 2 | 3 | package toml 4 | 5 | func Fuzz(data []byte) int { 6 | tree, err := LoadBytes(data) 7 | if err != nil { 8 | if tree != nil { 9 | panic("tree must be nil if there is an error") 10 | } 11 | return 0 12 | } 13 | 14 | str, err := tree.ToTomlString() 15 | if err != nil { 16 | if str != "" { 17 | panic(`str must be "" if there is an error`) 18 | } 19 | panic(err) 20 | } 21 | 22 | tree, err = Load(str) 23 | if err != nil { 24 | if tree != nil { 25 | panic("tree must be nil if there is an error") 26 | } 27 | return 0 28 | } 29 | 30 | return 1 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/fuzz.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | set -eu 3 | 4 | go get github.com/dvyukov/go-fuzz/go-fuzz 5 | go get github.com/dvyukov/go-fuzz/go-fuzz-build 6 | 7 | if [ ! -e toml-fuzz.zip ]; then 8 | go-fuzz-build github.com/pelletier/go-toml 9 | fi 10 | 11 | rm -fr fuzz 12 | mkdir -p fuzz/corpus 13 | cp *.toml fuzz/corpus 14 | 15 | go-fuzz -bin=toml-fuzz.zip -workdir=fuzz 16 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/marshal_test.toml: -------------------------------------------------------------------------------- 1 | title = "TOML Marshal Testing" 2 | 3 | [basic] 4 | bool = true 5 | date = 1979-05-27T07:32:00Z 6 | float = 123.4 7 | int = 5000 8 | string = "Bite me" 9 | uint = 5001 10 | 11 | [basic_lists] 12 | bools = [true,false,true] 13 | dates = [1979-05-27T07:32:00Z,1980-05-27T07:32:00Z] 14 | floats = [12.3,45.6,78.9] 15 | ints = [8001,8001,8002] 16 | strings = ["One","Two","Three"] 17 | uints = [5002,5003] 18 | 19 | [basic_map] 20 | one = "one" 21 | two = "two" 22 | 23 | [subdoc] 24 | 25 | [subdoc.first] 26 | name = "First" 27 | 28 | [subdoc.second] 29 | name = "Second" 30 | 31 | [[subdoclist]] 32 | name = "List.First" 33 | 34 | [[subdoclist]] 35 | name = "List.Second" 36 | 37 | [[subdocptrs]] 38 | name = "Second" 39 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/position.go: -------------------------------------------------------------------------------- 1 | // Position support for go-toml 2 | 3 | package toml 4 | 5 | import ( 6 | "fmt" 7 | ) 8 | 9 | // Position of a document element within a TOML document. 10 | // 11 | // Line and Col are both 1-indexed positions for the element's line number and 12 | // column number, respectively. Values of zero or less will cause Invalid(), 13 | // to return true. 14 | type Position struct { 15 | Line int // line within the document 16 | Col int // column within the line 17 | } 18 | 19 | // String representation of the position. 20 | // Displays 1-indexed line and column numbers. 21 | func (p Position) String() string { 22 | return fmt.Sprintf("(%d, %d)", p.Line, p.Col) 23 | } 24 | 25 | // Invalid returns whether or not the position is valid (i.e. with negative or 26 | // null values) 27 | func (p Position) Invalid() bool { 28 | return p.Line <= 0 || p.Col <= 0 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/philhofer/fwd/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2015, Philip Hofer 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /vendor/github.com/philhofer/fwd/writer_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package fwd 4 | 5 | func unsafestr(s string) []byte { return []byte(s) } 6 | -------------------------------------------------------------------------------- /vendor/github.com/philhofer/fwd/writer_unsafe.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package fwd 4 | 5 | import ( 6 | "reflect" 7 | "unsafe" 8 | ) 9 | 10 | // unsafe cast string as []byte 11 | func unsafestr(b string) []byte { 12 | l := len(b) 13 | return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{ 14 | Len: l, 15 | Cap: l, 16 | Data: (*reflect.StringHeader)(unsafe.Pointer(&b)).Data, 17 | })) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/.gitignore: -------------------------------------------------------------------------------- 1 | *.[68] 2 | *.a 3 | *.out 4 | *.swp 5 | _obj 6 | _testmain.go 7 | cmd/metrics-bench/metrics-bench 8 | cmd/metrics-example/metrics-example 9 | cmd/never-read/never-read 10 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.3 5 | - 1.4 6 | - 1.5 7 | - 1.6 8 | - 1.7 9 | - 1.8 10 | - 1.9 11 | 12 | script: 13 | - ./validate.sh 14 | 15 | # this should give us faster builds according to 16 | # http://docs.travis-ci.com/user/migrating-from-legacy/ 17 | sudo: false 18 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/json.go: -------------------------------------------------------------------------------- 1 | package metrics 2 | 3 | import ( 4 | "encoding/json" 5 | "io" 6 | "time" 7 | ) 8 | 9 | // MarshalJSON returns a byte slice containing a JSON representation of all 10 | // the metrics in the Registry. 11 | func (r *StandardRegistry) MarshalJSON() ([]byte, error) { 12 | return json.Marshal(r.GetAll()) 13 | } 14 | 15 | // WriteJSON writes metrics from the given registry periodically to the 16 | // specified io.Writer as JSON. 17 | func WriteJSON(r Registry, d time.Duration, w io.Writer) { 18 | for _ = range time.Tick(d) { 19 | WriteJSONOnce(r, w) 20 | } 21 | } 22 | 23 | // WriteJSONOnce writes metrics from the given registry to the specified 24 | // io.Writer as JSON. 25 | func WriteJSONOnce(r Registry, w io.Writer) { 26 | json.NewEncoder(w).Encode(r) 27 | } 28 | 29 | func (p *PrefixedRegistry) MarshalJSON() ([]byte, error) { 30 | return json.Marshal(p.GetAll()) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/metrics.go: -------------------------------------------------------------------------------- 1 | // Go port of Coda Hale's Metrics library 2 | // 3 | // 4 | // 5 | // Coda Hale's original work: 6 | package metrics 7 | 8 | // UseNilMetrics is checked by the constructor functions for all of the 9 | // standard metrics. If it is true, the metric returned is a stub. 10 | // 11 | // This global kill-switch helps quantify the observer effect and makes 12 | // for less cluttered pprof profiles. 13 | var UseNilMetrics bool = false 14 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/runtime_cgo.go: -------------------------------------------------------------------------------- 1 | // +build cgo 2 | // +build !appengine 3 | 4 | package metrics 5 | 6 | import "runtime" 7 | 8 | func numCgoCall() int64 { 9 | return runtime.NumCgoCall() 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/runtime_gccpufraction.go: -------------------------------------------------------------------------------- 1 | // +build go1.5 2 | 3 | package metrics 4 | 5 | import "runtime" 6 | 7 | func gcCPUFraction(memStats *runtime.MemStats) float64 { 8 | return memStats.GCCPUFraction 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/runtime_no_cgo.go: -------------------------------------------------------------------------------- 1 | // +build !cgo appengine 2 | 3 | package metrics 4 | 5 | func numCgoCall() int64 { 6 | return 0 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/runtime_no_gccpufraction.go: -------------------------------------------------------------------------------- 1 | // +build !go1.5 2 | 3 | package metrics 4 | 5 | import "runtime" 6 | 7 | func gcCPUFraction(memStats *runtime.MemStats) float64 { 8 | return 0 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/validate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # check there are no formatting issues 6 | GOFMT_LINES=`gofmt -l . | wc -l | xargs` 7 | test $GOFMT_LINES -eq 0 || echo "gofmt needs to be run, ${GOFMT_LINES} files have issues" 8 | 9 | # run the tests for the root package 10 | go test -race . 11 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.6.x 4 | - 1.7.x 5 | - 1.8.x 6 | - tip 7 | env: 8 | - GOMAXPROCS=4 GORACE=halt_on_error=1 9 | install: 10 | - go get github.com/stretchr/testify/assert 11 | - go get gopkg.in/gemnasium/logrus-airbrake-hook.v2 12 | - go get golang.org/x/sys/unix 13 | - go get golang.org/x/sys/windows 14 | script: 15 | - go test -race -v ./... 16 | -------------------------------------------------------------------------------- /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/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/terminal_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | // +build !appengine,!gopherjs 3 | 4 | package logrus 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ioctlReadTermios = unix.TIOCGETA 9 | 10 | type Termios unix.Termios 11 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine gopherjs 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_notappengine.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!gopherjs 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_linux.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2013 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build !appengine,!gopherjs 7 | 8 | package logrus 9 | 10 | import "golang.org/x/sys/unix" 11 | 12 | const ioctlReadTermios = unix.TCGETS 13 | 14 | type Termios unix.Termios 15 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/afero/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - 1.9 6 | - "1.10" 7 | - tip 8 | 9 | os: 10 | - linux 11 | - osx 12 | 13 | matrix: 14 | allow_failures: 15 | - go: tip 16 | fast_finish: true 17 | 18 | script: 19 | - go build 20 | - go test -race -v ./... 21 | 22 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/afero/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: '{build}' 2 | clone_folder: C:\gopath\src\github.com\spf13\afero 3 | environment: 4 | GOPATH: C:\gopath 5 | build_script: 6 | - cmd: >- 7 | go version 8 | 9 | go env 10 | 11 | go get -v github.com/spf13/afero/... 12 | 13 | go build github.com/spf13/afero 14 | test_script: 15 | - cmd: go test -race -v github.com/spf13/afero/... 16 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/afero/const_bsds.go: -------------------------------------------------------------------------------- 1 | // Copyright © 2016 Steve Francia . 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 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | // +build darwin openbsd freebsd netbsd dragonfly 15 | 16 | package afero 17 | 18 | import ( 19 | "syscall" 20 | ) 21 | 22 | const BADFD = syscall.EBADF 23 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/afero/const_win_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright © 2016 Steve Francia . 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 | // 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 | // +build !darwin 14 | // +build !openbsd 15 | // +build !freebsd 16 | // +build !dragonfly 17 | // +build !netbsd 18 | 19 | package afero 20 | 21 | import ( 22 | "syscall" 23 | ) 24 | 25 | const BADFD = syscall.EBADFD 26 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/afero/lstater.go: -------------------------------------------------------------------------------- 1 | // Copyright © 2018 Steve Francia . 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 | // 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 afero 15 | 16 | import ( 17 | "os" 18 | ) 19 | 20 | // Lstater is an optional interface in Afero. It is only implemented by the 21 | // filesystems saying so. 22 | // It will call Lstat if the filesystem iself is, or it delegates to, the os filesystem. 23 | // Else it will call Stat. 24 | // In addtion to the FileInfo, it will return a boolean telling whether Lstat was called or not. 25 | type Lstater interface { 26 | LstatIfPossible(name string) (os.FileInfo, bool, error) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/afero/mem/dir.go: -------------------------------------------------------------------------------- 1 | // Copyright © 2014 Steve Francia . 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 | // 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 mem 15 | 16 | type Dir interface { 17 | Len() int 18 | Names() []string 19 | Files() []*FileData 20 | Add(*FileData) 21 | Remove(*FileData) 22 | } 23 | 24 | func RemoveFromMemDir(dir *FileData, f *FileData) { 25 | dir.memDir.Remove(f) 26 | } 27 | 28 | func AddToMemDir(dir *FileData, f *FileData) { 29 | dir.memDir.Add(f) 30 | } 31 | 32 | func InitializeDir(d *FileData) { 33 | if d.memDir == nil { 34 | d.dir = true 35 | d.memDir = &DirMap{} 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cast/.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 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | 25 | *.bench 26 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cast/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: required 3 | go: 4 | - 1.7.5 5 | - 1.8 6 | - tip 7 | os: 8 | - linux 9 | matrix: 10 | allow_failures: 11 | - go: tip 12 | fast_finish: true 13 | script: 14 | - make check 15 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cast/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Steve Francia 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/.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 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | # Vim files https://github.com/github/gitignore/blob/master/Global/Vim.gitignore 23 | # swap 24 | [._]*.s[a-w][a-z] 25 | [._]s[a-w][a-z] 26 | # session 27 | Session.vim 28 | # temporary 29 | .netrwhist 30 | *~ 31 | # auto-generated tag files 32 | tags 33 | 34 | *.exe 35 | 36 | cobra.test 37 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/.mailmap: -------------------------------------------------------------------------------- 1 | Steve Francia 2 | Bjørn Erik Pedersen 3 | Fabiano Franz 4 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | matrix: 4 | include: 5 | - go: 1.9.4 6 | - go: 1.10.0 7 | - go: tip 8 | allow_failures: 9 | - go: tip 10 | 11 | before_install: 12 | - mkdir -p bin 13 | - curl -Lso bin/shellcheck https://github.com/caarlos0/shellcheck-docker/releases/download/v0.4.3/shellcheck 14 | - chmod +x bin/shellcheck 15 | script: 16 | - PATH=$PATH:$PWD/bin go test -v ./... 17 | - go build 18 | - diff -u <(echo -n) <(gofmt -d -s .) 19 | - if [ -z $NOVET ]; then 20 | diff -u <(echo -n) <(go tool vet . 2>&1 | grep -vE 'ExampleCommand|bash_completions.*Fprint'); 21 | fi 22 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/command_notwin.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package cobra 4 | 5 | var preExecHookFn func(*Command) 6 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/command_win.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package cobra 4 | 5 | import ( 6 | "os" 7 | "time" 8 | 9 | "github.com/inconshreveable/mousetrap" 10 | ) 11 | 12 | var preExecHookFn = preExecHook 13 | 14 | func preExecHook(c *Command) { 15 | if MousetrapHelpText != "" && mousetrap.StartedByExplorer() { 16 | c.Print(MousetrapHelpText) 17 | time.Sleep(5 * time.Second) 18 | os.Exit(1) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/jwalterweatherman/.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 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/* 2 | 3 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: go 4 | 5 | go: 6 | - 1.7.3 7 | - 1.8.1 8 | - tip 9 | 10 | matrix: 11 | allow_failures: 12 | - go: tip 13 | 14 | install: 15 | - go get github.com/golang/lint/golint 16 | - export PATH=$GOPATH/bin:$PATH 17 | - go install ./... 18 | 19 | script: 20 | - verify/all.sh -v 21 | - go test ./... 22 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/viper/.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 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.bench -------------------------------------------------------------------------------- /vendor/github.com/spf13/viper/.travis.yml: -------------------------------------------------------------------------------- 1 | go_import_path: github.com/spf13/viper 2 | 3 | language: go 4 | go: 5 | - 1.7.x 6 | - 1.8.x 7 | - 1.9.x 8 | - tip 9 | 10 | os: 11 | - linux 12 | - osx 13 | 14 | matrix: 15 | allow_failures: 16 | - go: tip 17 | fast_finish: true 18 | 19 | script: 20 | - go install ./... 21 | - diff -u <(echo -n) <(gofmt -d .) 22 | - go test -v ./... 23 | 24 | after_success: 25 | - go get -u -d github.com/spf13/hugo 26 | - cd $GOPATH/src/github.com/spf13/hugo && make && ./hugo -s docs && cd - 27 | 28 | sudo: false 29 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/viper/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Steve Francia 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /vendor/github.com/syndtr/goleveldb/leveldb/errors.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Suryandaru Triandana 2 | // All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style license that can be 5 | // found in the LICENSE file. 6 | 7 | package leveldb 8 | 9 | import ( 10 | "github.com/syndtr/goleveldb/leveldb/errors" 11 | ) 12 | 13 | // Common errors. 14 | var ( 15 | ErrNotFound = errors.ErrNotFound 16 | ErrReadOnly = errors.New("leveldb: read-only mode") 17 | ErrSnapshotReleased = errors.New("leveldb: snapshot released") 18 | ErrIterReleased = errors.New("leveldb: iterator released") 19 | ErrClosed = errors.New("leveldb: closed") 20 | ) 21 | -------------------------------------------------------------------------------- /vendor/github.com/syndtr/goleveldb/leveldb/filter.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012, Suryandaru Triandana 2 | // All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style license that can be 5 | // found in the LICENSE file. 6 | 7 | package leveldb 8 | 9 | import ( 10 | "github.com/syndtr/goleveldb/leveldb/filter" 11 | ) 12 | 13 | type iFilter struct { 14 | filter.Filter 15 | } 16 | 17 | func (f iFilter) Contains(filter, key []byte) bool { 18 | return f.Filter.Contains(filter, internalKey(key).ukey()) 19 | } 20 | 21 | func (f iFilter) NewGenerator() filter.FilterGenerator { 22 | return iFilterGenerator{f.Filter.NewGenerator()} 23 | } 24 | 25 | type iFilterGenerator struct { 26 | filter.FilterGenerator 27 | } 28 | 29 | func (g iFilterGenerator) Add(key []byte) { 30 | g.FilterGenerator.Add(internalKey(key).ukey()) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_nacl.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012, Suryandaru Triandana 2 | // All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style license that can be 5 | // found in the LICENSE file. 6 | 7 | // +build nacl 8 | 9 | package storage 10 | 11 | import ( 12 | "os" 13 | "syscall" 14 | ) 15 | 16 | func newFileLock(path string, readOnly bool) (fl fileLock, err error) { 17 | return nil, syscall.ENOTSUP 18 | } 19 | 20 | func setFileLock(f *os.File, readOnly, lock bool) error { 21 | return syscall.ENOTSUP 22 | } 23 | 24 | func rename(oldpath, newpath string) error { 25 | return syscall.ENOTSUP 26 | } 27 | 28 | func isErrInvalid(err error) bool { 29 | return false 30 | } 31 | 32 | func syncDir(name string) error { 33 | return syscall.ENOTSUP 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/syndtr/goleveldb/leveldb/util/crc32.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The LevelDB-Go Authors. All rights reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license that can be 4 | // found in the LICENSE file. 5 | 6 | package util 7 | 8 | import ( 9 | "hash/crc32" 10 | ) 11 | 12 | var table = crc32.MakeTable(crc32.Castagnoli) 13 | 14 | // CRC is a CRC-32 checksum computed using Castagnoli's polynomial. 15 | type CRC uint32 16 | 17 | // NewCRC creates a new crc based on the given bytes. 18 | func NewCRC(b []byte) CRC { 19 | return CRC(0).Update(b) 20 | } 21 | 22 | // Update updates the crc with the given bytes. 23 | func (c CRC) Update(b []byte) CRC { 24 | return CRC(crc32.Update(uint32(c), table, b)) 25 | } 26 | 27 | // Value returns a masked crc. 28 | func (c CRC) Value() uint32 { 29 | return uint32(c>>15|c<<17) + 0xa282ead8 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/syndtr/goleveldb/leveldb/util/hash.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012, Suryandaru Triandana 2 | // All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style license that can be 5 | // found in the LICENSE file. 6 | 7 | package util 8 | 9 | import ( 10 | "encoding/binary" 11 | ) 12 | 13 | // Hash return hash of the given data. 14 | func Hash(data []byte, seed uint32) uint32 { 15 | // Similar to murmur hash 16 | const ( 17 | m = uint32(0xc6a4a793) 18 | r = uint32(24) 19 | ) 20 | var ( 21 | h = seed ^ (uint32(len(data)) * m) 22 | i int 23 | ) 24 | 25 | for n := len(data) - len(data)%4; i < n; i += 4 { 26 | h += binary.LittleEndian.Uint32(data[i:]) 27 | h *= m 28 | h ^= (h >> 16) 29 | } 30 | 31 | switch len(data) - i { 32 | default: 33 | panic("not reached") 34 | case 3: 35 | h += uint32(data[i+2]) << 16 36 | fallthrough 37 | case 2: 38 | h += uint32(data[i+1]) << 8 39 | fallthrough 40 | case 1: 41 | h += uint32(data[i]) 42 | h *= m 43 | h ^= (h >> r) 44 | case 0: 45 | } 46 | 47 | return h 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/syndtr/goleveldb/leveldb/util/range.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Suryandaru Triandana 2 | // All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style license that can be 5 | // found in the LICENSE file. 6 | 7 | package util 8 | 9 | // Range is a key range. 10 | type Range struct { 11 | // Start of the key range, include in the range. 12 | Start []byte 13 | 14 | // Limit of the key range, not include in the range. 15 | Limit []byte 16 | } 17 | 18 | // BytesPrefix returns key range that satisfy the given prefix. 19 | // This only applicable for the standard 'bytes comparer'. 20 | func BytesPrefix(prefix []byte) *Range { 21 | var limit []byte 22 | for i := len(prefix) - 1; i >= 0; i-- { 23 | c := prefix[i] 24 | if c < 0xff { 25 | limit = make([]byte, i+1) 26 | copy(limit, prefix) 27 | limit[i] = c + 1 28 | break 29 | } 30 | } 31 | return &Range{prefix, limit} 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/tinylib/msgp/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Philip Hofer 2 | Portions Copyright (c) 2009 The Go Authors (license at http://golang.org) where indicated 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /vendor/github.com/tinylib/msgp/msgp/advise_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux,!appengine 2 | 3 | package msgp 4 | 5 | import ( 6 | "os" 7 | "syscall" 8 | ) 9 | 10 | func adviseRead(mem []byte) { 11 | syscall.Madvise(mem, syscall.MADV_SEQUENTIAL|syscall.MADV_WILLNEED) 12 | } 13 | 14 | func adviseWrite(mem []byte) { 15 | syscall.Madvise(mem, syscall.MADV_SEQUENTIAL) 16 | } 17 | 18 | func fallocate(f *os.File, sz int64) error { 19 | err := syscall.Fallocate(int(f.Fd()), 0, 0, sz) 20 | if err == syscall.ENOTSUP { 21 | return f.Truncate(sz) 22 | } 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/tinylib/msgp/msgp/advise_other.go: -------------------------------------------------------------------------------- 1 | // +build !linux appengine 2 | 3 | package msgp 4 | 5 | import ( 6 | "os" 7 | ) 8 | 9 | // TODO: darwin, BSD support 10 | 11 | func adviseRead(mem []byte) {} 12 | 13 | func adviseWrite(mem []byte) {} 14 | 15 | func fallocate(f *os.File, sz int64) error { 16 | return f.Truncate(sz) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/tinylib/msgp/msgp/appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package msgp 4 | 5 | // let's just assume appengine 6 | // uses 64-bit hardware... 7 | const smallint = false 8 | 9 | func UnsafeString(b []byte) string { 10 | return string(b) 11 | } 12 | 13 | func UnsafeBytes(s string) []byte { 14 | return []byte(s) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/tinylib/msgp/msgp/circular.go: -------------------------------------------------------------------------------- 1 | package msgp 2 | 3 | type timer interface { 4 | StartTimer() 5 | StopTimer() 6 | } 7 | 8 | // EndlessReader is an io.Reader 9 | // that loops over the same data 10 | // endlessly. It is used for benchmarking. 11 | type EndlessReader struct { 12 | tb timer 13 | data []byte 14 | offset int 15 | } 16 | 17 | // NewEndlessReader returns a new endless reader 18 | func NewEndlessReader(b []byte, tb timer) *EndlessReader { 19 | return &EndlessReader{tb: tb, data: b, offset: 0} 20 | } 21 | 22 | // Read implements io.Reader. In practice, it 23 | // always returns (len(p), nil), although it 24 | // fills the supplied slice while the benchmark 25 | // timer is stopped. 26 | func (c *EndlessReader) Read(p []byte) (int, error) { 27 | c.tb.StopTimer() 28 | var n int 29 | l := len(p) 30 | m := len(c.data) 31 | for n < l { 32 | nn := copy(p[n:], c.data[c.offset:]) 33 | n += nn 34 | c.offset += nn 35 | c.offset %= m 36 | } 37 | c.tb.StartTimer() 38 | return n, nil 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/tinylib/msgp/msgp/file_port.go: -------------------------------------------------------------------------------- 1 | // +build windows appengine 2 | 3 | package msgp 4 | 5 | import ( 6 | "io/ioutil" 7 | "os" 8 | ) 9 | 10 | // MarshalSizer is the combination 11 | // of the Marshaler and Sizer 12 | // interfaces. 13 | type MarshalSizer interface { 14 | Marshaler 15 | Sizer 16 | } 17 | 18 | func ReadFile(dst Unmarshaler, file *os.File) error { 19 | if u, ok := dst.(Decodable); ok { 20 | return u.DecodeMsg(NewReader(file)) 21 | } 22 | 23 | data, err := ioutil.ReadAll(file) 24 | if err != nil { 25 | return err 26 | } 27 | _, err = dst.UnmarshalMsg(data) 28 | return err 29 | } 30 | 31 | func WriteFile(src MarshalSizer, file *os.File) error { 32 | if e, ok := src.(Encodable); ok { 33 | w := NewWriter(file) 34 | err := e.EncodeMsg(w) 35 | if err == nil { 36 | err = w.Flush() 37 | } 38 | return err 39 | } 40 | 41 | raw, err := src.MarshalMsg(nil) 42 | if err != nil { 43 | return err 44 | } 45 | _, err = file.Write(raw) 46 | return err 47 | } 48 | -------------------------------------------------------------------------------- /vendor/github.com/tinylib/msgp/msgp/size.go: -------------------------------------------------------------------------------- 1 | package msgp 2 | 3 | // The sizes provided 4 | // are the worst-case 5 | // encoded sizes for 6 | // each type. For variable- 7 | // length types ([]byte, string), 8 | // the total encoded size is 9 | // the prefix size plus the 10 | // length of the object. 11 | const ( 12 | Int64Size = 9 13 | IntSize = Int64Size 14 | UintSize = Int64Size 15 | Int8Size = 2 16 | Int16Size = 3 17 | Int32Size = 5 18 | Uint8Size = 2 19 | ByteSize = Uint8Size 20 | Uint16Size = 3 21 | Uint32Size = 5 22 | Uint64Size = Int64Size 23 | Float64Size = 9 24 | Float32Size = 5 25 | Complex64Size = 10 26 | Complex128Size = 18 27 | 28 | TimeSize = 15 29 | BoolSize = 1 30 | NilSize = 1 31 | 32 | MapHeaderSize = 5 33 | ArrayHeaderSize = 5 34 | 35 | BytesPrefixSize = 5 36 | StringPrefixSize = 5 37 | ExtensionPrefixSize = 6 38 | ) 39 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_arrayof_gte_go15.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.5 5 | 6 | package codec 7 | 8 | import "reflect" 9 | 10 | const reflectArrayOfSupported = true 11 | 12 | func reflectArrayOf(count int, elem reflect.Type) reflect.Type { 13 | return reflect.ArrayOf(count, elem) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_arrayof_lt_go15.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build !go1.5 5 | 6 | package codec 7 | 8 | import "reflect" 9 | 10 | const reflectArrayOfSupported = false 11 | 12 | func reflectArrayOf(count int, elem reflect.Type) reflect.Type { 13 | panic("codec: reflect.ArrayOf unsupported in this go version") 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_makemap_gte_go19.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.9 5 | 6 | package codec 7 | 8 | import "reflect" 9 | 10 | func makeMapReflect(t reflect.Type, size int) reflect.Value { 11 | if size < 0 { 12 | return reflect.MakeMapWithSize(t, 4) 13 | } 14 | return reflect.MakeMapWithSize(t, size) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_makemap_lt_go19.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build !go1.9 5 | 6 | package codec 7 | 8 | import "reflect" 9 | 10 | func makeMapReflect(t reflect.Type, size int) reflect.Value { 11 | return reflect.MakeMap(t) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_unsupported_lt_go14.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build !go1.4 5 | 6 | package codec 7 | 8 | // This codec package will only work for go1.4 and above. 9 | // This is for the following reasons: 10 | // - go 1.4 was released in 2014 11 | // - go runtime is written fully in go 12 | // - interface only holds pointers 13 | // - reflect.Value is stabilized as 3 words 14 | 15 | func init() { 16 | panic("codec: go 1.3 and below are not supported") 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go15.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.5,!go1.6 5 | 6 | package codec 7 | 8 | import "os" 9 | 10 | var genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") == "1" 11 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go16.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.6,!go1.7 5 | 6 | package codec 7 | 8 | import "os" 9 | 10 | var genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") != "0" 11 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_vendor_gte_go17.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.7 5 | 6 | package codec 7 | 8 | const genCheckVendor = true 9 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_vendor_lt_go15.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build !go1.5 5 | 6 | package codec 7 | 8 | var genCheckVendor = false 9 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/z.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | package codec 5 | 6 | import "sort" 7 | 8 | // TODO: this is brittle, as it depends on z.go's init() being called last. 9 | // The current build tools all honor that files are passed in lexical order. 10 | // However, we should consider using an init_channel, 11 | // that each person doing init will write to. 12 | 13 | func init() { 14 | if !useLookupRecognizedTypes { 15 | return 16 | } 17 | sort.Sort(uintptrSlice(recognizedRtids)) 18 | sort.Sort(uintptrSlice(recognizedRtidPtrs)) 19 | recognizedRtidOrPtrs = make([]uintptr, len(recognizedRtids)+len(recognizedRtidPtrs)) 20 | copy(recognizedRtidOrPtrs, recognizedRtids) 21 | copy(recognizedRtidOrPtrs[len(recognizedRtids):], recognizedRtidPtrs) 22 | sort.Sort(uintptrSlice(recognizedRtidOrPtrs)) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/xordataexchange/crypt/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 XOR Data Exchange, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /vendor/github.com/xordataexchange/crypt/backend/backend.go: -------------------------------------------------------------------------------- 1 | // Package backend provides the K/V store interface for crypt backends. 2 | package backend 3 | 4 | // Response represents a response from a backend store. 5 | type Response struct { 6 | Value []byte 7 | Error error 8 | } 9 | 10 | // KVPair holds both a key and value when reading a list. 11 | type KVPair struct { 12 | Key string 13 | Value []byte 14 | } 15 | 16 | type KVPairs []*KVPair 17 | 18 | // A Store is a K/V store backend that retrieves and sets, and monitors 19 | // data in a K/V store. 20 | type Store interface { 21 | // Get retrieves a value from a K/V store for the provided key. 22 | Get(key string) ([]byte, error) 23 | 24 | // List retrieves all keys and values under a provided key. 25 | List(key string) (KVPairs, error) 26 | 27 | // Set sets the provided key to value. 28 | Set(key string, value []byte) error 29 | 30 | // Watch monitors a K/V store for changes to key. 31 | Watch(key string, stop chan bool) <-chan *Response 32 | } 33 | -------------------------------------------------------------------------------- /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/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/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/net/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/net/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/net/context/go19.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 context 8 | 9 | import "context" // standard library's context, as of Go 1.7 10 | 11 | // A Context carries a deadline, a cancelation signal, and other values across 12 | // API boundaries. 13 | // 14 | // Context's methods may be called by multiple goroutines simultaneously. 15 | type Context = context.Context 16 | 17 | // A CancelFunc tells an operation to abandon its work. 18 | // A CancelFunc does not wait for the work to stop. 19 | // After the first call, subsequent calls to a CancelFunc do nothing. 20 | type CancelFunc = context.CancelFunc 21 | -------------------------------------------------------------------------------- /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/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/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /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 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_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_dragonfly.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 Dragonfly's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a DragonFlyBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a DragonFlyBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_freebsd.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 FreeBSD's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a FreeBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a FreeBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a FreeBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /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 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 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/fcntl.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 unix 8 | 9 | import "unsafe" 10 | 11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 12 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. 13 | var fcntl64Syscall uintptr = SYS_FCNTL 14 | 15 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 16 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 17 | valptr, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(arg)) 18 | var err error 19 | if errno != 0 { 20 | err = errno 21 | } 22 | return int(valptr), err 23 | } 24 | 25 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 26 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 27 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 28 | if errno == 0 { 29 | return nil 30 | } 31 | return errno 32 | } 33 | -------------------------------------------------------------------------------- /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/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_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_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 ( 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 | 22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 24 | return int(fd), err 25 | } 26 | 27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 29 | return int(fd), err 30 | } 31 | -------------------------------------------------------------------------------- /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_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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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/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/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/text/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/text/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/text/collate/index.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 collate 6 | 7 | import "golang.org/x/text/internal/colltab" 8 | 9 | const blockSize = 64 10 | 11 | func getTable(t tableIndex) *colltab.Table { 12 | return &colltab.Table{ 13 | Index: colltab.Trie{ 14 | Index0: mainLookup[:][blockSize*t.lookupOffset:], 15 | Values0: mainValues[:][blockSize*t.valuesOffset:], 16 | Index: mainLookup[:], 17 | Values: mainValues[:], 18 | }, 19 | ExpandElem: mainExpandElem[:], 20 | ContractTries: colltab.ContractTrieSet(mainCTEntries[:]), 21 | ContractElem: mainContractElem[:], 22 | MaxContractLen: 18, 23 | VariableTop: varTop, 24 | } 25 | } 26 | 27 | // tableIndex holds information for constructing a table 28 | // for a certain locale based on the main table. 29 | type tableIndex struct { 30 | lookupOffset uint32 31 | valuesOffset uint32 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/Makefile: -------------------------------------------------------------------------------- 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 | CLEANFILES+=maketables 6 | 7 | maketables: maketables.go 8 | go build $^ 9 | 10 | tables: maketables 11 | ./maketables > tables.go 12 | gofmt -w -s tables.go 13 | 14 | # Build (but do not run) maketables during testing, 15 | # just to make sure it still compiles. 16 | testshort: maketables 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/common.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | package language 4 | 5 | // This file contains code common to the maketables.go and the package code. 6 | 7 | // langAliasType is the type of an alias in langAliasMap. 8 | type langAliasType int8 9 | 10 | const ( 11 | langDeprecated langAliasType = iota 12 | langMacro 13 | langLegacy 14 | 15 | langAliasTypeUnknown langAliasType = -1 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/gen_common.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 ignore 6 | 7 | package main 8 | 9 | // This file contains code common to the maketables.go and the package code. 10 | 11 | // langAliasType is the type of an alias in langAliasMap. 12 | type langAliasType int8 13 | 14 | const ( 15 | langDeprecated langAliasType = iota 16 | langMacro 17 | langLegacy 18 | 19 | langAliasTypeUnknown langAliasType = -1 20 | ) 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/go1_1.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 !go1.2 6 | 7 | package language 8 | 9 | import "sort" 10 | 11 | func sortStable(s sort.Interface) { 12 | ss := stableSort{ 13 | s: s, 14 | pos: make([]int, s.Len()), 15 | } 16 | for i := range ss.pos { 17 | ss.pos[i] = i 18 | } 19 | sort.Sort(&ss) 20 | } 21 | 22 | type stableSort struct { 23 | s sort.Interface 24 | pos []int 25 | } 26 | 27 | func (s *stableSort) Len() int { 28 | return len(s.pos) 29 | } 30 | 31 | func (s *stableSort) Less(i, j int) bool { 32 | return s.s.Less(i, j) || !s.s.Less(j, i) && s.pos[i] < s.pos[j] 33 | } 34 | 35 | func (s *stableSort) Swap(i, j int) { 36 | s.s.Swap(i, j) 37 | s.pos[i], s.pos[j] = s.pos[j], s.pos[i] 38 | } 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/go1_2.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 go1.2 6 | 7 | package language 8 | 9 | import "sort" 10 | 11 | var sortStable = sort.Stable 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.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.10 6 | 7 | package bidirule 8 | 9 | func (t *Transformer) isFinal() bool { 10 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.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.10 6 | 7 | package bidirule 8 | 9 | func (t *Transformer) isFinal() bool { 10 | if !t.isRTL() { 11 | return true 12 | } 13 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/width/gen_trieval.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 ignore 6 | 7 | package main 8 | 9 | // elem is an entry of the width trie. The high byte is used to encode the type 10 | // of the rune. The low byte is used to store the index to a mapping entry in 11 | // the inverseData array. 12 | type elem uint16 13 | 14 | const ( 15 | tagNeutral elem = iota << typeShift 16 | tagAmbiguous 17 | tagWide 18 | tagNarrow 19 | tagFullwidth 20 | tagHalfwidth 21 | ) 22 | 23 | const ( 24 | numTypeBits = 3 25 | typeShift = 16 - numTypeBits 26 | 27 | // tagNeedsFold is true for all fullwidth and halfwidth runes except for 28 | // the Won sign U+20A9. 29 | tagNeedsFold = 0x1000 30 | 31 | // The Korean Won sign is halfwidth, but SHOULD NOT be mapped to a wide 32 | // variant. 33 | wonSign rune = 0x20A9 34 | ) 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/width/kind_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=Kind"; DO NOT EDIT. 2 | 3 | package width 4 | 5 | import "fmt" 6 | 7 | const _Kind_name = "NeutralEastAsianAmbiguousEastAsianWideEastAsianNarrowEastAsianFullwidthEastAsianHalfwidth" 8 | 9 | var _Kind_index = [...]uint8{0, 7, 25, 38, 53, 71, 89} 10 | 11 | func (i Kind) String() string { 12 | if i < 0 || i >= Kind(len(_Kind_index)-1) { 13 | return fmt.Sprintf("Kind(%d)", i) 14 | } 15 | return _Kind_name[_Kind_index[i]:_Kind_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/width/trieval.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | package width 4 | 5 | // elem is an entry of the width trie. The high byte is used to encode the type 6 | // of the rune. The low byte is used to store the index to a mapping entry in 7 | // the inverseData array. 8 | type elem uint16 9 | 10 | const ( 11 | tagNeutral elem = iota << typeShift 12 | tagAmbiguous 13 | tagWide 14 | tagNarrow 15 | tagFullwidth 16 | tagHalfwidth 17 | ) 18 | 19 | const ( 20 | numTypeBits = 3 21 | typeShift = 16 - numTypeBits 22 | 23 | // tagNeedsFold is true for all fullwidth and halfwidth runes except for 24 | // the Won sign U+20A9. 25 | tagNeedsFold = 0x1000 26 | 27 | // The Korean Won sign is halfwidth, but SHOULD NOT be mapped to a wide 28 | // variant. 29 | wonSign rune = 0x20A9 30 | ) 31 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.4 5 | - 1.5 6 | - 1.6 7 | - 1.7 8 | - 1.8 9 | - 1.9 10 | - tip 11 | 12 | go_import_path: gopkg.in/yaml.v2 13 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 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 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/go.mod: -------------------------------------------------------------------------------- 1 | module "gopkg.in/yaml.v2" 2 | 3 | require ( 4 | "gopkg.in/check.v1" v0.0.0-20161208181325-20d25e280405 5 | ) 6 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/writerc.go: -------------------------------------------------------------------------------- 1 | package yaml 2 | 3 | // Set the writer error and return false. 4 | func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { 5 | emitter.error = yaml_WRITER_ERROR 6 | emitter.problem = problem 7 | return false 8 | } 9 | 10 | // Flush the output buffer. 11 | func yaml_emitter_flush(emitter *yaml_emitter_t) bool { 12 | if emitter.write_handler == nil { 13 | panic("write handler not set") 14 | } 15 | 16 | // Check if the buffer is empty. 17 | if emitter.buffer_pos == 0 { 18 | return true 19 | } 20 | 21 | if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { 22 | return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) 23 | } 24 | emitter.buffer_pos = 0 25 | return true 26 | } 27 | --------------------------------------------------------------------------------