├── .gitignore ├── LICENSE ├── README.md ├── README_zh.md ├── cmd ├── root.go └── web.go ├── config ├── config.go └── config.yaml ├── dao └── url.go ├── doc ├── strcut.sql └── struct.md ├── go.mod ├── go.sum ├── handler └── url.go ├── libs ├── base62.go └── base62_test.go ├── log └── init.go ├── main.go ├── model └── orm.go ├── resource └── init.go ├── router └── router.go ├── seq.png └── vendor ├── github.com ├── BurntSushi │ └── toml │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── COMPATIBLE │ │ ├── COPYING │ │ ├── Makefile │ │ ├── README.md │ │ ├── decode.go │ │ ├── decode_meta.go │ │ ├── doc.go │ │ ├── encode.go │ │ ├── encoding_types.go │ │ ├── encoding_types_1.1.go │ │ ├── lex.go │ │ ├── parse.go │ │ ├── session.vim │ │ ├── type_check.go │ │ └── type_fields.go ├── fatih │ └── structs │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── field.go │ │ ├── structs.go │ │ └── tags.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 ├── gin-contrib │ └── sse │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── go.mod │ │ ├── go.sum │ │ ├── sse-decoder.go │ │ ├── sse-encoder.go │ │ └── writer.go ├── gin-gonic │ └── gin │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── AUTHORS.md │ │ ├── BENCHMARKS.md │ │ ├── CHANGELOG.md │ │ ├── CODE_OF_CONDUCT.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── auth.go │ │ ├── binding │ │ ├── binding.go │ │ ├── binding_nomsgpack.go │ │ ├── default_validator.go │ │ ├── form.go │ │ ├── form_mapping.go │ │ ├── header.go │ │ ├── json.go │ │ ├── msgpack.go │ │ ├── multipart_form_mapping.go │ │ ├── protobuf.go │ │ ├── query.go │ │ ├── uri.go │ │ ├── xml.go │ │ └── yaml.go │ │ ├── codecov.yml │ │ ├── context.go │ │ ├── context_appengine.go │ │ ├── debug.go │ │ ├── deprecated.go │ │ ├── doc.go │ │ ├── errors.go │ │ ├── fs.go │ │ ├── gin.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── internal │ │ ├── bytesconv │ │ │ └── bytesconv.go │ │ └── json │ │ │ ├── json.go │ │ │ └── jsoniter.go │ │ ├── logger.go │ │ ├── mode.go │ │ ├── path.go │ │ ├── recovery.go │ │ ├── render │ │ ├── data.go │ │ ├── html.go │ │ ├── json.go │ │ ├── msgpack.go │ │ ├── protobuf.go │ │ ├── reader.go │ │ ├── redirect.go │ │ ├── render.go │ │ ├── text.go │ │ ├── xml.go │ │ └── yaml.go │ │ ├── response_writer.go │ │ ├── routergroup.go │ │ ├── test_helpers.go │ │ ├── tree.go │ │ ├── utils.go │ │ └── version.go ├── go-playground │ ├── locales │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── currency │ │ │ └── currency.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── logo.png │ │ └── rules.go │ ├── universal-translator │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── errors.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── import_export.go │ │ ├── logo.png │ │ ├── translator.go │ │ └── universal_translator.go │ └── validator │ │ └── v10 │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── baked_in.go │ │ ├── cache.go │ │ ├── country_codes.go │ │ ├── doc.go │ │ ├── errors.go │ │ ├── field_level.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── logo.png │ │ ├── regexes.go │ │ ├── struct_level.go │ │ ├── translations.go │ │ ├── util.go │ │ ├── validator.go │ │ └── validator_instance.go ├── go-sql-driver │ └── mysql │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── appengine.go │ │ ├── auth.go │ │ ├── buffer.go │ │ ├── collations.go │ │ ├── connection.go │ │ ├── connection_go18.go │ │ ├── const.go │ │ ├── driver.go │ │ ├── dsn.go │ │ ├── errors.go │ │ ├── fields.go │ │ ├── infile.go │ │ ├── packets.go │ │ ├── result.go │ │ ├── rows.go │ │ ├── statement.go │ │ ├── transaction.go │ │ ├── utils.go │ │ ├── utils_go17.go │ │ └── utils_go18.go ├── gogf │ └── gf │ │ ├── LICENSE │ │ ├── container │ │ ├── glist │ │ │ └── glist.go │ │ ├── gmap │ │ │ ├── gmap.go │ │ │ ├── gmap_hash_any_any_map.go │ │ │ ├── gmap_hash_int_any_map.go │ │ │ ├── gmap_hash_int_int_map.go │ │ │ ├── gmap_hash_int_str_map.go │ │ │ ├── gmap_hash_str_any_map.go │ │ │ ├── gmap_hash_str_int_map.go │ │ │ ├── gmap_hash_str_str_map.go │ │ │ ├── gmap_list_map.go │ │ │ └── gmap_tree_map.go │ │ ├── gset │ │ │ ├── gset_any_set.go │ │ │ ├── gset_int_set.go │ │ │ └── gset_str_set.go │ │ ├── gtree │ │ │ ├── gtree.go │ │ │ ├── gtree_avltree.go │ │ │ ├── gtree_btree.go │ │ │ └── gtree_redblacktree.go │ │ ├── gtype │ │ │ ├── bool.go │ │ │ ├── byte.go │ │ │ ├── bytes.go │ │ │ ├── float32.go │ │ │ ├── float64.go │ │ │ ├── gtype.go │ │ │ ├── int.go │ │ │ ├── int32.go │ │ │ ├── int64.go │ │ │ ├── interface.go │ │ │ ├── string.go │ │ │ ├── uint.go │ │ │ ├── uint32.go │ │ │ └── uint64.go │ │ └── gvar │ │ │ └── gvar.go │ │ ├── encoding │ │ └── gbinary │ │ │ ├── gbinary.go │ │ │ ├── gbinary_be.go │ │ │ ├── gbinary_bits.go │ │ │ ├── gbinary_func.go │ │ │ └── gbinary_le.go │ │ ├── internal │ │ ├── cmdenv │ │ │ └── cmdenv.go │ │ ├── empty │ │ │ └── empty.go │ │ ├── rwmutex │ │ │ └── rwmutex.go │ │ ├── structs │ │ │ ├── structs.go │ │ │ ├── structs_map.go │ │ │ └── structs_tag.go │ │ └── utilstr │ │ │ └── utilstr.go │ │ ├── os │ │ ├── gcache │ │ │ ├── gcache.go │ │ │ ├── gcache_cache.go │ │ │ ├── gcache_mem_cache.go │ │ │ ├── gcache_mem_cache_item.go │ │ │ └── gcache_mem_cache_lru.go │ │ ├── gtime │ │ │ ├── gtime.go │ │ │ ├── gtime_format.go │ │ │ └── gtime_time.go │ │ └── gtimer │ │ │ ├── gtimer.go │ │ │ ├── gtimer_entry.go │ │ │ ├── gtimer_loop.go │ │ │ └── gtimer_timer.go │ │ ├── text │ │ ├── gregex │ │ │ ├── gregex.go │ │ │ └── gregex_cache.go │ │ └── gstr │ │ │ ├── gstr.go │ │ │ ├── gstr_case.go │ │ │ ├── gstr_domain.go │ │ │ ├── gstr_levenshtein.go │ │ │ ├── gstr_parse.go │ │ │ ├── gstr_pos.go │ │ │ ├── gstr_similartext.go │ │ │ ├── gstr_soundex.go │ │ │ └── gstr_trim.go │ │ └── util │ │ ├── gconv │ │ ├── gconv.go │ │ ├── gconv_map.go │ │ ├── gconv_slice.go │ │ ├── gconv_struct.go │ │ ├── gconv_time.go │ │ └── gconv_unsafe.go │ │ ├── grand │ │ ├── grand.go │ │ └── grand_intn.go │ │ └── gutil │ │ ├── gutil.go │ │ └── gutil_comparator.go ├── golang │ └── protobuf │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ └── proto │ │ ├── clone.go │ │ ├── decode.go │ │ ├── deprecated.go │ │ ├── discard.go │ │ ├── encode.go │ │ ├── equal.go │ │ ├── extensions.go │ │ ├── lib.go │ │ ├── message_set.go │ │ ├── pointer_reflect.go │ │ ├── pointer_unsafe.go │ │ ├── properties.go │ │ ├── table_marshal.go │ │ ├── table_merge.go │ │ ├── table_unmarshal.go │ │ ├── text.go │ │ └── text_parser.go ├── hashicorp │ └── hcl │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── decoder.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── 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 ├── jinzhu │ ├── gorm │ │ ├── .gitignore │ │ ├── License │ │ ├── README.md │ │ ├── association.go │ │ ├── callback.go │ │ ├── callback_create.go │ │ ├── callback_delete.go │ │ ├── callback_query.go │ │ ├── callback_query_preload.go │ │ ├── callback_row_query.go │ │ ├── callback_save.go │ │ ├── callback_update.go │ │ ├── dialect.go │ │ ├── dialect_common.go │ │ ├── dialect_mysql.go │ │ ├── dialect_postgres.go │ │ ├── dialect_sqlite3.go │ │ ├── dialects │ │ │ └── mysql │ │ │ │ └── mysql.go │ │ ├── docker-compose.yml │ │ ├── errors.go │ │ ├── field.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── interface.go │ │ ├── join_table_handler.go │ │ ├── logger.go │ │ ├── main.go │ │ ├── model.go │ │ ├── model_struct.go │ │ ├── naming.go │ │ ├── scope.go │ │ ├── search.go │ │ ├── test_all.sh │ │ ├── utils.go │ │ └── wercker.yml │ └── inflection │ │ ├── LICENSE │ │ ├── README.md │ │ ├── go.mod │ │ ├── inflections.go │ │ └── wercker.yml ├── json-iterator │ └── go │ │ ├── .codecov.yml │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── Gopkg.lock │ │ ├── Gopkg.toml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── adapter.go │ │ ├── any.go │ │ ├── any_array.go │ │ ├── any_bool.go │ │ ├── any_float.go │ │ ├── any_int32.go │ │ ├── any_int64.go │ │ ├── any_invalid.go │ │ ├── any_nil.go │ │ ├── any_number.go │ │ ├── any_object.go │ │ ├── any_str.go │ │ ├── any_uint32.go │ │ ├── any_uint64.go │ │ ├── build.sh │ │ ├── config.go │ │ ├── fuzzy_mode_convert_table.md │ │ ├── go.mod │ │ ├── go.sum │ │ ├── iter.go │ │ ├── iter_array.go │ │ ├── iter_float.go │ │ ├── iter_int.go │ │ ├── iter_object.go │ │ ├── iter_skip.go │ │ ├── iter_skip_sloppy.go │ │ ├── iter_skip_strict.go │ │ ├── iter_str.go │ │ ├── jsoniter.go │ │ ├── pool.go │ │ ├── reflect.go │ │ ├── reflect_array.go │ │ ├── reflect_dynamic.go │ │ ├── reflect_extension.go │ │ ├── reflect_json_number.go │ │ ├── reflect_json_raw_message.go │ │ ├── reflect_map.go │ │ ├── reflect_marshaler.go │ │ ├── reflect_native.go │ │ ├── reflect_optional.go │ │ ├── reflect_slice.go │ │ ├── reflect_struct_decoder.go │ │ ├── reflect_struct_encoder.go │ │ ├── stream.go │ │ ├── stream_float.go │ │ ├── stream_int.go │ │ ├── stream_str.go │ │ └── test.sh ├── leodido │ └── go-urn │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── go.mod │ │ ├── go.sum │ │ ├── machine.go │ │ ├── machine.go.rl │ │ ├── makefile │ │ └── urn.go ├── magiconair │ └── properties │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── decode.go │ │ ├── doc.go │ │ ├── go.mod │ │ ├── integrate.go │ │ ├── lex.go │ │ ├── load.go │ │ ├── parser.go │ │ ├── properties.go │ │ └── rangecheck.go ├── mattn │ └── go-isatty │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── go.test.sh │ │ ├── isatty_bsd.go │ │ ├── isatty_others.go │ │ ├── isatty_plan9.go │ │ ├── isatty_solaris.go │ │ ├── isatty_tcgets.go │ │ ├── isatty_windows.go │ │ └── renovate.json ├── mitchellh │ └── mapstructure │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── decode_hooks.go │ │ ├── error.go │ │ ├── go.mod │ │ └── mapstructure.go ├── modern-go │ ├── concurrent │ │ ├── LICENSE │ │ ├── README.md │ │ ├── executor.go │ │ ├── go_above_19.go │ │ ├── go_below_19.go │ │ └── unbounded_executor.go │ └── reflect2 │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── Gopkg.lock │ │ ├── Gopkg.toml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── go_above_17.go │ │ ├── go_above_19.go │ │ ├── go_below_17.go │ │ ├── go_below_19.go │ │ ├── reflect2.go │ │ ├── reflect2_amd64.s │ │ ├── reflect2_kind.go │ │ ├── relfect2_386.s │ │ ├── relfect2_amd64p32.s │ │ ├── relfect2_arm.s │ │ ├── relfect2_arm64.s │ │ ├── relfect2_mips64x.s │ │ ├── relfect2_mipsx.s │ │ ├── relfect2_ppc64x.s │ │ ├── relfect2_s390x.s │ │ ├── safe_field.go │ │ ├── safe_map.go │ │ ├── safe_slice.go │ │ ├── safe_struct.go │ │ ├── safe_type.go │ │ ├── test.sh │ │ ├── type_map.go │ │ ├── unsafe_array.go │ │ ├── unsafe_eface.go │ │ ├── unsafe_field.go │ │ ├── unsafe_iface.go │ │ ├── unsafe_link.go │ │ ├── unsafe_map.go │ │ ├── unsafe_ptr.go │ │ ├── unsafe_slice.go │ │ ├── unsafe_struct.go │ │ └── unsafe_type.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 ├── 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 │ │ ├── go.mod │ │ ├── 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 │ │ ├── go.mod │ │ └── go.sum │ ├── cobra │ │ ├── .gitignore │ │ ├── .mailmap │ │ ├── .travis.yml │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── args.go │ │ ├── bash_completions.go │ │ ├── bash_completions.md │ │ ├── cobra.go │ │ ├── command.go │ │ ├── command_notwin.go │ │ ├── command_win.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── powershell_completions.go │ │ ├── powershell_completions.md │ │ ├── shell_completions.go │ │ ├── zsh_completions.go │ │ └── zsh_completions.md │ ├── jwalterweatherman │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── default_notepad.go │ │ ├── go.mod │ │ ├── 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 │ │ ├── string_to_int.go │ │ ├── string_to_string.go │ │ ├── uint.go │ │ ├── uint16.go │ │ ├── uint32.go │ │ ├── uint64.go │ │ ├── uint8.go │ │ └── uint_slice.go │ └── viper │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── flags.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── util.go │ │ └── viper.go ├── subosito │ └── gotenv │ │ ├── .env │ │ ├── .env.invalid │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── appveyor.yml │ │ └── gotenv.go └── ugorji │ └── go │ └── codec │ ├── 0_importpath.go │ ├── LICENSE │ ├── binc.go │ ├── build.sh │ ├── cbor.go │ ├── codecgen.go │ ├── decode.go │ ├── doc.go │ ├── encode.go │ ├── fast-path.generated.go │ ├── fast-path.go.tmpl │ ├── fast-path.not.go │ ├── float.go │ ├── gen-dec-array.go.tmpl │ ├── gen-dec-map.go.tmpl │ ├── gen-enc-chan.go.tmpl │ ├── gen-helper.generated.go │ ├── gen-helper.go.tmpl │ ├── gen.generated.go │ ├── gen.go │ ├── go.mod │ ├── goversion_arrayof_gte_go15.go │ ├── goversion_arrayof_lt_go15.go │ ├── goversion_fmt_time_gte_go15.go │ ├── goversion_fmt_time_lt_go15.go │ ├── goversion_makemap_gte_go19.go │ ├── goversion_makemap_lt_go19.go │ ├── goversion_maprange_gte_go112.go │ ├── goversion_maprange_lt_go112.go │ ├── goversion_unexportedembeddedptr_gte_go110.go │ ├── goversion_unexportedembeddedptr_lt_go110.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.s │ ├── helper_internal.go │ ├── helper_not_unsafe.go │ ├── helper_unsafe.go │ ├── json.go │ ├── mammoth-test.go.tmpl │ ├── mammoth2-test.go.tmpl │ ├── msgpack.go │ ├── prebuild.go │ ├── reader.go │ ├── register_ext.go │ ├── rpc.go │ ├── simple.go │ ├── sort-slice.generated.go │ ├── sort-slice.go.tmpl │ ├── test-cbor-goldens.json │ ├── test.py │ └── writer.go ├── go.uber.org ├── atomic │ ├── .codecov.yml │ ├── .gitignore │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── LICENSE.txt │ ├── Makefile │ ├── README.md │ ├── atomic.go │ ├── error.go │ ├── go.mod │ ├── go.sum │ ├── string.go │ └── tools.go ├── multierr │ ├── .codecov.yml │ ├── .gitignore │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── LICENSE.txt │ ├── Makefile │ ├── README.md │ ├── error.go │ ├── glide.yaml │ ├── go.mod │ ├── go.sum │ ├── go113.go │ └── tools.go ├── tools │ ├── LICENSE │ └── update-license │ │ ├── .gitignore │ │ ├── README.md │ │ ├── licenses.go │ │ └── main.go └── zap │ ├── .codecov.yml │ ├── .gitignore │ ├── .readme.tmpl │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── CODE_OF_CONDUCT.md │ ├── CONTRIBUTING.md │ ├── FAQ.md │ ├── LICENSE.txt │ ├── Makefile │ ├── README.md │ ├── array.go │ ├── buffer │ ├── buffer.go │ └── pool.go │ ├── checklicense.sh │ ├── config.go │ ├── doc.go │ ├── encoder.go │ ├── error.go │ ├── field.go │ ├── flag.go │ ├── glide.yaml │ ├── global.go │ ├── global_go112.go │ ├── global_prego112.go │ ├── go.mod │ ├── go.sum │ ├── http_handler.go │ ├── internal │ ├── bufferpool │ │ └── bufferpool.go │ ├── color │ │ └── color.go │ └── exit │ │ └── exit.go │ ├── level.go │ ├── logger.go │ ├── options.go │ ├── sink.go │ ├── stacktrace.go │ ├── sugar.go │ ├── time.go │ ├── tools.go │ ├── writer.go │ └── zapcore │ ├── console_encoder.go │ ├── core.go │ ├── doc.go │ ├── encoder.go │ ├── entry.go │ ├── error.go │ ├── field.go │ ├── hook.go │ ├── json_encoder.go │ ├── level.go │ ├── level_strings.go │ ├── marshaler.go │ ├── memory_encoder.go │ ├── sampler.go │ ├── tee.go │ └── write_syncer.go ├── golang.org └── x │ ├── crypto │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ └── sha3 │ │ ├── doc.go │ │ ├── hashes.go │ │ ├── hashes_generic.go │ │ ├── keccakf.go │ │ ├── keccakf_amd64.go │ │ ├── keccakf_amd64.s │ │ ├── register.go │ │ ├── sha3.go │ │ ├── sha3_s390x.go │ │ ├── sha3_s390x.s │ │ ├── shake.go │ │ ├── shake_generic.go │ │ ├── xor.go │ │ ├── xor_generic.go │ │ └── xor_unaligned.go │ ├── lint │ ├── .travis.yml │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── go.mod │ ├── go.sum │ ├── golint │ │ ├── golint.go │ │ ├── import.go │ │ └── importcomment.go │ └── lint.go │ ├── sys │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── cpu │ │ ├── asm_aix_ppc64.s │ │ ├── byteorder.go │ │ ├── cpu.go │ │ ├── cpu_aix_ppc64.go │ │ ├── cpu_arm.go │ │ ├── cpu_arm64.go │ │ ├── cpu_arm64.s │ │ ├── cpu_gc_arm64.go │ │ ├── cpu_gc_s390x.go │ │ ├── cpu_gc_x86.go │ │ ├── cpu_gccgo_arm64.go │ │ ├── cpu_gccgo_s390x.go │ │ ├── cpu_gccgo_x86.c │ │ ├── cpu_gccgo_x86.go │ │ ├── cpu_linux.go │ │ ├── cpu_linux_arm.go │ │ ├── cpu_linux_arm64.go │ │ ├── cpu_linux_noinit.go │ │ ├── cpu_linux_ppc64x.go │ │ ├── cpu_linux_s390x.go │ │ ├── cpu_mips64x.go │ │ ├── cpu_mipsx.go │ │ ├── cpu_other_arm64.go │ │ ├── cpu_riscv64.go │ │ ├── cpu_s390x.s │ │ ├── cpu_wasm.go │ │ ├── cpu_x86.go │ │ ├── cpu_x86.s │ │ ├── hwcap_linux.go │ │ └── syscall_aix_ppc64_gc.go │ └── unix │ │ ├── .gitignore │ │ ├── README.md │ │ ├── affinity_linux.go │ │ ├── aliases.go │ │ ├── asm_aix_ppc64.s │ │ ├── asm_darwin_386.s │ │ ├── asm_darwin_amd64.s │ │ ├── asm_darwin_arm.s │ │ ├── asm_darwin_arm64.s │ │ ├── asm_dragonfly_amd64.s │ │ ├── asm_freebsd_386.s │ │ ├── asm_freebsd_amd64.s │ │ ├── asm_freebsd_arm.s │ │ ├── asm_freebsd_arm64.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_riscv64.s │ │ ├── asm_linux_s390x.s │ │ ├── asm_netbsd_386.s │ │ ├── asm_netbsd_amd64.s │ │ ├── asm_netbsd_arm.s │ │ ├── asm_netbsd_arm64.s │ │ ├── asm_openbsd_386.s │ │ ├── asm_openbsd_amd64.s │ │ ├── asm_openbsd_arm.s │ │ ├── asm_openbsd_arm64.s │ │ ├── asm_solaris_amd64.s │ │ ├── bluetooth_linux.go │ │ ├── cap_freebsd.go │ │ ├── constants.go │ │ ├── dev_aix_ppc.go │ │ ├── dev_aix_ppc64.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_darwin.go │ │ ├── fcntl_linux_32bit.go │ │ ├── fdset.go │ │ ├── gccgo.go │ │ ├── gccgo_c.c │ │ ├── gccgo_linux_amd64.go │ │ ├── ioctl.go │ │ ├── mkall.sh │ │ ├── mkerrors.sh │ │ ├── pagesize_unix.go │ │ ├── pledge_openbsd.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── readdirent_getdents.go │ │ ├── readdirent_getdirentries.go │ │ ├── sockcmsg_dragonfly.go │ │ ├── sockcmsg_linux.go │ │ ├── sockcmsg_unix.go │ │ ├── sockcmsg_unix_other.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_aix.go │ │ ├── syscall_aix_ppc.go │ │ ├── syscall_aix_ppc64.go │ │ ├── syscall_bsd.go │ │ ├── syscall_darwin.1_12.go │ │ ├── syscall_darwin.1_13.go │ │ ├── syscall_darwin.go │ │ ├── syscall_darwin_386.1_11.go │ │ ├── syscall_darwin_386.go │ │ ├── syscall_darwin_amd64.1_11.go │ │ ├── syscall_darwin_amd64.go │ │ ├── syscall_darwin_arm.1_11.go │ │ ├── syscall_darwin_arm.go │ │ ├── syscall_darwin_arm64.1_11.go │ │ ├── syscall_darwin_arm64.go │ │ ├── syscall_darwin_libSystem.go │ │ ├── syscall_dragonfly.go │ │ ├── syscall_dragonfly_amd64.go │ │ ├── syscall_freebsd.go │ │ ├── syscall_freebsd_386.go │ │ ├── syscall_freebsd_amd64.go │ │ ├── syscall_freebsd_arm.go │ │ ├── syscall_freebsd_arm64.go │ │ ├── syscall_linux.go │ │ ├── syscall_linux_386.go │ │ ├── syscall_linux_amd64.go │ │ ├── syscall_linux_amd64_gc.go │ │ ├── syscall_linux_arm.go │ │ ├── syscall_linux_arm64.go │ │ ├── syscall_linux_gc.go │ │ ├── syscall_linux_gc_386.go │ │ ├── syscall_linux_gccgo_386.go │ │ ├── syscall_linux_gccgo_arm.go │ │ ├── syscall_linux_mips64x.go │ │ ├── syscall_linux_mipsx.go │ │ ├── syscall_linux_ppc64x.go │ │ ├── syscall_linux_riscv64.go │ │ ├── syscall_linux_s390x.go │ │ ├── syscall_linux_sparc64.go │ │ ├── syscall_netbsd.go │ │ ├── syscall_netbsd_386.go │ │ ├── syscall_netbsd_amd64.go │ │ ├── syscall_netbsd_arm.go │ │ ├── syscall_netbsd_arm64.go │ │ ├── syscall_openbsd.go │ │ ├── syscall_openbsd_386.go │ │ ├── syscall_openbsd_amd64.go │ │ ├── syscall_openbsd_arm.go │ │ ├── syscall_openbsd_arm64.go │ │ ├── syscall_solaris.go │ │ ├── syscall_solaris_amd64.go │ │ ├── syscall_unix.go │ │ ├── syscall_unix_gc.go │ │ ├── syscall_unix_gc_ppc64x.go │ │ ├── timestruct.go │ │ ├── unveil_openbsd.go │ │ ├── xattr_bsd.go │ │ ├── zerrors_aix_ppc.go │ │ ├── zerrors_aix_ppc64.go │ │ ├── zerrors_darwin_386.go │ │ ├── zerrors_darwin_amd64.go │ │ ├── zerrors_darwin_arm.go │ │ ├── zerrors_darwin_arm64.go │ │ ├── zerrors_dragonfly_amd64.go │ │ ├── zerrors_freebsd_386.go │ │ ├── zerrors_freebsd_amd64.go │ │ ├── zerrors_freebsd_arm.go │ │ ├── zerrors_freebsd_arm64.go │ │ ├── zerrors_linux_386.go │ │ ├── zerrors_linux_amd64.go │ │ ├── zerrors_linux_arm.go │ │ ├── zerrors_linux_arm64.go │ │ ├── zerrors_linux_mips.go │ │ ├── zerrors_linux_mips64.go │ │ ├── zerrors_linux_mips64le.go │ │ ├── zerrors_linux_mipsle.go │ │ ├── zerrors_linux_ppc64.go │ │ ├── zerrors_linux_ppc64le.go │ │ ├── zerrors_linux_riscv64.go │ │ ├── zerrors_linux_s390x.go │ │ ├── zerrors_linux_sparc64.go │ │ ├── zerrors_netbsd_386.go │ │ ├── zerrors_netbsd_amd64.go │ │ ├── zerrors_netbsd_arm.go │ │ ├── zerrors_netbsd_arm64.go │ │ ├── zerrors_openbsd_386.go │ │ ├── zerrors_openbsd_amd64.go │ │ ├── zerrors_openbsd_arm.go │ │ ├── zerrors_openbsd_arm64.go │ │ ├── zerrors_solaris_amd64.go │ │ ├── zptrace_armnn_linux.go │ │ ├── zptrace_linux_arm64.go │ │ ├── zptrace_mipsnn_linux.go │ │ ├── zptrace_mipsnnle_linux.go │ │ ├── zptrace_x86_linux.go │ │ ├── zsyscall_aix_ppc.go │ │ ├── zsyscall_aix_ppc64.go │ │ ├── zsyscall_aix_ppc64_gc.go │ │ ├── zsyscall_aix_ppc64_gccgo.go │ │ ├── zsyscall_darwin_386.1_11.go │ │ ├── zsyscall_darwin_386.1_13.go │ │ ├── zsyscall_darwin_386.1_13.s │ │ ├── zsyscall_darwin_386.go │ │ ├── zsyscall_darwin_386.s │ │ ├── zsyscall_darwin_amd64.1_11.go │ │ ├── zsyscall_darwin_amd64.1_13.go │ │ ├── zsyscall_darwin_amd64.1_13.s │ │ ├── zsyscall_darwin_amd64.go │ │ ├── zsyscall_darwin_amd64.s │ │ ├── zsyscall_darwin_arm.1_11.go │ │ ├── zsyscall_darwin_arm.1_13.go │ │ ├── zsyscall_darwin_arm.1_13.s │ │ ├── zsyscall_darwin_arm.go │ │ ├── zsyscall_darwin_arm.s │ │ ├── zsyscall_darwin_arm64.1_11.go │ │ ├── zsyscall_darwin_arm64.1_13.go │ │ ├── zsyscall_darwin_arm64.1_13.s │ │ ├── zsyscall_darwin_arm64.go │ │ ├── zsyscall_darwin_arm64.s │ │ ├── zsyscall_dragonfly_amd64.go │ │ ├── zsyscall_freebsd_386.go │ │ ├── zsyscall_freebsd_amd64.go │ │ ├── zsyscall_freebsd_arm.go │ │ ├── zsyscall_freebsd_arm64.go │ │ ├── zsyscall_linux_386.go │ │ ├── zsyscall_linux_amd64.go │ │ ├── zsyscall_linux_arm.go │ │ ├── zsyscall_linux_arm64.go │ │ ├── zsyscall_linux_mips.go │ │ ├── zsyscall_linux_mips64.go │ │ ├── zsyscall_linux_mips64le.go │ │ ├── zsyscall_linux_mipsle.go │ │ ├── zsyscall_linux_ppc64.go │ │ ├── zsyscall_linux_ppc64le.go │ │ ├── zsyscall_linux_riscv64.go │ │ ├── zsyscall_linux_s390x.go │ │ ├── zsyscall_linux_sparc64.go │ │ ├── zsyscall_netbsd_386.go │ │ ├── zsyscall_netbsd_amd64.go │ │ ├── zsyscall_netbsd_arm.go │ │ ├── zsyscall_netbsd_arm64.go │ │ ├── zsyscall_openbsd_386.go │ │ ├── zsyscall_openbsd_amd64.go │ │ ├── zsyscall_openbsd_arm.go │ │ ├── zsyscall_openbsd_arm64.go │ │ ├── zsyscall_solaris_amd64.go │ │ ├── zsysctl_openbsd_386.go │ │ ├── zsysctl_openbsd_amd64.go │ │ ├── zsysctl_openbsd_arm.go │ │ ├── zsysctl_openbsd_arm64.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_freebsd_arm64.go │ │ ├── zsysnum_linux_386.go │ │ ├── zsysnum_linux_amd64.go │ │ ├── zsysnum_linux_arm.go │ │ ├── zsysnum_linux_arm64.go │ │ ├── zsysnum_linux_mips.go │ │ ├── zsysnum_linux_mips64.go │ │ ├── zsysnum_linux_mips64le.go │ │ ├── zsysnum_linux_mipsle.go │ │ ├── zsysnum_linux_ppc64.go │ │ ├── zsysnum_linux_ppc64le.go │ │ ├── zsysnum_linux_riscv64.go │ │ ├── zsysnum_linux_s390x.go │ │ ├── zsysnum_linux_sparc64.go │ │ ├── zsysnum_netbsd_386.go │ │ ├── zsysnum_netbsd_amd64.go │ │ ├── zsysnum_netbsd_arm.go │ │ ├── zsysnum_netbsd_arm64.go │ │ ├── zsysnum_openbsd_386.go │ │ ├── zsysnum_openbsd_amd64.go │ │ ├── zsysnum_openbsd_arm.go │ │ ├── zsysnum_openbsd_arm64.go │ │ ├── ztypes_aix_ppc.go │ │ ├── ztypes_aix_ppc64.go │ │ ├── ztypes_darwin_386.go │ │ ├── ztypes_darwin_amd64.go │ │ ├── ztypes_darwin_arm.go │ │ ├── ztypes_darwin_arm64.go │ │ ├── ztypes_dragonfly_amd64.go │ │ ├── ztypes_freebsd_386.go │ │ ├── ztypes_freebsd_amd64.go │ │ ├── ztypes_freebsd_arm.go │ │ ├── ztypes_freebsd_arm64.go │ │ ├── ztypes_linux_386.go │ │ ├── ztypes_linux_amd64.go │ │ ├── ztypes_linux_arm.go │ │ ├── ztypes_linux_arm64.go │ │ ├── ztypes_linux_mips.go │ │ ├── ztypes_linux_mips64.go │ │ ├── ztypes_linux_mips64le.go │ │ ├── ztypes_linux_mipsle.go │ │ ├── ztypes_linux_ppc64.go │ │ ├── ztypes_linux_ppc64le.go │ │ ├── ztypes_linux_riscv64.go │ │ ├── ztypes_linux_s390x.go │ │ ├── ztypes_linux_sparc64.go │ │ ├── ztypes_netbsd_386.go │ │ ├── ztypes_netbsd_amd64.go │ │ ├── ztypes_netbsd_arm.go │ │ ├── ztypes_netbsd_arm64.go │ │ ├── ztypes_openbsd_386.go │ │ ├── ztypes_openbsd_amd64.go │ │ ├── ztypes_openbsd_arm.go │ │ ├── ztypes_openbsd_arm64.go │ │ └── ztypes_solaris_amd64.go │ ├── text │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── transform │ │ └── transform.go │ └── unicode │ │ └── norm │ │ ├── composition.go │ │ ├── forminfo.go │ │ ├── input.go │ │ ├── iter.go │ │ ├── normalize.go │ │ ├── readwriter.go │ │ ├── tables10.0.0.go │ │ ├── tables11.0.0.go │ │ ├── tables9.0.0.go │ │ ├── transform.go │ │ └── trie.go │ └── tools │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── go │ ├── ast │ │ └── astutil │ │ │ ├── enclosing.go │ │ │ ├── imports.go │ │ │ ├── rewrite.go │ │ │ └── util.go │ ├── buildutil │ │ ├── allpackages.go │ │ ├── fakecontext.go │ │ ├── overlay.go │ │ ├── tags.go │ │ └── util.go │ ├── gcexportdata │ │ ├── gcexportdata.go │ │ └── importer.go │ ├── internal │ │ ├── cgo │ │ │ ├── cgo.go │ │ │ └── cgo_pkgconfig.go │ │ ├── gcimporter │ │ │ ├── bexport.go │ │ │ ├── bimport.go │ │ │ ├── exportdata.go │ │ │ ├── gcimporter.go │ │ │ ├── iexport.go │ │ │ ├── iimport.go │ │ │ ├── newInterface10.go │ │ │ └── newInterface11.go │ │ └── packagesdriver │ │ │ └── sizes.go │ ├── loader │ │ ├── doc.go │ │ ├── loader.go │ │ └── util.go │ ├── packages │ │ ├── doc.go │ │ ├── external.go │ │ ├── golist.go │ │ ├── golist_overlay.go │ │ ├── packages.go │ │ └── visit.go │ └── types │ │ └── typeutil │ │ ├── callee.go │ │ ├── imports.go │ │ ├── map.go │ │ ├── methodsetcache.go │ │ └── ui.go │ └── internal │ ├── fastwalk │ ├── fastwalk.go │ ├── fastwalk_dirent_fileno.go │ ├── fastwalk_dirent_ino.go │ ├── fastwalk_dirent_namlen_bsd.go │ ├── fastwalk_dirent_namlen_linux.go │ ├── fastwalk_portable.go │ └── fastwalk_unix.go │ ├── gopathwalk │ └── walk.go │ ├── semver │ └── semver.go │ └── span │ ├── parse.go │ ├── span.go │ ├── token.go │ ├── token111.go │ ├── token112.go │ ├── uri.go │ └── utf16.go ├── google.golang.org └── appengine │ ├── LICENSE │ └── cloudsql │ ├── cloudsql.go │ ├── cloudsql_classic.go │ └── cloudsql_vm.go ├── gopkg.in ├── natefinch │ └── lumberjack.v2 │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── chown.go │ │ ├── chown_linux.go │ │ └── lumberjack.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 ├── honnef.co └── go │ └── tools │ ├── LICENSE │ ├── arg │ └── arg.go │ ├── callgraph │ ├── callgraph.go │ ├── static │ │ └── static.go │ └── util.go │ ├── cmd │ └── staticcheck │ │ ├── README.md │ │ └── staticcheck.go │ ├── config │ ├── config.go │ └── example.conf │ ├── deprecated │ └── stdlib.go │ ├── functions │ ├── concrete.go │ ├── functions.go │ ├── loops.go │ ├── pure.go │ └── terminates.go │ ├── internal │ └── sharedcheck │ │ └── lint.go │ ├── lint │ ├── LICENSE │ ├── generated.go │ ├── lint.go │ ├── lintdsl │ │ └── lintdsl.go │ └── lintutil │ │ ├── format │ │ └── format.go │ │ └── util.go │ ├── simple │ ├── CONTRIBUTING.md │ └── lint.go │ ├── ssa │ ├── LICENSE │ ├── blockopt.go │ ├── builder.go │ ├── const.go │ ├── create.go │ ├── doc.go │ ├── dom.go │ ├── emit.go │ ├── func.go │ ├── identical.go │ ├── identical_17.go │ ├── lift.go │ ├── lvalue.go │ ├── methods.go │ ├── mode.go │ ├── print.go │ ├── sanity.go │ ├── source.go │ ├── ssa.go │ ├── ssautil │ │ ├── load.go │ │ ├── switch.go │ │ └── visit.go │ ├── testmain.go │ ├── util.go │ ├── wrappers.go │ └── write.go │ ├── ssautil │ └── ssautil.go │ ├── staticcheck │ ├── CONTRIBUTING.md │ ├── buildtag.go │ ├── lint.go │ ├── rules.go │ └── vrp │ │ ├── channel.go │ │ ├── int.go │ │ ├── slice.go │ │ ├── string.go │ │ └── vrp.go │ ├── stylecheck │ ├── lint.go │ └── names.go │ ├── unused │ └── unused.go │ └── version │ └── version.go └── modules.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, build with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | .idea/* 14 | tinyurl 15 | -------------------------------------------------------------------------------- /config/config.yaml: -------------------------------------------------------------------------------- 1 | #Please replace it with your own domain. 2 | domain: "http://example.com/" 3 | 4 | web: 5 | mode: "debug" 6 | listen_address: ":8080" 7 | 8 | logger: 9 | # 1. "info" 10 | # 2. "debug" 11 | # 3. "error" 12 | level: "debug" 13 | filepath: "/var/log/tinyurl.log" 14 | 15 | mysql: 16 | #Please replace it with your own mysql address. 17 | dsn: "tinyurl_user:1pxIEuqHeQ8hFE@tcp(dev1:3306)/tinyurl?charset=utf8&loc=Asia%2FShanghai&parseTime=true" 18 | max_idle_conn: 50 19 | max_open_conn: 100 20 | conn_max_life_secs: 600 21 | # Whether to start debug mode 22 | # If on, the specific execution SQL is printed 23 | debug: true 24 | -------------------------------------------------------------------------------- /dao/url.go: -------------------------------------------------------------------------------- 1 | package dao 2 | 3 | import ( 4 | "github.com/vearne/tinyurl/model" 5 | "github.com/vearne/tinyurl/resource" 6 | ) 7 | 8 | func CreateTinyURL(url string) uint64 { 9 | item := models.TinyURL{} 10 | item.URL = url 11 | resource.MySQLClient.Create(&item) 12 | return item.ID 13 | } 14 | 15 | func GetURL(value uint64) string { 16 | item := models.TinyURL{ID: value} 17 | resource.MySQLClient.First(&item) 18 | return item.URL 19 | } 20 | -------------------------------------------------------------------------------- /doc/strcut.sql: -------------------------------------------------------------------------------- 1 | CREATE database tinyurl; 2 | USE tinyurl; 3 | CREATE TABLE `tinyurl` ( 4 | `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID', 5 | `url` varchar(255) DEFAULT NULL COMMENT 'URL', 6 | `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 7 | PRIMARY KEY (`id`) 8 | ) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8; 9 | 10 | 11 | -------------------------------------------------------------------------------- /doc/struct.md: -------------------------------------------------------------------------------- 1 | ### tinyurl 2 | 3 | |字段|类型|说明|备注| 4 | |:---|:---|:---|:---| 5 | |id|int|主键|| 6 | |url|varchar(255)|url|| 7 | |created_at|datetime|create date| -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/vearne/tinyurl 2 | 3 | go 1.13 4 | 5 | replace honnef.co/go/tools => github.com/dominikh/go-tools v0.0.0-20190102054323-c2f93a96b099 6 | 7 | require ( 8 | github.com/gin-gonic/gin v1.7.7 9 | github.com/gogf/gf v1.9.10 10 | github.com/jinzhu/gorm v1.9.11 11 | github.com/spf13/cobra v0.0.5 12 | github.com/spf13/viper v1.5.0 13 | go.uber.org/zap v1.13.0 14 | gopkg.in/natefinch/lumberjack.v2 v2.0.0 15 | ) 16 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | // Copyright © 2018 NAME HERE 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 main 16 | 17 | import "github.com/vearne/tinyurl/cmd" 18 | 19 | func main() { 20 | cmd.Execute() 21 | } 22 | -------------------------------------------------------------------------------- /model/orm.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | // 域名的解析规则 4 | type TinyURL struct { 5 | //gorm.Model 6 | ID uint64 `gorm:"column:id" json:"id"` 7 | URL string `gorm:"column:url" json:"url"` 8 | } 9 | 10 | func (TinyURL) TableName() string { 11 | return "tinyurl" 12 | } 13 | -------------------------------------------------------------------------------- /router/router.go: -------------------------------------------------------------------------------- 1 | package router 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "github.com/vearne/tinyurl/handler" 6 | "net/http" 7 | "time" 8 | ) 9 | 10 | //NewServer NewServer 11 | func NewServer() *gin.Engine { 12 | r := gin.Default() 13 | 14 | r.POST("/api/tinyurl", handler.UrlChange) 15 | r.GET("/:sid", handler.UrlGet) 16 | 17 | r.GET("/", func(c *gin.Context) { 18 | c.String(http.StatusOK, time.Now().String()) 19 | }) 20 | return r 21 | } 22 | -------------------------------------------------------------------------------- /seq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vearne/tinyurl/e66c74073e882cd1d5cc426fed2a23a176d64957/seq.png -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/.gitignore: -------------------------------------------------------------------------------- 1 | TAGS 2 | tags 3 | .*.swp 4 | tomlcheck/tomlcheck 5 | toml.test 6 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.1 4 | - 1.2 5 | - 1.3 6 | - 1.4 7 | - 1.5 8 | - 1.6 9 | - tip 10 | install: 11 | - go install ./... 12 | - go get github.com/BurntSushi/toml-test 13 | script: 14 | - export PATH="$PATH:$HOME/gopath/bin" 15 | - make test 16 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/COMPATIBLE: -------------------------------------------------------------------------------- 1 | Compatible with TOML version 2 | [v0.4.0](https://github.com/toml-lang/toml/blob/v0.4.0/versions/en/toml-v0.4.0.md) 3 | 4 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/Makefile: -------------------------------------------------------------------------------- 1 | install: 2 | go install ./... 3 | 4 | test: install 5 | go test -v 6 | toml-test toml-test-decoder 7 | toml-test -encoder toml-test-encoder 8 | 9 | fmt: 10 | gofmt -w *.go */*.go 11 | colcheck *.go */*.go 12 | 13 | tags: 14 | find ./ -name '*.go' -print0 | xargs -0 gotags > TAGS 15 | 16 | push: 17 | git push origin master 18 | git push github master 19 | 20 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/encoding_types.go: -------------------------------------------------------------------------------- 1 | // +build go1.2 2 | 3 | package toml 4 | 5 | // In order to support Go 1.1, we define our own TextMarshaler and 6 | // TextUnmarshaler types. For Go 1.2+, we just alias them with the 7 | // standard library interfaces. 8 | 9 | import ( 10 | "encoding" 11 | ) 12 | 13 | // TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here 14 | // so that Go 1.1 can be supported. 15 | type TextMarshaler encoding.TextMarshaler 16 | 17 | // TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined 18 | // here so that Go 1.1 can be supported. 19 | type TextUnmarshaler encoding.TextUnmarshaler 20 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/encoding_types_1.1.go: -------------------------------------------------------------------------------- 1 | // +build !go1.2 2 | 3 | package toml 4 | 5 | // These interfaces were introduced in Go 1.2, so we add them manually when 6 | // compiling for Go 1.1. 7 | 8 | // TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here 9 | // so that Go 1.1 can be supported. 10 | type TextMarshaler interface { 11 | MarshalText() (text []byte, err error) 12 | } 13 | 14 | // TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined 15 | // here so that Go 1.1 can be supported. 16 | type TextUnmarshaler interface { 17 | UnmarshalText(text []byte) error 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/session.vim: -------------------------------------------------------------------------------- 1 | au BufWritePost *.go silent!make tags > /dev/null 2>&1 2 | -------------------------------------------------------------------------------- /vendor/github.com/fatih/structs/.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/fatih/structs/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.7.x 4 | - 1.8.x 5 | - 1.9.x 6 | - tip 7 | sudo: false 8 | before_install: 9 | - go get github.com/axw/gocov/gocov 10 | - go get github.com/mattn/goveralls 11 | - if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi 12 | script: 13 | - $HOME/gopath/bin/goveralls -service=travis-ci 14 | -------------------------------------------------------------------------------- /vendor/github.com/fatih/structs/tags.go: -------------------------------------------------------------------------------- 1 | package structs 2 | 3 | import "strings" 4 | 5 | // tagOptions contains a slice of tag options 6 | type tagOptions []string 7 | 8 | // Has returns true if the given option is available in tagOptions 9 | func (t tagOptions) Has(opt string) bool { 10 | for _, tagOpt := range t { 11 | if tagOpt == opt { 12 | return true 13 | } 14 | } 15 | 16 | return false 17 | } 18 | 19 | // parseTag splits a struct field's tag into its name and a list of options 20 | // which comes after a name. A tag is in the form of: "name,option1,option2". 21 | // The name can be neglectected. 22 | func parseTag(tag string) (string, tagOptions) { 23 | // tag is one of followings: 24 | // "" 25 | // "name" 26 | // "name,opt" 27 | // "name,opt,opt2" 28 | // ",opt" 29 | 30 | res := strings.Split(tag, ",") 31 | return res[0], res[1:] 32 | } 33 | -------------------------------------------------------------------------------- /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/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/gin-contrib/sse/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.8.x 5 | - 1.9.x 6 | - 1.10.x 7 | - 1.11.x 8 | - 1.12.x 9 | - master 10 | 11 | git: 12 | depth: 10 13 | 14 | matrix: 15 | fast_finish: true 16 | include: 17 | - go: 1.11.x 18 | env: GO111MODULE=on 19 | - go: 1.12.x 20 | env: GO111MODULE=on 21 | 22 | script: 23 | - go test -v -covermode=count -coverprofile=coverage.out 24 | 25 | after_success: 26 | - bash <(curl -s https://codecov.io/bash) 27 | -------------------------------------------------------------------------------- /vendor/github.com/gin-contrib/sse/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/gin-contrib/sse 2 | 3 | go 1.12 4 | 5 | require github.com/stretchr/testify v1.3.0 6 | -------------------------------------------------------------------------------- /vendor/github.com/gin-contrib/sse/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 2 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 3 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 4 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 5 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 6 | github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= 7 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 8 | -------------------------------------------------------------------------------- /vendor/github.com/gin-contrib/sse/writer.go: -------------------------------------------------------------------------------- 1 | package sse 2 | 3 | import "io" 4 | 5 | type stringWriter interface { 6 | io.Writer 7 | WriteString(string) (int, error) 8 | } 9 | 10 | type stringWrapper struct { 11 | io.Writer 12 | } 13 | 14 | func (w stringWrapper) WriteString(str string) (int, error) { 15 | return w.Writer.Write([]byte(str)) 16 | } 17 | 18 | func checkWriter(writer io.Writer) stringWriter { 19 | if w, ok := writer.(stringWriter); ok { 20 | return w 21 | } else { 22 | return stringWrapper{writer} 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/.gitignore: -------------------------------------------------------------------------------- 1 | vendor/* 2 | !vendor/vendor.json 3 | coverage.out 4 | count.out 5 | test 6 | profile.out 7 | tmp.out 8 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | - With issues: 4 | - Use the search tool before opening a new issue. 5 | - Please provide source code and commit sha if you found a bug. 6 | - Review existing issues and provide feedback or react to them. 7 | 8 | - With pull requests: 9 | - Open your pull request against `master` 10 | - Your pull request should have no more than two commits, if not you should squash them. 11 | - It should pass all tests in the available continuous integration systems such as TravisCI. 12 | - You should add/modify tests to cover your proposed code changes. 13 | - If your pull request contains a new feature, please document it on the README. 14 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/binding/header.go: -------------------------------------------------------------------------------- 1 | package binding 2 | 3 | import ( 4 | "net/http" 5 | "net/textproto" 6 | "reflect" 7 | ) 8 | 9 | type headerBinding struct{} 10 | 11 | func (headerBinding) Name() string { 12 | return "header" 13 | } 14 | 15 | func (headerBinding) Bind(req *http.Request, obj interface{}) error { 16 | 17 | if err := mapHeader(obj, req.Header); err != nil { 18 | return err 19 | } 20 | 21 | return validate(obj) 22 | } 23 | 24 | func mapHeader(ptr interface{}, h map[string][]string) error { 25 | return mappingByPtr(ptr, headerSource(h), "header") 26 | } 27 | 28 | type headerSource map[string][]string 29 | 30 | var _ setter = headerSource(nil) 31 | 32 | func (hs headerSource) TrySet(value reflect.Value, field reflect.StructField, tagValue string, opt setOptions) (isSetted bool, err error) { 33 | return setByForm(value, field, hs, textproto.CanonicalMIMEHeaderKey(tagValue), opt) 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/binding/msgpack.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !nomsgpack 6 | // +build !nomsgpack 7 | 8 | package binding 9 | 10 | import ( 11 | "bytes" 12 | "io" 13 | "net/http" 14 | 15 | "github.com/ugorji/go/codec" 16 | ) 17 | 18 | type msgpackBinding struct{} 19 | 20 | func (msgpackBinding) Name() string { 21 | return "msgpack" 22 | } 23 | 24 | func (msgpackBinding) Bind(req *http.Request, obj interface{}) error { 25 | return decodeMsgPack(req.Body, obj) 26 | } 27 | 28 | func (msgpackBinding) BindBody(body []byte, obj interface{}) error { 29 | return decodeMsgPack(bytes.NewReader(body), obj) 30 | } 31 | 32 | func decodeMsgPack(r io.Reader, obj interface{}) error { 33 | cdc := new(codec.MsgpackHandle) 34 | if err := codec.NewDecoder(r, cdc).Decode(&obj); err != nil { 35 | return err 36 | } 37 | return validate(obj) 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/binding/query.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package binding 6 | 7 | import "net/http" 8 | 9 | type queryBinding struct{} 10 | 11 | func (queryBinding) Name() string { 12 | return "query" 13 | } 14 | 15 | func (queryBinding) Bind(req *http.Request, obj interface{}) error { 16 | values := req.URL.Query() 17 | if err := mapForm(obj, values); err != nil { 18 | return err 19 | } 20 | return validate(obj) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/binding/uri.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Gin Core Team. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package binding 6 | 7 | type uriBinding struct{} 8 | 9 | func (uriBinding) Name() string { 10 | return "uri" 11 | } 12 | 13 | func (uriBinding) BindUri(m map[string][]string, obj interface{}) error { 14 | if err := mapUri(obj, m); err != nil { 15 | return err 16 | } 17 | return validate(obj) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/binding/xml.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package binding 6 | 7 | import ( 8 | "bytes" 9 | "encoding/xml" 10 | "io" 11 | "net/http" 12 | ) 13 | 14 | type xmlBinding struct{} 15 | 16 | func (xmlBinding) Name() string { 17 | return "xml" 18 | } 19 | 20 | func (xmlBinding) Bind(req *http.Request, obj interface{}) error { 21 | return decodeXML(req.Body, obj) 22 | } 23 | 24 | func (xmlBinding) BindBody(body []byte, obj interface{}) error { 25 | return decodeXML(bytes.NewReader(body), obj) 26 | } 27 | func decodeXML(r io.Reader, obj interface{}) error { 28 | decoder := xml.NewDecoder(r) 29 | if err := decoder.Decode(obj); err != nil { 30 | return err 31 | } 32 | return validate(obj) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/binding/yaml.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Gin Core Team. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package binding 6 | 7 | import ( 8 | "bytes" 9 | "io" 10 | "net/http" 11 | 12 | "gopkg.in/yaml.v2" 13 | ) 14 | 15 | type yamlBinding struct{} 16 | 17 | func (yamlBinding) Name() string { 18 | return "yaml" 19 | } 20 | 21 | func (yamlBinding) Bind(req *http.Request, obj interface{}) error { 22 | return decodeYAML(req.Body, obj) 23 | } 24 | 25 | func (yamlBinding) BindBody(body []byte, obj interface{}) error { 26 | return decodeYAML(bytes.NewReader(body), obj) 27 | } 28 | 29 | func decodeYAML(r io.Reader, obj interface{}) error { 30 | decoder := yaml.NewDecoder(r) 31 | if err := decoder.Decode(obj); err != nil { 32 | return err 33 | } 34 | return validate(obj) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | notify: 3 | gitter: 4 | default: 5 | url: https://webhooks.gitter.im/e/d90dcdeeab2f1e357165 6 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/context_appengine.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build appengine 6 | // +build appengine 7 | 8 | package gin 9 | 10 | func init() { 11 | defaultPlatform = PlatformGoogleAppEngine 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/deprecated.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package gin 6 | 7 | import ( 8 | "log" 9 | 10 | "github.com/gin-gonic/gin/binding" 11 | ) 12 | 13 | // BindWith binds the passed struct pointer using the specified binding engine. 14 | // See the binding package. 15 | func (c *Context) BindWith(obj interface{}, b binding.Binding) error { 16 | log.Println(`BindWith(\"interface{}, binding.Binding\") error is going to 17 | be deprecated, please check issue #662 and either use MustBindWith() if you 18 | want HTTP 400 to be automatically returned if any error occur, or use 19 | ShouldBindWith() if you need to manage the error.`) 20 | return c.MustBindWith(obj, b) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package gin implements a HTTP web framework called gin. 3 | 4 | See https://gin-gonic.com/ for more information about gin. 5 | */ 6 | package gin // import "github.com/gin-gonic/gin" 7 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/gin-gonic/gin 2 | 3 | go 1.13 4 | 5 | require ( 6 | github.com/gin-contrib/sse v0.1.0 7 | github.com/go-playground/validator/v10 v10.4.1 8 | github.com/golang/protobuf v1.3.3 9 | github.com/json-iterator/go v1.1.9 10 | github.com/mattn/go-isatty v0.0.12 11 | github.com/stretchr/testify v1.4.0 12 | github.com/ugorji/go/codec v1.1.7 13 | gopkg.in/yaml.v2 v2.2.8 14 | ) 15 | 16 | retract v1.7.5 17 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/internal/bytesconv/bytesconv.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Gin Core Team. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package bytesconv 6 | 7 | import ( 8 | "unsafe" 9 | ) 10 | 11 | // StringToBytes converts string to byte slice without a memory allocation. 12 | func StringToBytes(s string) []byte { 13 | return *(*[]byte)(unsafe.Pointer( 14 | &struct { 15 | string 16 | Cap int 17 | }{s, len(s)}, 18 | )) 19 | } 20 | 21 | // BytesToString converts byte slice to string without a memory allocation. 22 | func BytesToString(b []byte) string { 23 | return *(*string)(unsafe.Pointer(&b)) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/internal/json/json.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Bo-Yi Wu. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !jsoniter 6 | // +build !jsoniter 7 | 8 | package json 9 | 10 | import "encoding/json" 11 | 12 | var ( 13 | // Marshal is exported by gin/json package. 14 | Marshal = json.Marshal 15 | // Unmarshal is exported by gin/json package. 16 | Unmarshal = json.Unmarshal 17 | // MarshalIndent is exported by gin/json package. 18 | MarshalIndent = json.MarshalIndent 19 | // NewDecoder is exported by gin/json package. 20 | NewDecoder = json.NewDecoder 21 | // NewEncoder is exported by gin/json package. 22 | NewEncoder = json.NewEncoder 23 | ) 24 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/internal/json/jsoniter.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Bo-Yi Wu. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build jsoniter 6 | // +build jsoniter 7 | 8 | package json 9 | 10 | import jsoniter "github.com/json-iterator/go" 11 | 12 | var ( 13 | json = jsoniter.ConfigCompatibleWithStandardLibrary 14 | // Marshal is exported by gin/json package. 15 | Marshal = json.Marshal 16 | // Unmarshal is exported by gin/json package. 17 | Unmarshal = json.Unmarshal 18 | // MarshalIndent is exported by gin/json package. 19 | MarshalIndent = json.MarshalIndent 20 | // NewDecoder is exported by gin/json package. 21 | NewDecoder = json.NewDecoder 22 | // NewEncoder is exported by gin/json package. 23 | NewEncoder = json.NewEncoder 24 | ) 25 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/render/data.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package render 6 | 7 | import "net/http" 8 | 9 | // Data contains ContentType and bytes data. 10 | type Data struct { 11 | ContentType string 12 | Data []byte 13 | } 14 | 15 | // Render (Data) writes data with custom ContentType. 16 | func (r Data) Render(w http.ResponseWriter) (err error) { 17 | r.WriteContentType(w) 18 | _, err = w.Write(r.Data) 19 | return 20 | } 21 | 22 | // WriteContentType (Data) writes custom ContentType. 23 | func (r Data) WriteContentType(w http.ResponseWriter) { 24 | writeContentType(w, []string{r.ContentType}) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/render/xml.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package render 6 | 7 | import ( 8 | "encoding/xml" 9 | "net/http" 10 | ) 11 | 12 | // XML contains the given interface object. 13 | type XML struct { 14 | Data interface{} 15 | } 16 | 17 | var xmlContentType = []string{"application/xml; charset=utf-8"} 18 | 19 | // Render (XML) encodes the given interface object and writes data with custom ContentType. 20 | func (r XML) Render(w http.ResponseWriter) error { 21 | r.WriteContentType(w) 22 | return xml.NewEncoder(w).Encode(r.Data) 23 | } 24 | 25 | // WriteContentType (XML) writes XML ContentType for response. 26 | func (r XML) WriteContentType(w http.ResponseWriter) { 27 | writeContentType(w, xmlContentType) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/render/yaml.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package render 6 | 7 | import ( 8 | "net/http" 9 | 10 | "gopkg.in/yaml.v2" 11 | ) 12 | 13 | // YAML contains the given interface object. 14 | type YAML struct { 15 | Data interface{} 16 | } 17 | 18 | var yamlContentType = []string{"application/x-yaml; charset=utf-8"} 19 | 20 | // Render (YAML) marshals the given interface object and writes data with custom ContentType. 21 | func (r YAML) Render(w http.ResponseWriter) error { 22 | r.WriteContentType(w) 23 | 24 | bytes, err := yaml.Marshal(r.Data) 25 | if err != nil { 26 | return err 27 | } 28 | 29 | _, err = w.Write(bytes) 30 | return err 31 | } 32 | 33 | // WriteContentType (YAML) writes YAML ContentType for response. 34 | func (r YAML) WriteContentType(w http.ResponseWriter) { 35 | writeContentType(w, yamlContentType) 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/test_helpers.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package gin 6 | 7 | import "net/http" 8 | 9 | // CreateTestContext returns a fresh engine and context for testing purposes 10 | func CreateTestContext(w http.ResponseWriter) (c *Context, r *Engine) { 11 | r = New() 12 | c = r.allocateContext() 13 | c.reset() 14 | c.writermem.reset(w) 15 | return 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/version.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Gin Core Team. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package gin 6 | 7 | // Version is the current gin framework's version. 8 | const Version = "v1.7.7" 9 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/locales/.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 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/locales/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.13.1 4 | - tip 5 | matrix: 6 | allow_failures: 7 | - go: tip 8 | 9 | notifications: 10 | email: 11 | recipients: dean.karn@gmail.com 12 | on_success: change 13 | on_failure: always 14 | 15 | before_install: 16 | - go install github.com/mattn/goveralls 17 | 18 | # Only clone the most recent commit. 19 | git: 20 | depth: 1 21 | 22 | script: 23 | - go test -v -race -covermode=atomic -coverprofile=coverage.coverprofile ./... 24 | 25 | after_success: | 26 | goveralls -coverprofile=coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN -------------------------------------------------------------------------------- /vendor/github.com/go-playground/locales/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/go-playground/locales 2 | 3 | go 1.13 4 | 5 | require golang.org/x/text v0.3.2 6 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/locales/go.sum: -------------------------------------------------------------------------------- 1 | golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= 2 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 3 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 4 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/locales/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vearne/tinyurl/e66c74073e882cd1d5cc426fed2a23a176d64957/vendor/github.com/go-playground/locales/logo.png -------------------------------------------------------------------------------- /vendor/github.com/go-playground/universal-translator/.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 | *.prof 25 | *.coverprofile -------------------------------------------------------------------------------- /vendor/github.com/go-playground/universal-translator/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.13.4 4 | - tip 5 | matrix: 6 | allow_failures: 7 | - go: tip 8 | 9 | notifications: 10 | email: 11 | recipients: dean.karn@gmail.com 12 | on_success: change 13 | on_failure: always 14 | 15 | before_install: 16 | - go install github.com/mattn/goveralls 17 | 18 | # Only clone the most recent commit. 19 | git: 20 | depth: 1 21 | 22 | script: 23 | - go test -v -race -covermode=atomic -coverprofile=coverage.coverprofile ./... 24 | 25 | after_success: | 26 | [ $TRAVIS_GO_VERSION = 1.13.4 ] && 27 | goveralls -coverprofile=coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN -------------------------------------------------------------------------------- /vendor/github.com/go-playground/universal-translator/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/go-playground/universal-translator 2 | 3 | go 1.13 4 | 5 | require github.com/go-playground/locales v0.13.0 6 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/universal-translator/go.sum: -------------------------------------------------------------------------------- 1 | github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= 2 | github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= 3 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 4 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 5 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/universal-translator/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vearne/tinyurl/e66c74073e882cd1d5cc426fed2a23a176d64957/vendor/github.com/go-playground/universal-translator/logo.png -------------------------------------------------------------------------------- /vendor/github.com/go-playground/validator/v10/.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 | bin 10 | 11 | # Architecture specific extensions/prefixes 12 | *.[568vq] 13 | [568vq].out 14 | 15 | *.cgo1.go 16 | *.cgo2.c 17 | _cgo_defun.c 18 | _cgo_gotypes.go 19 | _cgo_export.* 20 | 21 | _testmain.go 22 | 23 | *.exe 24 | *.test 25 | *.prof 26 | *.test 27 | *.out 28 | *.txt 29 | cover.html 30 | README.html 31 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/validator/v10/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.15.2 4 | - tip 5 | matrix: 6 | allow_failures: 7 | - go: tip 8 | 9 | notifications: 10 | email: 11 | recipients: dean.karn@gmail.com 12 | on_success: change 13 | on_failure: always 14 | 15 | before_install: 16 | - go install github.com/mattn/goveralls 17 | - mkdir -p $GOPATH/src/gopkg.in 18 | - ln -s $GOPATH/src/github.com/$TRAVIS_REPO_SLUG $GOPATH/src/gopkg.in/validator.v9 19 | 20 | # Only clone the most recent commit. 21 | git: 22 | depth: 1 23 | 24 | script: 25 | - go test -v -race -covermode=atomic -coverprofile=coverage.coverprofile ./... 26 | 27 | after_success: | 28 | [ $TRAVIS_GO_VERSION = 1.15.2 ] && 29 | goveralls -coverprofile=coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN 30 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/validator/v10/Makefile: -------------------------------------------------------------------------------- 1 | GOCMD=GO111MODULE=on go 2 | 3 | linters-install: 4 | @golangci-lint --version >/dev/null 2>&1 || { \ 5 | echo "installing linting tools..."; \ 6 | curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.21.0; \ 7 | } 8 | 9 | lint: linters-install 10 | $(PWD)/bin/golangci-lint run 11 | 12 | test: 13 | $(GOCMD) test -cover -race ./... 14 | 15 | bench: 16 | $(GOCMD) test -bench=. -benchmem ./... 17 | 18 | .PHONY: test lint linters-install -------------------------------------------------------------------------------- /vendor/github.com/go-playground/validator/v10/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/go-playground/validator/v10 2 | 3 | go 1.13 4 | 5 | require ( 6 | github.com/go-playground/assert/v2 v2.0.1 7 | github.com/go-playground/locales v0.13.0 8 | github.com/go-playground/universal-translator v0.17.0 9 | github.com/leodido/go-urn v1.2.0 10 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/validator/v10/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vearne/tinyurl/e66c74073e882cd1d5cc426fed2a23a176d64957/vendor/github.com/go-playground/validator/v10/logo.png -------------------------------------------------------------------------------- /vendor/github.com/go-playground/validator/v10/translations.go: -------------------------------------------------------------------------------- 1 | package validator 2 | 3 | import ut "github.com/go-playground/universal-translator" 4 | 5 | // TranslationFunc is the function type used to register or override 6 | // custom translations 7 | type TranslationFunc func(ut ut.Translator, fe FieldError) string 8 | 9 | // RegisterTranslationsFunc allows for registering of translations 10 | // for a 'ut.Translator' for use within the 'TranslationFunc' 11 | type RegisterTranslationsFunc func(ut ut.Translator) error 12 | -------------------------------------------------------------------------------- /vendor/github.com/go-sql-driver/mysql/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .DS_Store? 3 | ._* 4 | .Spotlight-V100 5 | .Trashes 6 | Icon? 7 | ehthumbs.db 8 | Thumbs.db 9 | .idea 10 | -------------------------------------------------------------------------------- /vendor/github.com/go-sql-driver/mysql/appengine.go: -------------------------------------------------------------------------------- 1 | // Go MySQL Driver - A MySQL-Driver for Go's database/sql package 2 | // 3 | // Copyright 2013 The Go-MySQL-Driver Authors. All rights reserved. 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public 6 | // License, v. 2.0. If a copy of the MPL was not distributed with this file, 7 | // You can obtain one at http://mozilla.org/MPL/2.0/. 8 | 9 | // +build appengine 10 | 11 | package mysql 12 | 13 | import ( 14 | "google.golang.org/appengine/cloudsql" 15 | ) 16 | 17 | func init() { 18 | RegisterDial("cloudsql", cloudsql.Dial) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/go-sql-driver/mysql/result.go: -------------------------------------------------------------------------------- 1 | // Go MySQL Driver - A MySQL-Driver for Go's database/sql package 2 | // 3 | // Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved. 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public 6 | // License, v. 2.0. If a copy of the MPL was not distributed with this file, 7 | // You can obtain one at http://mozilla.org/MPL/2.0/. 8 | 9 | package mysql 10 | 11 | type mysqlResult struct { 12 | affectedRows int64 13 | insertId int64 14 | } 15 | 16 | func (res *mysqlResult) LastInsertId() (int64, error) { 17 | return res.insertId, nil 18 | } 19 | 20 | func (res *mysqlResult) RowsAffected() (int64, error) { 21 | return res.affectedRows, nil 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/go-sql-driver/mysql/transaction.go: -------------------------------------------------------------------------------- 1 | // Go MySQL Driver - A MySQL-Driver for Go's database/sql package 2 | // 3 | // Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved. 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public 6 | // License, v. 2.0. If a copy of the MPL was not distributed with this file, 7 | // You can obtain one at http://mozilla.org/MPL/2.0/. 8 | 9 | package mysql 10 | 11 | type mysqlTx struct { 12 | mc *mysqlConn 13 | } 14 | 15 | func (tx *mysqlTx) Commit() (err error) { 16 | if tx.mc == nil || tx.mc.closed.IsSet() { 17 | return ErrInvalidConn 18 | } 19 | err = tx.mc.exec("COMMIT") 20 | tx.mc = nil 21 | return 22 | } 23 | 24 | func (tx *mysqlTx) Rollback() (err error) { 25 | if tx.mc == nil || tx.mc.closed.IsSet() { 26 | return ErrInvalidConn 27 | } 28 | err = tx.mc.exec("ROLLBACK") 29 | tx.mc = nil 30 | return 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/gogf/gf/container/gtree/gtree.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 gf Author(https://github.com/gogf/gf). All Rights Reserved. 2 | // 3 | // This Source Code Form is subject to the terms of the MIT License. 4 | // If a copy of the MIT was not distributed with this file, 5 | // You can obtain one at https://github.com/gogf/gf. 6 | 7 | // Package gtree provides concurrent-safe/unsafe tree containers. 8 | package gtree 9 | -------------------------------------------------------------------------------- /vendor/github.com/gogf/gf/container/gtype/gtype.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 gf Author(https://github.com/gogf/gf). All Rights Reserved. 2 | // 3 | // This Source Code Form is subject to the terms of the MIT License. 4 | // If a copy of the MIT was not distributed with this file, 5 | // You can obtain one at https://github.com/gogf/gf. 6 | 7 | // Package gtype provides kinds of high performance and concurrent-safe basic variable types. 8 | package gtype 9 | 10 | // Type is alias of Interface. 11 | type Type = Interface 12 | 13 | // New is alias of NewInterface. 14 | // See NewInterface. 15 | func New(value ...interface{}) *Type { 16 | return NewInterface(value...) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/gogf/gf/encoding/gbinary/gbinary_func.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 gf Author(https://github.com/gogf/gf). All Rights Reserved. 2 | // 3 | // This Source Code Form is subject to the terms of the MIT License. 4 | // If a copy of the MIT was not distributed with this file, 5 | // You can obtain one at https://github.com/gogf/gf. 6 | 7 | package gbinary 8 | -------------------------------------------------------------------------------- /vendor/github.com/gogf/gf/internal/structs/structs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 gf Author(https://github.com/gogf/gf). All Rights Reserved. 2 | // 3 | // This Source Code Form is subject to the terms of the MIT License. 4 | // If a copy of the MIT was not distributed with this file, 5 | // You can obtain one at https://github.com/gogf/gf. 6 | 7 | // Package structs provides functions for struct conversion. 8 | package structs 9 | 10 | import ( 11 | "github.com/fatih/structs" 12 | ) 13 | 14 | // Field is alias of structs.Field. 15 | type Field = structs.Field 16 | -------------------------------------------------------------------------------- /vendor/github.com/gogf/gf/os/gcache/gcache_mem_cache_item.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 gf Author(https://github.com/gogf/gf). All Rights Reserved. 2 | // 3 | // This Source Code Form is subject to the terms of the MIT License. 4 | // If a copy of the MIT was not distributed with this file, 5 | // You can obtain one at https://github.com/gogf/gf. 6 | 7 | package gcache 8 | 9 | import ( 10 | "github.com/gogf/gf/os/gtime" 11 | ) 12 | 13 | // IsExpired checks whether is expired. 14 | func (item *memCacheItem) IsExpired() bool { 15 | // Note that it should use greater than or equal judgement here 16 | // imagining that the cache time is only 1 millisecond. 17 | if item.e >= gtime.Millisecond() { 18 | return false 19 | } 20 | return true 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/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/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/hashicorp/hcl 2 | 3 | require github.com/davecgh/go-spew v1.1.1 4 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 2 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 3 | -------------------------------------------------------------------------------- /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/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/jinzhu/gorm/.gitignore: -------------------------------------------------------------------------------- 1 | documents 2 | coverage.txt 3 | _book 4 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/gorm/dialects/mysql/mysql.go: -------------------------------------------------------------------------------- 1 | package mysql 2 | 3 | import _ "github.com/go-sql-driver/mysql" 4 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/gorm/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | mysql: 5 | image: 'mysql:latest' 6 | ports: 7 | - 9910:3306 8 | environment: 9 | - MYSQL_DATABASE=gorm 10 | - MYSQL_USER=gorm 11 | - MYSQL_PASSWORD=gorm 12 | - MYSQL_RANDOM_ROOT_PASSWORD="yes" 13 | postgres: 14 | image: 'postgres:latest' 15 | ports: 16 | - 9920:5432 17 | environment: 18 | - POSTGRES_USER=gorm 19 | - POSTGRES_DB=gorm 20 | - POSTGRES_PASSWORD=gorm 21 | mssql: 22 | image: 'mcmoe/mssqldocker:latest' 23 | ports: 24 | - 9930:1433 25 | environment: 26 | - ACCEPT_EULA=Y 27 | - SA_PASSWORD=LoremIpsum86 28 | - MSSQL_DB=gorm 29 | - MSSQL_USER=gorm 30 | - MSSQL_PASSWORD=LoremIpsum86 31 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/gorm/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jinzhu/gorm 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/denisenkom/go-mssqldb v0.0.0-20190515213511-eb9f6a1743f3 7 | github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 8 | github.com/go-sql-driver/mysql v1.4.1 9 | github.com/jinzhu/inflection v1.0.0 10 | github.com/jinzhu/now v1.0.1 11 | github.com/lib/pq v1.1.1 12 | github.com/mattn/go-sqlite3 v1.11.0 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/gorm/interface.go: -------------------------------------------------------------------------------- 1 | package gorm 2 | 3 | import ( 4 | "context" 5 | "database/sql" 6 | ) 7 | 8 | // SQLCommon is the minimal database connection functionality gorm requires. Implemented by *sql.DB. 9 | type SQLCommon interface { 10 | Exec(query string, args ...interface{}) (sql.Result, error) 11 | Prepare(query string) (*sql.Stmt, error) 12 | Query(query string, args ...interface{}) (*sql.Rows, error) 13 | QueryRow(query string, args ...interface{}) *sql.Row 14 | } 15 | 16 | type sqlDb interface { 17 | Begin() (*sql.Tx, error) 18 | BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error) 19 | } 20 | 21 | type sqlTx interface { 22 | Commit() error 23 | Rollback() error 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/gorm/model.go: -------------------------------------------------------------------------------- 1 | package gorm 2 | 3 | import "time" 4 | 5 | // Model base model definition, including fields `ID`, `CreatedAt`, `UpdatedAt`, `DeletedAt`, which could be embedded in your models 6 | // type User struct { 7 | // gorm.Model 8 | // } 9 | type Model struct { 10 | ID uint `gorm:"primary_key"` 11 | CreatedAt time.Time 12 | UpdatedAt time.Time 13 | DeletedAt *time.Time `sql:"index"` 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/gorm/test_all.sh: -------------------------------------------------------------------------------- 1 | dialects=("postgres" "mysql" "mssql" "sqlite") 2 | 3 | for dialect in "${dialects[@]}" ; do 4 | DEBUG=false GORM_DIALECT=${dialect} go test 5 | done 6 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/inflection/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jinzhu/inflection 2 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/inflection/wercker.yml: -------------------------------------------------------------------------------- 1 | box: golang 2 | 3 | build: 4 | steps: 5 | - setup-go-workspace 6 | 7 | # Gets the dependencies 8 | - script: 9 | name: go get 10 | code: | 11 | go get 12 | 13 | # Build the project 14 | - script: 15 | name: go build 16 | code: | 17 | go build ./... 18 | 19 | # Test the project 20 | - script: 21 | name: go test 22 | code: | 23 | go test ./... 24 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/.codecov.yml: -------------------------------------------------------------------------------- 1 | ignore: 2 | - "output_tests/.*" 3 | 4 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /bug_test.go 3 | /coverage.txt 4 | /.idea 5 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.8.x 5 | - 1.x 6 | 7 | before_install: 8 | - go get -t -v ./... 9 | 10 | script: 11 | - ./test.sh 12 | 13 | after_success: 14 | - bash <(curl -s https://codecov.io/bash) 15 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/Gopkg.lock: -------------------------------------------------------------------------------- 1 | # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. 2 | 3 | 4 | [[projects]] 5 | name = "github.com/modern-go/concurrent" 6 | packages = ["."] 7 | revision = "e0a39a4cb4216ea8db28e22a69f4ec25610d513a" 8 | version = "1.0.0" 9 | 10 | [[projects]] 11 | name = "github.com/modern-go/reflect2" 12 | packages = ["."] 13 | revision = "4b7aa43c6742a2c18fdef89dd197aaae7dac7ccd" 14 | version = "1.0.1" 15 | 16 | [solve-meta] 17 | analyzer-name = "dep" 18 | analyzer-version = 1 19 | inputs-digest = "ea54a775e5a354cb015502d2e7aa4b74230fc77e894f34a838b268c25ec8eeb8" 20 | solver-name = "gps-cdcl" 21 | solver-version = 1 22 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/Gopkg.toml: -------------------------------------------------------------------------------- 1 | # Gopkg.toml example 2 | # 3 | # Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md 4 | # for detailed Gopkg.toml documentation. 5 | # 6 | # required = ["github.com/user/thing/cmd/thing"] 7 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 8 | # 9 | # [[constraint]] 10 | # name = "github.com/user/project" 11 | # version = "1.0.0" 12 | # 13 | # [[constraint]] 14 | # name = "github.com/user/project2" 15 | # branch = "dev" 16 | # source = "github.com/myfork/project2" 17 | # 18 | # [[override]] 19 | # name = "github.com/x/y" 20 | # version = "2.4.0" 21 | 22 | ignored = ["github.com/davecgh/go-spew*","github.com/google/gofuzz*","github.com/stretchr/testify*"] 23 | 24 | [[constraint]] 25 | name = "github.com/modern-go/reflect2" 26 | version = "1.0.1" 27 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | set -x 4 | 5 | if [ ! -d /tmp/build-golang/src/github.com/json-iterator ]; then 6 | mkdir -p /tmp/build-golang/src/github.com/json-iterator 7 | ln -s $PWD /tmp/build-golang/src/github.com/json-iterator/go 8 | fi 9 | export GOPATH=/tmp/build-golang 10 | go get -u github.com/golang/dep/cmd/dep 11 | cd /tmp/build-golang/src/github.com/json-iterator/go 12 | exec $GOPATH/bin/dep ensure -update 13 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/fuzzy_mode_convert_table.md: -------------------------------------------------------------------------------- 1 | | json type \ dest type | bool | int | uint | float |string| 2 | | --- | --- | --- | --- |--|--| 3 | | number | positive => true
negative => true
zero => false| 23.2 => 23
-32.1 => -32| 12.1 => 12
-12.1 => 0|as normal|same as origin| 4 | | string | empty string => false
string "0" => false
other strings => true | "123.32" => 123
"-123.4" => -123
"123.23xxxw" => 123
"abcde12" => 0
"-32.1" => -32| 13.2 => 13
-1.1 => 0 |12.1 => 12.1
-12.3 => -12.3
12.4xxa => 12.4
+1.1e2 =>110 |same as origin| 5 | | bool | true => true
false => false| true => 1
false => 0 | true => 1
false => 0 |true => 1
false => 0|true => "true"
false => "false"| 6 | | object | true | 0 | 0 |0|originnal json| 7 | | array | empty array => false
nonempty array => true| [] => 0
[1,2] => 1 | [] => 0
[1,2] => 1 |[] => 0
[1,2] => 1|original json| -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/json-iterator/go 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 7 | github.com/google/gofuzz v1.0.0 8 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 9 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 10 | github.com/stretchr/testify v1.3.0 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/jsoniter.go: -------------------------------------------------------------------------------- 1 | // Package jsoniter implements encoding and decoding of JSON as defined in 2 | // RFC 4627 and provides interfaces with identical syntax of standard lib encoding/json. 3 | // Converting from encoding/json to jsoniter is no more than replacing the package with jsoniter 4 | // and variable type declarations (if any). 5 | // jsoniter interfaces gives 100% compatibility with code using standard lib. 6 | // 7 | // "JSON and Go" 8 | // (https://golang.org/doc/articles/json_and_go.html) 9 | // gives a description of how Marshal/Unmarshal operate 10 | // between arbitrary or predefined json objects and bytes, 11 | // and it applies to jsoniter.Marshal/Unmarshal as well. 12 | // 13 | // Besides, jsoniter.Iterator provides a different set of interfaces 14 | // iterating given bytes/string/reader 15 | // and yielding parsed elements one by one. 16 | // This set of interfaces reads input as required and gives 17 | // better performance. 18 | package jsoniter 19 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -coverprofile=profile.out -coverpkg=github.com/json-iterator/go $d 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/github.com/leodido/go-urn/.gitignore: -------------------------------------------------------------------------------- 1 | *.exe 2 | *.dll 3 | *.so 4 | *.dylib 5 | 6 | *.test 7 | 8 | *.out 9 | *.txt 10 | 11 | vendor/ -------------------------------------------------------------------------------- /vendor/github.com/leodido/go-urn/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.9.x 5 | - 1.10.x 6 | - 1.11.x 7 | - 1.12.x 8 | - 1.13.x 9 | - tip 10 | 11 | before_install: 12 | - go get -t -v ./... 13 | 14 | script: 15 | - go test -race -coverprofile=coverage.txt -covermode=atomic 16 | 17 | after_success: 18 | - bash <(curl -s https://codecov.io/bash) -------------------------------------------------------------------------------- /vendor/github.com/leodido/go-urn/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/leodido/go-urn 2 | 3 | go 1.13 4 | 5 | require github.com/stretchr/testify v1.4.0 6 | -------------------------------------------------------------------------------- /vendor/github.com/leodido/go-urn/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 2 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 3 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 4 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 5 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 6 | github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= 7 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 8 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= 9 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 10 | gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= 11 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 12 | -------------------------------------------------------------------------------- /vendor/github.com/leodido/go-urn/makefile: -------------------------------------------------------------------------------- 1 | SHELL := /bin/bash 2 | 3 | build: machine.go 4 | 5 | images: docs/urn.png 6 | 7 | machine.go: machine.go.rl 8 | ragel -Z -G2 -e -o $@ $< 9 | @sed -i '/^\/\/line/d' $@ 10 | @$(MAKE) -s file=$@ snake2camel 11 | @gofmt -w -s $@ 12 | 13 | docs/urn.dot: machine.go.rl 14 | @mkdir -p docs 15 | ragel -Z -e -Vp $< -o $@ 16 | 17 | docs/urn.png: docs/urn.dot 18 | dot $< -Tpng -o $@ 19 | 20 | .PHONY: bench 21 | bench: *_test.go machine.go 22 | go test -bench=. -benchmem -benchtime=5s ./... 23 | 24 | .PHONY: tests 25 | tests: *_test.go machine.go 26 | go test -race -timeout 10s -coverprofile=coverage.out -covermode=atomic -v ./... 27 | 28 | .PHONY: clean 29 | clean: 30 | @rm -rf docs 31 | @rm -f machine.go 32 | 33 | .PHONY: snake2camel 34 | snake2camel: 35 | @awk -i inplace '{ \ 36 | while ( match($$0, /(.*)([a-z]+[0-9]*)_([a-zA-Z0-9])(.*)/, cap) ) \ 37 | $$0 = cap[1] cap[2] toupper(cap[3]) cap[4]; \ 38 | print \ 39 | }' $(file) -------------------------------------------------------------------------------- /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 | - "1.11.x" 11 | - "1.12.x" 12 | - tip 13 | -------------------------------------------------------------------------------- /vendor/github.com/magiconair/properties/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/magiconair/properties 2 | -------------------------------------------------------------------------------- /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/mattn/go-isatty/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.13.x 5 | - tip 6 | 7 | before_install: 8 | - go get -t -v ./... 9 | 10 | script: 11 | - ./go.test.sh 12 | 13 | after_success: 14 | - bash <(curl -s https://codecov.io/bash) 15 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/doc.go: -------------------------------------------------------------------------------- 1 | // Package isatty implements interface to isatty 2 | package isatty 3 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/mattn/go-isatty 2 | 3 | go 1.12 4 | 5 | require golang.org/x/sys v0.0.0-20200116001909-b77594299b42 6 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/go.sum: -------------------------------------------------------------------------------- 1 | golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg= 2 | golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 3 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/go.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -race -coverprofile=profile.out -covermode=atomic "$d" 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | // IsTerminal return true if the file descriptor is terminal. 9 | func IsTerminal(fd uintptr) bool { 10 | _, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA) 11 | return err == nil 12 | } 13 | 14 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 15 | // terminal. This is also always false on this environment. 16 | func IsCygwinTerminal(fd uintptr) bool { 17 | return false 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_others.go: -------------------------------------------------------------------------------- 1 | // +build appengine js nacl 2 | 3 | package isatty 4 | 5 | // IsTerminal returns true if the file descriptor is terminal which 6 | // is always false on js and appengine classic which is a sandboxed PaaS. 7 | func IsTerminal(fd uintptr) bool { 8 | return false 9 | } 10 | 11 | // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 12 | // terminal. This is also always false on this environment. 13 | func IsCygwinTerminal(fd uintptr) bool { 14 | return false 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_plan9.go: -------------------------------------------------------------------------------- 1 | // +build plan9 2 | 3 | package isatty 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // IsTerminal returns true if the given file descriptor is a terminal. 10 | func IsTerminal(fd uintptr) bool { 11 | path, err := syscall.Fd2path(int(fd)) 12 | if err != nil { 13 | return false 14 | } 15 | return path == "/dev/cons" || path == "/mnt/term/dev/cons" 16 | } 17 | 18 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 19 | // terminal. This is also always false on this environment. 20 | func IsCygwinTerminal(fd uintptr) bool { 21 | return false 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | // see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c 12 | func IsTerminal(fd uintptr) bool { 13 | var termio unix.Termio 14 | err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio) 15 | return err == nil 16 | } 17 | 18 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 19 | // terminal. This is also always false on this environment. 20 | func IsCygwinTerminal(fd uintptr) bool { 21 | return false 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_tcgets.go: -------------------------------------------------------------------------------- 1 | // +build linux aix 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | // IsTerminal return true if the file descriptor is terminal. 9 | func IsTerminal(fd uintptr) bool { 10 | _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) 11 | return err == nil 12 | } 13 | 14 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 15 | // terminal. This is also always false on this environment. 16 | func IsCygwinTerminal(fd uintptr) bool { 17 | return false 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ], 5 | "postUpdateOptions": [ 6 | "gomodTidy" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.11.x" 5 | - tip 6 | 7 | script: 8 | - go test 9 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.1.2 2 | 3 | * Fix error when decode hook decodes interface implementation into interface 4 | type. [GH-140] 5 | 6 | ## 1.1.1 7 | 8 | * Fix panic that can happen in `decodePtr` 9 | 10 | ## 1.1.0 11 | 12 | * Added `StringToIPHookFunc` to convert `string` to `net.IP` and `net.IPNet` [GH-133] 13 | * Support struct to struct decoding [GH-137] 14 | * If source map value is nil, then destination map value is nil (instead of empty) 15 | * If source slice value is nil, then destination slice value is nil (instead of empty) 16 | * If source pointer is nil, then destination pointer is set to nil (instead of 17 | allocated zero value of type) 18 | 19 | ## 1.0.0 20 | 21 | * Initial tagged stable release. 22 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/mitchellh/mapstructure 2 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/concurrent/README.md: -------------------------------------------------------------------------------- 1 | # concurrent 2 | concurrency utilities 3 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/concurrent/executor.go: -------------------------------------------------------------------------------- 1 | package concurrent 2 | 3 | import "context" 4 | 5 | type Executor interface { 6 | Go(handler func(ctx context.Context)) 7 | } -------------------------------------------------------------------------------- /vendor/github.com/modern-go/concurrent/go_above_19.go: -------------------------------------------------------------------------------- 1 | //+build go1.9 2 | 3 | package concurrent 4 | 5 | import "sync" 6 | 7 | type Map struct { 8 | sync.Map 9 | } 10 | 11 | func NewMap() *Map { 12 | return &Map{} 13 | } -------------------------------------------------------------------------------- /vendor/github.com/modern-go/concurrent/go_below_19.go: -------------------------------------------------------------------------------- 1 | //+build !go1.9 2 | 3 | package concurrent 4 | 5 | import "sync" 6 | 7 | type Map struct { 8 | lock sync.RWMutex 9 | data map[interface{}]interface{} 10 | } 11 | 12 | func NewMap() *Map { 13 | return &Map{ 14 | data: make(map[interface{}]interface{}, 32), 15 | } 16 | } 17 | 18 | func (m *Map) Load(key interface{}) (elem interface{}, found bool) { 19 | m.lock.RLock() 20 | elem, found = m.data[key] 21 | m.lock.RUnlock() 22 | return 23 | } 24 | 25 | func (m *Map) Store(key interface{}, elem interface{}) { 26 | m.lock.Lock() 27 | m.data[key] = elem 28 | m.lock.Unlock() 29 | } 30 | 31 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /coverage.txt 3 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.8.x 5 | - 1.x 6 | 7 | before_install: 8 | - go get -t -v ./... 9 | - go get -t -v github.com/modern-go/reflect2-tests/... 10 | 11 | script: 12 | - ./test.sh 13 | 14 | after_success: 15 | - bash <(curl -s https://codecov.io/bash) 16 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/Gopkg.lock: -------------------------------------------------------------------------------- 1 | # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. 2 | 3 | 4 | [[projects]] 5 | name = "github.com/modern-go/concurrent" 6 | packages = ["."] 7 | revision = "e0a39a4cb4216ea8db28e22a69f4ec25610d513a" 8 | version = "1.0.0" 9 | 10 | [solve-meta] 11 | analyzer-name = "dep" 12 | analyzer-version = 1 13 | inputs-digest = "daee8a88b3498b61c5640056665b8b9eea062006f5e596bbb6a3ed9119a11ec7" 14 | solver-name = "gps-cdcl" 15 | solver-version = 1 16 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/Gopkg.toml: -------------------------------------------------------------------------------- 1 | # Gopkg.toml example 2 | # 3 | # Refer to https://golang.github.io/dep/docs/Gopkg.toml.html 4 | # for detailed Gopkg.toml documentation. 5 | # 6 | # required = ["github.com/user/thing/cmd/thing"] 7 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 8 | # 9 | # [[constraint]] 10 | # name = "github.com/user/project" 11 | # version = "1.0.0" 12 | # 13 | # [[constraint]] 14 | # name = "github.com/user/project2" 15 | # branch = "dev" 16 | # source = "github.com/myfork/project2" 17 | # 18 | # [[override]] 19 | # name = "github.com/x/y" 20 | # version = "2.4.0" 21 | # 22 | # [prune] 23 | # non-go = false 24 | # go-tests = true 25 | # unused-packages = true 26 | 27 | ignored = [] 28 | 29 | [[constraint]] 30 | name = "github.com/modern-go/concurrent" 31 | version = "1.0.0" 32 | 33 | [prune] 34 | go-tests = true 35 | unused-packages = true 36 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/go_above_17.go: -------------------------------------------------------------------------------- 1 | //+build go1.7 2 | 3 | package reflect2 4 | 5 | import "unsafe" 6 | 7 | //go:linkname resolveTypeOff reflect.resolveTypeOff 8 | func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer 9 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/go_above_19.go: -------------------------------------------------------------------------------- 1 | //+build go1.9 2 | 3 | package reflect2 4 | 5 | import ( 6 | "unsafe" 7 | ) 8 | 9 | //go:linkname makemap reflect.makemap 10 | func makemap(rtype unsafe.Pointer, cap int) (m unsafe.Pointer) 11 | 12 | func makeMapWithSize(rtype unsafe.Pointer, cap int) unsafe.Pointer { 13 | return makemap(rtype, cap) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/go_below_17.go: -------------------------------------------------------------------------------- 1 | //+build !go1.7 2 | 3 | package reflect2 4 | 5 | import "unsafe" 6 | 7 | func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer { 8 | return nil 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/go_below_19.go: -------------------------------------------------------------------------------- 1 | //+build !go1.9 2 | 3 | package reflect2 4 | 5 | import ( 6 | "unsafe" 7 | ) 8 | 9 | //go:linkname makemap reflect.makemap 10 | func makemap(rtype unsafe.Pointer) (m unsafe.Pointer) 11 | 12 | func makeMapWithSize(rtype unsafe.Pointer, cap int) unsafe.Pointer { 13 | return makemap(rtype) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/reflect2_amd64.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vearne/tinyurl/e66c74073e882cd1d5cc426fed2a23a176d64957/vendor/github.com/modern-go/reflect2/reflect2_amd64.s -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/relfect2_386.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vearne/tinyurl/e66c74073e882cd1d5cc426fed2a23a176d64957/vendor/github.com/modern-go/reflect2/relfect2_386.s -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/relfect2_amd64p32.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vearne/tinyurl/e66c74073e882cd1d5cc426fed2a23a176d64957/vendor/github.com/modern-go/reflect2/relfect2_amd64p32.s -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/relfect2_arm.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vearne/tinyurl/e66c74073e882cd1d5cc426fed2a23a176d64957/vendor/github.com/modern-go/reflect2/relfect2_arm.s -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/relfect2_arm64.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vearne/tinyurl/e66c74073e882cd1d5cc426fed2a23a176d64957/vendor/github.com/modern-go/reflect2/relfect2_arm64.s -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/relfect2_mips64x.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vearne/tinyurl/e66c74073e882cd1d5cc426fed2a23a176d64957/vendor/github.com/modern-go/reflect2/relfect2_mips64x.s -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/relfect2_mipsx.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vearne/tinyurl/e66c74073e882cd1d5cc426fed2a23a176d64957/vendor/github.com/modern-go/reflect2/relfect2_mipsx.s -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/relfect2_ppc64x.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vearne/tinyurl/e66c74073e882cd1d5cc426fed2a23a176d64957/vendor/github.com/modern-go/reflect2/relfect2_ppc64x.s -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/relfect2_s390x.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vearne/tinyurl/e66c74073e882cd1d5cc426fed2a23a176d64957/vendor/github.com/modern-go/reflect2/relfect2_s390x.s -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/safe_struct.go: -------------------------------------------------------------------------------- 1 | package reflect2 2 | 3 | type safeStructType struct { 4 | safeType 5 | } 6 | 7 | func (type2 *safeStructType) FieldByName(name string) StructField { 8 | field, found := type2.Type.FieldByName(name) 9 | if !found { 10 | panic("field " + name + " not found") 11 | } 12 | return &safeField{StructField: field} 13 | } 14 | 15 | func (type2 *safeStructType) Field(i int) StructField { 16 | return &safeField{StructField: type2.Type.Field(i)} 17 | } 18 | 19 | func (type2 *safeStructType) FieldByIndex(index []int) StructField { 20 | return &safeField{StructField: type2.Type.FieldByIndex(index)} 21 | } 22 | 23 | func (type2 *safeStructType) FieldByNameFunc(match func(string) bool) StructField { 24 | field, found := type2.Type.FieldByNameFunc(match) 25 | if !found { 26 | panic("field match condition not found in " + type2.Type.String()) 27 | } 28 | return &safeField{StructField: field} 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list github.com/modern-go/reflect2-tests/... | grep -v vendor); do 7 | go test -coverprofile=profile.out -coverpkg=github.com/modern-go/reflect2 $d 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /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/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/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/spf13/afero 2 | -------------------------------------------------------------------------------- /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 | env: 3 | - GO111MODULE=on 4 | sudo: required 5 | go: 6 | - "1.11.x" 7 | - tip 8 | os: 9 | - linux 10 | matrix: 11 | allow_failures: 12 | - go: tip 13 | fast_finish: true 14 | script: 15 | - make check 16 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cast/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/spf13/cast 2 | 3 | require ( 4 | github.com/davecgh/go-spew v1.1.1 // indirect 5 | github.com/pmezard/go-difflib v1.0.0 // indirect 6 | github.com/stretchr/testify v1.2.2 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cast/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 2 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 3 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 4 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 5 | github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= 6 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 7 | -------------------------------------------------------------------------------- /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 | 38 | .idea/* 39 | -------------------------------------------------------------------------------- /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 | stages: 4 | - diff 5 | - test 6 | 7 | go: 8 | - 1.10.x 9 | - 1.11.x 10 | - 1.12.x 11 | - tip 12 | 13 | matrix: 14 | allow_failures: 15 | - go: tip 16 | include: 17 | - stage: diff 18 | go: 1.12.x 19 | script: diff -u <(echo -n) <(gofmt -d -s .) 20 | 21 | before_install: 22 | - mkdir -p bin 23 | - curl -Lso bin/shellcheck https://github.com/caarlos0/shellcheck-docker/releases/download/v0.6.0/shellcheck 24 | - chmod +x bin/shellcheck 25 | - go get -u github.com/kyoh86/richgo 26 | script: 27 | - PATH=$PATH:$PWD/bin richgo test -v ./... 28 | - go build 29 | - if [ -z $NOVET ]; then 30 | diff -u <(echo -n) <(go vet . 2>&1 | grep -vE 'ExampleCommand|bash_completions.*Fprint'); 31 | fi 32 | -------------------------------------------------------------------------------- /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 | "fmt" 7 | "os" 8 | "time" 9 | 10 | "github.com/inconshreveable/mousetrap" 11 | ) 12 | 13 | var preExecHookFn = preExecHook 14 | 15 | func preExecHook(c *Command) { 16 | if MousetrapHelpText != "" && mousetrap.StartedByExplorer() { 17 | c.Print(MousetrapHelpText) 18 | if MousetrapDisplayDuration > 0 { 19 | time.Sleep(MousetrapDisplayDuration) 20 | } else { 21 | c.Println("Press return to continue...") 22 | fmt.Scanln() 23 | } 24 | os.Exit(1) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/spf13/cobra 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/BurntSushi/toml v0.3.1 // indirect 7 | github.com/cpuguy83/go-md2man v1.0.10 8 | github.com/inconshreveable/mousetrap v1.0.0 9 | github.com/mitchellh/go-homedir v1.1.0 10 | github.com/spf13/pflag v1.0.3 11 | github.com/spf13/viper v1.3.2 12 | gopkg.in/yaml.v2 v2.2.2 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/powershell_completions.md: -------------------------------------------------------------------------------- 1 | # Generating PowerShell Completions For Your Own cobra.Command 2 | 3 | Cobra can generate PowerShell completion scripts. Users need PowerShell version 5.0 or above, which comes with Windows 10 and can be downloaded separately for Windows 7 or 8.1. They can then write the completions to a file and source this file from their PowerShell profile, which is referenced by the `$Profile` environment variable. See `Get-Help about_Profiles` for more info about PowerShell profiles. 4 | 5 | # What's supported 6 | 7 | - Completion for subcommands using their `.Short` description 8 | - Completion for non-hidden flags using their `.Name` and `.Shorthand` 9 | 10 | # What's not yet supported 11 | 12 | - Command aliases 13 | - Required, filename or custom flags (they will work like normal flags) 14 | - Custom completion scripts 15 | -------------------------------------------------------------------------------- /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/jwalterweatherman/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/spf13/jwalterweatherman 2 | -------------------------------------------------------------------------------- /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 25 | 26 | .vscode 27 | 28 | # exclude dependencies in the `/vendor` folder 29 | vendor 30 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/viper/.travis.yml: -------------------------------------------------------------------------------- 1 | go_import_path: github.com/spf13/viper 2 | 3 | language: go 4 | 5 | env: 6 | global: 7 | - GO111MODULE="on" 8 | - GOFLAGS="-mod=readonly" 9 | 10 | go: 11 | - 1.11.x 12 | - 1.12.x 13 | - 1.13.x 14 | - tip 15 | 16 | os: 17 | - linux 18 | - osx 19 | 20 | matrix: 21 | allow_failures: 22 | - go: tip 23 | fast_finish: true 24 | 25 | script: 26 | - go install ./... 27 | - diff -u <(echo -n) <(gofmt -d .) 28 | - go test -v ./... 29 | 30 | after_success: 31 | - go get -u -d github.com/spf13/hugo 32 | - cd $GOPATH/src/github.com/spf13/hugo && make && ./hugo -s docs && cd - 33 | -------------------------------------------------------------------------------- /vendor/github.com/subosito/gotenv/.env: -------------------------------------------------------------------------------- 1 | HELLO=world 2 | -------------------------------------------------------------------------------- /vendor/github.com/subosito/gotenv/.env.invalid: -------------------------------------------------------------------------------- 1 | lol$wut 2 | -------------------------------------------------------------------------------- /vendor/github.com/subosito/gotenv/.gitignore: -------------------------------------------------------------------------------- 1 | *.test 2 | *.out 3 | annotate.json 4 | -------------------------------------------------------------------------------- /vendor/github.com/subosito/gotenv/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.x 4 | os: 5 | - linux 6 | - osx 7 | script: 8 | - go test -test.v -coverprofile=coverage.out -covermode=count 9 | after_success: 10 | - bash <(curl -s https://codecov.io/bash) 11 | -------------------------------------------------------------------------------- /vendor/github.com/subosito/gotenv/appveyor.yml: -------------------------------------------------------------------------------- 1 | build: off 2 | clone_folder: c:\gopath\src\github.com\subosito\gotenv 3 | environment: 4 | GOPATH: c:\gopath 5 | stack: go 1.10 6 | before_test: 7 | - go get -t 8 | test_script: 9 | - go test -v -cover -race 10 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/0_importpath.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 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 // import "github.com/ugorji/go/codec" 5 | 6 | // This establishes that this package must be imported as github.com/ugorji/go/codec. 7 | // It makes forking easier, and plays well with pre-module releases of go. 8 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/codecgen.go: -------------------------------------------------------------------------------- 1 | // +build codecgen generated 2 | 3 | package codec 4 | 5 | // this file is here, to set the codecgen variable to true 6 | // when the build tag codecgen is set. 7 | // 8 | // this allows us do specific things e.g. skip missing fields tests, 9 | // when running in codecgen mode. 10 | 11 | func init() { 12 | codecgen = true 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/gen-enc-chan.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.Label}}: 2 | switch timeout{{.Sfx}} := z.EncBasicHandle().ChanRecvTimeout; { 3 | case timeout{{.Sfx}} == 0: // only consume available 4 | for { 5 | select { 6 | case b{{.Sfx}} := <-{{.Chan}}: 7 | {{ .Slice }} = append({{.Slice}}, b{{.Sfx}}) 8 | default: 9 | break {{.Label}} 10 | } 11 | } 12 | case timeout{{.Sfx}} > 0: // consume until timeout 13 | tt{{.Sfx}} := time.NewTimer(timeout{{.Sfx}}) 14 | for { 15 | select { 16 | case b{{.Sfx}} := <-{{.Chan}}: 17 | {{.Slice}} = append({{.Slice}}, b{{.Sfx}}) 18 | case <-tt{{.Sfx}}.C: 19 | // close(tt.C) 20 | break {{.Label}} 21 | } 22 | } 23 | default: // consume until close 24 | for b{{.Sfx}} := range {{.Chan}} { 25 | {{.Slice}} = append({{.Slice}}, b{{.Sfx}}) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/ugorji/go/codec 2 | 3 | require ( 4 | github.com/ugorji/go v1.1.7 5 | ) 6 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_arrayof_gte_go15.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 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-2018 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_fmt_time_gte_go15.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 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 "time" 9 | 10 | func fmtTime(t time.Time, b []byte) []byte { 11 | return t.AppendFormat(b, time.RFC3339Nano) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_fmt_time_lt_go15.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 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 "time" 9 | 10 | func fmtTime(t time.Time, b []byte) []byte { 11 | s := t.Format(time.RFC3339Nano) 12 | b = b[:len(s)] 13 | copy(b, s) 14 | return b 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_makemap_gte_go19.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 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-2018 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_maprange_gte_go112.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 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.12 5 | // +build safe 6 | 7 | package codec 8 | 9 | import "reflect" 10 | 11 | type mapIter struct { 12 | t *reflect.MapIter 13 | m reflect.Value 14 | values bool 15 | } 16 | 17 | func (t *mapIter) ValidKV() (r bool) { 18 | return true 19 | } 20 | 21 | func (t *mapIter) Next() (r bool) { 22 | return t.t.Next() 23 | } 24 | 25 | func (t *mapIter) Key() reflect.Value { 26 | return t.t.Key() 27 | } 28 | 29 | func (t *mapIter) Value() (r reflect.Value) { 30 | if t.values { 31 | return t.t.Value() 32 | } 33 | return 34 | } 35 | 36 | func (t *mapIter) Done() {} 37 | 38 | func mapRange(t *mapIter, m, k, v reflect.Value, values bool) { 39 | *t = mapIter{ 40 | m: m, 41 | t: m.MapRange(), 42 | values: values, 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_unexportedembeddedptr_gte_go110.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 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.10 5 | 6 | package codec 7 | 8 | const allowSetUnexportedEmbeddedPtr = false 9 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_unexportedembeddedptr_lt_go110.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 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.10 5 | 6 | package codec 7 | 8 | const allowSetUnexportedEmbeddedPtr = true 9 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_unsupported_lt_go14.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 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-2018 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-2018 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-2018 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-2018 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/helper.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vearne/tinyurl/e66c74073e882cd1d5cc426fed2a23a176d64957/vendor/github.com/ugorji/go/codec/helper.s -------------------------------------------------------------------------------- /vendor/go.uber.org/atomic/.codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | range: 80..100 3 | round: down 4 | precision: 2 5 | 6 | status: 7 | project: # measuring the overall project coverage 8 | default: # context, you can create multiple ones with custom titles 9 | enabled: yes # must be yes|true to enable this status 10 | target: 100 # specify the target coverage for each commit status 11 | # option: "auto" (must increase from parent commit or pull request base) 12 | # option: "X%" a static target percentage to hit 13 | if_not_found: success # if parent is not found report status as success, error, or failure 14 | if_ci_failed: error # if ci fails report status as success, error, or failure 15 | 16 | -------------------------------------------------------------------------------- /vendor/go.uber.org/atomic/.gitignore: -------------------------------------------------------------------------------- 1 | /bin 2 | .DS_Store 3 | /vendor 4 | cover.html 5 | cover.out 6 | lint.log 7 | 8 | # Binaries 9 | *.test 10 | 11 | # Profiling output 12 | *.prof 13 | -------------------------------------------------------------------------------- /vendor/go.uber.org/atomic/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | go_import_path: go.uber.org/atomic 4 | 5 | env: 6 | global: 7 | - GO111MODULE=on 8 | 9 | matrix: 10 | include: 11 | - go: 1.12.x 12 | - go: 1.13.x 13 | env: LINT=1 14 | 15 | cache: 16 | directories: 17 | - vendor 18 | 19 | before_install: 20 | - go version 21 | 22 | script: 23 | - test -z "$LINT" || make lint 24 | - make cover 25 | 26 | after_success: 27 | - bash <(curl -s https://codecov.io/bash) 28 | -------------------------------------------------------------------------------- /vendor/go.uber.org/atomic/Makefile: -------------------------------------------------------------------------------- 1 | # Directory to place `go install`ed binaries into. 2 | export GOBIN ?= $(shell pwd)/bin 3 | 4 | GOLINT = $(GOBIN)/golint 5 | 6 | GO_FILES ?= *.go 7 | 8 | .PHONY: build 9 | build: 10 | go build ./... 11 | 12 | .PHONY: test 13 | test: 14 | go test -race ./... 15 | 16 | .PHONY: gofmt 17 | gofmt: 18 | $(eval FMT_LOG := $(shell mktemp -t gofmt.XXXXX)) 19 | gofmt -e -s -l $(GO_FILES) > $(FMT_LOG) || true 20 | @[ ! -s "$(FMT_LOG)" ] || (echo "gofmt failed:" && cat $(FMT_LOG) && false) 21 | 22 | $(GOLINT): 23 | go install golang.org/x/lint/golint 24 | 25 | .PHONY: golint 26 | golint: $(GOLINT) 27 | $(GOLINT) ./... 28 | 29 | .PHONY: lint 30 | lint: gofmt golint 31 | 32 | .PHONY: cover 33 | cover: 34 | go test -coverprofile=cover.out -coverpkg ./... -v ./... 35 | go tool cover -html=cover.out -o cover.html 36 | -------------------------------------------------------------------------------- /vendor/go.uber.org/atomic/go.mod: -------------------------------------------------------------------------------- 1 | module go.uber.org/atomic 2 | 3 | require ( 4 | github.com/davecgh/go-spew v1.1.1 // indirect 5 | github.com/stretchr/testify v1.3.0 6 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de 7 | golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c // indirect 8 | ) 9 | 10 | go 1.13 11 | -------------------------------------------------------------------------------- /vendor/go.uber.org/multierr/.codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | range: 80..100 3 | round: down 4 | precision: 2 5 | 6 | status: 7 | project: # measuring the overall project coverage 8 | default: # context, you can create multiple ones with custom titles 9 | enabled: yes # must be yes|true to enable this status 10 | target: 100 # specify the target coverage for each commit status 11 | # option: "auto" (must increase from parent commit or pull request base) 12 | # option: "X%" a static target percentage to hit 13 | if_not_found: success # if parent is not found report status as success, error, or failure 14 | if_ci_failed: error # if ci fails report status as success, error, or failure 15 | 16 | -------------------------------------------------------------------------------- /vendor/go.uber.org/multierr/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | cover.html 3 | cover.out 4 | /bin 5 | -------------------------------------------------------------------------------- /vendor/go.uber.org/multierr/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | go_import_path: go.uber.org/multierr 4 | 5 | env: 6 | global: 7 | - GO15VENDOREXPERIMENT=1 8 | - GO111MODULE=on 9 | 10 | go: 11 | - 1.11.x 12 | - 1.12.x 13 | - 1.13.x 14 | 15 | cache: 16 | directories: 17 | - vendor 18 | 19 | before_install: 20 | - go version 21 | 22 | script: 23 | - | 24 | set -e 25 | make lint 26 | make cover 27 | 28 | after_success: 29 | - bash <(curl -s https://codecov.io/bash) 30 | -------------------------------------------------------------------------------- /vendor/go.uber.org/multierr/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Releases 2 | ======== 3 | 4 | v1.3.0 (2019-10-29) 5 | =================== 6 | 7 | - Switch to Go modules. 8 | 9 | 10 | v1.2.0 (2019-09-26) 11 | =================== 12 | 13 | - Support extracting and matching against wrapped errors with `errors.As` 14 | and `errors.Is`. 15 | 16 | 17 | v1.1.0 (2017-06-30) 18 | =================== 19 | 20 | - Added an `Errors(error) []error` function to extract the underlying list of 21 | errors for a multierr error. 22 | 23 | 24 | v1.0.0 (2017-05-31) 25 | =================== 26 | 27 | No changes since v0.2.0. This release is committing to making no breaking 28 | changes to the current API in the 1.X series. 29 | 30 | 31 | v0.2.0 (2017-04-11) 32 | =================== 33 | 34 | - Repeatedly appending to the same error is now faster due to fewer 35 | allocations. 36 | 37 | 38 | v0.1.0 (2017-31-03) 39 | =================== 40 | 41 | - Initial release 42 | -------------------------------------------------------------------------------- /vendor/go.uber.org/multierr/README.md: -------------------------------------------------------------------------------- 1 | # multierr [![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov] 2 | 3 | `multierr` allows combining one or more Go `error`s together. 4 | 5 | ## Installation 6 | 7 | go get -u go.uber.org/multierr 8 | 9 | ## Status 10 | 11 | Stable: No breaking changes will be made before 2.0. 12 | 13 | ------------------------------------------------------------------------------- 14 | 15 | Released under the [MIT License]. 16 | 17 | [MIT License]: LICENSE.txt 18 | [doc-img]: https://godoc.org/go.uber.org/multierr?status.svg 19 | [doc]: https://godoc.org/go.uber.org/multierr 20 | [ci-img]: https://travis-ci.com/uber-go/multierr.svg?branch=master 21 | [cov-img]: https://codecov.io/gh/uber-go/multierr/branch/master/graph/badge.svg 22 | [ci]: https://travis-ci.com/uber-go/multierr 23 | [cov]: https://codecov.io/gh/uber-go/multierr 24 | -------------------------------------------------------------------------------- /vendor/go.uber.org/multierr/glide.yaml: -------------------------------------------------------------------------------- 1 | package: go.uber.org/multierr 2 | import: 3 | - package: go.uber.org/atomic 4 | version: ^1 5 | testImport: 6 | - package: github.com/stretchr/testify 7 | subpackages: 8 | - assert 9 | -------------------------------------------------------------------------------- /vendor/go.uber.org/multierr/go.mod: -------------------------------------------------------------------------------- 1 | module go.uber.org/multierr 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/stretchr/testify v1.3.0 7 | go.uber.org/atomic v1.5.0 8 | go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee 9 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de 10 | golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5 // indirect 11 | honnef.co/go/tools v0.0.1-2019.2.3 12 | ) 13 | -------------------------------------------------------------------------------- /vendor/go.uber.org/tools/update-license/.gitignore: -------------------------------------------------------------------------------- 1 | update-license 2 | -------------------------------------------------------------------------------- /vendor/go.uber.org/tools/update-license/README.md: -------------------------------------------------------------------------------- 1 | # update-license 2 | 3 | This is a small tool that updates the license header for Uber's open source Golang files. 4 | 5 | ## Installation 6 | 7 | ``` 8 | go get go.uber.org/tools/update-license 9 | ``` 10 | 11 | ## Usage 12 | 13 | ``` 14 | update-license go_files... 15 | ``` 16 | 17 | ## Further Work 18 | 19 | * Support more licenses by name (MIT, Apache 2.0, etc), file path, url (http GET) 20 | * Support custom owner (not just "Uber Technologies, Inc.") 21 | * Support more languages than go (cover go, java, js, py to start, along with LICENSE, LICENSE.txt) 22 | * Talk about removing custom logic for header comments (ie `@generated`, `Code generated by`), it probably makes more sense just to put the license at the top 23 | * Better detection support for existing licenses so they can be removed 24 | * Verbose, dry run support 25 | -------------------------------------------------------------------------------- /vendor/go.uber.org/zap/.codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | range: 80..100 3 | round: down 4 | precision: 2 5 | 6 | status: 7 | project: # measuring the overall project coverage 8 | default: # context, you can create multiple ones with custom titles 9 | enabled: yes # must be yes|true to enable this status 10 | target: 95% # specify the target coverage for each commit status 11 | # option: "auto" (must increase from parent commit or pull request base) 12 | # option: "X%" a static target percentage to hit 13 | if_not_found: success # if parent is not found report status as success, error, or failure 14 | if_ci_failed: error # if ci fails report status as success, error, or failure 15 | ignore: 16 | - internal/readme/readme.go 17 | 18 | -------------------------------------------------------------------------------- /vendor/go.uber.org/zap/.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 | vendor 10 | 11 | # Architecture specific extensions/prefixes 12 | *.[568vq] 13 | [568vq].out 14 | 15 | *.cgo1.go 16 | *.cgo2.c 17 | _cgo_defun.c 18 | _cgo_gotypes.go 19 | _cgo_export.* 20 | 21 | _testmain.go 22 | 23 | *.exe 24 | *.test 25 | *.prof 26 | *.pprof 27 | *.out 28 | *.log 29 | 30 | /bin 31 | cover.out 32 | cover.html 33 | -------------------------------------------------------------------------------- /vendor/go.uber.org/zap/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | go_import_path: go.uber.org/zap 5 | env: 6 | global: 7 | - TEST_TIMEOUT_SCALE=10 8 | - GO111MODULE=on 9 | 10 | matrix: 11 | include: 12 | - go: 1.12.x 13 | - go: 1.13.x 14 | env: LINT=1 15 | 16 | script: 17 | - test -z "$LINT" || make lint 18 | - make test 19 | - make bench 20 | 21 | after_success: 22 | - make cover 23 | - bash <(curl -s https://codecov.io/bash) 24 | -------------------------------------------------------------------------------- /vendor/go.uber.org/zap/checklicense.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | ERROR_COUNT=0 4 | while read -r file 5 | do 6 | case "$(head -1 "${file}")" in 7 | *"Copyright (c) "*" Uber Technologies, Inc.") 8 | # everything's cool 9 | ;; 10 | *) 11 | echo "$file is missing license header." 12 | (( ERROR_COUNT++ )) 13 | ;; 14 | esac 15 | done < <(git ls-files "*\.go") 16 | 17 | exit $ERROR_COUNT 18 | -------------------------------------------------------------------------------- /vendor/go.uber.org/zap/glide.yaml: -------------------------------------------------------------------------------- 1 | package: go.uber.org/zap 2 | license: MIT 3 | import: 4 | - package: go.uber.org/atomic 5 | version: ^1 6 | - package: go.uber.org/multierr 7 | version: ^1 8 | testImport: 9 | - package: github.com/satori/go.uuid 10 | - package: github.com/sirupsen/logrus 11 | - package: github.com/apex/log 12 | subpackages: 13 | - handlers/json 14 | - package: github.com/go-kit/kit 15 | subpackages: 16 | - log 17 | - package: github.com/stretchr/testify 18 | subpackages: 19 | - assert 20 | - require 21 | - package: gopkg.in/inconshreveable/log15.v2 22 | - package: github.com/mattn/goveralls 23 | - package: github.com/pborman/uuid 24 | - package: github.com/pkg/errors 25 | - package: github.com/rs/zerolog 26 | - package: golang.org/x/tools 27 | subpackages: 28 | - cover 29 | - package: golang.org/x/lint 30 | subpackages: 31 | - golint 32 | - package: github.com/axw/gocov 33 | subpackages: 34 | - gocov 35 | -------------------------------------------------------------------------------- /vendor/go.uber.org/zap/go.mod: -------------------------------------------------------------------------------- 1 | module go.uber.org/zap 2 | 3 | go 1.13 4 | 5 | require ( 6 | github.com/pkg/errors v0.8.1 7 | github.com/stretchr/testify v1.4.0 8 | go.uber.org/atomic v1.5.0 9 | go.uber.org/multierr v1.3.0 10 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de 11 | ) 12 | -------------------------------------------------------------------------------- /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/sha3/hashes_generic.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo appengine !s390x 6 | 7 | package sha3 8 | 9 | import ( 10 | "hash" 11 | ) 12 | 13 | // new224Asm returns an assembly implementation of SHA3-224 if available, 14 | // otherwise it returns nil. 15 | func new224Asm() hash.Hash { return nil } 16 | 17 | // new256Asm returns an assembly implementation of SHA3-256 if available, 18 | // otherwise it returns nil. 19 | func new256Asm() hash.Hash { return nil } 20 | 21 | // new384Asm returns an assembly implementation of SHA3-384 if available, 22 | // otherwise it returns nil. 23 | func new384Asm() hash.Hash { return nil } 24 | 25 | // new512Asm returns an assembly implementation of SHA3-512 if available, 26 | // otherwise it returns nil. 27 | func new512Asm() hash.Hash { return nil } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/keccakf_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,!appengine,!gccgo 6 | 7 | package sha3 8 | 9 | // This function is implemented in keccakf_amd64.s. 10 | 11 | //go:noescape 12 | 13 | func keccakF1600(a *[25]uint64) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/register.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.4 6 | 7 | package sha3 8 | 9 | import ( 10 | "crypto" 11 | ) 12 | 13 | func init() { 14 | crypto.RegisterHash(crypto.SHA3_224, New224) 15 | crypto.RegisterHash(crypto.SHA3_256, New256) 16 | crypto.RegisterHash(crypto.SHA3_384, New384) 17 | crypto.RegisterHash(crypto.SHA3_512, New512) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/shake_generic.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo appengine !s390x 6 | 7 | package sha3 8 | 9 | // newShake128Asm returns an assembly implementation of SHAKE-128 if available, 10 | // otherwise it returns nil. 11 | func newShake128Asm() ShakeHash { 12 | return nil 13 | } 14 | 15 | // newShake256Asm returns an assembly implementation of SHAKE-256 if available, 16 | // otherwise it returns nil. 17 | func newShake256Asm() ShakeHash { 18 | return nil 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/xor.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !amd64,!386,!ppc64le appengine 6 | 7 | package sha3 8 | 9 | // A storageBuf is an aligned array of maxRate bytes. 10 | type storageBuf [maxRate]byte 11 | 12 | func (b *storageBuf) asBytes() *[maxRate]byte { 13 | return (*[maxRate]byte)(b) 14 | } 15 | 16 | var ( 17 | xorIn = xorInGeneric 18 | copyOut = copyOutGeneric 19 | xorInUnaligned = xorInGeneric 20 | copyOutUnaligned = copyOutGeneric 21 | ) 22 | 23 | const xorImplementationUnaligned = "generic" 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/xor_generic.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package sha3 6 | 7 | import "encoding/binary" 8 | 9 | // xorInGeneric xors the bytes in buf into the state; it 10 | // makes no non-portable assumptions about memory layout 11 | // or alignment. 12 | func xorInGeneric(d *state, buf []byte) { 13 | n := len(buf) / 8 14 | 15 | for i := 0; i < n; i++ { 16 | a := binary.LittleEndian.Uint64(buf) 17 | d.a[i] ^= a 18 | buf = buf[8:] 19 | } 20 | } 21 | 22 | // copyOutGeneric copies ulint64s to a byte buffer. 23 | func copyOutGeneric(d *state, b []byte) { 24 | for i := 0; len(b) >= 8; i++ { 25 | binary.LittleEndian.PutUint64(b, d.a[i]) 26 | b = b[8:] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/lint/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | go: 4 | - 1.10.x 5 | - 1.11.x 6 | - master 7 | 8 | go_import_path: golang.org/x/lint 9 | 10 | install: 11 | - go get -t -v ./... 12 | 13 | script: 14 | - go test -v -race ./... 15 | 16 | matrix: 17 | allow_failures: 18 | - go: master 19 | fast_finish: true 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/lint/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Golint 2 | 3 | ## Before filing an issue: 4 | 5 | ### Are you having trouble building golint? 6 | 7 | Check you have the latest version of its dependencies. Run 8 | ``` 9 | go get -u golang.org/x/lint/golint 10 | ``` 11 | If you still have problems, consider searching for existing issues before filing a new issue. 12 | 13 | ## Before sending a pull request: 14 | 15 | Have you understood the purpose of golint? Make sure to carefully read `README`. 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/lint/go.mod: -------------------------------------------------------------------------------- 1 | module golang.org/x/lint 2 | 3 | require golang.org/x/tools v0.0.0-20190311212946-11955173bddd 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/lint/go.sum: -------------------------------------------------------------------------------- 1 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 2 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 3 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 4 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 5 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd h1:/e+gpKk9r3dJobndpTytxS2gOy6m5uvpg+ISQoEcusQ= 6 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 7 | -------------------------------------------------------------------------------- /vendor/golang.org/x/lint/golint/importcomment.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018 The Go Authors. All rights reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file or at 5 | // https://developers.google.com/open-source/licenses/bsd. 6 | 7 | // +build go1.12 8 | 9 | // Require use of the correct import path only for Go 1.12+ users, so 10 | // any breakages coincide with people updating their CI configs or 11 | // whatnot. 12 | 13 | package main // import "golang.org/x/lint/golint" 14 | -------------------------------------------------------------------------------- /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/cpu/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix,ppc64 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 128 10 | 11 | const ( 12 | // getsystemcfg constants 13 | _SC_IMPL = 2 14 | _IMPL_POWER8 = 0x10000 15 | _IMPL_POWER9 = 0x20000 16 | ) 17 | 18 | func init() { 19 | impl := getsystemcfg(_SC_IMPL) 20 | if impl&_IMPL_POWER8 != 0 { 21 | PPC64.IsPOWER8 = true 22 | } 23 | if impl&_IMPL_POWER9 != 0 { 24 | PPC64.IsPOWER9 = true 25 | } 26 | 27 | Initialized = true 28 | } 29 | 30 | func getsystemcfg(label int) (n uint64) { 31 | r0, _ := callgetsystemcfg(label) 32 | n = uint64(r0) 33 | return 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 | // func getisar0() uint64 10 | TEXT ·getisar0(SB),NOSPLIT,$0-8 11 | // get Instruction Set Attributes 0 into x0 12 | // mrs x0, ID_AA64ISAR0_EL1 = d5380600 13 | WORD $0xd5380600 14 | MOVD R0, ret+0(FP) 15 | RET 16 | 17 | // func getisar1() uint64 18 | TEXT ·getisar1(SB),NOSPLIT,$0-8 19 | // get Instruction Set Attributes 1 into x0 20 | // mrs x0, ID_AA64ISAR1_EL1 = d5380620 21 | WORD $0xd5380620 22 | MOVD R0, ret+0(FP) 23 | RET 24 | 25 | // func getpfr0() uint64 26 | TEXT ·getpfr0(SB),NOSPLIT,$0-8 27 | // get Processor Feature Register 0 into x0 28 | // mrs x0, ID_AA64PFR0_EL1 = d5380400 29 | WORD $0xd5380400 30 | MOVD R0, ret+0(FP) 31 | RET 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 | package cpu 8 | 9 | func getisar0() uint64 10 | func getisar1() uint64 11 | func getpfr0() uint64 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 | package cpu 8 | 9 | // haveAsmFunctions reports whether the other functions in this file can 10 | // be safely called. 11 | func haveAsmFunctions() bool { return true } 12 | 13 | // The following feature detection functions are defined in cpu_s390x.s. 14 | // They are likely to be expensive to call so the results should be cached. 15 | func stfle() facilityList 16 | func kmQuery() queryResult 17 | func kmcQuery() queryResult 18 | func kmctrQuery() queryResult 19 | func kmaQuery() queryResult 20 | func kimdQuery() queryResult 21 | func klmdQuery() queryResult 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_x86.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386 amd64 amd64p32 6 | // +build !gccgo 7 | 8 | package cpu 9 | 10 | // cpuid is implemented in cpu_x86.s for gc compiler 11 | // and in cpu_gccgo.c for gccgo. 12 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) 13 | 14 | // xgetbv with ecx = 0 is implemented in cpu_x86.s for gc compiler 15 | // and in cpu_gccgo.c for gccgo. 16 | func xgetbv() (eax, edx uint32) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 | package cpu 8 | 9 | func getisar0() uint64 { return 0 } 10 | func getisar1() uint64 { return 0 } 11 | func getpfr0() uint64 { return 0 } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386 amd64 amd64p32 6 | // +build gccgo 7 | 8 | package cpu 9 | 10 | //extern gccgoGetCpuidCount 11 | func gccgoGetCpuidCount(eaxArg, ecxArg uint32, eax, ebx, ecx, edx *uint32) 12 | 13 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) { 14 | var a, b, c, d uint32 15 | gccgoGetCpuidCount(eaxArg, ecxArg, &a, &b, &c, &d) 16 | return a, b, c, d 17 | } 18 | 19 | //extern gccgoXgetbv 20 | func gccgoXgetbv(eax, edx *uint32) 21 | 22 | func xgetbv() (eax, edx uint32) { 23 | var a, d uint32 24 | gccgoXgetbv(&a, &d) 25 | return a, d 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !386,!amd64,!amd64p32,!arm64 6 | 7 | package cpu 8 | 9 | func init() { 10 | if err := readHWCAP(); err != nil { 11 | return 12 | } 13 | doinit() 14 | Initialized = true 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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,!arm,!arm64,!ppc64,!ppc64le,!s390x 6 | 7 | package cpu 8 | 9 | func doinit() {} 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64 ppc64le 7 | 8 | package cpu 9 | 10 | const cacheLineSize = 128 11 | 12 | // HWCAP/HWCAP2 bits. These are exposed by the kernel. 13 | const ( 14 | // ISA Level 15 | _PPC_FEATURE2_ARCH_2_07 = 0x80000000 16 | _PPC_FEATURE2_ARCH_3_00 = 0x00800000 17 | 18 | // CPU features 19 | _PPC_FEATURE2_DARN = 0x00200000 20 | _PPC_FEATURE2_SCV = 0x00100000 21 | ) 22 | 23 | func doinit() { 24 | // HWCAP2 feature bits 25 | PPC64.IsPOWER8 = isSet(hwCap2, _PPC_FEATURE2_ARCH_2_07) 26 | PPC64.IsPOWER9 = isSet(hwCap2, _PPC_FEATURE2_ARCH_3_00) 27 | PPC64.HasDARN = isSet(hwCap2, _PPC_FEATURE2_DARN) 28 | PPC64.HasSCV = isSet(hwCap2, _PPC_FEATURE2_SCV) 29 | } 30 | 31 | func isSet(hwc uint, value uint) bool { 32 | return hwc&value != 0 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_mips64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build mips64 mips64le 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 32 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_mipsx.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build mips mipsle 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 32 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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,arm64 6 | 7 | package cpu 8 | 9 | func doinit() {} 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_riscv64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 riscv64 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 32 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_wasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 wasm 6 | 7 | package cpu 8 | 9 | // We're compiling the cpu package for an unknown (software-abstracted) CPU. 10 | // Make CacheLinePad an empty struct and hope that the usual struct alignment 11 | // rules are good enough. 12 | 13 | const cacheLineSize = 0 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_x86.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386 amd64 amd64p32 6 | // +build !gccgo 7 | 8 | #include "textflag.h" 9 | 10 | // func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) 11 | TEXT ·cpuid(SB), NOSPLIT, $0-24 12 | MOVL eaxArg+0(FP), AX 13 | MOVL ecxArg+4(FP), CX 14 | CPUID 15 | MOVL AX, eax+8(FP) 16 | MOVL BX, ebx+12(FP) 17 | MOVL CX, ecx+16(FP) 18 | MOVL DX, edx+20(FP) 19 | RET 20 | 21 | // func xgetbv() (eax, edx uint32) 22 | TEXT ·xgetbv(SB),NOSPLIT,$0-8 23 | MOVL $0, CX 24 | XGETBV 25 | MOVL AX, eax+0(FP) 26 | MOVL DX, edx+4(FP) 27 | RET 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build go1.9 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | type Signal = syscall.Signal 13 | type Errno = syscall.Errno 14 | type SysProcAttr = syscall.SysProcAttr 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm64,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for AMD64, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM64, 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_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_netbsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 ARM64, 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 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 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_openbsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 arm64, 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_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 | HCI_CHANNEL_LOGGING = 4 27 | ) 28 | 29 | // Socketoption Level 30 | const ( 31 | SOL_BLUETOOTH = 0x112 32 | SOL_HCI = 0x0 33 | SOL_L2CAP = 0x6 34 | SOL_RFCOMM = 0x12 35 | SOL_SCO = 0x11 36 | ) 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix 6 | // +build ppc 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used by AIX. 10 | 11 | package unix 12 | 13 | // Major returns the major component of a Linux device number. 14 | func Major(dev uint64) uint32 { 15 | return uint32((dev >> 16) & 0xffff) 16 | } 17 | 18 | // Minor returns the minor component of a Linux device number. 19 | func Minor(dev uint64) uint32 { 20 | return uint32(dev & 0xffff) 21 | } 22 | 23 | // Mkdev returns a Linux device number generated from the given major and minor 24 | // components. 25 | func Mkdev(major, minor uint32) uint64 { 26 | return uint64(((major) << 16) | (minor)) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix 6 | // +build ppc64 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used AIX. 10 | 11 | package unix 12 | 13 | // Major returns the major component of a Linux device number. 14 | func Major(dev uint64) uint32 { 15 | return uint32((dev & 0x3fffffff00000000) >> 32) 16 | } 17 | 18 | // Minor returns the minor component of a Linux device number. 19 | func Minor(dev uint64) uint32 { 20 | return uint32((dev & 0x00000000ffffffff) >> 0) 21 | } 22 | 23 | // Mkdev returns a Linux device number generated from the given major and minor 24 | // components. 25 | func Mkdev(major, minor uint32) uint64 { 26 | var DEVNO64 uint64 27 | DEVNO64 = 0x8000000000000000 28 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/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 riscv64 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 11 | return fcntl(int(fd), cmd, arg) 12 | } 13 | 14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) 17 | return err 18 | } 19 | -------------------------------------------------------------------------------- /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/fdset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | // Set adds fd to the set fds. 10 | func (fds *FdSet) Set(fd int) { 11 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS)) 12 | } 13 | 14 | // Clear removes fd from the set fds. 15 | func (fds *FdSet) Clear(fd int) { 16 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS)) 17 | } 18 | 19 | // IsSet returns whether fd is in the set fds. 20 | func (fds *FdSet) IsSet(fd int) bool { 21 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0 22 | } 23 | 24 | // Zero clears the set fds. 25 | func (fds *FdSet) Zero() { 26 | for i := range fds.Bits { 27 | fds.Bits[i] = 0 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /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/pagesize_unix.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 aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,race linux,race freebsd,race 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix dragonfly freebsd linux netbsd openbsd 6 | 7 | package unix 8 | 9 | // ReadDirent reads directory entries from fd and writes them into buf. 10 | func ReadDirent(fd int, buf []byte) (n int, err error) { 11 | return Getdents(fd, buf) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdirentries.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 unix 8 | 9 | import "unsafe" 10 | 11 | // ReadDirent reads directory entries from fd and writes them into buf. 12 | func ReadDirent(fd int, buf []byte) (n int, err error) { 13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 15 | // actual system call is getdirentries64, 64 is a good guess. 16 | // TODO(rsc): Can we use a single global basep for all calls? 17 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 18 | return Getdirentries(fd, buf, base) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | // Round the length of a raw sockaddr up to align it properly. 8 | func cmsgAlignOf(salen int) int { 9 | salign := SizeofPtr 10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { 11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires 12 | // 32-bit aligned access to network subsystem. 13 | salign = 4 14 | } 15 | return (salen + salign - 1) & ^(salign - 1) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + uitoa(uint(-val)) 12 | } 13 | return uitoa(uint(val)) 14 | } 15 | 16 | func uitoa(val uint) string { 17 | var buf [32]byte // big enough for int64 18 | i := len(buf) - 1 19 | for val >= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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,go1.12,!go1.13 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { 14 | // To implement this using libSystem we'd need syscall_syscallPtr for 15 | // fdopendir. However, syscallPtr was only added in Go 1.13, so we fall 16 | // back to raw syscalls for this func on Go 1.12. 17 | var p unsafe.Pointer 18 | if len(buf) > 0 { 19 | p = unsafe.Pointer(&buf[0]) 20 | } else { 21 | p = unsafe.Pointer(&_zero) 22 | } 23 | r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) 24 | n = int(r0) 25 | if e1 != 0 { 26 | return n, errnoErr(e1) 27 | } 28 | return n, nil 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_darwin_386.1_11.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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,386,!go1.12 6 | 7 | package unix 8 | 9 | //sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_darwin_amd64.1_11.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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,amd64,!go1.12 6 | 7 | package unix 8 | 9 | //sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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,arm,!go1.12 6 | 7 | package unix 8 | 9 | func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { 10 | return 0, ENOSYS 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_darwin_arm64.1_11.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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,arm64,!go1.12 6 | 7 | package unix 8 | 9 | func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { 10 | return 0, ENOSYS 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,linux 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,!gccgo 6 | 7 | package unix 8 | 9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 11 | 12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 13 | // fail. 14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,!gccgo,386 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | 15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,gccgo,arm 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /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 (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /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 (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 arm64,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 (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (msghdr *Msghdr) SetIovlen(length int) { 22 | msghdr.Iovlen = int32(length) 23 | } 24 | 25 | func (cmsg *Cmsghdr) SetLen(length int) { 26 | cmsg.Len = uint32(length) 27 | } 28 | -------------------------------------------------------------------------------- /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,!ppc64le,!ppc64 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/unix/syscall_unix_gc_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64le ppc64 7 | // +build !gccgo 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 14 | return syscall.Syscall(trap, a1, a2, a3) 15 | } 16 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 17 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) 18 | } 19 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 20 | return syscall.RawSyscall(trap, a1, a2, a3) 21 | } 22 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 23 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. 2 | 3 | package unix 4 | 5 | import "unsafe" 6 | 7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. 8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { 9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} 10 | return ptrace(PTRACE_GETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) 11 | } 12 | 13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries. 14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { 15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} 16 | return ptrace(PTRACE_SETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.s: -------------------------------------------------------------------------------- 1 | // go run mkasm_darwin.go 386 2 | // Code generated by the command above; DO NOT EDIT. 3 | 4 | // +build go1.13 5 | 6 | #include "textflag.h" 7 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0 8 | JMP libc_fdopendir(SB) 9 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0 10 | JMP libc_closedir(SB) 11 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0 12 | JMP libc_readdir_r(SB) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s: -------------------------------------------------------------------------------- 1 | // go run mkasm_darwin.go amd64 2 | // Code generated by the command above; DO NOT EDIT. 3 | 4 | // +build go1.13 5 | 6 | #include "textflag.h" 7 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0 8 | JMP libc_fdopendir(SB) 9 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0 10 | JMP libc_closedir(SB) 11 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0 12 | JMP libc_readdir_r(SB) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.s: -------------------------------------------------------------------------------- 1 | // go run mkasm_darwin.go arm 2 | // Code generated by the command above; DO NOT EDIT. 3 | 4 | // +build go1.13 5 | 6 | #include "textflag.h" 7 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0 8 | JMP libc_fdopendir(SB) 9 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0 10 | JMP libc_closedir(SB) 11 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0 12 | JMP libc_readdir_r(SB) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s: -------------------------------------------------------------------------------- 1 | // go run mkasm_darwin.go arm64 2 | // Code generated by the command above; DO NOT EDIT. 3 | 4 | // +build go1.13 5 | 6 | #include "textflag.h" 7 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0 8 | JMP libc_fdopendir(SB) 9 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0 10 | JMP libc_closedir(SB) 11 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0 12 | JMP libc_readdir_r(SB) 13 | -------------------------------------------------------------------------------- /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/tools/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/tools/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/tools/go/ast/astutil/util.go: -------------------------------------------------------------------------------- 1 | package astutil 2 | 3 | import "go/ast" 4 | 5 | // Unparen returns e with any enclosing parentheses stripped. 6 | func Unparen(e ast.Expr) ast.Expr { 7 | for { 8 | p, ok := e.(*ast.ParenExpr) 9 | if !ok { 10 | return e 11 | } 12 | e = p.X 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.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 !go1.11 6 | 7 | package gcimporter 8 | 9 | import "go/types" 10 | 11 | func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { 12 | named := make([]*types.Named, len(embeddeds)) 13 | for i, e := range embeddeds { 14 | var ok bool 15 | named[i], ok = e.(*types.Named) 16 | if !ok { 17 | panic("embedding of non-defined interfaces in interfaces is not supported before Go 1.11") 18 | } 19 | } 20 | return types.NewInterface(methods, named) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.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 go1.11 6 | 7 | package gcimporter 8 | 9 | import "go/types" 10 | 11 | func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { 12 | return types.NewInterfaceType(methods, embeddeds) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_fileno.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 freebsd openbsd netbsd 6 | 7 | package fastwalk 8 | 9 | import "syscall" 10 | 11 | func direntInode(dirent *syscall.Dirent) uint64 { 12 | return uint64(dirent.Fileno) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_ino.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 linux darwin 6 | // +build !appengine 7 | 8 | package fastwalk 9 | 10 | import "syscall" 11 | 12 | func direntInode(dirent *syscall.Dirent) uint64 { 13 | return uint64(dirent.Ino) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_namlen_bsd.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 darwin freebsd openbsd netbsd 6 | 7 | package fastwalk 8 | 9 | import "syscall" 10 | 11 | func direntNamlen(dirent *syscall.Dirent) uint64 { 12 | return uint64(dirent.Namlen) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_namlen_linux.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 6 | // +build !appengine 7 | 8 | package fastwalk 9 | 10 | import ( 11 | "bytes" 12 | "syscall" 13 | "unsafe" 14 | ) 15 | 16 | func direntNamlen(dirent *syscall.Dirent) uint64 { 17 | const fixedHdr = uint16(unsafe.Offsetof(syscall.Dirent{}.Name)) 18 | nameBuf := (*[unsafe.Sizeof(dirent.Name)]byte)(unsafe.Pointer(&dirent.Name[0])) 19 | const nameBufLen = uint16(len(nameBuf)) 20 | limit := dirent.Reclen - fixedHdr 21 | if limit > nameBufLen { 22 | limit = nameBufLen 23 | } 24 | nameLen := bytes.IndexByte(nameBuf[:limit], 0) 25 | if nameLen < 0 { 26 | panic("failed to find terminating 0 byte in dirent") 27 | } 28 | return uint64(nameLen) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/internal/span/token112.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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.12 6 | 7 | package span 8 | 9 | import ( 10 | "go/token" 11 | ) 12 | 13 | // TODO(rstambler): Delete this file when we no longer support Go 1.11. 14 | func lineStart(f *token.File, line int) token.Pos { 15 | return f.LineStart(line) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/cloudsql/cloudsql_classic.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by the Apache 2.0 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build appengine 6 | 7 | package cloudsql 8 | 9 | import ( 10 | "net" 11 | 12 | "appengine/cloudsql" 13 | ) 14 | 15 | func connect(instance string) (net.Conn, error) { 16 | return cloudsql.Dial(instance) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/cloudsql/cloudsql_vm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by the Apache 2.0 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !appengine 6 | 7 | package cloudsql 8 | 9 | import ( 10 | "errors" 11 | "net" 12 | ) 13 | 14 | func connect(instance string) (net.Conn, error) { 15 | return nil, errors.New(`cloudsql: not supported in App Engine "flexible environment"`) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/gopkg.in/natefinch/lumberjack.v2/.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/gopkg.in/natefinch/lumberjack.v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.8 5 | - 1.7 6 | - 1.6 -------------------------------------------------------------------------------- /vendor/gopkg.in/natefinch/lumberjack.v2/chown.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package lumberjack 4 | 5 | import ( 6 | "os" 7 | ) 8 | 9 | func chown(_ string, _ os.FileInfo) error { 10 | return nil 11 | } 12 | -------------------------------------------------------------------------------- /vendor/gopkg.in/natefinch/lumberjack.v2/chown_linux.go: -------------------------------------------------------------------------------- 1 | package lumberjack 2 | 3 | import ( 4 | "os" 5 | "syscall" 6 | ) 7 | 8 | // os_Chown is a var so we can mock it out during tests. 9 | var os_Chown = os.Chown 10 | 11 | func chown(name string, info os.FileInfo) error { 12 | f, err := os.OpenFile(name, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, info.Mode()) 13 | if err != nil { 14 | return err 15 | } 16 | f.Close() 17 | stat := info.Sys().(*syscall.Stat_t) 18 | return os_Chown(name, int(stat.Uid), int(stat.Gid)) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/.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 | - "1.9.x" 10 | - "1.10.x" 11 | - "1.11.x" 12 | - "1.12.x" 13 | - "1.13.x" 14 | - "tip" 15 | 16 | go_import_path: gopkg.in/yaml.v2 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/cmd/staticcheck/README.md: -------------------------------------------------------------------------------- 1 | # staticcheck 2 | 3 | _staticcheck_ offers extensive analysis of Go code, covering a myriad 4 | of categories. It will detect bugs, suggest code simplifications, 5 | point out dead code, and more. 6 | 7 | ## Installation 8 | 9 | go get honnef.co/go/tools/cmd/staticcheck 10 | 11 | ## Documentation 12 | 13 | Detailed documentation can be found on 14 | [staticcheck.io](https://staticcheck.io/docs/). 15 | 16 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/cmd/staticcheck/staticcheck.go: -------------------------------------------------------------------------------- 1 | // staticcheck analyses Go code and makes it better. 2 | package main // import "honnef.co/go/tools/cmd/staticcheck" 3 | 4 | import ( 5 | "os" 6 | 7 | "honnef.co/go/tools/lint" 8 | "honnef.co/go/tools/lint/lintutil" 9 | "honnef.co/go/tools/simple" 10 | "honnef.co/go/tools/staticcheck" 11 | "honnef.co/go/tools/stylecheck" 12 | "honnef.co/go/tools/unused" 13 | ) 14 | 15 | func main() { 16 | fs := lintutil.FlagSet("staticcheck") 17 | fs.Parse(os.Args[1:]) 18 | 19 | checkers := []lint.Checker{ 20 | simple.NewChecker(), 21 | staticcheck.NewChecker(), 22 | stylecheck.NewChecker(), 23 | } 24 | 25 | uc := unused.NewChecker(unused.CheckAll) 26 | uc.ConsiderReflection = true 27 | checkers = append(checkers, unused.NewLintChecker(uc)) 28 | 29 | lintutil.ProcessFlagSet(checkers, fs) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/config/example.conf: -------------------------------------------------------------------------------- 1 | checks = ["all", "-ST1003", "-ST1014"] 2 | initialisms = ["ACL", "API", "ASCII", "CPU", "CSS", "DNS", 3 | "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", 4 | "IP", "JSON", "QPS", "RAM", "RPC", "SLA", 5 | "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", 6 | "UDP", "UI", "GID", "UID", "UUID", "URI", 7 | "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", 8 | "XSS"] 9 | dot_import_whitelist = [] 10 | http_status_code_whitelist = ["200", "400", "404", "500"] 11 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/functions/terminates.go: -------------------------------------------------------------------------------- 1 | package functions 2 | 3 | import "honnef.co/go/tools/ssa" 4 | 5 | // terminates reports whether fn is supposed to return, that is if it 6 | // has at least one theoretic path that returns from the function. 7 | // Explicit panics do not count as terminating. 8 | func terminates(fn *ssa.Function) bool { 9 | if fn.Blocks == nil { 10 | // assuming that a function terminates is the conservative 11 | // choice 12 | return true 13 | } 14 | 15 | for _, block := range fn.Blocks { 16 | if len(block.Instrs) == 0 { 17 | continue 18 | } 19 | if _, ok := block.Instrs[len(block.Instrs)-1].(*ssa.Return); ok { 20 | return true 21 | } 22 | } 23 | return false 24 | } 25 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/lint/generated.go: -------------------------------------------------------------------------------- 1 | package lint 2 | 3 | import ( 4 | "bufio" 5 | "bytes" 6 | "io" 7 | ) 8 | 9 | var ( 10 | prefix = []byte("// Code generated ") 11 | suffix = []byte(" DO NOT EDIT.") 12 | nl = []byte("\n") 13 | crnl = []byte("\r\n") 14 | ) 15 | 16 | func isGenerated(r io.Reader) bool { 17 | br := bufio.NewReader(r) 18 | for { 19 | s, err := br.ReadBytes('\n') 20 | if err != nil && err != io.EOF { 21 | return false 22 | } 23 | s = bytes.TrimSuffix(s, crnl) 24 | s = bytes.TrimSuffix(s, nl) 25 | if bytes.HasPrefix(s, prefix) && bytes.HasSuffix(s, suffix) { 26 | return true 27 | } 28 | if err == io.EOF { 29 | break 30 | } 31 | } 32 | return false 33 | } 34 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/simple/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to gosimple 2 | 3 | ## Before filing an issue: 4 | 5 | ### Are you having trouble building gosimple? 6 | 7 | Check you have the latest version of its dependencies. Run 8 | ``` 9 | go get -u honnef.co/go/tools/simple 10 | ``` 11 | If you still have problems, consider searching for existing issues before filing a new issue. 12 | 13 | ## Before sending a pull request: 14 | 15 | Have you understood the purpose of gosimple? Make sure to carefully read `README`. 16 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/ssa/identical.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package ssa 4 | 5 | import "go/types" 6 | 7 | var structTypesIdentical = types.IdenticalIgnoreTags 8 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/ssa/identical_17.go: -------------------------------------------------------------------------------- 1 | // +build !go1.8 2 | 3 | package ssa 4 | 5 | import "go/types" 6 | 7 | var structTypesIdentical = types.Identical 8 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/ssa/write.go: -------------------------------------------------------------------------------- 1 | package ssa 2 | 3 | func NewJump(parent *BasicBlock) *Jump { 4 | return &Jump{anInstruction{parent}} 5 | } 6 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/ssautil/ssautil.go: -------------------------------------------------------------------------------- 1 | package ssautil 2 | 3 | import ( 4 | "honnef.co/go/tools/ssa" 5 | ) 6 | 7 | func Reachable(from, to *ssa.BasicBlock) bool { 8 | if from == to { 9 | return true 10 | } 11 | if from.Dominates(to) { 12 | return true 13 | } 14 | 15 | found := false 16 | Walk(from, func(b *ssa.BasicBlock) bool { 17 | if b == to { 18 | found = true 19 | return false 20 | } 21 | return true 22 | }) 23 | return found 24 | } 25 | 26 | func Walk(b *ssa.BasicBlock, fn func(*ssa.BasicBlock) bool) { 27 | seen := map[*ssa.BasicBlock]bool{} 28 | wl := []*ssa.BasicBlock{b} 29 | for len(wl) > 0 { 30 | b := wl[len(wl)-1] 31 | wl = wl[:len(wl)-1] 32 | if seen[b] { 33 | continue 34 | } 35 | seen[b] = true 36 | if !fn(b) { 37 | continue 38 | } 39 | wl = append(wl, b.Succs...) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/staticcheck/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to staticcheck 2 | 3 | ## Before filing an issue: 4 | 5 | ### Are you having trouble building staticcheck? 6 | 7 | Check you have the latest version of its dependencies. Run 8 | ``` 9 | go get -u honnef.co/go/tools/staticcheck 10 | ``` 11 | If you still have problems, consider searching for existing issues before filing a new issue. 12 | 13 | ## Before sending a pull request: 14 | 15 | Have you understood the purpose of staticcheck? Make sure to carefully read `README`. 16 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/staticcheck/buildtag.go: -------------------------------------------------------------------------------- 1 | package staticcheck 2 | 3 | import ( 4 | "go/ast" 5 | "strings" 6 | 7 | . "honnef.co/go/tools/lint/lintdsl" 8 | ) 9 | 10 | func buildTags(f *ast.File) [][]string { 11 | var out [][]string 12 | for _, line := range strings.Split(Preamble(f), "\n") { 13 | if !strings.HasPrefix(line, "+build ") { 14 | continue 15 | } 16 | line = strings.TrimSpace(strings.TrimPrefix(line, "+build ")) 17 | fields := strings.Fields(line) 18 | out = append(out, fields) 19 | } 20 | return out 21 | } 22 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/version/version.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "path/filepath" 7 | ) 8 | 9 | const Version = "2019.1" 10 | 11 | func Print() { 12 | if Version == "devel" { 13 | fmt.Printf("%s (no version)\n", filepath.Base(os.Args[0])) 14 | } else { 15 | fmt.Printf("%s %s\n", filepath.Base(os.Args[0]), Version) 16 | } 17 | } 18 | --------------------------------------------------------------------------------