├── .gitignore ├── LICENSE ├── README.md ├── bin └── go-post-compile ├── cache ├── channel.go ├── inmem.go └── store.go ├── cmd ├── bgtasks │ ├── Procfile │ ├── bgtasks.go │ ├── channel_cache.go │ ├── gerrit.go │ ├── gotime.go │ ├── gotimestatus.go │ └── main.go ├── consumer │ ├── Procfile │ ├── channel_join.go │ ├── consumer.go │ ├── main.go │ ├── playground │ │ └── playground.go │ ├── prefix.go │ ├── reactions.go │ ├── responses.go │ └── team_join.go └── gateway │ ├── Procfile │ ├── gateway.go │ ├── handlers.go │ ├── main.go │ └── middleware.go ├── config ├── config.go └── config_test.go ├── glossary ├── glossary.go └── terms.go ├── go.mod ├── go.sum ├── handler ├── channel_join.go ├── handler.go ├── message_actions.go ├── messenger.go ├── responder.go └── team_join.go ├── internal ├── heartbeat │ └── heartbeat.go └── poller │ ├── gerrit │ ├── gerrit.go │ └── store.go │ ├── gotime │ ├── gotime.go │ └── store.go │ ├── gotimestatus │ ├── gotimestatus.go │ ├── gotimestatus_test.go │ ├── store.go │ └── testdata │ │ ├── statuses.json │ │ └── statuses_since.json │ └── single.json ├── mparser ├── mparser.go └── mparser_test.go ├── signing ├── signing.go └── signing_test.go ├── vendor ├── github.com │ ├── fatih │ │ └── color │ │ │ ├── .travis.yml │ │ │ ├── Gopkg.lock │ │ │ ├── Gopkg.toml │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── color.go │ │ │ └── doc.go │ ├── git-chglog │ │ └── git-chglog │ │ │ ├── .appveyor.yml │ │ │ ├── .editorconfig │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── Gopkg.lock │ │ │ ├── Gopkg.toml │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── chglog.go │ │ │ ├── cmd │ │ │ └── git-chglog │ │ │ │ ├── builder.go │ │ │ │ ├── cli.go │ │ │ │ ├── config.go │ │ │ │ ├── config_builder.go │ │ │ │ ├── config_builder_mock.go │ │ │ │ ├── config_loader.go │ │ │ │ ├── config_loader_mock.go │ │ │ │ ├── context.go │ │ │ │ ├── custom_template_builder.go │ │ │ │ ├── fs.go │ │ │ │ ├── fs_mock.go │ │ │ │ ├── generator.go │ │ │ │ ├── generator_mock.go │ │ │ │ ├── initializer.go │ │ │ │ ├── kac_template_builder.go │ │ │ │ ├── logger.go │ │ │ │ ├── main.go │ │ │ │ ├── processor_factory.go │ │ │ │ ├── questioner.go │ │ │ │ ├── questioner_mock.go │ │ │ │ ├── status_code.go │ │ │ │ ├── template_builder.go │ │ │ │ ├── template_builder_mock.go │ │ │ │ ├── utils.go │ │ │ │ ├── variables.go │ │ │ │ └── version.go │ │ │ ├── commit_extractor.go │ │ │ ├── commit_filter.go │ │ │ ├── commit_parser.go │ │ │ ├── errors.go │ │ │ ├── fields.go │ │ │ ├── processor.go │ │ │ ├── tag_reader.go │ │ │ ├── tag_selector.go │ │ │ └── utils.go │ ├── go-redis │ │ └── redis │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── cluster.go │ │ │ ├── cluster_commands.go │ │ │ ├── command.go │ │ │ ├── commands.go │ │ │ ├── doc.go │ │ │ ├── internal │ │ │ ├── consistenthash │ │ │ │ └── consistenthash.go │ │ │ ├── error.go │ │ │ ├── hashtag │ │ │ │ └── hashtag.go │ │ │ ├── internal.go │ │ │ ├── log.go │ │ │ ├── once.go │ │ │ ├── pool │ │ │ │ ├── conn.go │ │ │ │ ├── pool.go │ │ │ │ ├── pool_single.go │ │ │ │ └── pool_sticky.go │ │ │ ├── proto │ │ │ │ ├── reader.go │ │ │ │ ├── scan.go │ │ │ │ └── writer.go │ │ │ ├── util.go │ │ │ └── util │ │ │ │ ├── safe.go │ │ │ │ ├── strconv.go │ │ │ │ └── unsafe.go │ │ │ ├── iterator.go │ │ │ ├── options.go │ │ │ ├── pipeline.go │ │ │ ├── pubsub.go │ │ │ ├── redis.go │ │ │ ├── result.go │ │ │ ├── ring.go │ │ │ ├── script.go │ │ │ ├── sentinel.go │ │ │ ├── tx.go │ │ │ └── universal.go │ ├── google │ │ └── go-cmp │ │ │ ├── LICENSE │ │ │ └── cmp │ │ │ ├── compare.go │ │ │ ├── export_panic.go │ │ │ ├── export_unsafe.go │ │ │ ├── internal │ │ │ ├── diff │ │ │ │ ├── debug_disable.go │ │ │ │ ├── debug_enable.go │ │ │ │ └── diff.go │ │ │ ├── flags │ │ │ │ ├── flags.go │ │ │ │ ├── toolchain_legacy.go │ │ │ │ └── toolchain_recent.go │ │ │ ├── function │ │ │ │ └── func.go │ │ │ └── value │ │ │ │ ├── pointer_purego.go │ │ │ │ ├── pointer_unsafe.go │ │ │ │ ├── sort.go │ │ │ │ └── zero.go │ │ │ ├── options.go │ │ │ ├── path.go │ │ │ ├── report.go │ │ │ ├── report_compare.go │ │ │ ├── report_reflect.go │ │ │ ├── report_slices.go │ │ │ ├── report_text.go │ │ │ └── report_value.go │ ├── gorilla │ │ └── websocket │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── AUTHORS │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── client.go │ │ │ ├── client_clone.go │ │ │ ├── client_clone_legacy.go │ │ │ ├── compression.go │ │ │ ├── conn.go │ │ │ ├── conn_read.go │ │ │ ├── conn_read_legacy.go │ │ │ ├── doc.go │ │ │ ├── json.go │ │ │ ├── mask.go │ │ │ ├── mask_safe.go │ │ │ ├── prepared.go │ │ │ ├── server.go │ │ │ └── util.go │ ├── heroku │ │ └── x │ │ │ ├── LICENSE.txt │ │ │ └── hmetrics │ │ │ ├── hmetrics.go │ │ │ └── onload │ │ │ └── init.go │ ├── imdario │ │ └── mergo │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── CODE_OF_CONDUCT.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc.go │ │ │ ├── map.go │ │ │ ├── merge.go │ │ │ └── mergo.go │ ├── kballard │ │ └── go-shellquote │ │ │ ├── LICENSE │ │ │ ├── README │ │ │ ├── doc.go │ │ │ ├── quote.go │ │ │ └── unquote.go │ ├── mattn │ │ ├── go-colorable │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── colorable_appengine.go │ │ │ ├── colorable_others.go │ │ │ ├── colorable_windows.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ └── noncolorable.go │ │ ├── go-isatty │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── isatty_android.go │ │ │ ├── isatty_bsd.go │ │ │ ├── isatty_others.go │ │ │ ├── isatty_solaris.go │ │ │ ├── isatty_tcgets.go │ │ │ └── isatty_windows.go │ │ └── goveralls │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── README.md │ │ │ ├── gitinfo.go │ │ │ ├── gocover.go │ │ │ └── goveralls.go │ ├── mgutz │ │ └── ansi │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── ansi.go │ │ │ ├── doc.go │ │ │ └── print.go │ ├── pkg │ │ └── errors │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── appveyor.yml │ │ │ ├── errors.go │ │ │ └── stack.go │ ├── robinjoseph08 │ │ └── redisqueue │ │ │ ├── .editorconfig │ │ │ ├── .gitignore │ │ │ ├── .go-version │ │ │ ├── .golangci.yml │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE.txt │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── consumer.go │ │ │ ├── doc.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── message.go │ │ │ ├── producer.go │ │ │ ├── redis.go │ │ │ ├── signals.go │ │ │ └── tools.go │ ├── rs │ │ └── zerolog │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── CNAME │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── _config.yml │ │ │ ├── array.go │ │ │ ├── console.go │ │ │ ├── context.go │ │ │ ├── ctx.go │ │ │ ├── encoder.go │ │ │ ├── encoder_cbor.go │ │ │ ├── encoder_json.go │ │ │ ├── event.go │ │ │ ├── fields.go │ │ │ ├── globals.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── go112.go │ │ │ ├── hook.go │ │ │ ├── internal │ │ │ ├── cbor │ │ │ │ ├── README.md │ │ │ │ ├── base.go │ │ │ │ ├── cbor.go │ │ │ │ ├── decode_stream.go │ │ │ │ ├── string.go │ │ │ │ ├── time.go │ │ │ │ └── types.go │ │ │ └── json │ │ │ │ ├── base.go │ │ │ │ ├── bytes.go │ │ │ │ ├── string.go │ │ │ │ ├── time.go │ │ │ │ └── types.go │ │ │ ├── log.go │ │ │ ├── not_go112.go │ │ │ ├── pretty.png │ │ │ ├── sampler.go │ │ │ ├── syslog.go │ │ │ └── writer.go │ ├── slack-go │ │ └── slack │ │ │ ├── .gitignore │ │ │ ├── .gometalinter.json │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── TODO.txt │ │ │ ├── admin.go │ │ │ ├── attachments.go │ │ │ ├── auth.go │ │ │ ├── backoff.go │ │ │ ├── block.go │ │ │ ├── block_action.go │ │ │ ├── block_context.go │ │ │ ├── block_conv.go │ │ │ ├── block_divider.go │ │ │ ├── block_element.go │ │ │ ├── block_file.go │ │ │ ├── block_image.go │ │ │ ├── block_input.go │ │ │ ├── block_object.go │ │ │ ├── block_section.go │ │ │ ├── block_unknown.go │ │ │ ├── bots.go │ │ │ ├── channels.go │ │ │ ├── chat.go │ │ │ ├── comment.go │ │ │ ├── conversation.go │ │ │ ├── dialog.go │ │ │ ├── dialog_select.go │ │ │ ├── dialog_text.go │ │ │ ├── dnd.go │ │ │ ├── emoji.go │ │ │ ├── errors.go │ │ │ ├── files.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── groups.go │ │ │ ├── history.go │ │ │ ├── im.go │ │ │ ├── info.go │ │ │ ├── interactions.go │ │ │ ├── internal │ │ │ ├── errorsx │ │ │ │ └── errorsx.go │ │ │ └── timex │ │ │ │ └── timex.go │ │ │ ├── item.go │ │ │ ├── logger.go │ │ │ ├── messageID.go │ │ │ ├── messages.go │ │ │ ├── misc.go │ │ │ ├── oauth.go │ │ │ ├── pagination.go │ │ │ ├── pins.go │ │ │ ├── reactions.go │ │ │ ├── reminders.go │ │ │ ├── rtm.go │ │ │ ├── search.go │ │ │ ├── security.go │ │ │ ├── slack.go │ │ │ ├── slackevents │ │ │ ├── action_events.go │ │ │ ├── inner_events.go │ │ │ ├── outer_events.go │ │ │ └── parsers.go │ │ │ ├── slackutilsx │ │ │ └── slackutilsx.go │ │ │ ├── slash.go │ │ │ ├── stars.go │ │ │ ├── team.go │ │ │ ├── usergroups.go │ │ │ ├── users.go │ │ │ ├── views.go │ │ │ ├── webhooks.go │ │ │ ├── webhooks_go112.go │ │ │ ├── webhooks_go113.go │ │ │ ├── websocket.go │ │ │ ├── websocket_channels.go │ │ │ ├── websocket_desktop_notification.go │ │ │ ├── websocket_dm.go │ │ │ ├── websocket_dnd.go │ │ │ ├── websocket_files.go │ │ │ ├── websocket_groups.go │ │ │ ├── websocket_internals.go │ │ │ ├── websocket_managed_conn.go │ │ │ ├── websocket_misc.go │ │ │ ├── websocket_mobile_in_app_notification.go │ │ │ ├── websocket_pins.go │ │ │ ├── websocket_reactions.go │ │ │ ├── websocket_stars.go │ │ │ ├── websocket_subteam.go │ │ │ └── websocket_teams.go │ ├── tsuyoshiwada │ │ └── go-gitcmd │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── gitcmd.go │ ├── urfave │ │ └── cli │ │ │ ├── .flake8 │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── CODE_OF_CONDUCT.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── MAINTAINERS.md │ │ │ ├── README.md │ │ │ ├── app.go │ │ │ ├── appveyor.yml │ │ │ ├── category.go │ │ │ ├── cli.go │ │ │ ├── command.go │ │ │ ├── context.go │ │ │ ├── errors.go │ │ │ ├── flag-types.json │ │ │ ├── flag.go │ │ │ ├── flag_generated.go │ │ │ ├── funcs.go │ │ │ ├── generate-flag-types │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── help.go │ │ │ ├── runtests │ │ │ └── sort.go │ └── valyala │ │ └── fastjson │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── arena.go │ │ ├── doc.go │ │ ├── fastfloat │ │ └── parse.go │ │ ├── fuzz.go │ │ ├── go.mod │ │ ├── handy.go │ │ ├── parser.go │ │ ├── pool.go │ │ ├── scanner.go │ │ ├── update.go │ │ ├── util.go │ │ └── validate.go ├── golang.org │ └── x │ │ ├── sys │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ └── 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.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.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.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 │ │ └── tools │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ └── cover │ │ └── profile.go ├── gopkg.in │ ├── AlecAivazis │ │ └── survey.v1 │ │ │ ├── .travis.yml │ │ │ ├── CONTRIBUTING.md │ │ │ ├── Gopkg.lock │ │ │ ├── Gopkg.toml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── _tasks.hcl │ │ │ ├── confirm.go │ │ │ ├── core │ │ │ ├── renderer.go │ │ │ ├── template.go │ │ │ └── write.go │ │ │ ├── editor.go │ │ │ ├── filter.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── input.go │ │ │ ├── multiline.go │ │ │ ├── multiselect.go │ │ │ ├── password.go │ │ │ ├── select.go │ │ │ ├── survey.go │ │ │ ├── terminal │ │ │ ├── LICENSE.txt │ │ │ ├── README.md │ │ │ ├── buffered_reader.go │ │ │ ├── cursor.go │ │ │ ├── cursor_windows.go │ │ │ ├── display.go │ │ │ ├── display_posix.go │ │ │ ├── display_windows.go │ │ │ ├── error.go │ │ │ ├── output.go │ │ │ ├── output_windows.go │ │ │ ├── runereader.go │ │ │ ├── runereader_bsd.go │ │ │ ├── runereader_linux.go │ │ │ ├── runereader_posix.go │ │ │ ├── runereader_windows.go │ │ │ ├── sequences.go │ │ │ ├── stdio.go │ │ │ ├── syscall_windows.go │ │ │ └── terminal.go │ │ │ ├── transform.go │ │ │ └── validate.go │ ├── kyokomi │ │ └── emoji.v1 │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── emoji.go │ │ │ ├── emoji_codemap.go │ │ │ └── wercker.yml │ └── 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 └── modules.txt └── workqueue ├── context.go └── workqueue.go /.gitignore: -------------------------------------------------------------------------------- 1 | # OS files 2 | .DS_Store 3 | 4 | # Binaries for programs and plugins 5 | *.exe 6 | *.exe~ 7 | *.dll 8 | *.so 9 | *.dylib 10 | 11 | # Test binary, built with `go test -c` 12 | *.test 13 | 14 | # Output of the go coverage tool, specifically when used with LiteIDE 15 | *.out 16 | 17 | # binaries 18 | cmd/gateway/gateway 19 | cmd/consumer/consumer 20 | cmd/bgtasks/bgtasks 21 | 22 | # dev area 23 | cmd/dev/ 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Tim Heckman 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /bin/go-post-compile: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for prog in gateway consumer bgtasks; do 4 | echo "==> creating ./cmd/${prog}/bin" 5 | mkdir -p ./cmd/${prog}/bin 6 | 7 | echo "==> copying ./bin/${prog} to ./cmd/${prog}/bin" 8 | cp ./bin/${prog} ./cmd/${prog}/bin/ 9 | 10 | echo "==> copying ./cmd/${prog}/Procfile to ./cmd/${prog}/bin/Procfile" 11 | cp ./cmd/${prog}/Procfile ./cmd/${prog}/bin/ 12 | done 13 | 14 | -------------------------------------------------------------------------------- /cmd/bgtasks/Procfile: -------------------------------------------------------------------------------- 1 | bgtasks: /app/bgtasks 2 | -------------------------------------------------------------------------------- /cmd/bgtasks/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | 6 | _ "github.com/heroku/x/hmetrics/onload" 7 | 8 | "github.com/gobridge/gopherbot/config" 9 | ) 10 | 11 | func main() { 12 | cfg, err := config.LoadEnv() 13 | if err != nil { 14 | log.Fatalf("failed to load config: %v", err) 15 | } 16 | 17 | logger := config.DefaultLogger(cfg) 18 | 19 | if err := runServer(cfg, logger); err != nil { 20 | log.Fatalf("failed to run new bgtasks server: %v", err.Error()) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /cmd/consumer/Procfile: -------------------------------------------------------------------------------- 1 | consumer: /app/consumer 2 | -------------------------------------------------------------------------------- /cmd/consumer/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | 6 | _ "github.com/heroku/x/hmetrics/onload" 7 | 8 | "github.com/gobridge/gopherbot/config" 9 | ) 10 | 11 | func main() { 12 | c, err := config.LoadEnv() 13 | if err != nil { 14 | log.Fatalf("failed to load config: %v", err) 15 | } 16 | 17 | l := config.DefaultLogger(c) 18 | 19 | if err := runServer(c, l); err != nil { 20 | log.Fatalf("failed to run new consumer server: %v", err.Error()) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /cmd/gateway/Procfile: -------------------------------------------------------------------------------- 1 | web: /app/gateway 2 | -------------------------------------------------------------------------------- /cmd/gateway/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | 6 | _ "github.com/heroku/x/hmetrics/onload" 7 | 8 | "github.com/gobridge/gopherbot/config" 9 | ) 10 | 11 | func main() { 12 | c, err := config.LoadEnv() 13 | if err != nil { 14 | log.Fatalf("failed to load config: %v", err) 15 | } 16 | 17 | l := config.DefaultLogger(c) 18 | 19 | if err := runServer(c, l); err != nil { 20 | l.Fatal(). 21 | Err(err). 22 | Msg("failed to run gateway server") 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | // +heroku goVersion go1.14 2 | 3 | module github.com/gobridge/gopherbot 4 | 5 | go 1.14 6 | 7 | require ( 8 | github.com/go-redis/redis v6.15.7+incompatible 9 | github.com/google/go-cmp v0.4.0 10 | github.com/heroku/x v0.0.22 11 | github.com/onsi/ginkgo v1.10.1 // indirect 12 | github.com/onsi/gomega v1.7.0 // indirect 13 | github.com/robinjoseph08/redisqueue v1.1.0 14 | github.com/rs/zerolog v1.18.0 15 | github.com/slack-go/slack v0.6.4 16 | github.com/valyala/fastjson v1.5.1 17 | golang.org/x/tools v0.0.0-20200420001825-978e26b7c37c // indirect 18 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect 19 | gopkg.in/yaml.v2 v2.2.4 // indirect 20 | ) 21 | -------------------------------------------------------------------------------- /handler/handler.go: -------------------------------------------------------------------------------- 1 | // Package handler providers handler/router mechanisms for specific actions or 2 | // event types. 3 | package handler 4 | 5 | import ( 6 | "math/rand" 7 | "time" 8 | 9 | "github.com/slack-go/slack" 10 | ) 11 | 12 | func init() { 13 | rand.Seed(time.Now().UnixNano()) 14 | } 15 | 16 | // ChannelCache is the interface to describe the shape of a channel cache we 17 | // accept. 18 | type ChannelCache interface { 19 | Lookup(name string) (slack.Channel, bool) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/fatih/color/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.8.x 4 | - tip 5 | 6 | -------------------------------------------------------------------------------- /vendor/github.com/fatih/color/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/mattn/go-colorable" 6 | packages = ["."] 7 | revision = "167de6bfdfba052fa6b2d3664c8f5272e23c9072" 8 | version = "v0.0.9" 9 | 10 | [[projects]] 11 | name = "github.com/mattn/go-isatty" 12 | packages = ["."] 13 | revision = "0360b2af4f38e8d38c7fce2a9f4e702702d73a39" 14 | version = "v0.0.3" 15 | 16 | [[projects]] 17 | branch = "master" 18 | name = "golang.org/x/sys" 19 | packages = ["unix"] 20 | revision = "37707fdb30a5b38865cfb95e5aab41707daec7fd" 21 | 22 | [solve-meta] 23 | analyzer-name = "dep" 24 | analyzer-version = 1 25 | inputs-digest = "e8a50671c3cb93ea935bf210b1cd20702876b9d9226129be581ef646d1565cdc" 26 | solver-name = "gps-cdcl" 27 | solver-version = 1 28 | -------------------------------------------------------------------------------- /vendor/github.com/fatih/color/Gopkg.toml: -------------------------------------------------------------------------------- 1 | 2 | # Gopkg.toml example 3 | # 4 | # Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md 5 | # for detailed Gopkg.toml documentation. 6 | # 7 | # required = ["github.com/user/thing/cmd/thing"] 8 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 9 | # 10 | # [[constraint]] 11 | # name = "github.com/user/project" 12 | # version = "1.0.0" 13 | # 14 | # [[constraint]] 15 | # name = "github.com/user/project2" 16 | # branch = "dev" 17 | # source = "github.com/myfork/project2" 18 | # 19 | # [[override]] 20 | # name = "github.com/x/y" 21 | # version = "2.4.0" 22 | 23 | 24 | [[constraint]] 25 | name = "github.com/mattn/go-colorable" 26 | version = "0.0.9" 27 | 28 | [[constraint]] 29 | name = "github.com/mattn/go-isatty" 30 | version = "0.0.3" 31 | -------------------------------------------------------------------------------- /vendor/github.com/fatih/color/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Fatih Arslan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/.appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | 3 | clone_depth: 1 4 | clone_folder: c:\gopath\src\github.com\git-chglog\git-chglog 5 | 6 | environment: 7 | GOPATH: c:\gopath 8 | 9 | install: 10 | - echo %PATH% 11 | - echo %GOPATH% 12 | - go version 13 | - go env 14 | - set PATH=%PATH%;%GOPATH%\bin 15 | 16 | test_script: 17 | - go build github.com/git-chglog/git-chglog/cmd/git-chglog 18 | - for /f "" %%G in ('go list github.com/git-chglog/git-chglog/...') do ( go test -v %%G & IF ERRORLEVEL == 1 EXIT 1) 19 | 20 | build: off 21 | deploy: off 22 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_size = 2 6 | end_of_line = lf 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | 10 | [*.md] 11 | insert_final_newline = false 12 | trim_trailing_whitespace = false 13 | 14 | [Makefile] 15 | indent_style = tab 16 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/.gitignore: -------------------------------------------------------------------------------- 1 | /tmp 2 | /.tmp 3 | /dist 4 | 5 | # Created by https://www.gitignore.io/api/osx,macos,go 6 | 7 | ### Go ### 8 | # Binaries for programs and plugins 9 | *.exe 10 | *.dll 11 | *.so 12 | *.dylib 13 | 14 | # Test binary, build with `go test -c` 15 | *.test 16 | 17 | # Output of the go coverage tool, specifically when used with LiteIDE 18 | *.out 19 | 20 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 21 | .glide/ 22 | 23 | ### macOS ### 24 | *.DS_Store 25 | .AppleDouble 26 | .LSOverride 27 | 28 | # Icon must end with two \r 29 | Icon 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | .com.apple.timemachine.donotpresent 42 | 43 | # Directories potentially created on remote AFP share 44 | .AppleDB 45 | .AppleDesktop 46 | Network Trash Folder 47 | Temporary Items 48 | .apdisk 49 | 50 | ### OSX ### 51 | 52 | # Icon must end with two \r 53 | 54 | # Thumbnails 55 | 56 | # Files that might appear in the root of a volume 57 | 58 | # Directories potentially created on remote AFP share 59 | 60 | 61 | # End of https://www.gitignore.io/api/osx,macos,go 62 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | notifications: 4 | email: false 5 | go: 6 | - 1.9 7 | before_install: 8 | - go get github.com/mattn/goveralls 9 | before_script: 10 | - export TZ=Asia/Tokyo 11 | - sudo timedatectl set-timezone Asia/Tokyo 12 | - timedatectl 13 | script: 14 | - make test 15 | after_success: 16 | - goveralls -service=travis-ci 17 | before_deploy: 18 | - go get github.com/mitchellh/gox 19 | - go get github.com/tcnksm/ghr 20 | deploy: 21 | provider: script 22 | script: ./scripts/release.sh 23 | on: 24 | tags: true 25 | branch: master 26 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/Gopkg.toml: -------------------------------------------------------------------------------- 1 | [[constraint]] 2 | name = "github.com/stretchr/testify" 3 | version = "1.2.1" 4 | 5 | [[constraint]] 6 | name = "github.com/tsuyoshiwada/go-gitcmd" 7 | version = "0.0.1" 8 | 9 | [[constraint]] 10 | name = "github.com/urfave/cli" 11 | version = "1.20.0" 12 | 13 | [prune] 14 | non-go = true 15 | go-tests = true 16 | unused-packages = true 17 | 18 | [[constraint]] 19 | name = "github.com/fatih/color" 20 | version = "1.6.0" 21 | 22 | [[constraint]] 23 | name = "github.com/imdario/mergo" 24 | version = "0.3.2" 25 | 26 | [[constraint]] 27 | branch = "v2" 28 | name = "gopkg.in/yaml.v2" 29 | 30 | [[constraint]] 31 | name = "gopkg.in/AlecAivazis/survey.v1" 32 | version = "1.4.2" 33 | 34 | [[constraint]] 35 | name = "gopkg.in/kyokomi/emoji.v1" 36 | version = "1.5.0" 37 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 tsuyoshiwada 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: bootstrap 2 | bootstrap: clean deps 3 | 4 | .PHONY: deps 5 | deps: 6 | dep ensure -v 7 | 8 | .PHONY: clean 9 | clean: 10 | rm -rf ./vendor/ 11 | rm -rf ./dist/ 12 | rm -rf ./git-chglog 13 | rm -rf $(GOPATH)/bin/git-chglog 14 | rm -rf cover.out 15 | 16 | .PHONY: bulid 17 | build: 18 | go build -i -o git-chglog 19 | 20 | .PHONY: test 21 | test: 22 | go test -v `go list ./... | grep -v /vendor/` 23 | 24 | .PHONY: coverage 25 | coverage: 26 | goverage -coverprofile=cover.out `go list ./... | grep -v /vendor/` 27 | go tool cover -func=cover.out 28 | @rm -rf cover.out 29 | 30 | .PHONY: install 31 | install: 32 | go install ./cmd/git-chglog 33 | 34 | .PHONY: changelog 35 | changelog: 36 | @git-chglog --next-tag $(tag) $(tag) 37 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/cmd/git-chglog/builder.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | // Builder ... 4 | type Builder interface { 5 | Build(*Answer) (string, error) 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/cmd/git-chglog/config_builder_mock.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | type mockConfigBuilderImpl struct { 4 | ReturnBuild func(*Answer) (string, error) 5 | } 6 | 7 | func (m *mockConfigBuilderImpl) Build(ans *Answer) (string, error) { 8 | return m.ReturnBuild(ans) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/cmd/git-chglog/config_loader.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io/ioutil" 5 | 6 | yaml "gopkg.in/yaml.v2" 7 | ) 8 | 9 | // ConfigLoader ... 10 | type ConfigLoader interface { 11 | Load(string) (*Config, error) 12 | } 13 | 14 | type configLoaderImpl struct { 15 | } 16 | 17 | // NewConfigLoader ... 18 | func NewConfigLoader() ConfigLoader { 19 | return &configLoaderImpl{} 20 | } 21 | 22 | func (loader *configLoaderImpl) Load(path string) (*Config, error) { 23 | bytes, err := ioutil.ReadFile(path) 24 | if err != nil { 25 | return nil, err 26 | } 27 | 28 | config := &Config{} 29 | err = yaml.Unmarshal(bytes, config) 30 | if err != nil { 31 | return nil, err 32 | } 33 | 34 | return config, nil 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/cmd/git-chglog/config_loader_mock.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | type mockConfigLoaderImpl struct { 4 | ReturnLoad func(string) (*Config, error) 5 | } 6 | 7 | func (m *mockConfigLoaderImpl) Load(path string) (*Config, error) { 8 | return m.ReturnLoad(path) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/cmd/git-chglog/context.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io" 5 | ) 6 | 7 | // CLIContext ... 8 | type CLIContext struct { 9 | WorkingDir string 10 | Stdout io.Writer 11 | Stderr io.Writer 12 | ConfigPath string 13 | OutputPath string 14 | Silent bool 15 | NoColor bool 16 | NoEmoji bool 17 | Query string 18 | NextTag string 19 | } 20 | 21 | // InitContext ... 22 | type InitContext struct { 23 | WorkingDir string 24 | Stdout io.Writer 25 | Stderr io.Writer 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/cmd/git-chglog/fs.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io" 5 | "io/ioutil" 6 | "os" 7 | ) 8 | 9 | // FileSystem ... 10 | type FileSystem interface { 11 | Exists(path string) bool 12 | MkdirP(path string) error 13 | Create(name string) (File, error) 14 | WriteFile(path string, content []byte) error 15 | } 16 | 17 | // File ... 18 | type File interface { 19 | io.Closer 20 | io.Reader 21 | io.ReaderAt 22 | io.Seeker 23 | io.Writer 24 | Stat() (os.FileInfo, error) 25 | } 26 | 27 | var fs = &osFileSystem{} 28 | 29 | type osFileSystem struct{} 30 | 31 | func (*osFileSystem) Exists(path string) bool { 32 | _, err := os.Stat(path) 33 | return err == nil 34 | } 35 | 36 | func (*osFileSystem) MkdirP(path string) error { 37 | if _, err := os.Stat(path); os.IsNotExist(err) { 38 | return os.MkdirAll(path, os.ModePerm) 39 | } 40 | return nil 41 | } 42 | 43 | func (*osFileSystem) Create(name string) (File, error) { 44 | return os.Create(name) 45 | } 46 | 47 | func (*osFileSystem) WriteFile(path string, content []byte) error { 48 | return ioutil.WriteFile(path, content, os.ModePerm) 49 | } 50 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/cmd/git-chglog/fs_mock.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | type mockFileSystem struct { 4 | ReturnExists func(string) bool 5 | ReturnMkdirP func(string) error 6 | ReturnCreate func(string) (File, error) 7 | ReturnWriteFile func(string, []byte) error 8 | } 9 | 10 | func (m *mockFileSystem) Exists(path string) bool { 11 | return m.ReturnExists(path) 12 | } 13 | 14 | func (m *mockFileSystem) MkdirP(path string) error { 15 | return m.ReturnMkdirP(path) 16 | } 17 | 18 | func (m *mockFileSystem) Create(name string) (File, error) { 19 | return m.ReturnCreate(name) 20 | } 21 | 22 | func (m *mockFileSystem) WriteFile(path string, content []byte) error { 23 | return m.ReturnWriteFile(path, content) 24 | } 25 | 26 | type mockFile struct { 27 | File 28 | ReturnWrite func([]byte) (int, error) 29 | } 30 | 31 | func (m *mockFile) Write(b []byte) (int, error) { 32 | return m.ReturnWrite(b) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/cmd/git-chglog/generator.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io" 5 | 6 | chglog "github.com/git-chglog/git-chglog" 7 | ) 8 | 9 | // Generator ... 10 | type Generator interface { 11 | Generate(io.Writer, string, *chglog.Config) error 12 | } 13 | 14 | type generatorImpl struct{} 15 | 16 | // NewGenerator ... 17 | func NewGenerator() Generator { 18 | return &generatorImpl{} 19 | } 20 | 21 | // Generate ... 22 | func (*generatorImpl) Generate(w io.Writer, query string, config *chglog.Config) error { 23 | return chglog.NewGenerator(config).Generate(w, query) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/cmd/git-chglog/generator_mock.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io" 5 | 6 | chglog "github.com/git-chglog/git-chglog" 7 | ) 8 | 9 | type mockGeneratorImpl struct { 10 | ReturnGenerate func(io.Writer, string, *chglog.Config) error 11 | } 12 | 13 | func (m *mockGeneratorImpl) Generate(w io.Writer, query string, config *chglog.Config) error { 14 | return m.ReturnGenerate(w, query, config) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/cmd/git-chglog/questioner_mock.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | type mockQuestionerImpl struct { 4 | ReturnAsk func() (*Answer, error) 5 | } 6 | 7 | func (m *mockQuestionerImpl) Ask() (*Answer, error) { 8 | return m.ReturnAsk() 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/cmd/git-chglog/status_code.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | // Status code 4 | const ( 5 | ExitCodeOK = iota 6 | ExitCodeError 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/cmd/git-chglog/template_builder.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | const templateTagNameAnchor = "\n" 4 | 5 | // TemplateBuilder ... 6 | type TemplateBuilder interface { 7 | Builder 8 | } 9 | 10 | // TemplateBuilderFactory ... 11 | type TemplateBuilderFactory = func(string) TemplateBuilder 12 | 13 | func templateBuilderFactory(template string) TemplateBuilder { 14 | switch template { 15 | case tplKeepAChangelog.display: 16 | return NewKACTemplateBuilder() 17 | default: 18 | return NewCustomTemplateBuilder() 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/cmd/git-chglog/template_builder_mock.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | type mockTemplateBuilderImpl struct { 4 | ReturnBuild func(*Answer) (string, error) 5 | } 6 | 7 | func (m *mockTemplateBuilderImpl) Build(ans *Answer) (string, error) { 8 | return m.ReturnBuild(ans) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/cmd/git-chglog/utils.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/url" 6 | "regexp" 7 | "strings" 8 | ) 9 | 10 | var reSSH = regexp.MustCompile("^\\w+@([\\w\\.\\-]+):([\\w\\.\\-]+)\\/([\\w\\.\\-]+)$") 11 | 12 | func remoteOriginURLToHTTP(rawurl string) string { 13 | if rawurl == "" { 14 | return "" 15 | } 16 | 17 | rawurl = strings.TrimSuffix(rawurl, ".git") 18 | 19 | // for normal url format 20 | originURL, err := url.Parse(rawurl) 21 | 22 | if err == nil { 23 | scheme := originURL.Scheme 24 | if scheme != "http" { 25 | scheme = "https" 26 | } 27 | return fmt.Sprintf( 28 | "%s://%s%s", 29 | scheme, 30 | originURL.Host, 31 | originURL.Path, 32 | ) 33 | } 34 | 35 | // for `user@server:repo.git` 36 | res := reSSH.FindAllStringSubmatch(rawurl, -1) 37 | if len(res) > 0 { 38 | return fmt.Sprintf( 39 | "https://%s/%s/%s", 40 | res[0][1], 41 | res[0][2], 42 | res[0][3], 43 | ) 44 | } 45 | 46 | return "" 47 | } 48 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/cmd/git-chglog/version.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | // Version of git-chglog cli client 4 | const Version = "0.8.0" 5 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/commit_filter.go: -------------------------------------------------------------------------------- 1 | package chglog 2 | 3 | func commitFilter(commits []*Commit, filters map[string][]string) []*Commit { 4 | res := []*Commit{} 5 | 6 | for _, commit := range commits { 7 | include := false 8 | 9 | if len(filters) == 0 { 10 | include = true 11 | } 12 | 13 | for key, values := range filters { 14 | prop, ok := dotGet(commit, key) 15 | if !ok { 16 | include = false 17 | break 18 | } 19 | 20 | str, ok := prop.(string) 21 | if !ok { 22 | include = false 23 | break 24 | } 25 | 26 | exist := false 27 | 28 | for _, val := range values { 29 | if str == val { 30 | exist = true 31 | } 32 | } 33 | 34 | if !exist { 35 | include = false 36 | break 37 | } 38 | 39 | include = true 40 | } 41 | 42 | if include { 43 | res = append(res, commit) 44 | } 45 | } 46 | 47 | return res 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/git-chglog/git-chglog/errors.go: -------------------------------------------------------------------------------- 1 | package chglog 2 | 3 | import "errors" 4 | 5 | var ( 6 | errNotFoundTag = errors.New("could not find the tag") 7 | errFailedQueryParse = errors.New("failed to parse the query") 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/.gitignore: -------------------------------------------------------------------------------- 1 | *.rdb 2 | testdata/*/ 3 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | services: 5 | - redis-server 6 | 7 | go: 8 | - 1.9.x 9 | - 1.10.x 10 | - 1.11.x 11 | - 1.12.x 12 | - tip 13 | 14 | matrix: 15 | allow_failures: 16 | - go: tip 17 | 18 | install: 19 | - go get github.com/onsi/ginkgo 20 | - go get github.com/onsi/gomega 21 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## Unreleased 4 | 5 | - Cluster and Ring pipelines process commands for each node in its own goroutine. 6 | 7 | ## 6.14 8 | 9 | - Added Options.MinIdleConns. 10 | - Added Options.MaxConnAge. 11 | - PoolStats.FreeConns is renamed to PoolStats.IdleConns. 12 | - Add Client.Do to simplify creating custom commands. 13 | - Add Cmd.String, Cmd.Int, Cmd.Int64, Cmd.Uint64, Cmd.Float64, and Cmd.Bool helpers. 14 | - Lower memory usage. 15 | 16 | ## v6.13 17 | 18 | - Ring got new options called `HashReplicas` and `Hash`. It is recommended to set `HashReplicas = 1000` for better keys distribution between shards. 19 | - Cluster client was optimized to use much less memory when reloading cluster state. 20 | - PubSub.ReceiveMessage is re-worked to not use ReceiveTimeout so it does not lose data when timeout occurres. In most cases it is recommended to use PubSub.Channel instead. 21 | - Dialer.KeepAlive is set to 5 minutes by default. 22 | 23 | ## v6.12 24 | 25 | - ClusterClient got new option called `ClusterSlots` which allows to build cluster of normal Redis Servers that don't have cluster mode enabled. See https://godoc.org/github.com/go-redis/redis#example-NewClusterClient--ManualSetup 26 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/Makefile: -------------------------------------------------------------------------------- 1 | all: testdeps 2 | go test ./... 3 | go test ./... -short -race 4 | env GOOS=linux GOARCH=386 go test ./... 5 | go vet 6 | go get github.com/gordonklaus/ineffassign 7 | ineffassign . 8 | 9 | testdeps: testdata/redis/src/redis-server 10 | 11 | bench: testdeps 12 | go test ./... -test.run=NONE -test.bench=. -test.benchmem 13 | 14 | .PHONY: all test testdeps bench 15 | 16 | testdata/redis: 17 | mkdir -p $@ 18 | wget -qO- https://github.com/antirez/redis/archive/5.0.tar.gz | tar xvz --strip-components=1 -C $@ 19 | 20 | testdata/redis/src/redis-server: testdata/redis 21 | sed -i.bak 's/libjemalloc.a/libjemalloc.a -lrt/g' $ maxBackoff || backoff < minBackoff { 17 | backoff = maxBackoff 18 | } 19 | 20 | if backoff == 0 { 21 | return 0 22 | } 23 | return time.Duration(rand.Int63n(int64(backoff))) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/internal/log.go: -------------------------------------------------------------------------------- 1 | package internal 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | ) 7 | 8 | var Logger *log.Logger 9 | 10 | func Logf(s string, args ...interface{}) { 11 | if Logger == nil { 12 | return 13 | } 14 | Logger.Output(2, fmt.Sprintf(s, args...)) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/internal/util.go: -------------------------------------------------------------------------------- 1 | package internal 2 | 3 | import "github.com/go-redis/redis/internal/util" 4 | 5 | func ToLower(s string) string { 6 | if isLower(s) { 7 | return s 8 | } 9 | 10 | b := make([]byte, len(s)) 11 | for i := range b { 12 | c := s[i] 13 | if c >= 'A' && c <= 'Z' { 14 | c += 'a' - 'A' 15 | } 16 | b[i] = c 17 | } 18 | return util.BytesToString(b) 19 | } 20 | 21 | func isLower(s string) bool { 22 | for i := 0; i < len(s); i++ { 23 | c := s[i] 24 | if c >= 'A' && c <= 'Z' { 25 | return false 26 | } 27 | } 28 | return true 29 | } 30 | 31 | func Unwrap(err error) error { 32 | u, ok := err.(interface { 33 | Unwrap() error 34 | }) 35 | if !ok { 36 | return nil 37 | } 38 | return u.Unwrap() 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/internal/util/safe.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package util 4 | 5 | func BytesToString(b []byte) string { 6 | return string(b) 7 | } 8 | 9 | func StringToBytes(s string) []byte { 10 | return []byte(s) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/internal/util/strconv.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import "strconv" 4 | 5 | func Atoi(b []byte) (int, error) { 6 | return strconv.Atoi(BytesToString(b)) 7 | } 8 | 9 | func ParseInt(b []byte, base int, bitSize int) (int64, error) { 10 | return strconv.ParseInt(BytesToString(b), base, bitSize) 11 | } 12 | 13 | func ParseUint(b []byte, base int, bitSize int) (uint64, error) { 14 | return strconv.ParseUint(BytesToString(b), base, bitSize) 15 | } 16 | 17 | func ParseFloat(b []byte, bitSize int) (float64, error) { 18 | return strconv.ParseFloat(BytesToString(b), bitSize) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/go-redis/redis/internal/util/unsafe.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package util 4 | 5 | import ( 6 | "unsafe" 7 | ) 8 | 9 | // BytesToString converts byte slice to string. 10 | func BytesToString(b []byte) string { 11 | return *(*string)(unsafe.Pointer(&b)) 12 | } 13 | 14 | // StringToBytes converts string to byte slice. 15 | func StringToBytes(s string) []byte { 16 | return *(*[]byte)(unsafe.Pointer( 17 | &struct { 18 | string 19 | Cap int 20 | }{s, len(s)}, 21 | )) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/export_panic.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.md file. 4 | 5 | // +build purego 6 | 7 | package cmp 8 | 9 | import "reflect" 10 | 11 | const supportExporters = false 12 | 13 | func retrieveUnexportedField(reflect.Value, reflect.StructField) reflect.Value { 14 | panic("no support for forcibly accessing unexported fields") 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/export_unsafe.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.md file. 4 | 5 | // +build !purego 6 | 7 | package cmp 8 | 9 | import ( 10 | "reflect" 11 | "unsafe" 12 | ) 13 | 14 | const supportExporters = true 15 | 16 | // retrieveUnexportedField uses unsafe to forcibly retrieve any field from 17 | // a struct such that the value has read-write permissions. 18 | // 19 | // The parent struct, v, must be addressable, while f must be a StructField 20 | // describing the field to retrieve. 21 | func retrieveUnexportedField(v reflect.Value, f reflect.StructField) reflect.Value { 22 | // See https://github.com/google/go-cmp/issues/167 for discussion of the 23 | // following expression. 24 | return reflect.NewAt(f.Type, unsafe.Pointer(uintptr(unsafe.Pointer(v.UnsafeAddr()))+f.Offset)).Elem() 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.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.md file. 4 | 5 | // +build !cmp_debug 6 | 7 | package diff 8 | 9 | var debug debugger 10 | 11 | type debugger struct{} 12 | 13 | func (debugger) Begin(_, _ int, f EqualFunc, _, _ *EditScript) EqualFunc { 14 | return f 15 | } 16 | func (debugger) Update() {} 17 | func (debugger) Finish() {} 18 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/flags/flags.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.md file. 4 | 5 | package flags 6 | 7 | // Deterministic controls whether the output of Diff should be deterministic. 8 | // This is only used for testing. 9 | var Deterministic bool 10 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_legacy.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.md file. 4 | 5 | // +build !go1.10 6 | 7 | package flags 8 | 9 | // AtLeastGo110 reports whether the Go toolchain is at least Go 1.10. 10 | const AtLeastGo110 = false 11 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_recent.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.md file. 4 | 5 | // +build go1.10 6 | 7 | package flags 8 | 9 | // AtLeastGo110 reports whether the Go toolchain is at least Go 1.10. 10 | const AtLeastGo110 = true 11 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.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.md file. 4 | 5 | // +build purego 6 | 7 | package value 8 | 9 | import "reflect" 10 | 11 | // Pointer is an opaque typed pointer and is guaranteed to be comparable. 12 | type Pointer struct { 13 | p uintptr 14 | t reflect.Type 15 | } 16 | 17 | // PointerOf returns a Pointer from v, which must be a 18 | // reflect.Ptr, reflect.Slice, or reflect.Map. 19 | func PointerOf(v reflect.Value) Pointer { 20 | // NOTE: Storing a pointer as an uintptr is technically incorrect as it 21 | // assumes that the GC implementation does not use a moving collector. 22 | return Pointer{v.Pointer(), v.Type()} 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.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.md file. 4 | 5 | // +build !purego 6 | 7 | package value 8 | 9 | import ( 10 | "reflect" 11 | "unsafe" 12 | ) 13 | 14 | // Pointer is an opaque typed pointer and is guaranteed to be comparable. 15 | type Pointer struct { 16 | p unsafe.Pointer 17 | t reflect.Type 18 | } 19 | 20 | // PointerOf returns a Pointer from v, which must be a 21 | // reflect.Ptr, reflect.Slice, or reflect.Map. 22 | func PointerOf(v reflect.Value) Pointer { 23 | // The proper representation of a pointer is unsafe.Pointer, 24 | // which is necessary if the GC ever uses a moving collector. 25 | return Pointer{unsafe.Pointer(v.Pointer()), v.Type()} 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/.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 | 24 | .idea/ 25 | *.iml -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | matrix: 5 | include: 6 | - go: 1.4 7 | - go: 1.5 8 | - go: 1.6 9 | - go: 1.7 10 | - go: 1.8 11 | - go: tip 12 | allow_failures: 13 | - go: tip 14 | 15 | script: 16 | - go get -t -v ./... 17 | - diff -u <(echo -n) <(gofmt -d .) 18 | - go vet $(go list ./... | grep -v /vendor/) 19 | - go test -v -race ./... 20 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Gorilla WebSocket authors for copyright 2 | # purposes. 3 | # 4 | # Please keep the list sorted. 5 | 6 | Gary Burd 7 | Joachim Bauch 8 | 9 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/client_clone.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.8 6 | 7 | package websocket 8 | 9 | import "crypto/tls" 10 | 11 | func cloneTLSConfig(cfg *tls.Config) *tls.Config { 12 | if cfg == nil { 13 | return &tls.Config{} 14 | } 15 | return cfg.Clone() 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/conn_read.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. 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.5 6 | 7 | package websocket 8 | 9 | import "io" 10 | 11 | func (c *Conn) read(n int) ([]byte, error) { 12 | p, err := c.br.Peek(n) 13 | if err == io.EOF { 14 | err = errUnexpectedEOF 15 | } 16 | c.br.Discard(len(p)) 17 | return p, err 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/conn_read_legacy.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. 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.5 6 | 7 | package websocket 8 | 9 | import "io" 10 | 11 | func (c *Conn) read(n int) ([]byte, error) { 12 | p, err := c.br.Peek(n) 13 | if err == io.EOF { 14 | err = errUnexpectedEOF 15 | } 16 | if len(p) > 0 { 17 | // advance over the bytes just read 18 | io.ReadFull(c.br, p) 19 | } 20 | return p, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/mask_safe.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. Use of 2 | // this source code is governed by a BSD-style license that can be found in the 3 | // LICENSE file. 4 | 5 | // +build appengine 6 | 7 | package websocket 8 | 9 | func maskBytes(key [4]byte, pos int, b []byte) int { 10 | for i := range b { 11 | b[i] ^= key[pos&3] 12 | pos++ 13 | } 14 | return pos & 3 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/imdario/mergo/.gitignore: -------------------------------------------------------------------------------- 1 | #### joe made this: http://goel.io/joe 2 | 3 | #### go #### 4 | # Binaries for programs and plugins 5 | *.exe 6 | *.dll 7 | *.so 8 | *.dylib 9 | 10 | # Test binary, build with `go test -c` 11 | *.test 12 | 13 | # Output of the go coverage tool, specifically when used with LiteIDE 14 | *.out 15 | 16 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 17 | .glide/ 18 | 19 | #### vim #### 20 | # Swap 21 | [._]*.s[a-v][a-z] 22 | [._]*.sw[a-p] 23 | [._]s[a-v][a-z] 24 | [._]sw[a-p] 25 | 26 | # Session 27 | Session.vim 28 | 29 | # Temporary 30 | .netrwhist 31 | *~ 32 | # Auto-generated tag files 33 | tags 34 | -------------------------------------------------------------------------------- /vendor/github.com/imdario/mergo/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | install: 3 | - go get -t 4 | - go get golang.org/x/tools/cmd/cover 5 | - go get github.com/mattn/goveralls 6 | script: 7 | - $HOME/gopath/bin/goveralls -service=travis-ci -repotoken $COVERALLS_TOKEN 8 | -------------------------------------------------------------------------------- /vendor/github.com/imdario/mergo/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 Dario Castañé. All rights reserved. 2 | // Copyright 2009 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | /* 7 | Package mergo merges same-type structs and maps by setting default values in zero-value fields. 8 | 9 | Mergo won't merge unexported (private) fields but will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection). 10 | 11 | Usage 12 | 13 | From my own work-in-progress project: 14 | 15 | type networkConfig struct { 16 | Protocol string 17 | Address string 18 | ServerType string `json: "server_type"` 19 | Port uint16 20 | } 21 | 22 | type FssnConfig struct { 23 | Network networkConfig 24 | } 25 | 26 | var fssnDefault = FssnConfig { 27 | networkConfig { 28 | "tcp", 29 | "127.0.0.1", 30 | "http", 31 | 31560, 32 | }, 33 | } 34 | 35 | // Inside a function [...] 36 | 37 | if err := mergo.Merge(&config, fssnDefault); err != nil { 38 | log.Fatal(err) 39 | } 40 | 41 | // More code [...] 42 | 43 | */ 44 | package mergo 45 | -------------------------------------------------------------------------------- /vendor/github.com/kballard/go-shellquote/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014 Kevin Ballard 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the "Software"), 5 | to deal in the Software without restriction, including without limitation 6 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the 8 | Software is furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included 11 | in all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 14 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 15 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 17 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 18 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 19 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/github.com/kballard/go-shellquote/doc.go: -------------------------------------------------------------------------------- 1 | // Shellquote provides utilities for joining/splitting strings using sh's 2 | // word-splitting rules. 3 | package shellquote 4 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | 5 | before_install: 6 | - go get github.com/mattn/goveralls 7 | - go get golang.org/x/tools/cmd/cover 8 | script: 9 | - $HOME/gopath/bin/goveralls -repotoken xnXqRGwgW3SXIguzxf90ZSK1GPYZPaGrw 10 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Yasuhiro Matsumoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/colorable_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package colorable 4 | 5 | import ( 6 | "io" 7 | "os" 8 | 9 | _ "github.com/mattn/go-isatty" 10 | ) 11 | 12 | // NewColorable return new instance of Writer which handle escape sequence. 13 | func NewColorable(file *os.File) io.Writer { 14 | if file == nil { 15 | panic("nil passed instead of *os.File to NewColorable()") 16 | } 17 | 18 | return file 19 | } 20 | 21 | // NewColorableStdout return new instance of Writer which handle escape sequence for stdout. 22 | func NewColorableStdout() io.Writer { 23 | return os.Stdout 24 | } 25 | 26 | // NewColorableStderr return new instance of Writer which handle escape sequence for stderr. 27 | func NewColorableStderr() io.Writer { 28 | return os.Stderr 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/colorable_others.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | // +build !appengine 3 | 4 | package colorable 5 | 6 | import ( 7 | "io" 8 | "os" 9 | 10 | _ "github.com/mattn/go-isatty" 11 | ) 12 | 13 | // NewColorable return new instance of Writer which handle escape sequence. 14 | func NewColorable(file *os.File) io.Writer { 15 | if file == nil { 16 | panic("nil passed instead of *os.File to NewColorable()") 17 | } 18 | 19 | return file 20 | } 21 | 22 | // NewColorableStdout return new instance of Writer which handle escape sequence for stdout. 23 | func NewColorableStdout() io.Writer { 24 | return os.Stdout 25 | } 26 | 27 | // NewColorableStderr return new instance of Writer which handle escape sequence for stderr. 28 | func NewColorableStderr() io.Writer { 29 | return os.Stderr 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/mattn/go-colorable 2 | 3 | require github.com/mattn/go-isatty v0.0.8 4 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/go.sum: -------------------------------------------------------------------------------- 1 | github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw= 2 | github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 3 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8= 4 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 5 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/noncolorable.go: -------------------------------------------------------------------------------- 1 | package colorable 2 | 3 | import ( 4 | "bytes" 5 | "io" 6 | ) 7 | 8 | // NonColorable hold writer but remove escape sequence. 9 | type NonColorable struct { 10 | out io.Writer 11 | } 12 | 13 | // NewNonColorable return new instance of Writer which remove escape sequence from Writer. 14 | func NewNonColorable(w io.Writer) io.Writer { 15 | return &NonColorable{out: w} 16 | } 17 | 18 | // Write write data on console 19 | func (w *NonColorable) Write(data []byte) (n int, err error) { 20 | er := bytes.NewReader(data) 21 | var bw [1]byte 22 | loop: 23 | for { 24 | c1, err := er.ReadByte() 25 | if err != nil { 26 | break loop 27 | } 28 | if c1 != 0x1b { 29 | bw[0] = c1 30 | w.out.Write(bw[:]) 31 | continue 32 | } 33 | c2, err := er.ReadByte() 34 | if err != nil { 35 | break loop 36 | } 37 | if c2 != 0x5b { 38 | continue 39 | } 40 | 41 | var buf bytes.Buffer 42 | for { 43 | c, err := er.ReadByte() 44 | if err != nil { 45 | break loop 46 | } 47 | if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' { 48 | break 49 | } 50 | buf.Write([]byte(string(c))) 51 | } 52 | } 53 | 54 | return len(data), nil 55 | } 56 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | 5 | os: 6 | - linux 7 | - osx 8 | 9 | before_install: 10 | - go get github.com/mattn/goveralls 11 | - go get golang.org/x/tools/cmd/cover 12 | script: 13 | - $HOME/gopath/bin/goveralls -repotoken 3gHdORO5k5ziZcWMBxnd9LrMZaJs8m9x5 14 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) Yasuhiro MATSUMOTO 2 | 3 | MIT License (Expat) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/README.md: -------------------------------------------------------------------------------- 1 | # go-isatty 2 | 3 | [![Godoc Reference](https://godoc.org/github.com/mattn/go-isatty?status.svg)](http://godoc.org/github.com/mattn/go-isatty) 4 | [![Build Status](https://travis-ci.org/mattn/go-isatty.svg?branch=master)](https://travis-ci.org/mattn/go-isatty) 5 | [![Coverage Status](https://coveralls.io/repos/github/mattn/go-isatty/badge.svg?branch=master)](https://coveralls.io/github/mattn/go-isatty?branch=master) 6 | [![Go Report Card](https://goreportcard.com/badge/mattn/go-isatty)](https://goreportcard.com/report/mattn/go-isatty) 7 | 8 | isatty for golang 9 | 10 | ## Usage 11 | 12 | ```go 13 | package main 14 | 15 | import ( 16 | "fmt" 17 | "github.com/mattn/go-isatty" 18 | "os" 19 | ) 20 | 21 | func main() { 22 | if isatty.IsTerminal(os.Stdout.Fd()) { 23 | fmt.Println("Is Terminal") 24 | } else if isatty.IsCygwinTerminal(os.Stdout.Fd()) { 25 | fmt.Println("Is Cygwin/MSYS2 Terminal") 26 | } else { 27 | fmt.Println("Is Not Terminal") 28 | } 29 | } 30 | ``` 31 | 32 | ## Installation 33 | 34 | ``` 35 | $ go get github.com/mattn/go-isatty 36 | ``` 37 | 38 | ## License 39 | 40 | MIT 41 | 42 | ## Author 43 | 44 | Yasuhiro Matsumoto (a.k.a mattn) 45 | 46 | ## Thanks 47 | 48 | * k-takata: base idea for IsCygwinTerminal 49 | 50 | https://github.com/k-takata/go-iscygpty 51 | -------------------------------------------------------------------------------- /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 | require golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 4 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/go.sum: -------------------------------------------------------------------------------- 1 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8= 2 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 3 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_android.go: -------------------------------------------------------------------------------- 1 | // +build android 2 | 3 | package isatty 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | const ioctlReadTermios = syscall.TCGETS 11 | 12 | // IsTerminal return true if the file descriptor is terminal. 13 | func IsTerminal(fd uintptr) bool { 14 | var termios syscall.Termios 15 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 16 | return err == 0 17 | } 18 | 19 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 20 | // terminal. This is also always false on this environment. 21 | func IsCygwinTerminal(fd uintptr) bool { 22 | return false 23 | } 24 | -------------------------------------------------------------------------------- /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 ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | const ioctlReadTermios = syscall.TIOCGETA 12 | 13 | // IsTerminal return true if the file descriptor is terminal. 14 | func IsTerminal(fd uintptr) bool { 15 | var termios syscall.Termios 16 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 17 | return err == 0 18 | } 19 | 20 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 21 | // terminal. This is also always false on this environment. 22 | func IsCygwinTerminal(fd uintptr) bool { 23 | return false 24 | } 25 | -------------------------------------------------------------------------------- /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_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 | // +build !android 4 | 5 | package isatty 6 | 7 | import "golang.org/x/sys/unix" 8 | 9 | // IsTerminal return true if the file descriptor is terminal. 10 | func IsTerminal(fd uintptr) bool { 11 | _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) 12 | return err == nil 13 | } 14 | 15 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 16 | // terminal. This is also always false on this environment. 17 | func IsCygwinTerminal(fd uintptr) bool { 18 | return false 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/goveralls/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | /goveralls 3 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/goveralls/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | before_install: 5 | - go get github.com/mattn/goveralls 6 | - go get golang.org/x/tools/cmd/cover 7 | script: 8 | - go vet 9 | - $HOME/gopath/bin/goveralls -repotoken 0yTZejRUHJBFmBpsAcAqkD8518uTcW85z 10 | -------------------------------------------------------------------------------- /vendor/github.com/mgutz/ansi/.gitignore: -------------------------------------------------------------------------------- 1 | *.test 2 | -------------------------------------------------------------------------------- /vendor/github.com/mgutz/ansi/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2013 Mario L. Gutierrez 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | 10 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.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/pkg/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/pkg/errors 3 | go: 4 | - 1.10.x 5 | - 1.11.x 6 | - 1.12.x 7 | - tip 8 | 9 | script: 10 | - make check 11 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/Makefile: -------------------------------------------------------------------------------- 1 | PKGS := github.com/pkg/errors 2 | SRCDIRS := $(shell go list -f '{{.Dir}}' $(PKGS)) 3 | GO := go 4 | 5 | check: test vet gofmt misspell unconvert staticcheck ineffassign unparam 6 | 7 | test: 8 | $(GO) test $(PKGS) 9 | 10 | vet: | test 11 | $(GO) vet $(PKGS) 12 | 13 | staticcheck: 14 | $(GO) get honnef.co/go/tools/cmd/staticcheck 15 | staticcheck -checks all $(PKGS) 16 | 17 | misspell: 18 | $(GO) get github.com/client9/misspell/cmd/misspell 19 | misspell \ 20 | -locale GB \ 21 | -error \ 22 | *.md *.go 23 | 24 | unconvert: 25 | $(GO) get github.com/mdempsky/unconvert 26 | unconvert -v $(PKGS) 27 | 28 | ineffassign: 29 | $(GO) get github.com/gordonklaus/ineffassign 30 | find $(SRCDIRS) -name '*.go' | xargs ineffassign 31 | 32 | pedantic: check errcheck 33 | 34 | unparam: 35 | $(GO) get mvdan.cc/unparam 36 | unparam ./... 37 | 38 | errcheck: 39 | $(GO) get github.com/kisielk/errcheck 40 | errcheck $(PKGS) 41 | 42 | gofmt: 43 | @echo Checking code is gofmted 44 | @test -z "$(shell gofmt -s -l -d -e $(SRCDIRS) | tee /dev/stderr)" 45 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /vendor/github.com/robinjoseph08/redisqueue/.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | charset = utf-8 3 | end_of_line = lf 4 | insert_final_newline = true 5 | trim_trailing_whitespace = true 6 | 7 | [Makefile] 8 | indent_style = tab 9 | 10 | [*.go] 11 | indent_style = tab 12 | -------------------------------------------------------------------------------- /vendor/github.com/robinjoseph08/redisqueue/.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io/api/go,vim,macos 2 | 3 | ### Go ### 4 | # Binaries for programs and plugins 5 | *.exe 6 | *.dll 7 | *.so 8 | *.dylib 9 | 10 | # Test binary, build with `go test -c` 11 | *.test 12 | 13 | # Output of the go coverage tool, specifically when used with LiteIDE 14 | coverage.out 15 | coverage.html 16 | 17 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 18 | .glide/ 19 | 20 | # Vendored dependencies 21 | vendor/* 22 | _vendor*/* 23 | 24 | # Binary executables 25 | bin/ 26 | 27 | ### macOS ### 28 | *.DS_Store 29 | .AppleDouble 30 | .LSOverride 31 | 32 | # Icon must end with two \r 33 | Icon 34 | 35 | # Thumbnails 36 | ._* 37 | 38 | # Files that might appear in the root of a volume 39 | .DocumentRevisions-V100 40 | .fseventsd 41 | .Spotlight-V100 42 | .TemporaryItems 43 | .Trashes 44 | .VolumeIcon.icns 45 | .com.apple.timemachine.donotpresent 46 | 47 | # Directories potentially created on remote AFP share 48 | .AppleDB 49 | .AppleDesktop 50 | Network Trash Folder 51 | Temporary Items 52 | .apdisk 53 | 54 | ### Vim ### 55 | # swap 56 | .sw[a-p] 57 | .*.sw[a-p] 58 | # session 59 | Session.vim 60 | # temporary 61 | .netrwhist 62 | *~ 63 | # auto-generated tag files 64 | tags 65 | 66 | 67 | # End of https://www.gitignore.io/api/go,vim,macos 68 | -------------------------------------------------------------------------------- /vendor/github.com/robinjoseph08/redisqueue/.go-version: -------------------------------------------------------------------------------- 1 | 1.14.2 2 | -------------------------------------------------------------------------------- /vendor/github.com/robinjoseph08/redisqueue/.golangci.yml: -------------------------------------------------------------------------------- 1 | output: 2 | format: tab 3 | linters: 4 | disable-all: true 5 | enable: 6 | - deadcode 7 | - depguard 8 | - dupl 9 | - goconst 10 | - gocritic 11 | - gocyclo 12 | - gofmt 13 | - goimports 14 | - golint 15 | - gosec 16 | - govet 17 | - ineffassign 18 | - maligned 19 | - misspell 20 | - prealloc 21 | - scopelint 22 | - structcheck 23 | - typecheck 24 | - unconvert 25 | - varcheck 26 | issues: 27 | exclude-use-default: false 28 | max-per-linter: 0 29 | max-same-issues: 0 30 | exclude-rules: 31 | - path: _test\.go 32 | linters: 33 | - dupl 34 | - scopelint 35 | -------------------------------------------------------------------------------- /vendor/github.com/robinjoseph08/redisqueue/.travis.yml: -------------------------------------------------------------------------------- 1 | dist: trusty 2 | sudo: false 3 | language: go 4 | addons: 5 | apt: 6 | packages: 7 | - redis-server 8 | go: "1.14.2" 9 | env: 10 | - GO111MODULE=on 11 | install: 12 | - make setup 13 | - make install 14 | script: 15 | - make lint 16 | - make test 17 | - make enforce 18 | - make coveralls 19 | -------------------------------------------------------------------------------- /vendor/github.com/robinjoseph08/redisqueue/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## [v1.1.0](https://github.com/robinjoseph08/go-pg-migrations/compare/v1.0.1...v1.1.0) (2020-05-26) 4 | 5 | ### Chore 6 | 7 | * **makefile:** update Makefile ([#10](https://github.com/robinjoseph08/go-pg-migrations/issues/10)) 8 | 9 | ### Features 10 | 11 | * **consumer:** add support for registering consumer at specific Message ID ([#7](https://github.com/robinjoseph08/go-pg-migrations/issues/7)) 12 | * **redis:** add ability to inject `*redis.Client` into producer & consumer ([#9](https://github.com/robinjoseph08/go-pg-migrations/issues/9)) 13 | 14 | 15 | 16 | ## [v1.0.1](https://github.com/robinjoseph08/go-pg-migrations/compare/v1.0.0...v1.0.1) (2019-08-03) 17 | 18 | ### Bug Fixes 19 | 20 | * **reclaim:** increment ID when looping ([#4](https://github.com/robinjoseph08/go-pg-migrations/issues/4)) 21 | 22 | 23 | 24 | ## v1.0.0 (2019-07-13) 25 | 26 | ### Documentation 27 | 28 | * **README:** add version badge ([#3](https://github.com/robinjoseph08/go-pg-migrations/issues/3)) 29 | 30 | ### Features 31 | 32 | * **base:** create first version of producer and consumer ([#2](https://github.com/robinjoseph08/go-pg-migrations/issues/2)) 33 | 34 | -------------------------------------------------------------------------------- /vendor/github.com/robinjoseph08/redisqueue/LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Robin Joseph 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/robinjoseph08/redisqueue/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/robinjoseph08/redisqueue 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/fatih/color v1.7.0 // indirect 7 | github.com/git-chglog/git-chglog v0.0.0-20190611050339-63a4e637021f 8 | github.com/go-redis/redis v6.15.2+incompatible 9 | github.com/imdario/mergo v0.3.7 // indirect 10 | github.com/mattn/go-colorable v0.1.2 // indirect 11 | github.com/mattn/goveralls v0.0.2 12 | github.com/onsi/ginkgo v1.8.0 // indirect 13 | github.com/onsi/gomega v1.5.0 // indirect 14 | github.com/pborman/uuid v1.2.0 // indirect 15 | github.com/pkg/errors v0.8.1 16 | github.com/stretchr/testify v1.3.0 17 | github.com/tsuyoshiwada/go-gitcmd v0.0.0-20180205145712-5f1f5f9475df // indirect 18 | github.com/urfave/cli v1.20.0 // indirect 19 | golang.org/x/tools v0.0.0-20190706070813-72ffa07ba3db // indirect 20 | gopkg.in/AlecAivazis/survey.v1 v1.8.5 // indirect 21 | gopkg.in/kyokomi/emoji.v1 v1.5.1 // indirect 22 | gopkg.in/yaml.v2 v2.2.2 // indirect 23 | ) 24 | -------------------------------------------------------------------------------- /vendor/github.com/robinjoseph08/redisqueue/message.go: -------------------------------------------------------------------------------- 1 | package redisqueue 2 | 3 | // Message constitutes a message that will be enqueued and dequeued from Redis. 4 | // When enqueuing, it's recommended to leave ID empty and let Redis generate it, 5 | // unless you know what you're doing. 6 | type Message struct { 7 | ID string 8 | Stream string 9 | Values map[string]interface{} 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/robinjoseph08/redisqueue/signals.go: -------------------------------------------------------------------------------- 1 | package redisqueue 2 | 3 | import ( 4 | "os" 5 | "os/signal" 6 | "syscall" 7 | ) 8 | 9 | // newSignalHandler registered for SIGTERM and SIGINT. A stop channel is 10 | // returned which is closed on one of these signals. If a second signal is 11 | // caught, the program is terminated with exit code 1. 12 | func newSignalHandler() <-chan struct{} { 13 | stop := make(chan struct{}) 14 | c := make(chan os.Signal, 2) 15 | signal.Notify(c, syscall.SIGINT, syscall.SIGTERM) 16 | go func() { 17 | <-c 18 | close(stop) 19 | <-c 20 | os.Exit(1) 21 | }() 22 | 23 | return stop 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/robinjoseph08/redisqueue/tools.go: -------------------------------------------------------------------------------- 1 | // +build tools 2 | 3 | package tools 4 | 5 | import ( 6 | _ "github.com/git-chglog/git-chglog/cmd/git-chglog" 7 | _ "github.com/mattn/goveralls" 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/github.com/rs/zerolog/.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 | tmp 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 | -------------------------------------------------------------------------------- /vendor/github.com/rs/zerolog/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - "1.7" 4 | - "1.8" 5 | - "1.9" 6 | - "1.10" 7 | - "1.11" 8 | - "1.12" 9 | - "master" 10 | matrix: 11 | allow_failures: 12 | - go: "master" 13 | script: 14 | - go test -v -race -cpu=1,2,4 -bench . -benchmem ./... 15 | - go test -v -tags binary_log -race -cpu=1,2,4 -bench . -benchmem ./... 16 | -------------------------------------------------------------------------------- /vendor/github.com/rs/zerolog/CNAME: -------------------------------------------------------------------------------- 1 | zerolog.io -------------------------------------------------------------------------------- /vendor/github.com/rs/zerolog/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Olivier Poitrey 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/rs/zerolog/_config.yml: -------------------------------------------------------------------------------- 1 | remote_theme: rs/gh-readme 2 | -------------------------------------------------------------------------------- /vendor/github.com/rs/zerolog/ctx.go: -------------------------------------------------------------------------------- 1 | package zerolog 2 | 3 | import ( 4 | "context" 5 | ) 6 | 7 | var disabledLogger *Logger 8 | 9 | func init() { 10 | SetGlobalLevel(TraceLevel) 11 | l := Nop() 12 | disabledLogger = &l 13 | } 14 | 15 | type ctxKey struct{} 16 | 17 | // WithContext returns a copy of ctx with l associated. If an instance of Logger 18 | // is already in the context, the context is not updated. 19 | // 20 | // For instance, to add a field to an existing logger in the context, use this 21 | // notation: 22 | // 23 | // ctx := r.Context() 24 | // l := zerolog.Ctx(ctx) 25 | // l.UpdateContext(func(c Context) Context { 26 | // return c.Str("bar", "baz") 27 | // }) 28 | func (l *Logger) WithContext(ctx context.Context) context.Context { 29 | if lp, ok := ctx.Value(ctxKey{}).(*Logger); ok { 30 | if lp == l { 31 | // Do not store same logger. 32 | return ctx 33 | } 34 | } else if l.level == Disabled { 35 | // Do not store disabled logger. 36 | return ctx 37 | } 38 | return context.WithValue(ctx, ctxKey{}, l) 39 | } 40 | 41 | // Ctx returns the Logger associated with the ctx. If no logger 42 | // is associated, a disabled logger is returned. 43 | func Ctx(ctx context.Context) *Logger { 44 | if l, ok := ctx.Value(ctxKey{}).(*Logger); ok { 45 | return l 46 | } 47 | return disabledLogger 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/rs/zerolog/encoder_cbor.go: -------------------------------------------------------------------------------- 1 | // +build binary_log 2 | 3 | package zerolog 4 | 5 | // This file contains bindings to do binary encoding. 6 | 7 | import ( 8 | "github.com/rs/zerolog/internal/cbor" 9 | ) 10 | 11 | var ( 12 | _ encoder = (*cbor.Encoder)(nil) 13 | 14 | enc = cbor.Encoder{} 15 | ) 16 | 17 | func appendJSON(dst []byte, j []byte) []byte { 18 | return cbor.AppendEmbeddedJSON(dst, j) 19 | } 20 | 21 | // decodeIfBinaryToString - converts a binary formatted log msg to a 22 | // JSON formatted String Log message. 23 | func decodeIfBinaryToString(in []byte) string { 24 | return cbor.DecodeIfBinaryToString(in) 25 | } 26 | 27 | func decodeObjectToStr(in []byte) string { 28 | return cbor.DecodeObjectToStr(in) 29 | } 30 | 31 | // decodeIfBinaryToBytes - converts a binary formatted log msg to a 32 | // JSON formatted Bytes Log message. 33 | func decodeIfBinaryToBytes(in []byte) []byte { 34 | return cbor.DecodeIfBinaryToBytes(in) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/rs/zerolog/encoder_json.go: -------------------------------------------------------------------------------- 1 | // +build !binary_log 2 | 3 | package zerolog 4 | 5 | // encoder_json.go file contains bindings to generate 6 | // JSON encoded byte stream. 7 | 8 | import ( 9 | "github.com/rs/zerolog/internal/json" 10 | ) 11 | 12 | var ( 13 | _ encoder = (*json.Encoder)(nil) 14 | 15 | enc = json.Encoder{} 16 | ) 17 | 18 | func appendJSON(dst []byte, j []byte) []byte { 19 | return append(dst, j...) 20 | } 21 | 22 | func decodeIfBinaryToString(in []byte) string { 23 | return string(in) 24 | } 25 | 26 | func decodeObjectToStr(in []byte) string { 27 | return string(in) 28 | } 29 | 30 | func decodeIfBinaryToBytes(in []byte) []byte { 31 | return in 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/rs/zerolog/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/rs/zerolog 2 | 3 | require ( 4 | github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e 5 | github.com/pkg/errors v0.8.1 6 | github.com/rs/xid v1.2.1 7 | github.com/zenazn/goji v0.9.0 8 | golang.org/x/tools v0.0.0-20190828213141-aed303cbaa74 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/github.com/rs/zerolog/go112.go: -------------------------------------------------------------------------------- 1 | // +build go1.12 2 | 3 | package zerolog 4 | 5 | // Since go 1.12, some auto generated init functions are hidden from 6 | // runtime.Caller. 7 | const contextCallerSkipFrameCount = 2 8 | -------------------------------------------------------------------------------- /vendor/github.com/rs/zerolog/internal/cbor/base.go: -------------------------------------------------------------------------------- 1 | package cbor 2 | 3 | type Encoder struct{} 4 | 5 | // AppendKey adds a key (string) to the binary encoded log message 6 | func (e Encoder) AppendKey(dst []byte, key string) []byte { 7 | if len(dst) < 1 { 8 | dst = e.AppendBeginMarker(dst) 9 | } 10 | return e.AppendString(dst, key) 11 | } -------------------------------------------------------------------------------- /vendor/github.com/rs/zerolog/internal/json/base.go: -------------------------------------------------------------------------------- 1 | package json 2 | 3 | type Encoder struct{} 4 | 5 | // AppendKey appends a new key to the output JSON. 6 | func (e Encoder) AppendKey(dst []byte, key string) []byte { 7 | if len(dst) > 1 && dst[len(dst)-1] != '{' { 8 | dst = append(dst, ',') 9 | } 10 | dst = e.AppendString(dst, key) 11 | return append(dst, ':') 12 | } -------------------------------------------------------------------------------- /vendor/github.com/rs/zerolog/not_go112.go: -------------------------------------------------------------------------------- 1 | // +build !go1.12 2 | 3 | package zerolog 4 | 5 | const contextCallerSkipFrameCount = 3 6 | -------------------------------------------------------------------------------- /vendor/github.com/rs/zerolog/pretty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gobridge/gopherbot/5fb48e90bf53cb2b0b4f0388ce9920cedf4c661d/vendor/github.com/rs/zerolog/pretty.png -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/.gitignore: -------------------------------------------------------------------------------- 1 | *.test 2 | *~ 3 | .idea/ 4 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/.gometalinter.json: -------------------------------------------------------------------------------- 1 | { 2 | "DisableAll": true, 3 | "Enable": [ 4 | "structcheck", 5 | "vet", 6 | "misspell", 7 | "unconvert", 8 | "interfacer", 9 | "goimports" 10 | ], 11 | "Vendor": true, 12 | "Exclude": ["vendor"], 13 | "Deadline": "300s" 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | env: 4 | - GO111MODULE=on 5 | 6 | install: true 7 | 8 | before_install: 9 | - export PATH=$HOME/gopath/bin:$PATH 10 | # install gometalinter 11 | - curl -L https://git.io/vp6lP | sh 12 | 13 | script: 14 | - PATH=$PWD/bin:$PATH gometalinter ./... 15 | - go test -race -cover ./... 16 | 17 | matrix: 18 | allow_failures: 19 | - go: tip 20 | include: 21 | - go: "1.7.x" 22 | script: go test -v ./... 23 | - go: "1.8.x" 24 | script: go test -v ./... 25 | - go: "1.9.x" 26 | script: go test -v ./... 27 | - go: "1.10.x" 28 | script: go test -v ./... 29 | - go: "1.11.x" 30 | script: go test -v -mod=vendor ./... 31 | - go: "1.12.x" 32 | script: go test -v -mod=vendor ./... 33 | - go: "1.13.x" 34 | script: go test -v -mod=vendor ./... 35 | - go: "tip" 36 | script: go test -v -mod=vendor ./... 37 | 38 | git: 39 | depth: 10 40 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: help deps fmt lint test test-race test-integration 2 | 3 | help: 4 | @echo "" 5 | @echo "Welcome to slack-go/slack make." 6 | @echo "The following commands are available:" 7 | @echo "" 8 | @echo " make deps : Fetch all dependencies" 9 | @echo " make fmt : Run go fmt to fix any formatting issues" 10 | @echo " make lint : Use go vet to check for linting issues" 11 | @echo " make test : Run all short tests" 12 | @echo " make test-race : Run all tests with race condition checking" 13 | @echo " make test-integration : Run all tests without limiting to short" 14 | @echo "" 15 | @echo " make pr-prep : Run this before making a PR to run fmt, lint and tests" 16 | @echo "" 17 | 18 | deps: 19 | @go mod tidy 20 | 21 | fmt: 22 | @go fmt . 23 | 24 | lint: 25 | @go vet . 26 | 27 | test: 28 | @go test -v -count=1 -timeout 300s -short ./... 29 | 30 | test-race: 31 | @go test -v -count=1 -timeout 300s -short -race ./... 32 | 33 | test-integration: 34 | @go test -v -count=1 -timeout 600s ./... 35 | 36 | pr-prep: fmt lint test-race test-integration 37 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/TODO.txt: -------------------------------------------------------------------------------- 1 | - Add more tests!!! 2 | - Add support to have markdown hints 3 | - See section Message Formatting at https://api.slack.com/docs/formatting 4 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/block_action.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | // ActionBlock defines data that is used to hold interactive elements. 4 | // 5 | // More Information: https://api.slack.com/reference/messaging/blocks#actions 6 | type ActionBlock struct { 7 | Type MessageBlockType `json:"type"` 8 | BlockID string `json:"block_id,omitempty"` 9 | Elements BlockElements `json:"elements"` 10 | } 11 | 12 | // BlockType returns the type of the block 13 | func (s ActionBlock) BlockType() MessageBlockType { 14 | return s.Type 15 | } 16 | 17 | // NewActionBlock returns a new instance of an Action Block 18 | func NewActionBlock(blockID string, elements ...BlockElement) *ActionBlock { 19 | return &ActionBlock{ 20 | Type: MBTAction, 21 | BlockID: blockID, 22 | Elements: BlockElements{ 23 | ElementSet: elements, 24 | }, 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/block_context.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | // ContextBlock defines data that is used to display message context, which can 4 | // include both images and text. 5 | // 6 | // More Information: https://api.slack.com/reference/messaging/blocks#actions 7 | type ContextBlock struct { 8 | Type MessageBlockType `json:"type"` 9 | BlockID string `json:"block_id,omitempty"` 10 | ContextElements ContextElements `json:"elements"` 11 | } 12 | 13 | // BlockType returns the type of the block 14 | func (s ContextBlock) BlockType() MessageBlockType { 15 | return s.Type 16 | } 17 | 18 | type ContextElements struct { 19 | Elements []MixedElement 20 | } 21 | 22 | // NewContextBlock returns a new instance of a context block 23 | func NewContextBlock(blockID string, mixedElements ...MixedElement) *ContextBlock { 24 | elements := ContextElements{ 25 | Elements: mixedElements, 26 | } 27 | return &ContextBlock{ 28 | Type: MBTContext, 29 | BlockID: blockID, 30 | ContextElements: elements, 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/block_divider.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | // DividerBlock for displaying a divider line between blocks (similar to
tag in html) 4 | // 5 | // More Information: https://api.slack.com/reference/messaging/blocks#divider 6 | type DividerBlock struct { 7 | Type MessageBlockType `json:"type"` 8 | BlockID string `json:"block_id,omitempty"` 9 | } 10 | 11 | // BlockType returns the type of the block 12 | func (s DividerBlock) BlockType() MessageBlockType { 13 | return s.Type 14 | } 15 | 16 | // NewDividerBlock returns a new instance of a divider block 17 | func NewDividerBlock() *DividerBlock { 18 | return &DividerBlock{ 19 | Type: MBTDivider, 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/block_file.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | // FileBlock defines data that is used to display a remote file. 4 | // 5 | // More Information: https://api.slack.com/reference/block-kit/blocks#file 6 | type FileBlock struct { 7 | Type MessageBlockType `json:"type"` 8 | BlockID string `json:"block_id,omitempty"` 9 | ExternalID string `json:"external_id"` 10 | Source string `json:"source"` 11 | } 12 | 13 | // BlockType returns the type of the block 14 | func (s FileBlock) BlockType() MessageBlockType { 15 | return s.Type 16 | } 17 | 18 | // NewFileBlock returns a new instance of a file block 19 | func NewFileBlock(blockID string, externalID string, source string) *FileBlock { 20 | return &FileBlock{ 21 | Type: MBTFile, 22 | BlockID: blockID, 23 | ExternalID: externalID, 24 | Source: source, 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/block_image.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | // ImageBlock defines data required to display an image as a block element 4 | // 5 | // More Information: https://api.slack.com/reference/messaging/blocks#image 6 | type ImageBlock struct { 7 | Type MessageBlockType `json:"type"` 8 | ImageURL string `json:"image_url"` 9 | AltText string `json:"alt_text"` 10 | BlockID string `json:"block_id,omitempty"` 11 | Title *TextBlockObject `json:"title"` 12 | } 13 | 14 | // BlockType returns the type of the block 15 | func (s ImageBlock) BlockType() MessageBlockType { 16 | return s.Type 17 | } 18 | 19 | // NewImageBlock returns an instance of a new Image Block type 20 | func NewImageBlock(imageURL, altText, blockID string, title *TextBlockObject) *ImageBlock { 21 | return &ImageBlock{ 22 | Type: MBTImage, 23 | ImageURL: imageURL, 24 | AltText: altText, 25 | BlockID: blockID, 26 | Title: title, 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/block_input.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | // InputBlock defines data that is used to display user input fields. 4 | // 5 | // More Information: https://api.slack.com/reference/block-kit/blocks#input 6 | type InputBlock struct { 7 | Type MessageBlockType `json:"type"` 8 | BlockID string `json:"block_id,omitempty"` 9 | Label *TextBlockObject `json:"label"` 10 | Element BlockElement `json:"element"` 11 | Hint *TextBlockObject `json:"hint,omitempty"` 12 | Optional bool `json:"optional,omitempty"` 13 | } 14 | 15 | // BlockType returns the type of the block 16 | func (s InputBlock) BlockType() MessageBlockType { 17 | return s.Type 18 | } 19 | 20 | // NewInputBlock returns a new instance of an input block 21 | func NewInputBlock(blockID string, label *TextBlockObject, element BlockElement) *InputBlock { 22 | return &InputBlock{ 23 | Type: MBTInput, 24 | BlockID: blockID, 25 | Label: label, 26 | Element: element, 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/block_unknown.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | // UnknownBlock represents a block type that is not yet known. This block type exists to prevent Slack from introducing 4 | // new and unknown block types that break this library. 5 | type UnknownBlock struct { 6 | Type MessageBlockType `json:"type"` 7 | BlockID string `json:"block_id,omitempty"` 8 | } 9 | 10 | // BlockType returns the type of the block 11 | func (b UnknownBlock) BlockType() MessageBlockType { 12 | return b.Type 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/comment.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | // Comment contains all the information relative to a comment 4 | type Comment struct { 5 | ID string `json:"id,omitempty"` 6 | Created JSONTime `json:"created,omitempty"` 7 | Timestamp JSONTime `json:"timestamp,omitempty"` 8 | User string `json:"user,omitempty"` 9 | Comment string `json:"comment,omitempty"` 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/emoji.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | ) 7 | 8 | type emojiResponseFull struct { 9 | Emoji map[string]string `json:"emoji"` 10 | SlackResponse 11 | } 12 | 13 | // GetEmoji retrieves all the emojis 14 | func (api *Client) GetEmoji() (map[string]string, error) { 15 | return api.GetEmojiContext(context.Background()) 16 | } 17 | 18 | // GetEmojiContext retrieves all the emojis with a custom context 19 | func (api *Client) GetEmojiContext(ctx context.Context) (map[string]string, error) { 20 | values := url.Values{ 21 | "token": {api.token}, 22 | } 23 | response := &emojiResponseFull{} 24 | 25 | err := api.postMethod(ctx, "emoji.list", values, response) 26 | if err != nil { 27 | return nil, err 28 | } 29 | 30 | if response.Err() != nil { 31 | return nil, response.Err() 32 | } 33 | 34 | return response.Emoji, nil 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/errors.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | import "github.com/slack-go/slack/internal/errorsx" 4 | 5 | // Errors returned by various methods. 6 | const ( 7 | ErrAlreadyDisconnected = errorsx.String("Invalid call to Disconnect - Slack API is already disconnected") 8 | ErrRTMDisconnected = errorsx.String("disconnect received while trying to connect") 9 | ErrRTMGoodbye = errorsx.String("goodbye detected") 10 | ErrRTMDeadman = errorsx.String("deadman switch triggered") 11 | ErrParametersMissing = errorsx.String("received empty parameters") 12 | ErrInvalidConfiguration = errorsx.String("invalid configuration") 13 | ErrMissingHeaders = errorsx.String("missing headers") 14 | ErrExpiredTimestamp = errorsx.String("timestamp is too old") 15 | ) 16 | 17 | // internal errors 18 | const ( 19 | errPaginationComplete = errorsx.String("pagination complete") 20 | ) 21 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/slack-go/slack 2 | 3 | require ( 4 | github.com/go-test/deep v1.0.4 5 | github.com/gorilla/websocket v1.2.0 6 | github.com/pkg/errors v0.8.0 7 | github.com/stretchr/testify v1.2.2 8 | ) 9 | 10 | go 1.13 11 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/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/go-test/deep v1.0.4 h1:u2CU3YKy9I2pmu9pX0eq50wCgjfGIt539SqR7FbHiho= 4 | github.com/go-test/deep v1.0.4/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= 5 | github.com/gorilla/websocket v1.2.0 h1:VJtLvh6VQym50czpZzx07z/kw9EgAxI3x1ZB8taTMQQ= 6 | github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= 7 | github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= 8 | github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 9 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 10 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 11 | github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= 12 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 13 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/history.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | const ( 4 | DEFAULT_HISTORY_LATEST = "" 5 | DEFAULT_HISTORY_OLDEST = "0" 6 | DEFAULT_HISTORY_COUNT = 100 7 | DEFAULT_HISTORY_INCLUSIVE = false 8 | DEFAULT_HISTORY_UNREADS = false 9 | ) 10 | 11 | // HistoryParameters contains all the necessary information to help in the retrieval of history for Channels/Groups/DMs 12 | type HistoryParameters struct { 13 | Latest string 14 | Oldest string 15 | Count int 16 | Inclusive bool 17 | Unreads bool 18 | } 19 | 20 | // History contains message history information needed to navigate a Channel / Group / DM history 21 | type History struct { 22 | Latest string `json:"latest"` 23 | Messages []Message `json:"messages"` 24 | HasMore bool `json:"has_more"` 25 | Unread int `json:"unread_count_display"` 26 | } 27 | 28 | // NewHistoryParameters provides an instance of HistoryParameters with all the sane default values set 29 | func NewHistoryParameters() HistoryParameters { 30 | return HistoryParameters{ 31 | Latest: DEFAULT_HISTORY_LATEST, 32 | Oldest: DEFAULT_HISTORY_OLDEST, 33 | Count: DEFAULT_HISTORY_COUNT, 34 | Inclusive: DEFAULT_HISTORY_INCLUSIVE, 35 | Unreads: DEFAULT_HISTORY_UNREADS, 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/internal/errorsx/errorsx.go: -------------------------------------------------------------------------------- 1 | package errorsx 2 | 3 | // String representing an error, useful for declaring string constants as errors. 4 | type String string 5 | 6 | func (t String) Error() string { 7 | return string(t) 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/internal/timex/timex.go: -------------------------------------------------------------------------------- 1 | package timex 2 | 3 | import "time" 4 | 5 | // Max returns the maximum duration 6 | func Max(values ...time.Duration) time.Duration { 7 | var ( 8 | max time.Duration 9 | ) 10 | 11 | for _, v := range values { 12 | if v > max { 13 | max = v 14 | } 15 | } 16 | 17 | return max 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/messageID.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | import "sync" 4 | 5 | // IDGenerator provides an interface for generating integer ID values. 6 | type IDGenerator interface { 7 | Next() int 8 | } 9 | 10 | // NewSafeID returns a new instance of an IDGenerator which is safe for 11 | // concurrent use by multiple goroutines. 12 | func NewSafeID(startID int) IDGenerator { 13 | return &safeID{ 14 | nextID: startID, 15 | mutex: &sync.Mutex{}, 16 | } 17 | } 18 | 19 | type safeID struct { 20 | nextID int 21 | mutex *sync.Mutex 22 | } 23 | 24 | func (s *safeID) Next() int { 25 | s.mutex.Lock() 26 | defer s.mutex.Unlock() 27 | id := s.nextID 28 | s.nextID++ 29 | return id 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/pagination.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | // Paging contains paging information 4 | type Paging struct { 5 | Count int `json:"count"` 6 | Total int `json:"total"` 7 | Page int `json:"page"` 8 | Pages int `json:"pages"` 9 | } 10 | 11 | // Pagination contains pagination information 12 | // This is different from Paging in that it contains additional details 13 | type Pagination struct { 14 | TotalCount int `json:"total_count"` 15 | Page int `json:"page"` 16 | PerPage int `json:"per_page"` 17 | PageCount int `json:"page_count"` 18 | First int `json:"first"` 19 | Last int `json:"last"` 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/webhooks.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | import ( 4 | "context" 5 | "net/http" 6 | ) 7 | 8 | type WebhookMessage struct { 9 | Username string `json:"username,omitempty"` 10 | IconEmoji string `json:"icon_emoji,omitempty"` 11 | IconURL string `json:"icon_url,omitempty"` 12 | Channel string `json:"channel,omitempty"` 13 | ThreadTimestamp string `json:"thread_ts,omitempty"` 14 | Text string `json:"text,omitempty"` 15 | Attachments []Attachment `json:"attachments,omitempty"` 16 | Parse string `json:"parse,omitempty"` 17 | } 18 | 19 | func PostWebhook(url string, msg *WebhookMessage) error { 20 | return PostWebhookCustomHTTPContext(context.Background(), url, http.DefaultClient, msg) 21 | } 22 | 23 | func PostWebhookContext(ctx context.Context, url string, msg *WebhookMessage) error { 24 | return PostWebhookCustomHTTPContext(ctx, url, http.DefaultClient, msg) 25 | } 26 | 27 | func PostWebhookCustomHTTP(url string, httpClient *http.Client, msg *WebhookMessage) error { 28 | return PostWebhookCustomHTTPContext(context.Background(), url, httpClient, msg) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/webhooks_go112.go: -------------------------------------------------------------------------------- 1 | // +build !go1.13 2 | 3 | package slack 4 | 5 | import ( 6 | "bytes" 7 | "context" 8 | "encoding/json" 9 | "net/http" 10 | 11 | "github.com/pkg/errors" 12 | ) 13 | 14 | func PostWebhookCustomHTTPContext(ctx context.Context, url string, httpClient *http.Client, msg *WebhookMessage) error { 15 | raw, err := json.Marshal(msg) 16 | if err != nil { 17 | return errors.Wrap(err, "marshal failed") 18 | } 19 | 20 | req, err := http.NewRequest(http.MethodPost, url, bytes.NewReader(raw)) 21 | if err != nil { 22 | return errors.Wrap(err, "failed new request") 23 | } 24 | req = req.WithContext(ctx) 25 | req.Header.Set("Content-Type", "application/json") 26 | 27 | resp, err := httpClient.Do(req) 28 | if err != nil { 29 | return errors.Wrap(err, "failed to post webhook") 30 | } 31 | defer resp.Body.Close() 32 | 33 | return checkStatusCode(resp, discard{}) 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/webhooks_go113.go: -------------------------------------------------------------------------------- 1 | // +build go1.13 2 | 3 | package slack 4 | 5 | import ( 6 | "bytes" 7 | "context" 8 | "encoding/json" 9 | "net/http" 10 | 11 | "github.com/pkg/errors" 12 | ) 13 | 14 | func PostWebhookCustomHTTPContext(ctx context.Context, url string, httpClient *http.Client, msg *WebhookMessage) error { 15 | raw, err := json.Marshal(msg) 16 | if err != nil { 17 | return errors.Wrap(err, "marshal failed") 18 | } 19 | 20 | req, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewReader(raw)) 21 | if err != nil { 22 | return errors.Wrap(err, "failed new request") 23 | } 24 | req.Header.Set("Content-Type", "application/json") 25 | 26 | resp, err := httpClient.Do(req) 27 | if err != nil { 28 | return errors.Wrap(err, "failed to post webhook") 29 | } 30 | defer resp.Body.Close() 31 | 32 | return checkStatusCode(resp, discard{}) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/websocket_desktop_notification.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | // DesktopNotificationEvent represents the update event for Desktop Notification. 4 | type DesktopNotificationEvent struct { 5 | Type string `json:"type"` 6 | Title string `json:"title"` 7 | Subtitle string `json:"subtitle"` 8 | Message string `json:"msg"` 9 | Timestamp string `json:"ts"` 10 | Content string `json:"content"` 11 | Channel string `json:"channel"` 12 | LaunchURI string `json:"launchUri"` 13 | AvatarImage string `json:"avatarImage"` 14 | SsbFilename string `json:"ssbFilename"` 15 | ImageURI string `json:"imageUri"` 16 | IsShared bool `json:"is_shared"` 17 | IsChannelInvite bool `json:"is_channel_invite"` 18 | EventTimestamp string `json:"event_ts"` 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/websocket_dm.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | // IMCreatedEvent represents the IM created event 4 | type IMCreatedEvent struct { 5 | Type string `json:"type"` 6 | User string `json:"user"` 7 | Channel ChannelCreatedInfo `json:"channel"` 8 | } 9 | 10 | // IMHistoryChangedEvent represents the IM history changed event 11 | type IMHistoryChangedEvent ChannelHistoryChangedEvent 12 | 13 | // IMOpenEvent represents the IM open event 14 | type IMOpenEvent ChannelInfoEvent 15 | 16 | // IMCloseEvent represents the IM close event 17 | type IMCloseEvent ChannelInfoEvent 18 | 19 | // IMMarkedEvent represents the IM marked event 20 | type IMMarkedEvent ChannelInfoEvent 21 | 22 | // IMMarkedHistoryChanged represents the IM marked history changed event 23 | type IMMarkedHistoryChanged ChannelInfoEvent 24 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/websocket_dnd.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | // DNDUpdatedEvent represents the update event for Do Not Disturb 4 | type DNDUpdatedEvent struct { 5 | Type string `json:"type"` 6 | User string `json:"user"` 7 | Status DNDStatus `json:"dnd_status"` 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/websocket_mobile_in_app_notification.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | // MobileInAppNotificationEvent represents the update event for Mobile App Notification. 4 | type MobileInAppNotificationEvent struct { 5 | Type string `json:"type"` 6 | Title string `json:"title"` 7 | Subtitle string `json:"subtitle"` 8 | Timestamp string `json:"ts"` 9 | Channel string `json:"channel"` 10 | AvatarImage string `json:"avatarImage"` 11 | IsShared bool `json:"is_shared"` 12 | ChannelName string `json:"channel_name"` 13 | AuthorID string `json:"author_id"` 14 | AuthorDisplayName string `json:"author_display_name"` 15 | MessageText string `json:"msg_text"` 16 | PushID string `json:"push_id"` 17 | NotifcationID string `json:"notif_id"` 18 | MobileLaunchURI string `json:"mobileLaunchUri"` 19 | EventTimestamp string `json:"event_ts"` 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/websocket_pins.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | type pinEvent struct { 4 | Type string `json:"type"` 5 | User string `json:"user"` 6 | Item Item `json:"item"` 7 | Channel string `json:"channel_id"` 8 | EventTimestamp string `json:"event_ts"` 9 | HasPins bool `json:"has_pins,omitempty"` 10 | } 11 | 12 | // PinAddedEvent represents the Pin added event 13 | type PinAddedEvent pinEvent 14 | 15 | // PinRemovedEvent represents the Pin removed event 16 | type PinRemovedEvent pinEvent 17 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/websocket_reactions.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | // reactionItem is a lighter-weight item than is returned by the reactions list. 4 | type reactionItem struct { 5 | Type string `json:"type"` 6 | Channel string `json:"channel,omitempty"` 7 | File string `json:"file,omitempty"` 8 | FileComment string `json:"file_comment,omitempty"` 9 | Timestamp string `json:"ts,omitempty"` 10 | } 11 | 12 | type reactionEvent struct { 13 | Type string `json:"type"` 14 | User string `json:"user"` 15 | ItemUser string `json:"item_user"` 16 | Item reactionItem `json:"item"` 17 | Reaction string `json:"reaction"` 18 | EventTimestamp string `json:"event_ts"` 19 | } 20 | 21 | // ReactionAddedEvent represents the Reaction added event 22 | type ReactionAddedEvent reactionEvent 23 | 24 | // ReactionRemovedEvent represents the Reaction removed event 25 | type ReactionRemovedEvent reactionEvent 26 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/websocket_stars.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | type starEvent struct { 4 | Type string `json:"type"` 5 | User string `json:"user"` 6 | Item StarredItem `json:"item"` 7 | EventTimestamp string `json:"event_ts"` 8 | } 9 | 10 | // StarAddedEvent represents the Star added event 11 | type StarAddedEvent starEvent 12 | 13 | // StarRemovedEvent represents the Star removed event 14 | type StarRemovedEvent starEvent 15 | -------------------------------------------------------------------------------- /vendor/github.com/slack-go/slack/websocket_teams.go: -------------------------------------------------------------------------------- 1 | package slack 2 | 3 | // TeamJoinEvent represents the Team join event 4 | type TeamJoinEvent struct { 5 | Type string `json:"type"` 6 | User User `json:"user"` 7 | } 8 | 9 | // TeamRenameEvent represents the Team rename event 10 | type TeamRenameEvent struct { 11 | Type string `json:"type"` 12 | Name string `json:"name,omitempty"` 13 | EventTimestamp string `json:"event_ts,omitempty"` 14 | } 15 | 16 | // TeamPrefChangeEvent represents the Team preference change event 17 | type TeamPrefChangeEvent struct { 18 | Type string `json:"type"` 19 | Name string `json:"name,omitempty"` 20 | Value []string `json:"value,omitempty"` 21 | } 22 | 23 | // TeamDomainChangeEvent represents the Team domain change event 24 | type TeamDomainChangeEvent struct { 25 | Type string `json:"type"` 26 | URL string `json:"url"` 27 | Domain string `json:"domain"` 28 | } 29 | 30 | // TeamMigrationStartedEvent represents the Team migration started event 31 | type TeamMigrationStartedEvent struct { 32 | Type string `json:"type"` 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/tsuyoshiwada/go-gitcmd/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/osx,macos,go 3 | 4 | ### Go ### 5 | # Binaries for programs and plugins 6 | *.exe 7 | *.dll 8 | *.so 9 | *.dylib 10 | 11 | # Test binary, build with `go test -c` 12 | *.test 13 | 14 | # Output of the go coverage tool, specifically when used with LiteIDE 15 | *.out 16 | 17 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 18 | .glide/ 19 | 20 | ### macOS ### 21 | *.DS_Store 22 | .AppleDouble 23 | .LSOverride 24 | 25 | # Icon must end with two \r 26 | Icon 27 | 28 | # Thumbnails 29 | ._* 30 | 31 | # Files that might appear in the root of a volume 32 | .DocumentRevisions-V100 33 | .fseventsd 34 | .Spotlight-V100 35 | .TemporaryItems 36 | .Trashes 37 | .VolumeIcon.icns 38 | .com.apple.timemachine.donotpresent 39 | 40 | # Directories potentially created on remote AFP share 41 | .AppleDB 42 | .AppleDesktop 43 | Network Trash Folder 44 | Temporary Items 45 | .apdisk 46 | 47 | ### OSX ### 48 | 49 | # Icon must end with two \r 50 | 51 | # Thumbnails 52 | 53 | # Files that might appear in the root of a volume 54 | 55 | # Directories potentially created on remote AFP share 56 | 57 | 58 | # End of https://www.gitignore.io/api/osx,macos,go 59 | -------------------------------------------------------------------------------- /vendor/github.com/tsuyoshiwada/go-gitcmd/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.9 5 | script: 6 | - go test -v 7 | branches: 8 | only: 9 | - master 10 | -------------------------------------------------------------------------------- /vendor/github.com/tsuyoshiwada/go-gitcmd/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | 3 | > 2018-02-05 4 | 5 | * First Release :tada: 6 | 7 | -------------------------------------------------------------------------------- /vendor/github.com/tsuyoshiwada/go-gitcmd/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 tsuyoshiwada 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length = 120 3 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/.gitignore: -------------------------------------------------------------------------------- 1 | *.coverprofile 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | dist: trusty 4 | osx_image: xcode8.3 5 | go: 1.11.x 6 | 7 | os: 8 | - linux 9 | - osx 10 | 11 | cache: 12 | directories: 13 | - node_modules 14 | 15 | before_script: 16 | - go get github.com/urfave/gfmrun/... || true 17 | - go get golang.org/x/tools/cmd/goimports 18 | - if [ ! -f node_modules/.bin/markdown-toc ] ; then 19 | npm install markdown-toc ; 20 | fi 21 | 22 | script: 23 | - ./runtests gen 24 | - ./runtests vet 25 | - ./runtests test 26 | - ./runtests gfmrun 27 | - ./runtests toc 28 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | **NOTE**: the primary maintainer(s) may be found in 4 | [./MAINTAINERS.md](./MAINTAINERS.md). 5 | 6 | Feel free to put up a pull request to fix a bug or maybe add a feature. I will 7 | give it a code review and make sure that it does not break backwards 8 | compatibility. If I or any other collaborators agree that it is in line with 9 | the vision of the project, we will work with you to get the code into 10 | a mergeable state and merge it into the master branch. 11 | 12 | If you have contributed something significant to the project, we will most 13 | likely add you as a collaborator. As a collaborator you are given the ability 14 | to merge others pull requests. It is very important that new code does not 15 | break existing code, so be careful about what code you do choose to merge. 16 | 17 | If you feel like you have contributed to the project but have not yet been added 18 | as a collaborator, we probably forgot to add you :sweat_smile:. Please open an 19 | issue! 20 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Jeremy Saenz & Contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | - @meatballhat 2 | - @lynncyrin 3 | - @AudriusButkevicius 4 | - @asahasrabuddhe 5 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | 3 | os: Windows Server 2016 4 | 5 | image: Visual Studio 2017 6 | 7 | clone_folder: c:\gopath\src\github.com\urfave\cli 8 | 9 | environment: 10 | GOPATH: C:\gopath 11 | GOVERSION: 1.8.x 12 | PYTHON: C:\Python36-x64 13 | PYTHON_VERSION: 3.6.x 14 | PYTHON_ARCH: 64 15 | 16 | install: 17 | - set PATH=%GOPATH%\bin;C:\go\bin;%PATH% 18 | - go version 19 | - go env 20 | - go get github.com/urfave/gfmrun/... 21 | - go get -v -t ./... 22 | 23 | build_script: 24 | - python runtests vet 25 | - python runtests test 26 | - python runtests gfmrun 27 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/category.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | // CommandCategories is a slice of *CommandCategory. 4 | type CommandCategories []*CommandCategory 5 | 6 | // CommandCategory is a category containing commands. 7 | type CommandCategory struct { 8 | Name string 9 | Commands Commands 10 | } 11 | 12 | func (c CommandCategories) Less(i, j int) bool { 13 | return lexicographicLess(c[i].Name, c[j].Name) 14 | } 15 | 16 | func (c CommandCategories) Len() int { 17 | return len(c) 18 | } 19 | 20 | func (c CommandCategories) Swap(i, j int) { 21 | c[i], c[j] = c[j], c[i] 22 | } 23 | 24 | // AddCommand adds a command to a category. 25 | func (c CommandCategories) AddCommand(category string, command Command) CommandCategories { 26 | for _, commandCategory := range c { 27 | if commandCategory.Name == category { 28 | commandCategory.Commands = append(commandCategory.Commands, command) 29 | return c 30 | } 31 | } 32 | return append(c, &CommandCategory{Name: category, Commands: []Command{command}}) 33 | } 34 | 35 | // VisibleCommands returns a slice of the Commands with Hidden=false 36 | func (c *CommandCategory) VisibleCommands() []Command { 37 | ret := []Command{} 38 | for _, command := range c.Commands { 39 | if !command.Hidden { 40 | ret = append(ret, command) 41 | } 42 | } 43 | return ret 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/cli.go: -------------------------------------------------------------------------------- 1 | // Package cli provides a minimal framework for creating and organizing command line 2 | // Go applications. cli is designed to be easy to understand and write, the most simple 3 | // cli application can be written as follows: 4 | // func main() { 5 | // cli.NewApp().Run(os.Args) 6 | // } 7 | // 8 | // Of course this application does not do much, so let's make this an actual application: 9 | // func main() { 10 | // app := cli.NewApp() 11 | // app.Name = "greet" 12 | // app.Usage = "say a greeting" 13 | // app.Action = func(c *cli.Context) error { 14 | // println("Greetings") 15 | // return nil 16 | // } 17 | // 18 | // app.Run(os.Args) 19 | // } 20 | package cli 21 | 22 | //go:generate python ./generate-flag-types cli -i flag-types.json -o flag_generated.go 23 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/urfave/cli 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/BurntSushi/toml v0.3.1 7 | gopkg.in/yaml.v2 v2.2.2 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/go.sum: -------------------------------------------------------------------------------- 1 | github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= 2 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 3 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= 4 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 5 | gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= 6 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 7 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/sort.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import "unicode" 4 | 5 | // lexicographicLess compares strings alphabetically considering case. 6 | func lexicographicLess(i, j string) bool { 7 | iRunes := []rune(i) 8 | jRunes := []rune(j) 9 | 10 | lenShared := len(iRunes) 11 | if lenShared > len(jRunes) { 12 | lenShared = len(jRunes) 13 | } 14 | 15 | for index := 0; index < lenShared; index++ { 16 | ir := iRunes[index] 17 | jr := jRunes[index] 18 | 19 | if lir, ljr := unicode.ToLower(ir), unicode.ToLower(jr); lir != ljr { 20 | return lir < ljr 21 | } 22 | 23 | if ir != jr { 24 | return ir < jr 25 | } 26 | } 27 | 28 | return i < j 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/fastjson/.gitignore: -------------------------------------------------------------------------------- 1 | tags 2 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/fastjson/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.10.x 5 | 6 | script: 7 | # build test for supported platforms 8 | - GOOS=linux go build 9 | - GOOS=darwin go build 10 | - GOOS=freebsd go build 11 | - GOOS=windows go build 12 | 13 | # run tests on a standard platform 14 | - go test -v ./... -coverprofile=coverage.txt -covermode=atomic 15 | - go test -v ./... -race 16 | 17 | after_success: 18 | # Upload coverage results to codecov.io 19 | - bash <(curl -s https://codecov.io/bash) 20 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/fastjson/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Aliaksandr Valialkin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/fastjson/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package fastjson provides fast JSON parsing. 3 | 4 | Arbitrary JSON may be parsed by fastjson without the need for creating structs 5 | or for generating go code. Just parse JSON and get the required fields with 6 | Get* functions. 7 | 8 | */ 9 | package fastjson 10 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/fastjson/fuzz.go: -------------------------------------------------------------------------------- 1 | // +build gofuzz 2 | 3 | package fastjson 4 | 5 | func Fuzz(data []byte) int { 6 | err := ValidateBytes(data) 7 | if err != nil { 8 | return 0 9 | } 10 | 11 | v := MustParseBytes(data) 12 | 13 | dst := make([]byte, 0) 14 | dst = v.MarshalTo(dst) 15 | 16 | err = ValidateBytes(dst) 17 | if err != nil { 18 | panic(err) 19 | } 20 | 21 | return 1 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/fastjson/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/valyala/fastjson 2 | 3 | go 1.12 4 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/fastjson/pool.go: -------------------------------------------------------------------------------- 1 | package fastjson 2 | 3 | import ( 4 | "sync" 5 | ) 6 | 7 | // ParserPool may be used for pooling Parsers for similarly typed JSONs. 8 | type ParserPool struct { 9 | pool sync.Pool 10 | } 11 | 12 | // Get returns a Parser from pp. 13 | // 14 | // The Parser must be Put to pp after use. 15 | func (pp *ParserPool) Get() *Parser { 16 | v := pp.pool.Get() 17 | if v == nil { 18 | return &Parser{} 19 | } 20 | return v.(*Parser) 21 | } 22 | 23 | // Put returns p to pp. 24 | // 25 | // p and objects recursively returned from p cannot be used after p 26 | // is put into pp. 27 | func (pp *ParserPool) Put(p *Parser) { 28 | pp.pool.Put(p) 29 | } 30 | 31 | // ArenaPool may be used for pooling Arenas for similarly typed JSONs. 32 | type ArenaPool struct { 33 | pool sync.Pool 34 | } 35 | 36 | // Get returns an Arena from ap. 37 | // 38 | // The Arena must be Put to ap after use. 39 | func (ap *ArenaPool) Get() *Arena { 40 | v := ap.pool.Get() 41 | if v == nil { 42 | return &Arena{} 43 | } 44 | return v.(*Arena) 45 | } 46 | 47 | // Put returns a to ap. 48 | // 49 | // a and objects created by a cannot be used after a is put into ap. 50 | func (ap *ArenaPool) Put(a *Arena) { 51 | ap.pool.Put(a) 52 | } 53 | -------------------------------------------------------------------------------- /vendor/github.com/valyala/fastjson/util.go: -------------------------------------------------------------------------------- 1 | package fastjson 2 | 3 | import ( 4 | "reflect" 5 | "unsafe" 6 | ) 7 | 8 | func b2s(b []byte) string { 9 | return *(*string)(unsafe.Pointer(&b)) 10 | } 11 | 12 | func s2b(s string) []byte { 13 | strh := (*reflect.StringHeader)(unsafe.Pointer(&s)) 14 | var sh reflect.SliceHeader 15 | sh.Data = strh.Data 16 | sh.Len = strh.Len 17 | sh.Cap = strh.Len 18 | return *(*[]byte)(unsafe.Pointer(&sh)) 19 | } 20 | 21 | const maxStartEndStringLen = 80 22 | 23 | func startEndString(s string) string { 24 | if len(s) <= maxStartEndStringLen { 25 | return s 26 | } 27 | start := s[:40] 28 | end := s[len(s)-40:] 29 | return start + "..." + end 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/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_linux_ppc64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64 ppc64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for ppc64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 19 | BL runtime·entersyscall(SB) 20 | MOVD a1+8(FP), R3 21 | MOVD a2+16(FP), R4 22 | MOVD a3+24(FP), R5 23 | MOVD R0, R6 24 | MOVD R0, R7 25 | MOVD R0, R8 26 | MOVD trap+0(FP), R9 // syscall entry 27 | SYSCALL R9 28 | MOVD R3, r1+32(FP) 29 | MOVD R4, r2+40(FP) 30 | BL runtime·exitsyscall(SB) 31 | RET 32 | 33 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 34 | MOVD a1+8(FP), R3 35 | MOVD a2+16(FP), R4 36 | MOVD a3+24(FP), R5 37 | MOVD R0, R6 38 | MOVD R0, R7 39 | MOVD R0, R8 40 | MOVD trap+0(FP), R9 // syscall entry 41 | SYSCALL R9 42 | MOVD R3, r1+32(FP) 43 | MOVD R4, r2+40(FP) 44 | RET 45 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_riscv64.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 riscv64,!gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for linux/riscv64. 11 | // 12 | // Where available, just jump to package syscall's implementation of 13 | // these functions. 14 | 15 | TEXT ·Syscall(SB),NOSPLIT,$0-56 16 | JMP syscall·Syscall(SB) 17 | 18 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 19 | JMP syscall·Syscall6(SB) 20 | 21 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 22 | CALL runtime·entersyscall(SB) 23 | MOV a1+8(FP), A0 24 | MOV a2+16(FP), A1 25 | MOV a3+24(FP), A2 26 | MOV trap+0(FP), A7 // syscall entry 27 | ECALL 28 | MOV A0, r1+32(FP) // r1 29 | MOV A1, r2+40(FP) // r2 30 | CALL runtime·exitsyscall(SB) 31 | RET 32 | 33 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 34 | JMP syscall·RawSyscall(SB) 35 | 36 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 37 | JMP syscall·RawSyscall6(SB) 38 | 39 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 40 | MOV a1+8(FP), A0 41 | MOV a2+16(FP), A1 42 | MOV a3+24(FP), A2 43 | MOV trap+0(FP), A7 // syscall entry 44 | ECALL 45 | MOV A0, r1+32(FP) 46 | MOV A1, r2+40(FP) 47 | RET 48 | -------------------------------------------------------------------------------- /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/dev_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Dragonfly's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a DragonFlyBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a DragonFlyBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_freebsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in FreeBSD's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a FreeBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a FreeBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a FreeBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/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.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 dragonfly freebsd linux netbsd openbsd 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 12 | // systems by fcntl_linux_32bit.go to be SYS_FCNTL64. 13 | var fcntl64Syscall uintptr = SYS_FCNTL 14 | 15 | func fcntl(fd int, cmd, arg int) (int, error) { 16 | valptr, _, errno := Syscall(fcntl64Syscall, uintptr(fd), uintptr(cmd), uintptr(arg)) 17 | var err error 18 | if errno != 0 { 19 | err = errno 20 | } 21 | return int(valptr), err 22 | } 23 | 24 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 25 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 26 | return fcntl(int(fd), cmd, arg) 27 | } 28 | 29 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 30 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 31 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 32 | if errno == 0 { 33 | return nil 34 | } 35 | return errno 36 | } 37 | -------------------------------------------------------------------------------- /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_c.c: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo 6 | // +build !aix 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #define _STRINGIFY2_(x) #x 13 | #define _STRINGIFY_(x) _STRINGIFY2_(x) 14 | #define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__) 15 | 16 | // Call syscall from C code because the gccgo support for calling from 17 | // Go to C does not support varargs functions. 18 | 19 | struct ret { 20 | uintptr_t r; 21 | uintptr_t err; 22 | }; 23 | 24 | struct ret 25 | gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) 26 | { 27 | struct ret r; 28 | 29 | errno = 0; 30 | r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); 31 | r.err = errno; 32 | return r; 33 | } 34 | 35 | uintptr_t 36 | gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) 37 | { 38 | return syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); 39 | } 40 | -------------------------------------------------------------------------------- /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/sockcmsg_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Socket control messages 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // UnixCredentials encodes credentials into a socket control message 12 | // for sending to another process. This can be used for 13 | // authentication. 14 | func UnixCredentials(ucred *Ucred) []byte { 15 | b := make([]byte, CmsgSpace(SizeofUcred)) 16 | h := (*Cmsghdr)(unsafe.Pointer(&b[0])) 17 | h.Level = SOL_SOCKET 18 | h.Type = SCM_CREDENTIALS 19 | h.SetLen(CmsgLen(SizeofUcred)) 20 | *(*Ucred)(h.data(0)) = *ucred 21 | return b 22 | } 23 | 24 | // ParseUnixCredentials decodes a socket control message that contains 25 | // credentials in a Ucred structure. To receive such a message, the 26 | // SO_PASSCRED option must be enabled on the socket. 27 | func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) { 28 | if m.Header.Level != SOL_SOCKET { 29 | return nil, EINVAL 30 | } 31 | if m.Header.Type != SCM_CREDENTIALS { 32 | return nil, EINVAL 33 | } 34 | ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0])) 35 | return &ucred, nil 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_unix_other.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 freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | ) 12 | 13 | // Round the length of a raw sockaddr up to align it properly. 14 | func cmsgAlignOf(salen int) int { 15 | salign := SizeofPtr 16 | 17 | // dragonfly needs to check ABI version at runtime, see cmsgAlignOf in 18 | // sockcmsg_dragonfly.go 19 | switch runtime.GOOS { 20 | case "aix": 21 | // There is no alignment on AIX. 22 | salign = 1 23 | case "darwin", "illumos", "solaris": 24 | // NOTE: It seems like 64-bit Darwin, Illumos and Solaris 25 | // kernels still require 32-bit aligned access to network 26 | // subsystem. 27 | if SizeofPtr == 8 { 28 | salign = 4 29 | } 30 | case "netbsd", "openbsd": 31 | // NetBSD and OpenBSD armv7 require 64-bit alignment. 32 | if runtime.GOARCH == "arm" { 33 | salign = 8 34 | } 35 | } 36 | 37 | return (salen + salign - 1) & ^(salign - 1) 38 | } 39 | -------------------------------------------------------------------------------- /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_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,gccgo,386 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | 22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 24 | return int(fd), err 25 | } 26 | 27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 29 | return int(fd), err 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,gccgo,arm 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (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_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/386 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/arm the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_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,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /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/unveil_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import ( 8 | "syscall" 9 | "unsafe" 10 | ) 11 | 12 | // Unveil implements the unveil syscall. 13 | // For more information see unveil(2). 14 | // Note that the special case of blocking further 15 | // unveil calls is handled by UnveilBlock. 16 | func Unveil(path string, flags string) error { 17 | pathPtr, err := syscall.BytePtrFromString(path) 18 | if err != nil { 19 | return err 20 | } 21 | flagsPtr, err := syscall.BytePtrFromString(flags) 22 | if err != nil { 23 | return err 24 | } 25 | _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(unsafe.Pointer(pathPtr)), uintptr(unsafe.Pointer(flagsPtr)), 0) 26 | if e != 0 { 27 | return e 28 | } 29 | return nil 30 | } 31 | 32 | // UnveilBlock blocks future unveil calls. 33 | // For more information see unveil(2). 34 | func UnveilBlock() error { 35 | // Both pointers must be nil. 36 | var pathUnsafe, flagsUnsafe unsafe.Pointer 37 | _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(pathUnsafe), uintptr(flagsUnsafe), 0) 38 | if e != 0 { 39 | return e 40 | } 41 | return nil 42 | } 43 | -------------------------------------------------------------------------------- /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.go: -------------------------------------------------------------------------------- 1 | // go run mksyscall.go -l32 -tags darwin,386,go1.13 syscall_darwin.1_13.go 2 | // Code generated by the command above; see README.md. DO NOT EDIT. 3 | 4 | // +build darwin,386,go1.13 5 | 6 | package unix 7 | 8 | import ( 9 | "syscall" 10 | "unsafe" 11 | ) 12 | 13 | var _ syscall.Errno 14 | 15 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 16 | 17 | func closedir(dir uintptr) (err error) { 18 | _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0) 19 | if e1 != 0 { 20 | err = errnoErr(e1) 21 | } 22 | return 23 | } 24 | 25 | func libc_closedir_trampoline() 26 | 27 | //go:linkname libc_closedir libc_closedir 28 | //go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib" 29 | 30 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 31 | 32 | func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) { 33 | r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result))) 34 | res = Errno(r0) 35 | return 36 | } 37 | 38 | func libc_readdir_r_trampoline() 39 | 40 | //go:linkname libc_readdir_r libc_readdir_r 41 | //go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib" 42 | -------------------------------------------------------------------------------- /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.go: -------------------------------------------------------------------------------- 1 | // go run mksyscall.go -tags darwin,amd64,go1.13 syscall_darwin.1_13.go 2 | // Code generated by the command above; see README.md. DO NOT EDIT. 3 | 4 | // +build darwin,amd64,go1.13 5 | 6 | package unix 7 | 8 | import ( 9 | "syscall" 10 | "unsafe" 11 | ) 12 | 13 | var _ syscall.Errno 14 | 15 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 16 | 17 | func closedir(dir uintptr) (err error) { 18 | _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0) 19 | if e1 != 0 { 20 | err = errnoErr(e1) 21 | } 22 | return 23 | } 24 | 25 | func libc_closedir_trampoline() 26 | 27 | //go:linkname libc_closedir libc_closedir 28 | //go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib" 29 | 30 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 31 | 32 | func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) { 33 | r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result))) 34 | res = Errno(r0) 35 | return 36 | } 37 | 38 | func libc_readdir_r_trampoline() 39 | 40 | //go:linkname libc_readdir_r libc_readdir_r 41 | //go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib" 42 | -------------------------------------------------------------------------------- /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.go: -------------------------------------------------------------------------------- 1 | // go run mksyscall.go -l32 -tags darwin,arm,go1.13 syscall_darwin.1_13.go 2 | // Code generated by the command above; see README.md. DO NOT EDIT. 3 | 4 | // +build darwin,arm,go1.13 5 | 6 | package unix 7 | 8 | import ( 9 | "syscall" 10 | "unsafe" 11 | ) 12 | 13 | var _ syscall.Errno 14 | 15 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 16 | 17 | func closedir(dir uintptr) (err error) { 18 | _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0) 19 | if e1 != 0 { 20 | err = errnoErr(e1) 21 | } 22 | return 23 | } 24 | 25 | func libc_closedir_trampoline() 26 | 27 | //go:linkname libc_closedir libc_closedir 28 | //go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib" 29 | 30 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 31 | 32 | func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) { 33 | r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result))) 34 | res = Errno(r0) 35 | return 36 | } 37 | 38 | func libc_readdir_r_trampoline() 39 | 40 | //go:linkname libc_readdir_r libc_readdir_r 41 | //go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib" 42 | -------------------------------------------------------------------------------- /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.go: -------------------------------------------------------------------------------- 1 | // go run mksyscall.go -tags darwin,arm64,go1.13 syscall_darwin.1_13.go 2 | // Code generated by the command above; see README.md. DO NOT EDIT. 3 | 4 | // +build darwin,arm64,go1.13 5 | 6 | package unix 7 | 8 | import ( 9 | "syscall" 10 | "unsafe" 11 | ) 12 | 13 | var _ syscall.Errno 14 | 15 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 16 | 17 | func closedir(dir uintptr) (err error) { 18 | _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0) 19 | if e1 != 0 { 20 | err = errnoErr(e1) 21 | } 22 | return 23 | } 24 | 25 | func libc_closedir_trampoline() 26 | 27 | //go:linkname libc_closedir libc_closedir 28 | //go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib" 29 | 30 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 31 | 32 | func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) { 33 | r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result))) 34 | res = Errno(r0) 35 | return 36 | } 37 | 38 | func libc_readdir_r_trampoline() 39 | 40 | //go:linkname libc_readdir_r libc_readdir_r 41 | //go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib" 42 | -------------------------------------------------------------------------------- /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/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/gopkg.in/AlecAivazis/survey.v1/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | os: 4 | - linux 5 | - osx 6 | - windows 7 | 8 | go_import_path: gopkg.in/AlecAivazis/survey.v1 9 | 10 | before_install: 11 | - go get github.com/alecaivazis/run 12 | 13 | install: 14 | - run install-deps 15 | 16 | script: 17 | - run tests 18 | # - run autoplay-tests 19 | -------------------------------------------------------------------------------- /vendor/gopkg.in/AlecAivazis/survey.v1/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Alec Aivazis 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/gopkg.in/AlecAivazis/survey.v1/_tasks.hcl: -------------------------------------------------------------------------------- 1 | task "install-deps" { 2 | description = "Install all of package dependencies" 3 | pipeline = [ 4 | "go get -t {{.files}}", 5 | # for autoplay tests 6 | "go get github.com/kr/pty" 7 | ] 8 | } 9 | 10 | task "tests" { 11 | description = "Run the test suite" 12 | command = "go test {{.files}}" 13 | } 14 | 15 | variables { 16 | files = "$(go list -v ./... | grep -iEv \"tests|examples\")" 17 | } 18 | 19 | -------------------------------------------------------------------------------- /vendor/gopkg.in/AlecAivazis/survey.v1/filter.go: -------------------------------------------------------------------------------- 1 | package survey 2 | 3 | import "strings" 4 | 5 | var DefaultFilterFn = func(filter string, options []string) (answer []string) { 6 | filter = strings.ToLower(filter) 7 | for _, o := range options { 8 | if strings.Contains(strings.ToLower(o), filter) { 9 | answer = append(answer, o) 10 | } 11 | } 12 | return answer 13 | } 14 | -------------------------------------------------------------------------------- /vendor/gopkg.in/AlecAivazis/survey.v1/go.mod: -------------------------------------------------------------------------------- 1 | module gopkg.in/AlecAivazis/survey.v1 2 | 3 | require ( 4 | github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8 5 | github.com/davecgh/go-spew v1.1.0 // indirect 6 | github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174 7 | github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 8 | github.com/kr/pty v1.1.1 // indirect 9 | github.com/mattn/go-colorable v0.0.9 // indirect 10 | github.com/mattn/go-isatty v0.0.3 11 | github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | github.com/stretchr/testify v1.2.1 14 | golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b // indirect 15 | golang.org/x/sys v0.0.0-20180606202747-9527bec2660b // indirect 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/gopkg.in/AlecAivazis/survey.v1/terminal/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Takashi Kokubun 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /vendor/gopkg.in/AlecAivazis/survey.v1/terminal/README.md: -------------------------------------------------------------------------------- 1 | # survey/terminal 2 | 3 | This package started as a copy of [kokuban/go-ansi](http://github.com/k0kubun/go-ansi) but has since been modified to fit survey's specific needs. 4 | -------------------------------------------------------------------------------- /vendor/gopkg.in/AlecAivazis/survey.v1/terminal/buffered_reader.go: -------------------------------------------------------------------------------- 1 | package terminal 2 | 3 | import ( 4 | "bytes" 5 | "io" 6 | ) 7 | 8 | type BufferedReader struct { 9 | In io.Reader 10 | Buffer *bytes.Buffer 11 | } 12 | 13 | func (br *BufferedReader) Read(p []byte) (int, error) { 14 | n, err := br.Buffer.Read(p) 15 | if err != nil && err != io.EOF { 16 | return n, err 17 | } else if err == nil { 18 | return n, nil 19 | } 20 | 21 | return br.In.Read(p[n:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/gopkg.in/AlecAivazis/survey.v1/terminal/display.go: -------------------------------------------------------------------------------- 1 | package terminal 2 | 3 | type EraseLineMode int 4 | 5 | const ( 6 | ERASE_LINE_END EraseLineMode = iota 7 | ERASE_LINE_START 8 | ERASE_LINE_ALL 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/gopkg.in/AlecAivazis/survey.v1/terminal/display_posix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package terminal 4 | 5 | import ( 6 | "fmt" 7 | ) 8 | 9 | func EraseLine(out FileWriter, mode EraseLineMode) { 10 | fmt.Fprintf(out, "\x1b[%dK", mode) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/gopkg.in/AlecAivazis/survey.v1/terminal/display_windows.go: -------------------------------------------------------------------------------- 1 | package terminal 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | ) 7 | 8 | func EraseLine(out FileWriter, mode EraseLineMode) { 9 | handle := syscall.Handle(out.Fd()) 10 | 11 | var csbi consoleScreenBufferInfo 12 | procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) 13 | 14 | var w uint32 15 | var x Short 16 | cursor := csbi.cursorPosition 17 | switch mode { 18 | case ERASE_LINE_END: 19 | x = csbi.size.X 20 | case ERASE_LINE_START: 21 | x = 0 22 | case ERASE_LINE_ALL: 23 | cursor.X = 0 24 | x = csbi.size.X 25 | } 26 | procFillConsoleOutputCharacter.Call(uintptr(handle), uintptr(' '), uintptr(x), uintptr(*(*int32)(unsafe.Pointer(&cursor))), uintptr(unsafe.Pointer(&w))) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/gopkg.in/AlecAivazis/survey.v1/terminal/error.go: -------------------------------------------------------------------------------- 1 | package terminal 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | var ( 8 | InterruptErr = errors.New("interrupt") 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/gopkg.in/AlecAivazis/survey.v1/terminal/output.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package terminal 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | // NewAnsiStdout returns special stdout, which converts escape sequences to Windows API calls 10 | // on Windows environment. 11 | func NewAnsiStdout(out FileWriter) io.Writer { 12 | return out 13 | } 14 | 15 | // NewAnsiStderr returns special stderr, which converts escape sequences to Windows API calls 16 | // on Windows environment. 17 | func NewAnsiStderr(out FileWriter) io.Writer { 18 | return out 19 | } 20 | -------------------------------------------------------------------------------- /vendor/gopkg.in/AlecAivazis/survey.v1/terminal/runereader_bsd.go: -------------------------------------------------------------------------------- 1 | // copied from: https://github.com/golang/crypto/blob/master/ssh/terminal/util_bsd.go 2 | // Copyright 2013 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build darwin dragonfly freebsd netbsd openbsd 7 | 8 | package terminal 9 | 10 | import "syscall" 11 | 12 | const ioctlReadTermios = syscall.TIOCGETA 13 | const ioctlWriteTermios = syscall.TIOCSETA 14 | -------------------------------------------------------------------------------- /vendor/gopkg.in/AlecAivazis/survey.v1/terminal/runereader_linux.go: -------------------------------------------------------------------------------- 1 | // copied from https://github.com/golang/crypto/blob/master/ssh/terminal/util_linux.go 2 | // Copyright 2013 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | package terminal 7 | 8 | // These constants are declared here, rather than importing 9 | // them from the syscall package as some syscall packages, even 10 | // on linux, for example gccgo, do not declare them. 11 | const ioctlReadTermios = 0x5401 // syscall.TCGETS 12 | const ioctlWriteTermios = 0x5402 // syscall.TCSETS 13 | -------------------------------------------------------------------------------- /vendor/gopkg.in/AlecAivazis/survey.v1/terminal/sequences.go: -------------------------------------------------------------------------------- 1 | package terminal 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | ) 7 | 8 | const ( 9 | KeyArrowLeft = '\x02' 10 | KeyArrowRight = '\x06' 11 | KeyArrowUp = '\x10' 12 | KeyArrowDown = '\x0e' 13 | KeySpace = ' ' 14 | KeyEnter = '\r' 15 | KeyBackspace = '\b' 16 | KeyDelete = '\x7f' 17 | KeyInterrupt = '\x03' 18 | KeyEndTransmission = '\x04' 19 | KeyEscape = '\x1b' 20 | KeyDeleteWord = '\x17' // Ctrl+W 21 | KeyDeleteLine = '\x18' // Ctrl+X 22 | SpecialKeyHome = '\x01' 23 | SpecialKeyEnd = '\x11' 24 | SpecialKeyDelete = '\x12' 25 | IgnoreKey = '\000' 26 | ) 27 | 28 | func soundBell(out io.Writer) { 29 | fmt.Fprint(out, "\a") 30 | } 31 | -------------------------------------------------------------------------------- /vendor/gopkg.in/AlecAivazis/survey.v1/terminal/stdio.go: -------------------------------------------------------------------------------- 1 | package terminal 2 | 3 | import ( 4 | "io" 5 | ) 6 | 7 | // Stdio is the standard input/output the terminal reads/writes with. 8 | type Stdio struct { 9 | In FileReader 10 | Out FileWriter 11 | Err io.Writer 12 | } 13 | 14 | // FileWriter provides a minimal interface for Stdin. 15 | type FileWriter interface { 16 | io.Writer 17 | Fd() uintptr 18 | } 19 | 20 | // FileReader provides a minimal interface for Stdout. 21 | type FileReader interface { 22 | io.Reader 23 | Fd() uintptr 24 | } 25 | -------------------------------------------------------------------------------- /vendor/gopkg.in/AlecAivazis/survey.v1/terminal/syscall_windows.go: -------------------------------------------------------------------------------- 1 | package terminal 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | var ( 8 | kernel32 = syscall.NewLazyDLL("kernel32.dll") 9 | procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo") 10 | procSetConsoleTextAttribute = kernel32.NewProc("SetConsoleTextAttribute") 11 | procSetConsoleCursorPosition = kernel32.NewProc("SetConsoleCursorPosition") 12 | procFillConsoleOutputCharacter = kernel32.NewProc("FillConsoleOutputCharacterW") 13 | procGetConsoleCursorInfo = kernel32.NewProc("GetConsoleCursorInfo") 14 | procSetConsoleCursorInfo = kernel32.NewProc("SetConsoleCursorInfo") 15 | ) 16 | 17 | type wchar uint16 18 | type dword uint32 19 | type word uint16 20 | 21 | type smallRect struct { 22 | left Short 23 | top Short 24 | right Short 25 | bottom Short 26 | } 27 | 28 | type consoleScreenBufferInfo struct { 29 | size Coord 30 | cursorPosition Coord 31 | attributes word 32 | window smallRect 33 | maximumWindowSize Coord 34 | } 35 | 36 | type consoleCursorInfo struct { 37 | size dword 38 | visible int32 39 | } 40 | -------------------------------------------------------------------------------- /vendor/gopkg.in/AlecAivazis/survey.v1/terminal/terminal.go: -------------------------------------------------------------------------------- 1 | package terminal 2 | 3 | type Short int16 4 | 5 | type Coord struct { 6 | X Short 7 | Y Short 8 | } 9 | -------------------------------------------------------------------------------- /vendor/gopkg.in/kyokomi/emoji.v1/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | emoji.iml 3 | -------------------------------------------------------------------------------- /vendor/gopkg.in/kyokomi/emoji.v1/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 kyokomi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/gopkg.in/kyokomi/emoji.v1/README.md: -------------------------------------------------------------------------------- 1 | # Emoji 2 | Emoji is a simple golang package. 3 | 4 | [![wercker status](https://app.wercker.com/status/7bef60de2c6d3e0e6c13d56b2393c5d8/s/master "wercker status")](https://app.wercker.com/project/byKey/7bef60de2c6d3e0e6c13d56b2393c5d8) 5 | [![Coverage Status](https://coveralls.io/repos/kyokomi/emoji/badge.png?branch=master)](https://coveralls.io/r/kyokomi/emoji?branch=master) 6 | [![GoDoc](https://godoc.org/github.com/kyokomi/emoji?status.svg)](https://godoc.org/github.com/kyokomi/emoji) 7 | 8 | Get it: 9 | 10 | ``` 11 | go get gopkg.in/kyokomi/emoji.v1 12 | ``` 13 | 14 | Import it: 15 | 16 | ``` 17 | import ( 18 | "gopkg.in/kyokomi/emoji.v1" 19 | ) 20 | ``` 21 | 22 | ## Usage 23 | 24 | ```go 25 | package main 26 | 27 | import ( 28 | "fmt" 29 | 30 | "github.com/kyokomi/emoji" 31 | ) 32 | 33 | func main() { 34 | fmt.Println("Hello World Emoji!") 35 | 36 | emoji.Println(":beer: Beer!!!") 37 | 38 | pizzaMessage := emoji.Sprint("I like a :pizza: and :sushi:!!") 39 | fmt.Println(pizzaMessage) 40 | } 41 | ``` 42 | 43 | ## Demo 44 | 45 | ![demo](screen/image.png) 46 | 47 | ## Reference 48 | 49 | - [GitHub EMOJI CHEAT SHEET](http://www.emoji-cheat-sheet.com/) 50 | 51 | ## License 52 | 53 | [MIT](https://github.com/kyokomi/emoji/blob/master/LICENSE) 54 | -------------------------------------------------------------------------------- /vendor/gopkg.in/kyokomi/emoji.v1/wercker.yml: -------------------------------------------------------------------------------- 1 | box: golang 2 | build: 3 | steps: 4 | - setup-go-workspace 5 | - script: 6 | name: install goveralls 7 | code: | 8 | go get github.com/mattn/goveralls 9 | - script: 10 | name: go get 11 | code: | 12 | go get 13 | - script: 14 | name: go build 15 | code: | 16 | go build ./... 17 | - script: 18 | name: go test 19 | code: | 20 | go test ./... 21 | - script: 22 | name: coveralls 23 | code: | 24 | goveralls -v -service wercker.com -repotoken $COVERALLS_TOKEN 25 | 26 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.4 5 | - 1.5 6 | - 1.6 7 | - 1.7 8 | - 1.8 9 | - 1.9 10 | - tip 11 | 12 | go_import_path: gopkg.in/yaml.v2 13 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/go.mod: -------------------------------------------------------------------------------- 1 | module "gopkg.in/yaml.v2" 2 | 3 | require ( 4 | "gopkg.in/check.v1" v0.0.0-20161208181325-20d25e280405 5 | ) 6 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/writerc.go: -------------------------------------------------------------------------------- 1 | package yaml 2 | 3 | // Set the writer error and return false. 4 | func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { 5 | emitter.error = yaml_WRITER_ERROR 6 | emitter.problem = problem 7 | return false 8 | } 9 | 10 | // Flush the output buffer. 11 | func yaml_emitter_flush(emitter *yaml_emitter_t) bool { 12 | if emitter.write_handler == nil { 13 | panic("write handler not set") 14 | } 15 | 16 | // Check if the buffer is empty. 17 | if emitter.buffer_pos == 0 { 18 | return true 19 | } 20 | 21 | if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { 22 | return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) 23 | } 24 | emitter.buffer_pos = 0 25 | return true 26 | } 27 | --------------------------------------------------------------------------------