├── .github
└── workflows
│ └── release.yml
├── .goreleaser.yml
├── .idea
├── modules.xml
├── vcs.xml
├── whats-cli.iml
└── workspace.xml
├── README.md
├── cli
├── selector_cli.go
└── user_input.go
├── cmd
├── root.go
├── whats_connection
│ └── whats_connection.go
└── whats_messages
│ └── whats_messages.go
├── deploy.sh
├── go.mod
├── go.sum
├── main.go
├── package.json
├── utils
├── go_commands
│ └── go_mod.go
├── json_utils
│ └── json_utils.go
├── shell_commands
│ └── shell_commands.go
└── whats_utils
│ └── whats_utils.go
└── vendor
├── github.com
├── Baozisoftware
│ └── qrcode-terminal-go
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── qrcodeTerminal.go
├── Rhymen
│ └── go-whatsapp
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── binary
│ │ ├── decoder.go
│ │ ├── encoder.go
│ │ ├── node.go
│ │ ├── proto
│ │ │ ├── def.pb.go
│ │ │ └── def.proto
│ │ └── token
│ │ │ └── token.go
│ │ ├── chat_history.go
│ │ ├── conn.go
│ │ ├── contact.go
│ │ ├── crypto
│ │ ├── cbc
│ │ │ └── cbc.go
│ │ ├── curve25519
│ │ │ └── curve.go
│ │ └── hkdf
│ │ │ └── hkdf.go
│ │ ├── errors.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── group.go
│ │ ├── handler.go
│ │ ├── media.go
│ │ ├── message.go
│ │ ├── profile.go
│ │ ├── read.go
│ │ ├── session.go
│ │ ├── store.go
│ │ └── write.go
├── alexellis
│ └── go-execute
│ │ ├── LICENSE
│ │ └── pkg
│ │ └── v1
│ │ └── exec.go
├── chzyer
│ └── readline
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── ansi_windows.go
│ │ ├── complete.go
│ │ ├── complete_helper.go
│ │ ├── complete_segment.go
│ │ ├── history.go
│ │ ├── operation.go
│ │ ├── password.go
│ │ ├── rawreader_windows.go
│ │ ├── readline.go
│ │ ├── remote.go
│ │ ├── runebuf.go
│ │ ├── runes.go
│ │ ├── search.go
│ │ ├── std.go
│ │ ├── std_windows.go
│ │ ├── term.go
│ │ ├── term_bsd.go
│ │ ├── term_linux.go
│ │ ├── term_solaris.go
│ │ ├── term_unix.go
│ │ ├── term_windows.go
│ │ ├── terminal.go
│ │ ├── utils.go
│ │ ├── utils_unix.go
│ │ ├── utils_windows.go
│ │ ├── vim.go
│ │ └── windows_api.go
├── fsnotify
│ └── fsnotify
│ │ ├── .editorconfig
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── AUTHORS
│ │ ├── CHANGELOG.md
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── fen.go
│ │ ├── fsnotify.go
│ │ ├── inotify.go
│ │ ├── inotify_poller.go
│ │ ├── kqueue.go
│ │ ├── open_mode_bsd.go
│ │ ├── open_mode_darwin.go
│ │ └── windows.go
├── golang
│ └── protobuf
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ └── proto
│ │ ├── clone.go
│ │ ├── decode.go
│ │ ├── deprecated.go
│ │ ├── discard.go
│ │ ├── encode.go
│ │ ├── equal.go
│ │ ├── extensions.go
│ │ ├── lib.go
│ │ ├── message_set.go
│ │ ├── pointer_reflect.go
│ │ ├── pointer_unsafe.go
│ │ ├── properties.go
│ │ ├── table_marshal.go
│ │ ├── table_merge.go
│ │ ├── table_unmarshal.go
│ │ ├── text.go
│ │ └── text_parser.go
├── gorilla
│ └── websocket
│ │ ├── .gitignore
│ │ ├── AUTHORS
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── client.go
│ │ ├── client_clone.go
│ │ ├── client_clone_legacy.go
│ │ ├── compression.go
│ │ ├── conn.go
│ │ ├── conn_write.go
│ │ ├── conn_write_legacy.go
│ │ ├── doc.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── join.go
│ │ ├── json.go
│ │ ├── mask.go
│ │ ├── mask_safe.go
│ │ ├── prepared.go
│ │ ├── proxy.go
│ │ ├── server.go
│ │ ├── trace.go
│ │ ├── trace_17.go
│ │ ├── util.go
│ │ └── x_net_proxy.go
├── hashicorp
│ └── hcl
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── appveyor.yml
│ │ ├── decoder.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── hcl.go
│ │ ├── hcl
│ │ ├── ast
│ │ │ ├── ast.go
│ │ │ └── walk.go
│ │ ├── parser
│ │ │ ├── error.go
│ │ │ └── parser.go
│ │ ├── printer
│ │ │ ├── nodes.go
│ │ │ └── printer.go
│ │ ├── scanner
│ │ │ └── scanner.go
│ │ ├── strconv
│ │ │ └── quote.go
│ │ └── token
│ │ │ ├── position.go
│ │ │ └── token.go
│ │ ├── json
│ │ ├── parser
│ │ │ ├── flatten.go
│ │ │ └── parser.go
│ │ ├── scanner
│ │ │ └── scanner.go
│ │ └── token
│ │ │ ├── position.go
│ │ │ └── token.go
│ │ ├── lex.go
│ │ └── parse.go
├── inconshreveable
│ └── mousetrap
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── trap_others.go
│ │ ├── trap_windows.go
│ │ └── trap_windows_1.4.go
├── juju
│ └── ansiterm
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── attribute.go
│ │ ├── color.go
│ │ ├── context.go
│ │ ├── doc.go
│ │ ├── style.go
│ │ ├── tabwriter.go
│ │ ├── tabwriter
│ │ ├── LICENSE
│ │ └── tabwriter.go
│ │ ├── terminal.go
│ │ └── writer.go
├── lunixbochs
│ └── vtclean
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── io.go
│ │ ├── line.go
│ │ └── vtclean.go
├── magiconair
│ └── properties
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── decode.go
│ │ ├── doc.go
│ │ ├── go.mod
│ │ ├── integrate.go
│ │ ├── lex.go
│ │ ├── load.go
│ │ ├── parser.go
│ │ ├── properties.go
│ │ └── rangecheck.go
├── manifoldco
│ └── promptui
│ │ ├── .gitignore
│ │ ├── .golangci.yml
│ │ ├── .travis.yml
│ │ ├── CHANGELOG.md
│ │ ├── CODE_OF_CONDUCT.md
│ │ ├── LICENSE.md
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── codes.go
│ │ ├── cursor.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── keycodes.go
│ │ ├── keycodes_other.go
│ │ ├── keycodes_windows.go
│ │ ├── list
│ │ └── list.go
│ │ ├── prompt.go
│ │ ├── promptui.go
│ │ ├── screenbuf
│ │ └── screenbuf.go
│ │ ├── select.go
│ │ ├── styles.go
│ │ └── styles_windows.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_bsd.go
│ │ ├── isatty_linux.go
│ │ ├── isatty_others.go
│ │ ├── isatty_solaris.go
│ │ └── isatty_windows.go
├── mitchellh
│ ├── go-homedir
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── go.mod
│ │ └── homedir.go
│ └── mapstructure
│ │ ├── .travis.yml
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── decode_hooks.go
│ │ ├── error.go
│ │ ├── go.mod
│ │ └── mapstructure.go
├── pelletier
│ └── go-toml
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── benchmark.json
│ │ ├── benchmark.sh
│ │ ├── benchmark.toml
│ │ ├── benchmark.yml
│ │ ├── doc.go
│ │ ├── example-crlf.toml
│ │ ├── example.toml
│ │ ├── fuzz.go
│ │ ├── fuzz.sh
│ │ ├── keysparsing.go
│ │ ├── lexer.go
│ │ ├── marshal.go
│ │ ├── marshal_test.toml
│ │ ├── parser.go
│ │ ├── position.go
│ │ ├── test.sh
│ │ ├── token.go
│ │ ├── toml.go
│ │ ├── tomltree_create.go
│ │ └── tomltree_write.go
├── pkg
│ └── errors
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── appveyor.yml
│ │ ├── errors.go
│ │ └── stack.go
├── skip2
│ └── go-qrcode
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── bitset
│ │ └── bitset.go
│ │ ├── encoder.go
│ │ ├── qrcode.go
│ │ ├── reedsolomon
│ │ ├── gf2_8.go
│ │ ├── gf_poly.go
│ │ └── reed_solomon.go
│ │ ├── regular_symbol.go
│ │ ├── symbol.go
│ │ └── version.go
├── spf13
│ ├── afero
│ │ ├── .travis.yml
│ │ ├── LICENSE.txt
│ │ ├── README.md
│ │ ├── afero.go
│ │ ├── appveyor.yml
│ │ ├── basepath.go
│ │ ├── cacheOnReadFs.go
│ │ ├── const_bsds.go
│ │ ├── const_win_unix.go
│ │ ├── copyOnWriteFs.go
│ │ ├── go.mod
│ │ ├── httpFs.go
│ │ ├── ioutil.go
│ │ ├── lstater.go
│ │ ├── match.go
│ │ ├── mem
│ │ │ ├── dir.go
│ │ │ ├── dirmap.go
│ │ │ └── file.go
│ │ ├── memmap.go
│ │ ├── os.go
│ │ ├── path.go
│ │ ├── readonlyfs.go
│ │ ├── regexpfs.go
│ │ ├── unionFile.go
│ │ └── util.go
│ ├── cast
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── cast.go
│ │ ├── caste.go
│ │ ├── go.mod
│ │ └── go.sum
│ ├── cobra
│ │ ├── .gitignore
│ │ ├── .golangci.yml
│ │ ├── .mailmap
│ │ ├── .travis.yml
│ │ ├── CHANGELOG.md
│ │ ├── CONDUCT.md
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE.txt
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── args.go
│ │ ├── bash_completions.go
│ │ ├── bash_completions.md
│ │ ├── cobra.go
│ │ ├── command.go
│ │ ├── command_notwin.go
│ │ ├── command_win.go
│ │ ├── custom_completions.go
│ │ ├── fish_completions.go
│ │ ├── fish_completions.md
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── powershell_completions.go
│ │ ├── powershell_completions.md
│ │ ├── projects_using_cobra.md
│ │ ├── shell_completions.go
│ │ ├── shell_completions.md
│ │ ├── zsh_completions.go
│ │ └── zsh_completions.md
│ ├── jwalterweatherman
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── default_notepad.go
│ │ ├── go.mod
│ │ ├── log_counter.go
│ │ └── notepad.go
│ ├── pflag
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── bool.go
│ │ ├── bool_slice.go
│ │ ├── bytes.go
│ │ ├── count.go
│ │ ├── duration.go
│ │ ├── duration_slice.go
│ │ ├── flag.go
│ │ ├── float32.go
│ │ ├── float32_slice.go
│ │ ├── float64.go
│ │ ├── float64_slice.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── golangflag.go
│ │ ├── int.go
│ │ ├── int16.go
│ │ ├── int32.go
│ │ ├── int32_slice.go
│ │ ├── int64.go
│ │ ├── int64_slice.go
│ │ ├── int8.go
│ │ ├── int_slice.go
│ │ ├── ip.go
│ │ ├── ip_slice.go
│ │ ├── ipmask.go
│ │ ├── ipnet.go
│ │ ├── string.go
│ │ ├── string_array.go
│ │ ├── string_slice.go
│ │ ├── string_to_int.go
│ │ ├── string_to_int64.go
│ │ ├── string_to_string.go
│ │ ├── uint.go
│ │ ├── uint16.go
│ │ ├── uint32.go
│ │ ├── uint64.go
│ │ ├── uint8.go
│ │ └── uint_slice.go
│ └── viper
│ │ ├── .editorconfig
│ │ ├── .gitignore
│ │ ├── .golangci.yml
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── flags.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── util.go
│ │ └── viper.go
└── subosito
│ └── gotenv
│ ├── .env
│ ├── .env.invalid
│ ├── .gitignore
│ ├── .travis.yml
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── appveyor.yml
│ └── gotenv.go
├── golang.org
└── x
│ ├── crypto
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── curve25519
│ │ ├── const_amd64.h
│ │ ├── const_amd64.s
│ │ ├── cswap_amd64.s
│ │ ├── curve25519.go
│ │ ├── doc.go
│ │ ├── freeze_amd64.s
│ │ ├── ladderstep_amd64.s
│ │ ├── mont25519_amd64.go
│ │ ├── mul_amd64.s
│ │ └── square_amd64.s
│ └── hkdf
│ │ └── hkdf.go
│ ├── 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
│ │ ├── 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_linux.go
│ │ ├── sockcmsg_unix.go
│ │ ├── str.go
│ │ ├── syscall.go
│ │ ├── syscall_aix.go
│ │ ├── syscall_aix_ppc.go
│ │ ├── syscall_aix_ppc64.go
│ │ ├── syscall_bsd.go
│ │ ├── syscall_darwin.go
│ │ ├── syscall_darwin_386.go
│ │ ├── syscall_darwin_amd64.go
│ │ ├── syscall_darwin_arm.go
│ │ ├── syscall_darwin_arm64.go
│ │ ├── syscall_darwin_libSystem.go
│ │ ├── syscall_dragonfly.go
│ │ ├── syscall_dragonfly_amd64.go
│ │ ├── syscall_freebsd.go
│ │ ├── syscall_freebsd_386.go
│ │ ├── syscall_freebsd_amd64.go
│ │ ├── syscall_freebsd_arm.go
│ │ ├── syscall_freebsd_arm64.go
│ │ ├── syscall_linux.go
│ │ ├── syscall_linux_386.go
│ │ ├── syscall_linux_amd64.go
│ │ ├── syscall_linux_amd64_gc.go
│ │ ├── syscall_linux_arm.go
│ │ ├── syscall_linux_arm64.go
│ │ ├── syscall_linux_gc.go
│ │ ├── syscall_linux_gc_386.go
│ │ ├── syscall_linux_gccgo_386.go
│ │ ├── syscall_linux_gccgo_arm.go
│ │ ├── syscall_linux_mips64x.go
│ │ ├── syscall_linux_mipsx.go
│ │ ├── syscall_linux_ppc64x.go
│ │ ├── syscall_linux_riscv64.go
│ │ ├── syscall_linux_s390x.go
│ │ ├── syscall_linux_sparc64.go
│ │ ├── syscall_netbsd.go
│ │ ├── syscall_netbsd_386.go
│ │ ├── syscall_netbsd_amd64.go
│ │ ├── syscall_netbsd_arm.go
│ │ ├── syscall_netbsd_arm64.go
│ │ ├── syscall_openbsd.go
│ │ ├── syscall_openbsd_386.go
│ │ ├── syscall_openbsd_amd64.go
│ │ ├── syscall_openbsd_arm.go
│ │ ├── syscall_openbsd_arm64.go
│ │ ├── syscall_solaris.go
│ │ ├── syscall_solaris_amd64.go
│ │ ├── syscall_unix.go
│ │ ├── syscall_unix_gc.go
│ │ ├── syscall_unix_gc_ppc64x.go
│ │ ├── timestruct.go
│ │ ├── unveil_openbsd.go
│ │ ├── xattr_bsd.go
│ │ ├── zerrors_aix_ppc.go
│ │ ├── zerrors_aix_ppc64.go
│ │ ├── zerrors_darwin_386.go
│ │ ├── zerrors_darwin_amd64.go
│ │ ├── zerrors_darwin_arm.go
│ │ ├── zerrors_darwin_arm64.go
│ │ ├── zerrors_dragonfly_amd64.go
│ │ ├── zerrors_freebsd_386.go
│ │ ├── zerrors_freebsd_amd64.go
│ │ ├── zerrors_freebsd_arm.go
│ │ ├── zerrors_freebsd_arm64.go
│ │ ├── zerrors_linux_386.go
│ │ ├── zerrors_linux_amd64.go
│ │ ├── zerrors_linux_arm.go
│ │ ├── zerrors_linux_arm64.go
│ │ ├── zerrors_linux_mips.go
│ │ ├── zerrors_linux_mips64.go
│ │ ├── zerrors_linux_mips64le.go
│ │ ├── zerrors_linux_mipsle.go
│ │ ├── zerrors_linux_ppc64.go
│ │ ├── zerrors_linux_ppc64le.go
│ │ ├── zerrors_linux_riscv64.go
│ │ ├── zerrors_linux_s390x.go
│ │ ├── zerrors_linux_sparc64.go
│ │ ├── zerrors_netbsd_386.go
│ │ ├── zerrors_netbsd_amd64.go
│ │ ├── zerrors_netbsd_arm.go
│ │ ├── zerrors_netbsd_arm64.go
│ │ ├── zerrors_openbsd_386.go
│ │ ├── zerrors_openbsd_amd64.go
│ │ ├── zerrors_openbsd_arm.go
│ │ ├── zerrors_openbsd_arm64.go
│ │ ├── zerrors_solaris_amd64.go
│ │ ├── zptrace386_linux.go
│ │ ├── zptracearm_linux.go
│ │ ├── zptracemips_linux.go
│ │ ├── zptracemipsle_linux.go
│ │ ├── zsyscall_aix_ppc.go
│ │ ├── zsyscall_aix_ppc64.go
│ │ ├── zsyscall_aix_ppc64_gc.go
│ │ ├── zsyscall_aix_ppc64_gccgo.go
│ │ ├── zsyscall_darwin_386.1_11.go
│ │ ├── zsyscall_darwin_386.go
│ │ ├── zsyscall_darwin_386.s
│ │ ├── zsyscall_darwin_amd64.1_11.go
│ │ ├── zsyscall_darwin_amd64.go
│ │ ├── zsyscall_darwin_amd64.s
│ │ ├── zsyscall_darwin_arm.1_11.go
│ │ ├── zsyscall_darwin_arm.go
│ │ ├── zsyscall_darwin_arm.s
│ │ ├── zsyscall_darwin_arm64.1_11.go
│ │ ├── zsyscall_darwin_arm64.go
│ │ ├── zsyscall_darwin_arm64.s
│ │ ├── zsyscall_dragonfly_amd64.go
│ │ ├── zsyscall_freebsd_386.go
│ │ ├── zsyscall_freebsd_amd64.go
│ │ ├── zsyscall_freebsd_arm.go
│ │ ├── zsyscall_freebsd_arm64.go
│ │ ├── zsyscall_linux_386.go
│ │ ├── zsyscall_linux_amd64.go
│ │ ├── zsyscall_linux_arm.go
│ │ ├── zsyscall_linux_arm64.go
│ │ ├── zsyscall_linux_mips.go
│ │ ├── zsyscall_linux_mips64.go
│ │ ├── zsyscall_linux_mips64le.go
│ │ ├── zsyscall_linux_mipsle.go
│ │ ├── zsyscall_linux_ppc64.go
│ │ ├── zsyscall_linux_ppc64le.go
│ │ ├── zsyscall_linux_riscv64.go
│ │ ├── zsyscall_linux_s390x.go
│ │ ├── zsyscall_linux_sparc64.go
│ │ ├── zsyscall_netbsd_386.go
│ │ ├── zsyscall_netbsd_amd64.go
│ │ ├── zsyscall_netbsd_arm.go
│ │ ├── zsyscall_netbsd_arm64.go
│ │ ├── zsyscall_openbsd_386.go
│ │ ├── zsyscall_openbsd_amd64.go
│ │ ├── zsyscall_openbsd_arm.go
│ │ ├── zsyscall_openbsd_arm64.go
│ │ ├── zsyscall_solaris_amd64.go
│ │ ├── zsysctl_openbsd_386.go
│ │ ├── zsysctl_openbsd_amd64.go
│ │ ├── zsysctl_openbsd_arm.go
│ │ ├── zsysctl_openbsd_arm64.go
│ │ ├── zsysnum_darwin_386.go
│ │ ├── zsysnum_darwin_amd64.go
│ │ ├── zsysnum_darwin_arm.go
│ │ ├── zsysnum_darwin_arm64.go
│ │ ├── zsysnum_dragonfly_amd64.go
│ │ ├── zsysnum_freebsd_386.go
│ │ ├── zsysnum_freebsd_amd64.go
│ │ ├── zsysnum_freebsd_arm.go
│ │ ├── zsysnum_freebsd_arm64.go
│ │ ├── zsysnum_linux_386.go
│ │ ├── zsysnum_linux_amd64.go
│ │ ├── zsysnum_linux_arm.go
│ │ ├── zsysnum_linux_arm64.go
│ │ ├── zsysnum_linux_mips.go
│ │ ├── zsysnum_linux_mips64.go
│ │ ├── zsysnum_linux_mips64le.go
│ │ ├── zsysnum_linux_mipsle.go
│ │ ├── zsysnum_linux_ppc64.go
│ │ ├── zsysnum_linux_ppc64le.go
│ │ ├── zsysnum_linux_riscv64.go
│ │ ├── zsysnum_linux_s390x.go
│ │ ├── zsysnum_linux_sparc64.go
│ │ ├── zsysnum_netbsd_386.go
│ │ ├── zsysnum_netbsd_amd64.go
│ │ ├── zsysnum_netbsd_arm.go
│ │ ├── zsysnum_netbsd_arm64.go
│ │ ├── zsysnum_openbsd_386.go
│ │ ├── zsysnum_openbsd_amd64.go
│ │ ├── zsysnum_openbsd_arm.go
│ │ ├── zsysnum_openbsd_arm64.go
│ │ ├── ztypes_aix_ppc.go
│ │ ├── ztypes_aix_ppc64.go
│ │ ├── ztypes_darwin_386.go
│ │ ├── ztypes_darwin_amd64.go
│ │ ├── ztypes_darwin_arm.go
│ │ ├── ztypes_darwin_arm64.go
│ │ ├── ztypes_dragonfly_amd64.go
│ │ ├── ztypes_freebsd_386.go
│ │ ├── ztypes_freebsd_amd64.go
│ │ ├── ztypes_freebsd_arm.go
│ │ ├── ztypes_freebsd_arm64.go
│ │ ├── ztypes_linux_386.go
│ │ ├── ztypes_linux_amd64.go
│ │ ├── ztypes_linux_arm.go
│ │ ├── ztypes_linux_arm64.go
│ │ ├── ztypes_linux_mips.go
│ │ ├── ztypes_linux_mips64.go
│ │ ├── ztypes_linux_mips64le.go
│ │ ├── ztypes_linux_mipsle.go
│ │ ├── ztypes_linux_ppc64.go
│ │ ├── ztypes_linux_ppc64le.go
│ │ ├── ztypes_linux_riscv64.go
│ │ ├── ztypes_linux_s390x.go
│ │ ├── ztypes_linux_sparc64.go
│ │ ├── ztypes_netbsd_386.go
│ │ ├── ztypes_netbsd_amd64.go
│ │ ├── ztypes_netbsd_arm.go
│ │ ├── ztypes_netbsd_arm64.go
│ │ ├── ztypes_openbsd_386.go
│ │ ├── ztypes_openbsd_amd64.go
│ │ ├── ztypes_openbsd_arm.go
│ │ ├── ztypes_openbsd_arm64.go
│ │ └── ztypes_solaris_amd64.go
│ └── text
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── transform
│ └── transform.go
│ └── unicode
│ └── norm
│ ├── composition.go
│ ├── forminfo.go
│ ├── input.go
│ ├── iter.go
│ ├── normalize.go
│ ├── readwriter.go
│ ├── tables10.0.0.go
│ ├── tables11.0.0.go
│ ├── tables9.0.0.go
│ ├── transform.go
│ └── trie.go
├── gopkg.in
├── ini.v1
│ ├── .gitignore
│ ├── .travis.yml
│ ├── LICENSE
│ ├── Makefile
│ ├── README.md
│ ├── data_source.go
│ ├── deprecated.go
│ ├── error.go
│ ├── file.go
│ ├── helper.go
│ ├── ini.go
│ ├── key.go
│ ├── parser.go
│ ├── section.go
│ └── struct.go
└── yaml.v2
│ ├── .travis.yml
│ ├── LICENSE
│ ├── LICENSE.libyaml
│ ├── NOTICE
│ ├── README.md
│ ├── apic.go
│ ├── decode.go
│ ├── emitterc.go
│ ├── encode.go
│ ├── go.mod
│ ├── parserc.go
│ ├── readerc.go
│ ├── resolve.go
│ ├── scannerc.go
│ ├── sorter.go
│ ├── writerc.go
│ ├── yaml.go
│ ├── yamlh.go
│ └── yamlprivateh.go
└── modules.txt
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: goreleaser
2 |
3 | on:
4 | push:
5 | tags:
6 | - '*'
7 |
8 | jobs:
9 | goreleaser:
10 | runs-on: ubuntu-latest
11 | steps:
12 | -
13 | name: Checkout
14 | uses: actions/checkout@v2
15 | with:
16 | fetch-depth: 0
17 | -
18 | name: Set up Go
19 | uses: actions/setup-go@v2
20 | with:
21 | go-version: 1.16
22 | -
23 | name: Run GoReleaser
24 | uses: goreleaser/goreleaser-action@v2
25 | with:
26 | version: latest
27 | args: release --rm-dist
28 | env:
29 | GITHUB_TOKEN: ${{ secrets.TOKEN_GO_RELEASE }}
30 |
--------------------------------------------------------------------------------
/.goreleaser.yml:
--------------------------------------------------------------------------------
1 | # This is an example .goreleaser.yml file with some sane defaults.
2 | # Make sure to check the documentation at http://goreleaser.com
3 | before:
4 | hooks:
5 | # You may remove this if you don't use go modules.
6 | - go mod tidy
7 | # you may remove this if you don't need go generate
8 | - go generate ./...
9 | project_name: whats-cli
10 | builds:
11 | - env:
12 | - CGO_ENABLED=0
13 | goos:
14 | - linux
15 | - windows
16 | - darwin
17 | checksum:
18 | name_template: 'checksums.txt'
19 | snapshot:
20 | name_template: "{{ .Tag }}-next"
21 | changelog:
22 | sort: asc
23 | filters:
24 | exclude:
25 | - '^docs:'
26 | - '^test:'
27 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/whats-cli.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # whatsapp-cli
2 |
3 | Connect and send messages as a whatsapp client directly from command line, **this is only for experimental use**.
4 |
5 | ## Installing
6 |
7 | ##### Install with NPM
8 |
9 | `npm i -g whats-cli`
10 |
11 | ##### Install with SourceCode
12 |
13 | `git clone https://github.com/jsdaniell/whats-cli.git`
14 |
15 | `cd whats-cli`
16 |
17 | `go install`
18 |
19 | `whats-cli connect-qr`
20 |
21 | ##### Install with release
22 |
23 | Download the release file of your system type on the [Releases Page](https://github.com/jsdaniell/whats-cli/releases).
24 |
25 | `cd {downloadedRelease}`
26 |
27 | `./whats-cli connect-qr`
28 |
29 | ## Testing
30 |
31 | ##### Get the QRCode on command line
32 |
33 | `whats-cli connect-qr "sessionID"`
34 |
35 | ##### Get the string of QRCode on command line
36 |
37 | `whats-cli connect "sessionID"`
38 |
39 | ##### Send message
40 |
41 | `whats-cli send "number" "message" "sessionID"`
42 |
43 | #### Dealing with bad restored sessions:
44 |
45 | Sometimes if you want to reset the stored session you can erase the `whatsappSession.gob` file, what's generated locally when logging a session.
46 |
47 | `rm whatsappSession-{sessionID}.gob`
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/cli/selector_cli.go:
--------------------------------------------------------------------------------
1 | package cli
2 |
3 | import (
4 | "github.com/manifoldco/promptui"
5 | "log"
6 | )
7 |
8 | // SelectorCli helps to get user input showing a selector with the passed options and label.
9 | func SelectorCli(label string, options ...string) (string, error) {
10 | s := promptui.Select{
11 | Label: label,
12 | Items: options,
13 | }
14 |
15 | _, result, err := s.Run()
16 | if err != nil {
17 | log.Fatal(err)
18 | }
19 |
20 | return result, nil
21 | }
22 |
--------------------------------------------------------------------------------
/cli/user_input.go:
--------------------------------------------------------------------------------
1 | package cli
2 |
3 | import (
4 | "errors"
5 | "fmt"
6 | "github.com/manifoldco/promptui"
7 | )
8 |
9 | // An example of validate function:
10 | //
11 | // validate := func(input string) error {
12 | // _, err := strconv.ParseFloat(input, 64)
13 | // if err != nil {
14 | // return errors.New("Invalid number")
15 | // }
16 | // return nil
17 | // }
18 |
19 | // UserInput allow to get the user input with optional validate function.
20 | func UserInput(label string, validate ...promptui.ValidateFunc) (string, error) {
21 |
22 | var validation promptui.ValidateFunc
23 |
24 | if len(validate) == 0 {
25 | validation = promptui.ValidateFunc(func(s string) error {
26 | return nil
27 | })
28 | } else if len(validate) == 1 {
29 | validation = validate[0]
30 | } else if len(validate) > 1 {
31 | return "", errors.New("it's permited only one validation function parameter.")
32 | }
33 |
34 | prompt := promptui.Prompt{
35 | Label: label,
36 | Validate: validation,
37 | }
38 |
39 | result, err := prompt.Run()
40 |
41 | if err != nil {
42 | fmt.Printf("Prompt failed %v\n", err)
43 | return "", err
44 | }
45 |
46 | return result, nil
47 | }
48 |
--------------------------------------------------------------------------------
/deploy.sh:
--------------------------------------------------------------------------------
1 | echo "Deploy new version to releases and NPM"
2 | echo "Type the version: "
3 |
4 | read -r version
5 |
6 | go mod vendor
7 |
8 | git add -A
9 |
10 | echo "Commit message: "
11 | read -r commitDescription
12 | git commit -am "${commitDescription}"
13 | git push
14 |
15 | git tag -a "v${version}" -am "Beta Release" && git push origin "v${version}"
16 | npm publish
17 |
18 |
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/jsdaniell/whats-cli
2 |
3 | go 1.15
4 |
5 | require (
6 | github.com/Baozisoftware/qrcode-terminal-go v0.0.0-20170407111555-c0650d8dff0f
7 | github.com/Rhymen/go-whatsapp v0.1.1
8 | github.com/alexellis/go-execute v0.0.0-20201205082949-69a2cde04f4f
9 | github.com/davecgh/go-spew v1.1.1 // indirect
10 | github.com/manifoldco/promptui v0.8.0
11 | github.com/mitchellh/go-homedir v1.1.0
12 | github.com/spf13/cobra v1.1.3
13 | github.com/spf13/viper v1.7.0
14 | )
15 |
--------------------------------------------------------------------------------
/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "github.com/jsdaniell/whats-cli/cmd"
5 | )
6 |
7 | func main() {
8 | cmd.Execute()
9 | }
10 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "whats-cli",
3 | "version": "1.2.1",
4 | "description": "Description of your project",
5 | "main": "index.js",
6 | "scripts": {
7 | "postinstall": "go-npm install",
8 | "preuninstall": "go-npm uninstall"
9 | },
10 | "goBinary": {
11 | "name": "whats-cli",
12 | "path": "./bin",
13 | "url": "https://github.com/jsdaniell/whats-cli/releases/download/v{{version}}/whats-cli_{{version}}_{{platform}}_{{arch}}.tar.gz"
14 | },
15 | "author": "jsdaniell",
16 | "license": "ISC",
17 | "bugs": {
18 | "url": "https://github.com/jsdaniell/whats-cli/issues"
19 | },
20 | "homepage": "https://github.com/jsdaniell/whats-cli#readme",
21 | "dependencies": {
22 | "go-npm": "^0.1.9",
23 | "whats-cli": "latest"
24 | }
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/utils/json_utils/json_utils.go:
--------------------------------------------------------------------------------
1 | package json_utils
2 |
3 | import (
4 | "encoding/json"
5 | "io/ioutil"
6 | "os"
7 | )
8 |
9 | type PackageJson struct {
10 | Version string `json:"version"`
11 | }
12 |
13 | func GettingJSONVersion() (string) {
14 | file, err := os.Open("package.json")
15 | if err != nil {
16 | return err.Error()
17 | }
18 |
19 | defer file.Close()
20 |
21 | var version PackageJson
22 |
23 | byteValue, _ := ioutil.ReadAll(file)
24 |
25 | err = json.Unmarshal(byteValue, &version)
26 | if err != nil {
27 | return err.Error()
28 | }
29 |
30 | return version.Version
31 | }
32 |
--------------------------------------------------------------------------------
/utils/shell_commands/shell_commands.go:
--------------------------------------------------------------------------------
1 | package shell_commands
2 |
3 | import (
4 | "fmt"
5 | execute "github.com/alexellis/go-execute/pkg/v1"
6 | )
7 |
8 | func ExecuteSh(file, projectName string) {
9 | cmd := execute.ExecTask{
10 | Command: "sh",
11 | Args: []string{file},
12 | StreamStdio: false,
13 | Cwd: projectName,
14 | }
15 |
16 | res, err := cmd.Execute()
17 | if err != nil {
18 | panic(err)
19 | }
20 |
21 | fmt.Printf("output: %s", res.Stderr)
22 | }
23 |
24 | func ExecuteShellCommand(command string, projectName string, args ...string) {
25 | cmd := execute.ExecTask{
26 | Command: command,
27 | Args: args,
28 | StreamStdio: false,
29 | Cwd: projectName,
30 | }
31 |
32 | res, err := cmd.Execute()
33 | if err != nil {
34 | panic(err)
35 | }
36 |
37 | fmt.Printf("output: %s", res.Stderr)
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/github.com/Baozisoftware/qrcode-terminal-go/.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/Baozisoftware/qrcode-terminal-go/README.md:
--------------------------------------------------------------------------------
1 |
2 | # qrcode-terminal-go
3 | QRCode terminal for golang.
4 |
5 | # Example
6 | ```go
7 | package main
8 |
9 | import "github.com/Baozisoftware/qrcode-terminal-go"
10 |
11 | func main() {
12 | Test1()
13 | Test2()
14 | }
15 |
16 | func Test1(){
17 | content := "Hello, 世界"
18 | obj := qrcodeTerminal.New()
19 | obj.Get(content).Print()
20 | }
21 |
22 | func Test2(){
23 | content := "https://github.com/Baozisoftware/qrcode-terminal-go"
24 | obj := qrcodeTerminal.New2(qrcodeTerminal.ConsoleColors.BrightBlue,qrcodeTerminal.ConsoleColors.BrightGreen,qrcodeTerminal.QRCodeRecoveryLevels.Low)
25 | obj.Get([]byte(content)).Print()
26 | }
27 | ```
28 |
29 | ## Screenshots
30 | ### Windows XP
31 | 
32 | ### Windows 7
33 | 
34 | ### Windows 10
35 | 
36 | ### Ubuntu
37 | 
38 | ### macOS
39 | 
40 |
--------------------------------------------------------------------------------
/vendor/github.com/Rhymen/go-whatsapp/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | docs/
3 | build/
4 |
--------------------------------------------------------------------------------
/vendor/github.com/Rhymen/go-whatsapp/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018
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/Rhymen/go-whatsapp/crypto/curve25519/curve.go:
--------------------------------------------------------------------------------
1 | /*
2 | In cryptography, Curve25519 is an elliptic curve offering 128 bits of security and designed for use with the elliptic
3 | curve Diffie–Hellman (ECDH) key agreement scheme. It is one of the fastest ECC curves and is not covered by any known
4 | patents. The reference implementation is public domain software. The original Curve25519 paper defined it
5 | as a Diffie–Hellman (DH) function.
6 | */
7 | package curve25519
8 |
9 | import (
10 | "crypto/rand"
11 | "golang.org/x/crypto/curve25519"
12 | "io"
13 | )
14 |
15 | /*
16 | GenerateKey generates a public private key pair using Curve25519.
17 | */
18 | func GenerateKey() (privateKey *[32]byte, publicKey *[32]byte, err error) {
19 | var pub, priv [32]byte
20 |
21 | _, err = io.ReadFull(rand.Reader, priv[:])
22 | if err != nil {
23 | return nil, nil, err
24 | }
25 |
26 | priv[0] &= 248
27 | priv[31] &= 127
28 | priv[31] |= 64
29 |
30 | curve25519.ScalarBaseMult(&pub, &priv)
31 |
32 | return &priv, &pub, nil
33 | }
34 |
35 | /*
36 | GenerateSharedSecret generates the shared secret with a given public private key pair.
37 | */
38 | func GenerateSharedSecret(priv, pub [32]byte) []byte {
39 | var secret [32]byte
40 |
41 | curve25519.ScalarMult(&secret, &priv, &pub)
42 |
43 | return secret[:]
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/github.com/Rhymen/go-whatsapp/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/Rhymen/go-whatsapp
2 |
3 | require (
4 | github.com/Rhymen/go-whatsapp/examples/echo v0.0.0-20190325075644-cc2581bbf24d // indirect
5 | github.com/Rhymen/go-whatsapp/examples/restoreSession v0.0.0-20190325075644-cc2581bbf24d // indirect
6 | github.com/Rhymen/go-whatsapp/examples/sendImage v0.0.0-20190325075644-cc2581bbf24d // indirect
7 | github.com/Rhymen/go-whatsapp/examples/sendTextMessages v0.0.0-20190325075644-cc2581bbf24d // indirect
8 | github.com/golang/protobuf v1.3.0
9 | github.com/gorilla/websocket v1.4.1
10 | github.com/pkg/errors v0.8.1
11 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
12 | )
13 |
14 | go 1.13
15 |
--------------------------------------------------------------------------------
/vendor/github.com/Rhymen/go-whatsapp/profile.go:
--------------------------------------------------------------------------------
1 | package whatsapp
2 |
3 | import (
4 | "fmt"
5 | "github.com/Rhymen/go-whatsapp/binary"
6 | "strconv"
7 | "time"
8 | )
9 |
10 | // Pictures must be JPG 640x640 and 96x96, respectively
11 | func (wac *Conn) UploadProfilePic(image, preview []byte) (<-chan string, error) {
12 | tag := fmt.Sprintf("%d.--%d", time.Now().Unix(), wac.msgCount*19)
13 | n := binary.Node{
14 | Description: "action",
15 | Attributes: map[string]string{
16 | "type": "set",
17 | "epoch": strconv.Itoa(wac.msgCount),
18 | },
19 | Content: []interface{}{
20 | binary.Node{
21 | Description: "picture",
22 | Attributes: map[string]string{
23 | "id": tag,
24 | "jid": wac.Info.Wid,
25 | "type": "set",
26 | },
27 | Content: []binary.Node{
28 | {
29 | Description: "image",
30 | Attributes: nil,
31 | Content: image,
32 | },
33 | {
34 | Description: "preview",
35 | Attributes: nil,
36 | Content: preview,
37 | },
38 | },
39 | },
40 | },
41 | }
42 | return wac.writeBinary(n, profile, 136, tag)
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/github.com/alexellis/go-execute/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Inlets
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/chzyer/readline/.gitignore:
--------------------------------------------------------------------------------
1 | .vscode/*
2 |
--------------------------------------------------------------------------------
/vendor/github.com/chzyer/readline/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.x
4 | script:
5 | - GOOS=windows go install github.com/chzyer/readline/example/...
6 | - GOOS=linux go install github.com/chzyer/readline/example/...
7 | - GOOS=darwin go install github.com/chzyer/readline/example/...
8 | - go test -race -v
9 |
--------------------------------------------------------------------------------
/vendor/github.com/chzyer/readline/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Chzyer
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/chzyer/readline/password.go:
--------------------------------------------------------------------------------
1 | package readline
2 |
3 | type opPassword struct {
4 | o *Operation
5 | backupCfg *Config
6 | }
7 |
8 | func newOpPassword(o *Operation) *opPassword {
9 | return &opPassword{o: o}
10 | }
11 |
12 | func (o *opPassword) ExitPasswordMode() {
13 | o.o.SetConfig(o.backupCfg)
14 | o.backupCfg = nil
15 | }
16 |
17 | func (o *opPassword) EnterPasswordMode(cfg *Config) (err error) {
18 | o.backupCfg, err = o.o.SetConfig(cfg)
19 | return
20 | }
21 |
22 | func (o *opPassword) PasswordConfig() *Config {
23 | return &Config{
24 | EnableMask: true,
25 | InterruptPrompt: "\n",
26 | EOFPrompt: "\n",
27 | HistoryLimit: -1,
28 | Painter: &defaultPainter{},
29 |
30 | Stdout: o.o.cfg.Stdout,
31 | Stderr: o.o.cfg.Stderr,
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/github.com/chzyer/readline/std_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package readline
4 |
5 | func init() {
6 | Stdin = NewRawReader()
7 | Stdout = NewANSIWriter(Stdout)
8 | Stderr = NewANSIWriter(Stderr)
9 | }
10 |
--------------------------------------------------------------------------------
/vendor/github.com/chzyer/readline/term_bsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd netbsd openbsd
6 |
7 | package readline
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func getTermios(fd int) (*Termios, error) {
15 | termios := new(Termios)
16 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), syscall.TIOCGETA, uintptr(unsafe.Pointer(termios)), 0, 0, 0)
17 | if err != 0 {
18 | return nil, err
19 | }
20 | return termios, nil
21 | }
22 |
23 | func setTermios(fd int, termios *Termios) error {
24 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), syscall.TIOCSETA, uintptr(unsafe.Pointer(termios)), 0, 0, 0)
25 | if err != 0 {
26 | return err
27 | }
28 | return nil
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/github.com/chzyer/readline/term_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package readline
6 |
7 | import (
8 | "syscall"
9 | "unsafe"
10 | )
11 |
12 | // These constants are declared here, rather than importing
13 | // them from the syscall package as some syscall packages, even
14 | // on linux, for example gccgo, do not declare them.
15 | const ioctlReadTermios = 0x5401 // syscall.TCGETS
16 | const ioctlWriteTermios = 0x5402 // syscall.TCSETS
17 |
18 | func getTermios(fd int) (*Termios, error) {
19 | termios := new(Termios)
20 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(termios)), 0, 0, 0)
21 | if err != 0 {
22 | return nil, err
23 | }
24 | return termios, nil
25 | }
26 |
27 | func setTermios(fd int, termios *Termios) error {
28 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(termios)), 0, 0, 0)
29 | if err != 0 {
30 | return err
31 | }
32 | return nil
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/github.com/chzyer/readline/term_solaris.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 solaris
6 |
7 | package readline
8 |
9 | import "golang.org/x/sys/unix"
10 |
11 | // GetSize returns the dimensions of the given terminal.
12 | func GetSize(fd int) (int, int, error) {
13 | ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)
14 | if err != nil {
15 | return 0, 0, err
16 | }
17 | return int(ws.Col), int(ws.Row), nil
18 | }
19 |
20 | type Termios unix.Termios
21 |
22 | func getTermios(fd int) (*Termios, error) {
23 | termios, err := unix.IoctlGetTermios(fd, unix.TCGETS)
24 | if err != nil {
25 | return nil, err
26 | }
27 | return (*Termios)(termios), nil
28 | }
29 |
30 | func setTermios(fd int, termios *Termios) error {
31 | return unix.IoctlSetTermios(fd, unix.TCSETSF, (*unix.Termios)(termios))
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/github.com/chzyer/readline/term_unix.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 | // +build darwin dragonfly freebsd linux,!appengine netbsd openbsd
6 |
7 | package readline
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | type Termios syscall.Termios
15 |
16 | // GetSize returns the dimensions of the given terminal.
17 | func GetSize(fd int) (int, int, error) {
18 | var dimensions [4]uint16
19 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), uintptr(syscall.TIOCGWINSZ), uintptr(unsafe.Pointer(&dimensions)), 0, 0, 0)
20 | if err != 0 {
21 | return 0, 0, err
22 | }
23 | return int(dimensions[1]), int(dimensions[0]), nil
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/github.com/chzyer/readline/utils_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package readline
4 |
5 | import (
6 | "io"
7 | "syscall"
8 | )
9 |
10 | func SuspendMe() {
11 | }
12 |
13 | func GetStdin() int {
14 | return int(syscall.Stdin)
15 | }
16 |
17 | func init() {
18 | isWindows = true
19 | }
20 |
21 | // get width of the terminal
22 | func GetScreenWidth() int {
23 | info, _ := GetConsoleScreenBufferInfo()
24 | if info == nil {
25 | return -1
26 | }
27 | return int(info.dwSize.x)
28 | }
29 |
30 | // ClearScreen clears the console screen
31 | func ClearScreen(_ io.Writer) error {
32 | return SetConsoleCursorPosition(&_COORD{0, 0})
33 | }
34 |
35 | func DefaultIsTerminal() bool {
36 | return true
37 | }
38 |
39 | func DefaultOnWidthChanged(func()) {
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/github.com/fsnotify/fsnotify/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = tab
5 | indent_size = 4
6 |
--------------------------------------------------------------------------------
/vendor/github.com/fsnotify/fsnotify/.gitignore:
--------------------------------------------------------------------------------
1 | # Setup a Global .gitignore for OS and editor generated files:
2 | # https://help.github.com/articles/ignoring-files
3 | # git config --global core.excludesfile ~/.gitignore_global
4 |
5 | .vagrant
6 | *.sublime-project
7 |
--------------------------------------------------------------------------------
/vendor/github.com/fsnotify/fsnotify/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: go
3 |
4 | go:
5 | - 1.8.x
6 | - 1.9.x
7 | - tip
8 |
9 | matrix:
10 | allow_failures:
11 | - go: tip
12 | fast_finish: true
13 |
14 | before_script:
15 | - go get -u github.com/golang/lint/golint
16 |
17 | script:
18 | - go test -v --race ./...
19 |
20 | after_script:
21 | - test -z "$(gofmt -s -l -w . | tee /dev/stderr)"
22 | - test -z "$(golint ./... | tee /dev/stderr)"
23 | - go vet ./...
24 |
25 | os:
26 | - linux
27 | - osx
28 |
29 | notifications:
30 | email: false
31 |
--------------------------------------------------------------------------------
/vendor/github.com/fsnotify/fsnotify/fen.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build solaris
6 |
7 | package fsnotify
8 |
9 | import (
10 | "errors"
11 | )
12 |
13 | // Watcher watches a set of files, delivering events to a channel.
14 | type Watcher struct {
15 | Events chan Event
16 | Errors chan error
17 | }
18 |
19 | // NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
20 | func NewWatcher() (*Watcher, error) {
21 | return nil, errors.New("FEN based watcher not yet supported for fsnotify\n")
22 | }
23 |
24 | // Close removes all watches and closes the events channel.
25 | func (w *Watcher) Close() error {
26 | return nil
27 | }
28 |
29 | // Add starts watching the named file or directory (non-recursively).
30 | func (w *Watcher) Add(name string) error {
31 | return nil
32 | }
33 |
34 | // Remove stops watching the the named file or directory (non-recursively).
35 | func (w *Watcher) Remove(name string) error {
36 | return nil
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build freebsd openbsd netbsd dragonfly
6 |
7 | package fsnotify
8 |
9 | import "golang.org/x/sys/unix"
10 |
11 | const openMode = unix.O_NONBLOCK | unix.O_RDONLY
12 |
--------------------------------------------------------------------------------
/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin
6 |
7 | package fsnotify
8 |
9 | import "golang.org/x/sys/unix"
10 |
11 | // note: this constant is not defined on BSD
12 | const openMode = unix.O_EVTONLY
13 |
--------------------------------------------------------------------------------
/vendor/github.com/golang/protobuf/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/github.com/golang/protobuf/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/github.com/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
26 |
--------------------------------------------------------------------------------
/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 | Google LLC (https://opensource.google.com/)
8 | Joachim Bauch
9 |
10 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/websocket/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013 The Gorilla WebSocket Authors. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are met:
5 |
6 | Redistributions of source code must retain the above copyright notice, this
7 | list of conditions and the following disclaimer.
8 |
9 | Redistributions in binary form must reproduce the above copyright notice,
10 | this list of conditions and the following disclaimer in the documentation
11 | and/or other materials provided with the distribution.
12 |
13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
14 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
17 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
20 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
21 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 |
--------------------------------------------------------------------------------
/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_write.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.8
6 |
7 | package websocket
8 |
9 | import "net"
10 |
11 | func (c *Conn) writeBufs(bufs ...[]byte) error {
12 | b := net.Buffers(bufs)
13 | _, err := b.WriteTo(c.conn)
14 | return err
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/websocket/conn_write_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.8
6 |
7 | package websocket
8 |
9 | func (c *Conn) writeBufs(bufs ...[]byte) error {
10 | for _, buf := range bufs {
11 | if len(buf) > 0 {
12 | if _, err := c.conn.Write(buf); err != nil {
13 | return err
14 | }
15 | }
16 | }
17 | return nil
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/websocket/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/gorilla/websocket
2 |
3 | go 1.12
4 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/websocket/go.sum:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsdaniell/whats-cli/b6017ad955b370d323914ee7086a12cb149c3299/vendor/github.com/gorilla/websocket/go.sum
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/websocket/join.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | package websocket
6 |
7 | import (
8 | "io"
9 | "strings"
10 | )
11 |
12 | // JoinMessages concatenates received messages to create a single io.Reader.
13 | // The string term is appended to each message. The returned reader does not
14 | // support concurrent calls to the Read method.
15 | func JoinMessages(c *Conn, term string) io.Reader {
16 | return &joinReader{c: c, term: term}
17 | }
18 |
19 | type joinReader struct {
20 | c *Conn
21 | term string
22 | r io.Reader
23 | }
24 |
25 | func (r *joinReader) Read(p []byte) (int, error) {
26 | if r.r == nil {
27 | var err error
28 | _, r.r, err = r.c.NextReader()
29 | if err != nil {
30 | return 0, err
31 | }
32 | if r.term != "" {
33 | r.r = io.MultiReader(r.r, strings.NewReader(r.term))
34 | }
35 | }
36 | n, err := r.r.Read(p)
37 | if err == io.EOF {
38 | err = nil
39 | r.r = nil
40 | }
41 | return n, err
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/websocket/mask.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 | import "unsafe"
10 |
11 | const wordSize = int(unsafe.Sizeof(uintptr(0)))
12 |
13 | func maskBytes(key [4]byte, pos int, b []byte) int {
14 | // Mask one byte at a time for small buffers.
15 | if len(b) < 2*wordSize {
16 | for i := range b {
17 | b[i] ^= key[pos&3]
18 | pos++
19 | }
20 | return pos & 3
21 | }
22 |
23 | // Mask one byte at a time to word boundary.
24 | if n := int(uintptr(unsafe.Pointer(&b[0]))) % wordSize; n != 0 {
25 | n = wordSize - n
26 | for i := range b[:n] {
27 | b[i] ^= key[pos&3]
28 | pos++
29 | }
30 | b = b[n:]
31 | }
32 |
33 | // Create aligned word size key.
34 | var k [wordSize]byte
35 | for i := range k {
36 | k[i] = key[(pos+i)&3]
37 | }
38 | kw := *(*uintptr)(unsafe.Pointer(&k))
39 |
40 | // Mask one word at a time.
41 | n := (len(b) / wordSize) * wordSize
42 | for i := 0; i < n; i += wordSize {
43 | *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&b[0])) + uintptr(i))) ^= kw
44 | }
45 |
46 | // Mask one byte at a time for remaining bytes.
47 | b = b[n:]
48 | for i := range b {
49 | b[i] ^= key[pos&3]
50 | pos++
51 | }
52 |
53 | return pos & 3
54 | }
55 |
--------------------------------------------------------------------------------
/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/gorilla/websocket/trace.go:
--------------------------------------------------------------------------------
1 | // +build go1.8
2 |
3 | package websocket
4 |
5 | import (
6 | "crypto/tls"
7 | "net/http/httptrace"
8 | )
9 |
10 | func doHandshakeWithTrace(trace *httptrace.ClientTrace, tlsConn *tls.Conn, cfg *tls.Config) error {
11 | if trace.TLSHandshakeStart != nil {
12 | trace.TLSHandshakeStart()
13 | }
14 | err := doHandshake(tlsConn, cfg)
15 | if trace.TLSHandshakeDone != nil {
16 | trace.TLSHandshakeDone(tlsConn.ConnectionState(), err)
17 | }
18 | return err
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/websocket/trace_17.go:
--------------------------------------------------------------------------------
1 | // +build !go1.8
2 |
3 | package websocket
4 |
5 | import (
6 | "crypto/tls"
7 | "net/http/httptrace"
8 | )
9 |
10 | func doHandshakeWithTrace(trace *httptrace.ClientTrace, tlsConn *tls.Conn, cfg *tls.Config) error {
11 | return doHandshake(tlsConn, cfg)
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/.gitignore:
--------------------------------------------------------------------------------
1 | y.output
2 |
3 | # ignore intellij files
4 | .idea
5 | *.iml
6 | *.ipr
7 | *.iws
8 |
9 | *.test
10 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 |
3 | language: go
4 |
5 | go:
6 | - 1.x
7 | - tip
8 |
9 | branches:
10 | only:
11 | - master
12 |
13 | script: make test
14 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/Makefile:
--------------------------------------------------------------------------------
1 | TEST?=./...
2 |
3 | default: test
4 |
5 | fmt: generate
6 | go fmt ./...
7 |
8 | test: generate
9 | go get -t ./...
10 | go test $(TEST) $(TESTARGS)
11 |
12 | generate:
13 | go generate ./...
14 |
15 | updatedeps:
16 | go get -u golang.org/x/tools/cmd/stringer
17 |
18 | .PHONY: default generate test updatedeps
19 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: "build-{branch}-{build}"
2 | image: Visual Studio 2015
3 | clone_folder: c:\gopath\src\github.com\hashicorp\hcl
4 | environment:
5 | GOPATH: c:\gopath
6 | init:
7 | - git config --global core.autocrlf false
8 | install:
9 | - cmd: >-
10 | echo %Path%
11 |
12 | go version
13 |
14 | go env
15 |
16 | go get -t ./...
17 |
18 | build_script:
19 | - cmd: go test -v ./...
20 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/hashicorp/hcl
2 |
3 | require github.com/davecgh/go-spew v1.1.1
4 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/go.sum:
--------------------------------------------------------------------------------
1 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
2 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/hcl.go:
--------------------------------------------------------------------------------
1 | // Package hcl decodes HCL into usable Go structures.
2 | //
3 | // hcl input can come in either pure HCL format or JSON format.
4 | // It can be parsed into an AST, and then decoded into a structure,
5 | // or it can be decoded directly from a string into a structure.
6 | //
7 | // If you choose to parse HCL into a raw AST, the benefit is that you
8 | // can write custom visitor implementations to implement custom
9 | // semantic checks. By default, HCL does not perform any semantic
10 | // checks.
11 | package hcl
12 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/hcl/parser/error.go:
--------------------------------------------------------------------------------
1 | package parser
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/hashicorp/hcl/hcl/token"
7 | )
8 |
9 | // PosError is a parse error that contains a position.
10 | type PosError struct {
11 | Pos token.Pos
12 | Err error
13 | }
14 |
15 | func (e *PosError) Error() string {
16 | return fmt.Sprintf("At %s: %s", e.Pos, e.Err)
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/lex.go:
--------------------------------------------------------------------------------
1 | package hcl
2 |
3 | import (
4 | "unicode"
5 | "unicode/utf8"
6 | )
7 |
8 | type lexModeValue byte
9 |
10 | const (
11 | lexModeUnknown lexModeValue = iota
12 | lexModeHcl
13 | lexModeJson
14 | )
15 |
16 | // lexMode returns whether we're going to be parsing in JSON
17 | // mode or HCL mode.
18 | func lexMode(v []byte) lexModeValue {
19 | var (
20 | r rune
21 | w int
22 | offset int
23 | )
24 |
25 | for {
26 | r, w = utf8.DecodeRune(v[offset:])
27 | offset += w
28 | if unicode.IsSpace(r) {
29 | continue
30 | }
31 | if r == '{' {
32 | return lexModeJson
33 | }
34 | break
35 | }
36 |
37 | return lexModeHcl
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/parse.go:
--------------------------------------------------------------------------------
1 | package hcl
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/hashicorp/hcl/hcl/ast"
7 | hclParser "github.com/hashicorp/hcl/hcl/parser"
8 | jsonParser "github.com/hashicorp/hcl/json/parser"
9 | )
10 |
11 | // ParseBytes accepts as input byte slice and returns ast tree.
12 | //
13 | // Input can be either JSON or HCL
14 | func ParseBytes(in []byte) (*ast.File, error) {
15 | return parse(in)
16 | }
17 |
18 | // ParseString accepts input as a string and returns ast tree.
19 | func ParseString(input string) (*ast.File, error) {
20 | return parse([]byte(input))
21 | }
22 |
23 | func parse(in []byte) (*ast.File, error) {
24 | switch lexMode(in) {
25 | case lexModeHcl:
26 | return hclParser.Parse(in)
27 | case lexModeJson:
28 | return jsonParser.Parse(in)
29 | }
30 |
31 | return nil, fmt.Errorf("unknown config format")
32 | }
33 |
34 | // Parse parses the given input and returns the root object.
35 | //
36 | // The input format can be either HCL or JSON.
37 | func Parse(input string) (*ast.File, error) {
38 | return parse([]byte(input))
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/github.com/inconshreveable/mousetrap/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2014 Alan Shreve
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/vendor/github.com/inconshreveable/mousetrap/README.md:
--------------------------------------------------------------------------------
1 | # mousetrap
2 |
3 | mousetrap is a tiny library that answers a single question.
4 |
5 | On a Windows machine, was the process invoked by someone double clicking on
6 | the executable file while browsing in explorer?
7 |
8 | ### Motivation
9 |
10 | Windows developers unfamiliar with command line tools will often "double-click"
11 | the executable for a tool. Because most CLI tools print the help and then exit
12 | when invoked without arguments, this is often very frustrating for those users.
13 |
14 | mousetrap provides a way to detect these invocations so that you can provide
15 | more helpful behavior and instructions on how to run the CLI tool. To see what
16 | this looks like, both from an organizational and a technical perspective, see
17 | https://inconshreveable.com/09-09-2014/sweat-the-small-stuff/
18 |
19 | ### The interface
20 |
21 | The library exposes a single interface:
22 |
23 | func StartedByExplorer() (bool)
24 |
--------------------------------------------------------------------------------
/vendor/github.com/inconshreveable/mousetrap/trap_others.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package mousetrap
4 |
5 | // StartedByExplorer returns true if the program was invoked by the user
6 | // double-clicking on the executable from explorer.exe
7 | //
8 | // It is conservative and returns false if any of the internal calls fail.
9 | // It does not guarantee that the program was run from a terminal. It only can tell you
10 | // whether it was launched from explorer.exe
11 | //
12 | // On non-Windows platforms, it always returns false.
13 | func StartedByExplorer() bool {
14 | return false
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/inconshreveable/mousetrap/trap_windows_1.4.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 | // +build go1.4
3 |
4 | package mousetrap
5 |
6 | import (
7 | "os"
8 | "syscall"
9 | "unsafe"
10 | )
11 |
12 | func getProcessEntry(pid int) (*syscall.ProcessEntry32, error) {
13 | snapshot, err := syscall.CreateToolhelp32Snapshot(syscall.TH32CS_SNAPPROCESS, 0)
14 | if err != nil {
15 | return nil, err
16 | }
17 | defer syscall.CloseHandle(snapshot)
18 | var procEntry syscall.ProcessEntry32
19 | procEntry.Size = uint32(unsafe.Sizeof(procEntry))
20 | if err = syscall.Process32First(snapshot, &procEntry); err != nil {
21 | return nil, err
22 | }
23 | for {
24 | if procEntry.ProcessID == uint32(pid) {
25 | return &procEntry, nil
26 | }
27 | err = syscall.Process32Next(snapshot, &procEntry)
28 | if err != nil {
29 | return nil, err
30 | }
31 | }
32 | }
33 |
34 | // StartedByExplorer returns true if the program was invoked by the user double-clicking
35 | // on the executable from explorer.exe
36 | //
37 | // It is conservative and returns false if any of the internal calls fail.
38 | // It does not guarantee that the program was run from a terminal. It only can tell you
39 | // whether it was launched from explorer.exe
40 | func StartedByExplorer() bool {
41 | pe, err := getProcessEntry(os.Getppid())
42 | if err != nil {
43 | return false
44 | }
45 | return "explorer.exe" == syscall.UTF16ToString(pe.ExeFile[:])
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/github.com/juju/ansiterm/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2016 Canonical Ltd.
2 | # Licensed under the LGPLv3, see LICENCE file for details.
3 |
4 | default: check
5 |
6 | check:
7 | go test
8 |
9 | docs:
10 | godoc2md github.com/juju/ansiterm > README.md
11 | sed -i 's|\[godoc-link-here\]|[](https://godoc.org/github.com/juju/ansiterm)|' README.md
12 |
13 |
14 | .PHONY: default check docs
15 |
--------------------------------------------------------------------------------
/vendor/github.com/juju/ansiterm/attribute.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 Canonical Ltd.
2 | // Licensed under the LGPLv3, see LICENCE file for details.
3 |
4 | package ansiterm
5 |
6 | import (
7 | "fmt"
8 | "sort"
9 | "strings"
10 | )
11 |
12 | type attribute int
13 |
14 | const (
15 | unknownAttribute attribute = -1
16 | reset attribute = 0
17 | )
18 |
19 | // sgr returns the escape sequence for the Select Graphic Rendition
20 | // for the attribute.
21 | func (a attribute) sgr() string {
22 | if a < 0 {
23 | return ""
24 | }
25 | return fmt.Sprintf("\x1b[%dm", a)
26 | }
27 |
28 | type attributes []attribute
29 |
30 | func (a attributes) Len() int { return len(a) }
31 | func (a attributes) Less(i, j int) bool { return a[i] < a[j] }
32 | func (a attributes) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
33 |
34 | // sgr returns the combined escape sequence for the Select Graphic Rendition
35 | // for the sequence of attributes.
36 | func (a attributes) sgr() string {
37 | switch len(a) {
38 | case 0:
39 | return ""
40 | case 1:
41 | return a[0].sgr()
42 | default:
43 | sort.Sort(a)
44 | var values []string
45 | for _, attr := range a {
46 | values = append(values, fmt.Sprint(attr))
47 | }
48 | return fmt.Sprintf("\x1b[%sm", strings.Join(values, ";"))
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/vendor/github.com/juju/ansiterm/doc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 Canonical Ltd.
2 | // Licensed under the LGPLv3, see LICENCE file for details.
3 |
4 | // Package ansiterm provides a Writer that writes out the ANSI escape
5 | // codes for color and styles.
6 | package ansiterm
7 |
--------------------------------------------------------------------------------
/vendor/github.com/juju/ansiterm/style.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 Canonical Ltd.
2 | // Licensed under the LGPLv3, see LICENCE file for details.
3 |
4 | package ansiterm
5 |
6 | const (
7 | _ Style = iota
8 | Bold
9 | Faint
10 | Italic
11 | Underline
12 | Blink
13 | Reverse
14 | Strikethrough
15 | Conceal
16 | )
17 |
18 | type Style int
19 |
20 | func (s Style) String() string {
21 | switch s {
22 | case Bold:
23 | return "bold"
24 | case Faint:
25 | return "faint"
26 | case Italic:
27 | return "italic"
28 | case Underline:
29 | return "underline"
30 | case Blink:
31 | return "blink"
32 | case Reverse:
33 | return "reverse"
34 | case Strikethrough:
35 | return "strikethrough"
36 | case Conceal:
37 | return "conceal"
38 | default:
39 | return ""
40 | }
41 | }
42 |
43 | func (s Style) enable() attribute {
44 | switch s {
45 | case Bold:
46 | return 1
47 | case Faint:
48 | return 2
49 | case Italic:
50 | return 3
51 | case Underline:
52 | return 4
53 | case Blink:
54 | return 5
55 | case Reverse:
56 | return 7
57 | case Conceal:
58 | return 8
59 | case Strikethrough:
60 | return 9
61 | default:
62 | return unknownAttribute
63 | }
64 | }
65 |
66 | func (s Style) disable() attribute {
67 | value := s.enable()
68 | if value != unknownAttribute {
69 | return value + 20
70 | }
71 | return value
72 | }
73 |
--------------------------------------------------------------------------------
/vendor/github.com/juju/ansiterm/terminal.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 Canonical Ltd.
2 | // Licensed under the LGPLv3, see LICENCE file for details.
3 |
4 | package ansiterm
5 |
6 | import (
7 | "io"
8 | "os"
9 |
10 | "github.com/mattn/go-colorable"
11 | "github.com/mattn/go-isatty"
12 | )
13 |
14 | // colorEnabledWriter returns a writer that can handle the ansi color codes
15 | // and true if the writer passed in is a terminal capable of color. If the
16 | // TERM environment variable is set to "dumb", the terminal is not considered
17 | // color capable.
18 | func colorEnabledWriter(w io.Writer) (io.Writer, bool) {
19 | f, ok := w.(*os.File)
20 | if !ok {
21 | return w, false
22 | }
23 | // Check the TERM environment variable specifically
24 | // to check for "dumb" terminals.
25 | if os.Getenv("TERM") == "dumb" {
26 | return w, false
27 | }
28 | if !isatty.IsTerminal(f.Fd()) {
29 | return w, false
30 | }
31 | return colorable.NewColorable(f), true
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/github.com/lunixbochs/vtclean/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | sudo: false
3 |
4 | script: go test -v
5 |
6 | go:
7 | - 1.5
8 | - 1.6
9 | - 1.7
10 |
--------------------------------------------------------------------------------
/vendor/github.com/lunixbochs/vtclean/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2015 Ryan Hileman
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/github.com/lunixbochs/vtclean/README.md:
--------------------------------------------------------------------------------
1 | [](https://travis-ci.org/lunixbochs/vtclean)
2 |
3 | vtclean
4 | ----
5 |
6 | Clean up raw terminal output by stripping escape sequences, optionally preserving color.
7 |
8 | Get it: `go get github.com/lunixbochs/vtclean/vtclean`
9 |
10 | API:
11 |
12 | import "github.com/lunixbochs/vtclean"
13 | vtclean.Clean(line string, color bool) string
14 |
15 | Command line example:
16 |
17 | $ echo -e '\x1b[1;32mcolor example
18 | color forced to stop at end of line
19 | backspace is ba\b\bgood
20 | no beeps!\x07\x07' | ./vtclean -color
21 |
22 | color example
23 | color forced to stop at end of line
24 | backspace is good
25 | no beeps!
26 |
27 | Go example:
28 |
29 | package main
30 |
31 | import (
32 | "fmt"
33 | "github.com/lunixbochs/vtclean"
34 | )
35 |
36 | func main() {
37 | line := vtclean.Clean(
38 | "\033[1;32mcolor, " +
39 | "curs\033[Aor, " +
40 | "backspace\b\b\b\b\b\b\b\b\b\b\b\033[K", false)
41 | fmt.Println(line)
42 | }
43 |
44 | Output:
45 |
46 | color, cursor
47 |
--------------------------------------------------------------------------------
/vendor/github.com/magiconair/properties/.gitignore:
--------------------------------------------------------------------------------
1 | *.sublime-project
2 | *.sublime-workspace
3 | *.un~
4 | *.swp
5 | .idea/
6 | *.iml
7 |
--------------------------------------------------------------------------------
/vendor/github.com/magiconair/properties/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.4.x
4 | - 1.5.x
5 | - 1.6.x
6 | - 1.7.x
7 | - 1.8.x
8 | - 1.9.x
9 | - "1.10.x"
10 | - "1.11.x"
11 | - "1.12.x"
12 | - tip
13 |
--------------------------------------------------------------------------------
/vendor/github.com/magiconair/properties/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/magiconair/properties
2 |
--------------------------------------------------------------------------------
/vendor/github.com/magiconair/properties/integrate.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 Frank Schroeder. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package properties
6 |
7 | import "flag"
8 |
9 | // MustFlag sets flags that are skipped by dst.Parse when p contains
10 | // the respective key for flag.Flag.Name.
11 | //
12 | // It's use is recommended with command line arguments as in:
13 | // flag.Parse()
14 | // p.MustFlag(flag.CommandLine)
15 | func (p *Properties) MustFlag(dst *flag.FlagSet) {
16 | m := make(map[string]*flag.Flag)
17 | dst.VisitAll(func(f *flag.Flag) {
18 | m[f.Name] = f
19 | })
20 | dst.Visit(func(f *flag.Flag) {
21 | delete(m, f.Name) // overridden
22 | })
23 |
24 | for name, f := range m {
25 | v, ok := p.Get(name)
26 | if !ok {
27 | continue
28 | }
29 |
30 | if err := f.Value.Set(v); err != nil {
31 | ErrorHandler(err)
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/github.com/magiconair/properties/rangecheck.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 Frank Schroeder. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package properties
6 |
7 | import (
8 | "fmt"
9 | "math"
10 | )
11 |
12 | // make this a var to overwrite it in a test
13 | var is32Bit = ^uint(0) == math.MaxUint32
14 |
15 | // intRangeCheck checks if the value fits into the int type and
16 | // panics if it does not.
17 | func intRangeCheck(key string, v int64) int {
18 | if is32Bit && (v < math.MinInt32 || v > math.MaxInt32) {
19 | panic(fmt.Sprintf("Value %d for key %s out of range", v, key))
20 | }
21 | return int(v)
22 | }
23 |
24 | // uintRangeCheck checks if the value fits into the uint type and
25 | // panics if it does not.
26 | func uintRangeCheck(key string, v uint64) uint {
27 | if is32Bit && v > math.MaxUint32 {
28 | panic(fmt.Sprintf("Value %d for key %s out of range", v, key))
29 | }
30 | return uint(v)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/github.com/manifoldco/promptui/.gitignore:
--------------------------------------------------------------------------------
1 | vendor
2 | all-cover.txt
3 | bin/
4 |
--------------------------------------------------------------------------------
/vendor/github.com/manifoldco/promptui/.golangci.yml:
--------------------------------------------------------------------------------
1 | run:
2 | deadline: 5m
3 |
4 | issues:
5 | # Disable maximums so we see all issues
6 | max-per-linter: 0
7 | max-same-issues: 0
8 |
9 | # golangci-lint ignores missing docstrings by default. That's no good!
10 | exclude-use-default: false
11 |
12 | linters:
13 | disable-all: true
14 | enable:
15 | - misspell
16 | - golint
17 | - goimports
18 | - ineffassign
19 | - deadcode
20 | - gofmt
21 | - govet
22 | - structcheck
23 | - unconvert
24 | - megacheck
25 | - typecheck
26 | - varcheck
27 |
--------------------------------------------------------------------------------
/vendor/github.com/manifoldco/promptui/.travis.yml:
--------------------------------------------------------------------------------
1 | dist: bionic
2 | language: go
3 |
4 | go:
5 | - "1.12.x"
6 | - "1.13.x"
7 |
8 | branches:
9 | only:
10 | - master
11 |
12 | after_success:
13 | # only report coverage for go-version 1.11
14 | - if [[ $TRAVIS_GO_VERSION =~ ^1\.11 ]] ; then bash <(curl -s https://codecov.io/bash) -f all-cover.txt; fi
15 |
--------------------------------------------------------------------------------
/vendor/github.com/manifoldco/promptui/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/manifoldco/promptui
2 |
3 | go 1.12
4 |
5 | require (
6 | github.com/chzyer/logex v1.1.10 // indirect
7 | github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
8 | github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 // indirect
9 | github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a
10 | github.com/kr/pretty v0.1.0 // indirect
11 | github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a // indirect
12 | github.com/mattn/go-colorable v0.0.9 // indirect
13 | github.com/mattn/go-isatty v0.0.4 // indirect
14 | golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b // indirect
15 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
16 | )
17 |
--------------------------------------------------------------------------------
/vendor/github.com/manifoldco/promptui/keycodes.go:
--------------------------------------------------------------------------------
1 | package promptui
2 |
3 | import "github.com/chzyer/readline"
4 |
5 | // These runes are used to identify the commands entered by the user in the command prompt. They map
6 | // to specific actions of promptui in prompt mode and can be remapped if necessary.
7 | var (
8 | // KeyEnter is the default key for submission/selection.
9 | KeyEnter rune = readline.CharEnter
10 |
11 | // KeyCtrlH is the key for deleting input text.
12 | KeyCtrlH rune = readline.CharCtrlH
13 |
14 | // KeyPrev is the default key to go up during selection.
15 | KeyPrev rune = readline.CharPrev
16 | KeyPrevDisplay = "↑"
17 |
18 | // KeyNext is the default key to go down during selection.
19 | KeyNext rune = readline.CharNext
20 | KeyNextDisplay = "↓"
21 |
22 | // KeyBackward is the default key to page up during selection.
23 | KeyBackward rune = readline.CharBackward
24 | KeyBackwardDisplay = "←"
25 |
26 | // KeyForward is the default key to page down during selection.
27 | KeyForward rune = readline.CharForward
28 | KeyForwardDisplay = "→"
29 | )
30 |
--------------------------------------------------------------------------------
/vendor/github.com/manifoldco/promptui/keycodes_other.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package promptui
4 |
5 | import "github.com/chzyer/readline"
6 |
7 | var (
8 | // KeyBackspace is the default key for deleting input text.
9 | KeyBackspace rune = readline.CharBackspace
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/github.com/manifoldco/promptui/keycodes_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package promptui
4 |
5 | // source: https://msdn.microsoft.com/en-us/library/aa243025(v=vs.60).aspx
6 |
7 | var (
8 | // KeyBackspace is the default key for deleting input text inside a command line prompt.
9 | KeyBackspace rune = 8
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/github.com/manifoldco/promptui/promptui.go:
--------------------------------------------------------------------------------
1 | // Package promptui is a library providing a simple interface to create command-line prompts for go.
2 | // It can be easily integrated into spf13/cobra, urfave/cli or any cli go application.
3 | //
4 | // promptui has two main input modes:
5 | //
6 | // Prompt provides a single line for user input. It supports optional live validation,
7 | // confirmation and masking the input.
8 | //
9 | // Select provides a list of options to choose from. It supports pagination, search,
10 | // detailed view and custom templates.
11 | package promptui
12 |
13 | import "errors"
14 |
15 | // ErrEOF is the error returned from prompts when EOF is encountered.
16 | var ErrEOF = errors.New("^D")
17 |
18 | // ErrInterrupt is the error returned from prompts when an interrupt (ctrl-c) is
19 | // encountered.
20 | var ErrInterrupt = errors.New("^C")
21 |
22 | // ErrAbort is the error returned when confirm prompts are supplied "n"
23 | var ErrAbort = errors.New("")
24 |
25 | // ValidateFunc is a placeholder type for any validation functions that validates a given input. It should return
26 | // a ValidationError if the input is not valid.
27 | type ValidateFunc func(string) error
28 |
--------------------------------------------------------------------------------
/vendor/github.com/manifoldco/promptui/styles.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package promptui
4 |
5 | // These are the default icons used by promptui for select and prompts. These should not be overridden and instead
6 | // customized through the use of custom templates
7 | var (
8 | // IconInitial is the icon used when starting in prompt mode and the icon next to the label when
9 | // starting in select mode.
10 | IconInitial = Styler(FGBlue)("?")
11 |
12 | // IconGood is the icon used when a good answer is entered in prompt mode.
13 | IconGood = Styler(FGGreen)("✔")
14 |
15 | // IconWarn is the icon used when a good, but potentially invalid answer is entered in prompt mode.
16 | IconWarn = Styler(FGYellow)("⚠")
17 |
18 | // IconBad is the icon used when a bad answer is entered in prompt mode.
19 | IconBad = Styler(FGRed)("✗")
20 |
21 | // IconSelect is the icon used to identify the currently selected item in select mode.
22 | IconSelect = Styler(FGBold)("▸")
23 | )
24 |
--------------------------------------------------------------------------------
/vendor/github.com/manifoldco/promptui/styles_windows.go:
--------------------------------------------------------------------------------
1 | package promptui
2 |
3 | // These are the default icons used bu promptui for select and prompts. They can either be overridden directly
4 | // from these variable or customized through the use of custom templates
5 | var (
6 | // IconInitial is the icon used when starting in prompt mode and the icon next to the label when
7 | // starting in select mode.
8 | IconInitial = Styler(FGBlue)("?")
9 |
10 | // IconGood is the icon used when a good answer is entered in prompt mode.
11 | IconGood = Styler(FGGreen)("v")
12 |
13 | // IconWarn is the icon used when a good, but potentially invalid answer is entered in prompt mode.
14 | IconWarn = Styler(FGYellow)("!")
15 |
16 | // IconBad is the icon used when a bad answer is entered in prompt mode.
17 | IconBad = Styler(FGRed)("x")
18 |
19 | // IconSelect is the icon used to identify the currently selected item in select mode.
20 | IconSelect = Styler(FGBold)(">")
21 | )
22 |
--------------------------------------------------------------------------------
/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.5
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 | [](http://godoc.org/github.com/mattn/go-isatty)
4 | [](https://travis-ci.org/mattn/go-isatty)
5 | [](https://coveralls.io/github/mattn/go-isatty?branch=master)
6 | [](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_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_linux.go:
--------------------------------------------------------------------------------
1 | // +build linux
2 | // +build !appengine
3 |
4 | package isatty
5 |
6 | import "golang.org/x/sys/unix"
7 |
8 | // IsTerminal return true if the file descriptor is terminal.
9 | func IsTerminal(fd uintptr) bool {
10 | _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS)
11 | return err == nil
12 | }
13 |
14 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
15 | // terminal. This is also always false on this environment.
16 | func IsCygwinTerminal(fd uintptr) bool {
17 | return false
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/isatty_others.go:
--------------------------------------------------------------------------------
1 | // +build appengine js
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/mitchellh/go-homedir/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 Mitchell Hashimoto
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/mitchellh/go-homedir/README.md:
--------------------------------------------------------------------------------
1 | # go-homedir
2 |
3 | This is a Go library for detecting the user's home directory without
4 | the use of cgo, so the library can be used in cross-compilation environments.
5 |
6 | Usage is incredibly simple, just call `homedir.Dir()` to get the home directory
7 | for a user, and `homedir.Expand()` to expand the `~` in a path to the home
8 | directory.
9 |
10 | **Why not just use `os/user`?** The built-in `os/user` package requires
11 | cgo on Darwin systems. This means that any Go code that uses that package
12 | cannot cross compile. But 99% of the time the use for `os/user` is just to
13 | retrieve the home directory, which we can do for the current user without
14 | cgo. This library does that, enabling cross-compilation.
15 |
--------------------------------------------------------------------------------
/vendor/github.com/mitchellh/go-homedir/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/mitchellh/go-homedir
2 |
--------------------------------------------------------------------------------
/vendor/github.com/mitchellh/mapstructure/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - "1.11.x"
5 | - tip
6 |
7 | script:
8 | - go test
9 |
--------------------------------------------------------------------------------
/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 1.1.2
2 |
3 | * Fix error when decode hook decodes interface implementation into interface
4 | type. [GH-140]
5 |
6 | ## 1.1.1
7 |
8 | * Fix panic that can happen in `decodePtr`
9 |
10 | ## 1.1.0
11 |
12 | * Added `StringToIPHookFunc` to convert `string` to `net.IP` and `net.IPNet` [GH-133]
13 | * Support struct to struct decoding [GH-137]
14 | * If source map value is nil, then destination map value is nil (instead of empty)
15 | * If source slice value is nil, then destination slice value is nil (instead of empty)
16 | * If source pointer is nil, then destination pointer is set to nil (instead of
17 | allocated zero value of type)
18 |
19 | ## 1.0.0
20 |
21 | * Initial tagged stable release.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/mitchellh/mapstructure/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 Mitchell Hashimoto
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/mitchellh/mapstructure/error.go:
--------------------------------------------------------------------------------
1 | package mapstructure
2 |
3 | import (
4 | "errors"
5 | "fmt"
6 | "sort"
7 | "strings"
8 | )
9 |
10 | // Error implements the error interface and can represents multiple
11 | // errors that occur in the course of a single decode.
12 | type Error struct {
13 | Errors []string
14 | }
15 |
16 | func (e *Error) Error() string {
17 | points := make([]string, len(e.Errors))
18 | for i, err := range e.Errors {
19 | points[i] = fmt.Sprintf("* %s", err)
20 | }
21 |
22 | sort.Strings(points)
23 | return fmt.Sprintf(
24 | "%d error(s) decoding:\n\n%s",
25 | len(e.Errors), strings.Join(points, "\n"))
26 | }
27 |
28 | // WrappedErrors implements the errwrap.Wrapper interface to make this
29 | // return value more useful with the errwrap and go-multierror libraries.
30 | func (e *Error) WrappedErrors() []error {
31 | if e == nil {
32 | return nil
33 | }
34 |
35 | result := make([]error, len(e.Errors))
36 | for i, e := range e.Errors {
37 | result[i] = errors.New(e)
38 | }
39 |
40 | return result
41 | }
42 |
43 | func appendErrors(errors []string, err error) []string {
44 | switch e := err.(type) {
45 | case *Error:
46 | return append(errors, e.Errors...)
47 | default:
48 | return append(errors, e.Error())
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/vendor/github.com/mitchellh/mapstructure/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/mitchellh/mapstructure
2 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/.gitignore:
--------------------------------------------------------------------------------
1 | test_program/test_program_bin
2 | fuzz/
3 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: go
3 | go:
4 | - 1.8.x
5 | - 1.9.x
6 | - 1.10.x
7 | - tip
8 | matrix:
9 | allow_failures:
10 | - go: tip
11 | fast_finish: true
12 | script:
13 | - if [ -n "$(go fmt ./...)" ]; then exit 1; fi
14 | - ./test.sh
15 | - ./benchmark.sh $TRAVIS_BRANCH https://github.com/$TRAVIS_REPO_SLUG.git
16 | before_install:
17 | - go get github.com/axw/gocov/gocov
18 | - go get github.com/mattn/goveralls
19 | - if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
20 | branches:
21 | only: [master]
22 | after_success:
23 | - $HOME/gopath/bin/goveralls -service=travis-ci -coverprofile=coverage.out -repotoken $COVERALLS_TOKEN
24 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 - 2017 Thomas Pelletier, Eric Anderton
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/pelletier/go-toml/benchmark.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | reference_ref=${1:-master}
6 | reference_git=${2:-.}
7 |
8 | if ! `hash benchstat 2>/dev/null`; then
9 | echo "Installing benchstat"
10 | go get golang.org/x/perf/cmd/benchstat
11 | go install golang.org/x/perf/cmd/benchstat
12 | fi
13 |
14 | tempdir=`mktemp -d /tmp/go-toml-benchmark-XXXXXX`
15 | ref_tempdir="${tempdir}/ref"
16 | ref_benchmark="${ref_tempdir}/benchmark-`echo -n ${reference_ref}|tr -s '/' '-'`.txt"
17 | local_benchmark="`pwd`/benchmark-local.txt"
18 |
19 | echo "=== ${reference_ref} (${ref_tempdir})"
20 | git clone ${reference_git} ${ref_tempdir} >/dev/null 2>/dev/null
21 | pushd ${ref_tempdir} >/dev/null
22 | git checkout ${reference_ref} >/dev/null 2>/dev/null
23 | go test -bench=. -benchmem | tee ${ref_benchmark}
24 | popd >/dev/null
25 |
26 | echo ""
27 | echo "=== local"
28 | go test -bench=. -benchmem | tee ${local_benchmark}
29 |
30 | echo ""
31 | echo "=== diff"
32 | benchstat -delta-test=none ${ref_benchmark} ${local_benchmark}
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/doc.go:
--------------------------------------------------------------------------------
1 | // Package toml is a TOML parser and manipulation library.
2 | //
3 | // This version supports the specification as described in
4 | // https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md
5 | //
6 | // Marshaling
7 | //
8 | // Go-toml can marshal and unmarshal TOML documents from and to data
9 | // structures.
10 | //
11 | // TOML document as a tree
12 | //
13 | // Go-toml can operate on a TOML document as a tree. Use one of the Load*
14 | // functions to parse TOML data and obtain a Tree instance, then one of its
15 | // methods to manipulate the tree.
16 | //
17 | // JSONPath-like queries
18 | //
19 | // The package github.com/pelletier/go-toml/query implements a system
20 | // similar to JSONPath to quickly retrieve elements of a TOML document using a
21 | // single expression. See the package documentation for more information.
22 | //
23 | package toml
24 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/example-crlf.toml:
--------------------------------------------------------------------------------
1 | # This is a TOML document. Boom.
2 |
3 | title = "TOML Example"
4 |
5 | [owner]
6 | name = "Tom Preston-Werner"
7 | organization = "GitHub"
8 | bio = "GitHub Cofounder & CEO\nLikes tater tots and beer."
9 | dob = 1979-05-27T07:32:00Z # First class dates? Why not?
10 |
11 | [database]
12 | server = "192.168.1.1"
13 | ports = [ 8001, 8001, 8002 ]
14 | connection_max = 5000
15 | enabled = true
16 |
17 | [servers]
18 |
19 | # You can indent as you please. Tabs or spaces. TOML don't care.
20 | [servers.alpha]
21 | ip = "10.0.0.1"
22 | dc = "eqdc10"
23 |
24 | [servers.beta]
25 | ip = "10.0.0.2"
26 | dc = "eqdc10"
27 |
28 | [clients]
29 | data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it
30 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/example.toml:
--------------------------------------------------------------------------------
1 | # This is a TOML document. Boom.
2 |
3 | title = "TOML Example"
4 |
5 | [owner]
6 | name = "Tom Preston-Werner"
7 | organization = "GitHub"
8 | bio = "GitHub Cofounder & CEO\nLikes tater tots and beer."
9 | dob = 1979-05-27T07:32:00Z # First class dates? Why not?
10 |
11 | [database]
12 | server = "192.168.1.1"
13 | ports = [ 8001, 8001, 8002 ]
14 | connection_max = 5000
15 | enabled = true
16 |
17 | [servers]
18 |
19 | # You can indent as you please. Tabs or spaces. TOML don't care.
20 | [servers.alpha]
21 | ip = "10.0.0.1"
22 | dc = "eqdc10"
23 |
24 | [servers.beta]
25 | ip = "10.0.0.2"
26 | dc = "eqdc10"
27 |
28 | [clients]
29 | data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it
30 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/fuzz.go:
--------------------------------------------------------------------------------
1 | // +build gofuzz
2 |
3 | package toml
4 |
5 | func Fuzz(data []byte) int {
6 | tree, err := LoadBytes(data)
7 | if err != nil {
8 | if tree != nil {
9 | panic("tree must be nil if there is an error")
10 | }
11 | return 0
12 | }
13 |
14 | str, err := tree.ToTomlString()
15 | if err != nil {
16 | if str != "" {
17 | panic(`str must be "" if there is an error`)
18 | }
19 | panic(err)
20 | }
21 |
22 | tree, err = Load(str)
23 | if err != nil {
24 | if tree != nil {
25 | panic("tree must be nil if there is an error")
26 | }
27 | return 0
28 | }
29 |
30 | return 1
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/fuzz.sh:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | set -eu
3 |
4 | go get github.com/dvyukov/go-fuzz/go-fuzz
5 | go get github.com/dvyukov/go-fuzz/go-fuzz-build
6 |
7 | if [ ! -e toml-fuzz.zip ]; then
8 | go-fuzz-build github.com/pelletier/go-toml
9 | fi
10 |
11 | rm -fr fuzz
12 | mkdir -p fuzz/corpus
13 | cp *.toml fuzz/corpus
14 |
15 | go-fuzz -bin=toml-fuzz.zip -workdir=fuzz
16 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/marshal_test.toml:
--------------------------------------------------------------------------------
1 | title = "TOML Marshal Testing"
2 |
3 | [basic]
4 | bool = true
5 | date = 1979-05-27T07:32:00Z
6 | float = 123.4
7 | int = 5000
8 | string = "Bite me"
9 | uint = 5001
10 |
11 | [basic_lists]
12 | bools = [true,false,true]
13 | dates = [1979-05-27T07:32:00Z,1980-05-27T07:32:00Z]
14 | floats = [12.3,45.6,78.9]
15 | ints = [8001,8001,8002]
16 | strings = ["One","Two","Three"]
17 | uints = [5002,5003]
18 |
19 | [basic_map]
20 | one = "one"
21 | two = "two"
22 |
23 | [subdoc]
24 |
25 | [subdoc.first]
26 | name = "First"
27 |
28 | [subdoc.second]
29 | name = "Second"
30 |
31 | [[subdoclist]]
32 | name = "List.First"
33 |
34 | [[subdoclist]]
35 | name = "List.Second"
36 |
37 | [[subdocptrs]]
38 | name = "Second"
39 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/position.go:
--------------------------------------------------------------------------------
1 | // Position support for go-toml
2 |
3 | package toml
4 |
5 | import (
6 | "fmt"
7 | )
8 |
9 | // Position of a document element within a TOML document.
10 | //
11 | // Line and Col are both 1-indexed positions for the element's line number and
12 | // column number, respectively. Values of zero or less will cause Invalid(),
13 | // to return true.
14 | type Position struct {
15 | Line int // line within the document
16 | Col int // column within the line
17 | }
18 |
19 | // String representation of the position.
20 | // Displays 1-indexed line and column numbers.
21 | func (p Position) String() string {
22 | return fmt.Sprintf("(%d, %d)", p.Line, p.Col)
23 | }
24 |
25 | // Invalid returns whether or not the position is valid (i.e. with negative or
26 | // null values)
27 | func (p Position) Invalid() bool {
28 | return p.Line <= 0 || p.Col <= 0
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/github.com/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.4.x
5 | - 1.5.x
6 | - 1.6.x
7 | - 1.7.x
8 | - 1.8.x
9 | - 1.9.x
10 | - 1.10.x
11 | - 1.11.x
12 | - tip
13 |
14 | script:
15 | - go test -v ./...
16 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/errors/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2015, Dave Cheney
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 |
7 | * Redistributions of source code must retain the above copyright notice, this
8 | list of conditions and the following disclaimer.
9 |
10 | * Redistributions in binary form must reproduce the above copyright notice,
11 | this list of conditions and the following disclaimer in the documentation
12 | and/or other materials provided with the distribution.
13 |
14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 |
--------------------------------------------------------------------------------
/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/skip2/go-qrcode/.gitignore:
--------------------------------------------------------------------------------
1 | *.sw*
2 | *.png
3 | *.directory
4 | qrcode/qrcode
5 |
--------------------------------------------------------------------------------
/vendor/github.com/skip2/go-qrcode/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - 1.7
5 |
6 | script:
7 | - go test -v ./...
8 |
9 |
--------------------------------------------------------------------------------
/vendor/github.com/skip2/go-qrcode/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014 Tom Harwood
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/afero/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: go
3 |
4 | go:
5 | - 1.9
6 | - "1.10"
7 | - tip
8 |
9 | os:
10 | - linux
11 | - osx
12 |
13 | matrix:
14 | allow_failures:
15 | - go: tip
16 | fast_finish: true
17 |
18 | script:
19 | - go build
20 | - go test -race -v ./...
21 |
22 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/afero/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: '{build}'
2 | clone_folder: C:\gopath\src\github.com\spf13\afero
3 | environment:
4 | GOPATH: C:\gopath
5 | build_script:
6 | - cmd: >-
7 | go version
8 |
9 | go env
10 |
11 | go get -v github.com/spf13/afero/...
12 |
13 | go build github.com/spf13/afero
14 | test_script:
15 | - cmd: go test -race -v github.com/spf13/afero/...
16 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/afero/const_bsds.go:
--------------------------------------------------------------------------------
1 | // Copyright © 2016 Steve Francia .
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | // +build darwin openbsd freebsd netbsd dragonfly
15 |
16 | package afero
17 |
18 | import (
19 | "syscall"
20 | )
21 |
22 | const BADFD = syscall.EBADF
23 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/afero/const_win_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright © 2016 Steve Francia .
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 | // +build !darwin
14 | // +build !openbsd
15 | // +build !freebsd
16 | // +build !dragonfly
17 | // +build !netbsd
18 |
19 | package afero
20 |
21 | import (
22 | "syscall"
23 | )
24 |
25 | const BADFD = syscall.EBADFD
26 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/afero/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/spf13/afero
2 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/afero/lstater.go:
--------------------------------------------------------------------------------
1 | // Copyright © 2018 Steve Francia .
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | package afero
15 |
16 | import (
17 | "os"
18 | )
19 |
20 | // Lstater is an optional interface in Afero. It is only implemented by the
21 | // filesystems saying so.
22 | // It will call Lstat if the filesystem iself is, or it delegates to, the os filesystem.
23 | // Else it will call Stat.
24 | // In addtion to the FileInfo, it will return a boolean telling whether Lstat was called or not.
25 | type Lstater interface {
26 | LstatIfPossible(name string) (os.FileInfo, bool, error)
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/afero/mem/dir.go:
--------------------------------------------------------------------------------
1 | // Copyright © 2014 Steve Francia .
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | package mem
15 |
16 | type Dir interface {
17 | Len() int
18 | Names() []string
19 | Files() []*FileData
20 | Add(*FileData)
21 | Remove(*FileData)
22 | }
23 |
24 | func RemoveFromMemDir(dir *FileData, f *FileData) {
25 | dir.memDir.Remove(f)
26 | }
27 |
28 | func AddToMemDir(dir *FileData, f *FileData) {
29 | dir.memDir.Add(f)
30 | }
31 |
32 | func InitializeDir(d *FileData) {
33 | if d.memDir == nil {
34 | d.dir = true
35 | d.memDir = &DirMap{}
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cast/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 |
25 | *.bench
26 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cast/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | env:
3 | - GO111MODULE=on
4 | sudo: required
5 | go:
6 | - "1.11.x"
7 | - tip
8 | os:
9 | - linux
10 | matrix:
11 | allow_failures:
12 | - go: tip
13 | fast_finish: true
14 | script:
15 | - make check
16 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cast/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Steve Francia
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cast/Makefile:
--------------------------------------------------------------------------------
1 | # A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
2 |
3 | .PHONY: check fmt lint test test-race vet test-cover-html help
4 | .DEFAULT_GOAL := help
5 |
6 | check: test-race fmt vet lint ## Run tests and linters
7 |
8 | test: ## Run tests
9 | go test ./...
10 |
11 | test-race: ## Run tests with race detector
12 | go test -race ./...
13 |
14 | fmt: ## Run gofmt linter
15 | @for d in `go list` ; do \
16 | if [ "`gofmt -l -s $$GOPATH/src/$$d | tee /dev/stderr`" ]; then \
17 | echo "^ improperly formatted go files" && echo && exit 1; \
18 | fi \
19 | done
20 |
21 | lint: ## Run golint linter
22 | @for d in `go list` ; do \
23 | if [ "`golint $$d | tee /dev/stderr`" ]; then \
24 | echo "^ golint errors!" && echo && exit 1; \
25 | fi \
26 | done
27 |
28 | vet: ## Run go vet linter
29 | @if [ "`go vet | tee /dev/stderr`" ]; then \
30 | echo "^ go vet errors!" && echo && exit 1; \
31 | fi
32 |
33 | test-cover-html: ## Generate test coverage report
34 | go test -coverprofile=coverage.out -covermode=count
35 | go tool cover -func=coverage.out
36 |
37 | help:
38 | @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
39 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cast/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/spf13/cast
2 |
3 | require (
4 | github.com/davecgh/go-spew v1.1.1 // indirect
5 | github.com/pmezard/go-difflib v1.0.0 // indirect
6 | github.com/stretchr/testify v1.2.2
7 | )
8 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cast/go.sum:
--------------------------------------------------------------------------------
1 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
2 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
4 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
5 | github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
6 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
7 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | # Vim files https://github.com/github/gitignore/blob/master/Global/Vim.gitignore
23 | # swap
24 | [._]*.s[a-w][a-z]
25 | [._]s[a-w][a-z]
26 | # session
27 | Session.vim
28 | # temporary
29 | .netrwhist
30 | *~
31 | # auto-generated tag files
32 | tags
33 |
34 | *.exe
35 | cobra.test
36 | bin
37 |
38 | .idea/
39 | *.iml
40 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/.golangci.yml:
--------------------------------------------------------------------------------
1 | run:
2 | deadline: 5m
3 |
4 | linters:
5 | disable-all: true
6 | enable:
7 | #- bodyclose
8 | - deadcode
9 | #- depguard
10 | #- dogsled
11 | #- dupl
12 | - errcheck
13 | #- exhaustive
14 | #- funlen
15 | - gas
16 | #- gochecknoinits
17 | - goconst
18 | #- gocritic
19 | #- gocyclo
20 | #- gofmt
21 | - goimports
22 | - golint
23 | #- gomnd
24 | #- goprintffuncname
25 | #- gosec
26 | #- gosimple
27 | - govet
28 | - ineffassign
29 | - interfacer
30 | #- lll
31 | - maligned
32 | - megacheck
33 | #- misspell
34 | #- nakedret
35 | #- noctx
36 | #- nolintlint
37 | #- rowserrcheck
38 | #- scopelint
39 | #- staticcheck
40 | - structcheck
41 | #- stylecheck
42 | #- typecheck
43 | - unconvert
44 | #- unparam
45 | #- unused
46 | - varcheck
47 | #- whitespace
48 | fast: false
49 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/.mailmap:
--------------------------------------------------------------------------------
1 | Steve Francia
2 | Bjørn Erik Pedersen
3 | Fabiano Franz
4 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | stages:
4 | - test
5 | - build
6 |
7 | go:
8 | - 1.12.x
9 | - 1.13.x
10 | - tip
11 |
12 | env: GO111MODULE=on
13 |
14 | before_install:
15 | - go get -u github.com/kyoh86/richgo
16 | - go get -u github.com/mitchellh/gox
17 | - curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin latest
18 |
19 | matrix:
20 | allow_failures:
21 | - go: tip
22 | include:
23 | - stage: build
24 | go: 1.13.x
25 | script: make cobra_generator
26 |
27 | script:
28 | - make test
29 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/Makefile:
--------------------------------------------------------------------------------
1 | BIN="./bin"
2 | SRC=$(shell find . -name "*.go")
3 |
4 | ifeq (, $(shell which golangci-lint))
5 | $(warning "could not find golangci-lint in $(PATH), run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh")
6 | endif
7 |
8 | ifeq (, $(shell which richgo))
9 | $(warning "could not find richgo in $(PATH), run: go get github.com/kyoh86/richgo")
10 | endif
11 |
12 | .PHONY: fmt lint test cobra_generator install_deps clean
13 |
14 | default: all
15 |
16 | all: fmt test cobra_generator
17 |
18 | fmt:
19 | $(info ******************** checking formatting ********************)
20 | @test -z $(shell gofmt -l $(SRC)) || (gofmt -d $(SRC); exit 1)
21 |
22 | lint:
23 | $(info ******************** running lint tools ********************)
24 | golangci-lint run -v
25 |
26 | test: install_deps lint
27 | $(info ******************** running tests ********************)
28 | richgo test -v ./...
29 |
30 | cobra_generator: install_deps
31 | $(info ******************** building generator ********************)
32 | mkdir -p $(BIN)
33 | make -C cobra all
34 |
35 | install_deps:
36 | $(info ******************** downloading dependencies ********************)
37 | go get -v ./...
38 |
39 | clean:
40 | rm -rf $(BIN)
41 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/command_notwin.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package cobra
4 |
5 | var preExecHookFn func(*Command)
6 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/command_win.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package cobra
4 |
5 | import (
6 | "fmt"
7 | "os"
8 | "time"
9 |
10 | "github.com/inconshreveable/mousetrap"
11 | )
12 |
13 | var preExecHookFn = preExecHook
14 |
15 | func preExecHook(c *Command) {
16 | if MousetrapHelpText != "" && mousetrap.StartedByExplorer() {
17 | c.Print(MousetrapHelpText)
18 | if MousetrapDisplayDuration > 0 {
19 | time.Sleep(MousetrapDisplayDuration)
20 | } else {
21 | c.Println("Press return to continue...")
22 | fmt.Scanln()
23 | }
24 | os.Exit(1)
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/fish_completions.md:
--------------------------------------------------------------------------------
1 | ## Generating Fish Completions For Your cobra.Command
2 |
3 | Please refer to [Shell Completions](shell_completions.md) for details.
4 |
5 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/spf13/cobra
2 |
3 | go 1.12
4 |
5 | require (
6 | github.com/cpuguy83/go-md2man/v2 v2.0.0
7 | github.com/inconshreveable/mousetrap v1.0.0
8 | github.com/mitchellh/go-homedir v1.1.0
9 | github.com/spf13/pflag v1.0.5
10 | github.com/spf13/viper v1.7.0
11 | gopkg.in/yaml.v2 v2.4.0
12 | )
13 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/powershell_completions.md:
--------------------------------------------------------------------------------
1 | # Generating PowerShell Completions For Your Own cobra.Command
2 |
3 | Please refer to [Shell Completions](shell_completions.md#powershell-completions) for details.
4 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/jwalterweatherman/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/jwalterweatherman/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Steve Francia
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/vendor/github.com/spf13/jwalterweatherman/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/spf13/jwalterweatherman
2 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/pflag/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/*
2 |
3 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/pflag/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 |
3 | language: go
4 |
5 | go:
6 | - 1.9.x
7 | - 1.10.x
8 | - 1.11.x
9 | - tip
10 |
11 | matrix:
12 | allow_failures:
13 | - go: tip
14 |
15 | install:
16 | - go get golang.org/x/lint/golint
17 | - export PATH=$GOPATH/bin:$PATH
18 | - go install ./...
19 |
20 | script:
21 | - verify/all.sh -v
22 | - go test ./...
23 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/pflag/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/spf13/pflag
2 |
3 | go 1.12
4 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/pflag/go.sum:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsdaniell/whats-cli/b6017ad955b370d323914ee7086a12cb149c3299/vendor/github.com/spf13/pflag/go.sum
--------------------------------------------------------------------------------
/vendor/github.com/spf13/viper/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | indent_size = 4
7 | indent_style = space
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.go]
12 | indent_style = tab
13 |
14 | [{Makefile, *.mk}]
15 | indent_style = tab
16 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/viper/.gitignore:
--------------------------------------------------------------------------------
1 | /.idea/
2 | /bin/
3 | /build/
4 | /var/
5 | /vendor/
6 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/viper/.golangci.yml:
--------------------------------------------------------------------------------
1 | linters-settings:
2 | golint:
3 | min-confidence: 0.1
4 | goimports:
5 | local-prefixes: github.com/spf13/viper
6 |
7 | linters:
8 | enable-all: true
9 | disable:
10 | - funlen
11 | - maligned
12 |
13 | # TODO: fix me
14 | - wsl
15 | - gochecknoinits
16 | - gosimple
17 | - gochecknoglobals
18 | - errcheck
19 | - lll
20 | - godox
21 | - scopelint
22 | - gocyclo
23 | - gocognit
24 | - gocritic
25 |
26 | service:
27 | golangci-lint-version: 1.21.x
28 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/viper/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Steve Francia
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/vendor/github.com/subosito/gotenv/.env:
--------------------------------------------------------------------------------
1 | HELLO=world
2 |
--------------------------------------------------------------------------------
/vendor/github.com/subosito/gotenv/.env.invalid:
--------------------------------------------------------------------------------
1 | lol$wut
2 |
--------------------------------------------------------------------------------
/vendor/github.com/subosito/gotenv/.gitignore:
--------------------------------------------------------------------------------
1 | *.test
2 | *.out
3 | annotate.json
4 |
--------------------------------------------------------------------------------
/vendor/github.com/subosito/gotenv/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.x
4 | os:
5 | - linux
6 | - osx
7 | script:
8 | - go test -test.v -coverprofile=coverage.out -covermode=count
9 | after_success:
10 | - bash <(curl -s https://codecov.io/bash)
11 |
--------------------------------------------------------------------------------
/vendor/github.com/subosito/gotenv/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | ## [1.2.0] - 2019-08-03
4 |
5 | ### Added
6 |
7 | - Add `Must` helper to raise an error as panic. It can be used with `Load` and `OverLoad`.
8 | - Add more tests to be 100% coverage.
9 | - Add CHANGELOG
10 | - Add more OS for the test: OSX and Windows
11 |
12 | ### Changed
13 |
14 | - Reduce complexity and improve source code for having `A+` score in [goreportcard](https://goreportcard.com/report/github.com/subosito/gotenv).
15 | - Updated README with mentions to all available functions
16 |
17 | ### Removed
18 |
19 | - Remove `ErrFormat`
20 | - Remove `MustLoad` and `MustOverload`, replaced with `Must` helper.
21 |
22 | ## [1.1.1] - 2018-06-05
23 |
24 | ### Changed
25 |
26 | - Replace `os.Getenv` with `os.LookupEnv` to ensure that the environment variable is not set, by [radding](https://github.com/radding)
27 |
28 | ## [1.1.0] - 2017-03-20
29 |
30 | ### Added
31 |
32 | - Supports carriage return in env
33 | - Handle files with UTF-8 BOM
34 |
35 | ### Changed
36 |
37 | - Whitespace handling
38 |
39 | ### Fixed
40 |
41 | - Incorrect variable expansion
42 | - Handling escaped '$' characters
43 |
44 | ## [1.0.0] - 2014-10-05
45 |
46 | First stable release.
47 |
48 |
--------------------------------------------------------------------------------
/vendor/github.com/subosito/gotenv/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 Alif Rachmawadi
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/subosito/gotenv/appveyor.yml:
--------------------------------------------------------------------------------
1 | build: off
2 | clone_folder: c:\gopath\src\github.com\subosito\gotenv
3 | environment:
4 | GOPATH: c:\gopath
5 | stack: go 1.10
6 | before_test:
7 | - go get -t
8 | test_script:
9 | - go test -v -cover -race
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at https://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at https://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/const_amd64.h:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // This code was translated into a form compatible with 6a from the public
6 | // domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
7 |
8 | #define REDMASK51 0x0007FFFFFFFFFFFF
9 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/const_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // This code was translated into a form compatible with 6a from the public
6 | // domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
7 |
8 | // +build amd64,!gccgo,!appengine
9 |
10 | // These constants cannot be encoded in non-MOVQ immediates.
11 | // We access them directly from memory instead.
12 |
13 | DATA ·_121666_213(SB)/8, $996687872
14 | GLOBL ·_121666_213(SB), 8, $8
15 |
16 | DATA ·_2P0(SB)/8, $0xFFFFFFFFFFFDA
17 | GLOBL ·_2P0(SB), 8, $8
18 |
19 | DATA ·_2P1234(SB)/8, $0xFFFFFFFFFFFFE
20 | GLOBL ·_2P1234(SB), 8, $8
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/cswap_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,!gccgo,!appengine
6 |
7 | // func cswap(inout *[4][5]uint64, v uint64)
8 | TEXT ·cswap(SB),7,$0
9 | MOVQ inout+0(FP),DI
10 | MOVQ v+8(FP),SI
11 |
12 | SUBQ $1, SI
13 | NOTQ SI
14 | MOVQ SI, X15
15 | PSHUFD $0x44, X15, X15
16 |
17 | MOVOU 0(DI), X0
18 | MOVOU 16(DI), X2
19 | MOVOU 32(DI), X4
20 | MOVOU 48(DI), X6
21 | MOVOU 64(DI), X8
22 | MOVOU 80(DI), X1
23 | MOVOU 96(DI), X3
24 | MOVOU 112(DI), X5
25 | MOVOU 128(DI), X7
26 | MOVOU 144(DI), X9
27 |
28 | MOVO X1, X10
29 | MOVO X3, X11
30 | MOVO X5, X12
31 | MOVO X7, X13
32 | MOVO X9, X14
33 |
34 | PXOR X0, X10
35 | PXOR X2, X11
36 | PXOR X4, X12
37 | PXOR X6, X13
38 | PXOR X8, X14
39 | PAND X15, X10
40 | PAND X15, X11
41 | PAND X15, X12
42 | PAND X15, X13
43 | PAND X15, X14
44 | PXOR X10, X0
45 | PXOR X10, X1
46 | PXOR X11, X2
47 | PXOR X11, X3
48 | PXOR X12, X4
49 | PXOR X12, X5
50 | PXOR X13, X6
51 | PXOR X13, X7
52 | PXOR X14, X8
53 | PXOR X14, X9
54 |
55 | MOVOU X0, 0(DI)
56 | MOVOU X2, 16(DI)
57 | MOVOU X4, 32(DI)
58 | MOVOU X6, 48(DI)
59 | MOVOU X8, 64(DI)
60 | MOVOU X1, 80(DI)
61 | MOVOU X3, 96(DI)
62 | MOVOU X5, 112(DI)
63 | MOVOU X7, 128(DI)
64 | MOVOU X9, 144(DI)
65 | RET
66 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/doc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Package curve25519 provides an implementation of scalar multiplication on
6 | // the elliptic curve known as curve25519. See https://cr.yp.to/ecdh.html
7 | package curve25519 // import "golang.org/x/crypto/curve25519"
8 |
9 | // basePoint is the x coordinate of the generator of the curve.
10 | var basePoint = [32]byte{9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
11 |
12 | // ScalarMult sets dst to the product in*base where dst and base are the x
13 | // coordinates of group points and all values are in little-endian form.
14 | func ScalarMult(dst, in, base *[32]byte) {
15 | scalarMult(dst, in, base)
16 | }
17 |
18 | // ScalarBaseMult sets dst to the product in*base where dst and base are the x
19 | // coordinates of group points, base is the standard generator and all values
20 | // are in little-endian form.
21 | func ScalarBaseMult(dst, in *[32]byte) {
22 | ScalarMult(dst, in, &basePoint)
23 | }
24 |
--------------------------------------------------------------------------------
/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/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/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_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for arm, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
23 | BL runtime·entersyscall(SB)
24 | MOVW trap+0(FP), R7
25 | MOVW a1+4(FP), R0
26 | MOVW a2+8(FP), R1
27 | MOVW a3+12(FP), R2
28 | MOVW $0, R3
29 | MOVW $0, R4
30 | MOVW $0, R5
31 | SWI $0
32 | MOVW R0, r1+16(FP)
33 | MOVW $0, R0
34 | MOVW R0, r2+20(FP)
35 | BL runtime·exitsyscall(SB)
36 | RET
37 |
38 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
39 | B syscall·RawSyscall(SB)
40 |
41 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
42 | B syscall·RawSyscall6(SB)
43 |
44 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
45 | MOVW trap+0(FP), R7 // syscall entry
46 | MOVW a1+4(FP), R0
47 | MOVW a2+8(FP), R1
48 | MOVW a3+12(FP), R2
49 | SWI $0
50 | MOVW R0, r1+16(FP)
51 | MOVW $0, R0
52 | MOVW R0, r2+20(FP)
53 | RET
54 |
55 | TEXT ·seek(SB),NOSPLIT,$0-28
56 | B syscall·seek(SB)
57 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build arm64
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-56
15 | B syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
18 | B syscall·Syscall6(SB)
19 |
20 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
21 | BL runtime·entersyscall(SB)
22 | MOVD a1+8(FP), R0
23 | MOVD a2+16(FP), R1
24 | MOVD a3+24(FP), R2
25 | MOVD $0, R3
26 | MOVD $0, R4
27 | MOVD $0, R5
28 | MOVD trap+0(FP), R8 // syscall entry
29 | SVC
30 | MOVD R0, r1+32(FP) // r1
31 | MOVD R1, r2+40(FP) // r2
32 | BL runtime·exitsyscall(SB)
33 | RET
34 |
35 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
36 | B syscall·RawSyscall(SB)
37 |
38 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
39 | B syscall·RawSyscall6(SB)
40 |
41 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
42 | MOVD a1+8(FP), R0
43 | MOVD a2+16(FP), R1
44 | MOVD a3+24(FP), R2
45 | MOVD $0, R3
46 | MOVD $0, R4
47 | MOVD $0, R5
48 | MOVD trap+0(FP), R8 // syscall entry
49 | SVC
50 | MOVD R0, r1+32(FP)
51 | MOVD R1, r2+40(FP)
52 | RET
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build mips64 mips64le
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for mips64, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | JMP syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | JMP syscall·Syscall6(SB)
23 |
24 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
25 | JAL runtime·entersyscall(SB)
26 | MOVV a1+8(FP), R4
27 | MOVV a2+16(FP), R5
28 | MOVV a3+24(FP), R6
29 | MOVV R0, R7
30 | MOVV R0, R8
31 | MOVV R0, R9
32 | MOVV trap+0(FP), R2 // syscall entry
33 | SYSCALL
34 | MOVV R2, r1+32(FP)
35 | MOVV R3, r2+40(FP)
36 | JAL runtime·exitsyscall(SB)
37 | RET
38 |
39 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
40 | JMP syscall·RawSyscall(SB)
41 |
42 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
43 | JMP syscall·RawSyscall6(SB)
44 |
45 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
46 | MOVV a1+8(FP), R4
47 | MOVV a2+16(FP), R5
48 | MOVV a3+24(FP), R6
49 | MOVV R0, R7
50 | MOVV R0, R8
51 | MOVV R0, R9
52 | MOVV trap+0(FP), R2 // syscall entry
53 | SYSCALL
54 | MOVV R2, r1+32(FP)
55 | MOVV R3, r2+40(FP)
56 | RET
57 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build mips mipsle
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for mips, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-28
19 | JMP syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
22 | JMP syscall·Syscall6(SB)
23 |
24 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
25 | JMP syscall·Syscall9(SB)
26 |
27 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
28 | JAL runtime·entersyscall(SB)
29 | MOVW a1+4(FP), R4
30 | MOVW a2+8(FP), R5
31 | MOVW a3+12(FP), R6
32 | MOVW R0, R7
33 | MOVW trap+0(FP), R2 // syscall entry
34 | SYSCALL
35 | MOVW R2, r1+16(FP) // r1
36 | MOVW R3, r2+20(FP) // r2
37 | JAL runtime·exitsyscall(SB)
38 | RET
39 |
40 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
41 | JMP syscall·RawSyscall(SB)
42 |
43 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
44 | JMP syscall·RawSyscall6(SB)
45 |
46 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
47 | MOVW a1+4(FP), R4
48 | MOVW a2+8(FP), R5
49 | MOVW a3+12(FP), R6
50 | MOVW trap+0(FP), R2 // syscall entry
51 | SYSCALL
52 | MOVW R2, r1+16(FP)
53 | MOVW R3, r2+20(FP)
54 | RET
55 |
--------------------------------------------------------------------------------
/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 $0, A3
27 | MOV $0, A4
28 | MOV $0, A5
29 | MOV $0, A6
30 | MOV trap+0(FP), A7 // syscall entry
31 | ECALL
32 | MOV A0, r1+32(FP) // r1
33 | MOV A1, r2+40(FP) // r2
34 | CALL runtime·exitsyscall(SB)
35 | RET
36 |
37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
38 | JMP syscall·RawSyscall(SB)
39 |
40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
41 | JMP syscall·RawSyscall6(SB)
42 |
43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
44 | MOV a1+8(FP), A0
45 | MOV a2+16(FP), A1
46 | MOV a3+24(FP), A2
47 | MOV ZERO, A3
48 | MOV ZERO, A4
49 | MOV ZERO, A5
50 | MOV trap+0(FP), A7 // syscall entry
51 | ECALL
52 | MOV A0, r1+32(FP)
53 | MOV A1, r2+40(FP)
54 | RET
55 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_s390x.s:
--------------------------------------------------------------------------------
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 s390x
6 | // +build linux
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for s390x, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | BR syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | BR syscall·Syscall6(SB)
23 |
24 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
25 | BL runtime·entersyscall(SB)
26 | MOVD a1+8(FP), R2
27 | MOVD a2+16(FP), R3
28 | MOVD a3+24(FP), R4
29 | MOVD $0, R5
30 | MOVD $0, R6
31 | MOVD $0, R7
32 | MOVD trap+0(FP), R1 // syscall entry
33 | SYSCALL
34 | MOVD R2, r1+32(FP)
35 | MOVD R3, r2+40(FP)
36 | BL runtime·exitsyscall(SB)
37 | RET
38 |
39 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
40 | BR syscall·RawSyscall(SB)
41 |
42 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
43 | BR syscall·RawSyscall6(SB)
44 |
45 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
46 | MOVD a1+8(FP), R2
47 | MOVD a2+16(FP), R3
48 | MOVD a3+24(FP), R4
49 | MOVD $0, R5
50 | MOVD $0, R6
51 | MOVD $0, R7
52 | MOVD trap+0(FP), R1 // syscall entry
53 | SYSCALL
54 | MOVD R2, r1+32(FP)
55 | MOVD R3, r2+40(FP)
56 | RET
57 |
--------------------------------------------------------------------------------
/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 | )
27 |
28 | // Socketoption Level
29 | const (
30 | SOL_BLUETOOTH = 0x112
31 | SOL_HCI = 0x0
32 | SOL_L2CAP = 0x6
33 | SOL_RFCOMM = 0x12
34 | SOL_SCO = 0x11
35 | )
36 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/constants.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | const (
10 | R_OK = 0x4
11 | W_OK = 0x2
12 | X_OK = 0x1
13 | )
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_aix_ppc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix
6 | // +build ppc
7 |
8 | // Functions to access/create device major and minor numbers matching the
9 | // encoding used by AIX.
10 |
11 | package unix
12 |
13 | // Major returns the major component of a Linux device number.
14 | func Major(dev uint64) uint32 {
15 | return uint32((dev >> 16) & 0xffff)
16 | }
17 |
18 | // Minor returns the minor component of a Linux device number.
19 | func Minor(dev uint64) uint32 {
20 | return uint32(dev & 0xffff)
21 | }
22 |
23 | // Mkdev returns a Linux device number generated from the given major and minor
24 | // components.
25 | func Mkdev(major, minor uint32) uint64 {
26 | return uint64(((major) << 16) | (minor))
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix
6 | // +build ppc64
7 |
8 | // Functions to access/create device major and minor numbers matching the
9 | // encoding used AIX.
10 |
11 | package unix
12 |
13 | // Major returns the major component of a Linux device number.
14 | func Major(dev uint64) uint32 {
15 | return uint32((dev & 0x3fffffff00000000) >> 32)
16 | }
17 |
18 | // Minor returns the minor component of a Linux device number.
19 | func Minor(dev uint64) uint32 {
20 | return uint32((dev & 0x00000000ffffffff) >> 0)
21 | }
22 |
23 | // Mkdev returns a Linux device number generated from the given major and minor
24 | // components.
25 | func Mkdev(major, minor uint32) uint64 {
26 | var DEVNO64 uint64
27 | DEVNO64 = 0x8000000000000000
28 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64)
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in Darwin's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of a Darwin device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev >> 24) & 0xff)
13 | }
14 |
15 | // Minor returns the minor component of a Darwin device number.
16 | func Minor(dev uint64) uint32 {
17 | return uint32(dev & 0xffffff)
18 | }
19 |
20 | // Mkdev returns a Darwin device number generated from the given major and minor
21 | // components.
22 | func Mkdev(major, minor uint32) uint64 {
23 | return (uint64(major) << 24) | uint64(minor)
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_dragonfly.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in Dragonfly's sys/types.h header.
7 | //
8 | // The information below is extracted and adapted from sys/types.h:
9 | //
10 | // Minor gives a cookie instead of an index since in order to avoid changing the
11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for
12 | // devices that don't use them.
13 |
14 | package unix
15 |
16 | // Major returns the major component of a DragonFlyBSD device number.
17 | func Major(dev uint64) uint32 {
18 | return uint32((dev >> 8) & 0xff)
19 | }
20 |
21 | // Minor returns the minor component of a DragonFlyBSD device number.
22 | func Minor(dev uint64) uint32 {
23 | return uint32(dev & 0xffff00ff)
24 | }
25 |
26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and
27 | // minor components.
28 | func Mkdev(major, minor uint32) uint64 {
29 | return (uint64(major) << 8) | uint64(minor)
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_freebsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in FreeBSD's sys/types.h header.
7 | //
8 | // The information below is extracted and adapted from sys/types.h:
9 | //
10 | // Minor gives a cookie instead of an index since in order to avoid changing the
11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for
12 | // devices that don't use them.
13 |
14 | package unix
15 |
16 | // Major returns the major component of a FreeBSD device number.
17 | func Major(dev uint64) uint32 {
18 | return uint32((dev >> 8) & 0xff)
19 | }
20 |
21 | // Minor returns the minor component of a FreeBSD device number.
22 | func Minor(dev uint64) uint32 {
23 | return uint32(dev & 0xffff00ff)
24 | }
25 |
26 | // Mkdev returns a FreeBSD device number generated from the given major and
27 | // minor components.
28 | func Mkdev(major, minor uint32) uint64 {
29 | return (uint64(major) << 8) | uint64(minor)
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_netbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in NetBSD's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of a NetBSD device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev & 0x000fff00) >> 8)
13 | }
14 |
15 | // Minor returns the minor component of a NetBSD device number.
16 | func Minor(dev uint64) uint32 {
17 | minor := uint32((dev & 0x000000ff) >> 0)
18 | minor |= uint32((dev & 0xfff00000) >> 12)
19 | return minor
20 | }
21 |
22 | // Mkdev returns a NetBSD device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | dev := (uint64(major) << 8) & 0x000fff00
26 | dev |= (uint64(minor) << 12) & 0xfff00000
27 | dev |= (uint64(minor) << 0) & 0x000000ff
28 | return dev
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_openbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in OpenBSD's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of an OpenBSD device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev & 0x0000ff00) >> 8)
13 | }
14 |
15 | // Minor returns the minor component of an OpenBSD device number.
16 | func Minor(dev uint64) uint32 {
17 | minor := uint32((dev & 0x000000ff) >> 0)
18 | minor |= uint32((dev & 0xffff0000) >> 8)
19 | return minor
20 | }
21 |
22 | // Mkdev returns an OpenBSD device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | dev := (uint64(major) << 8) & 0x0000ff00
26 | dev |= (uint64(minor) << 8) & 0xffff0000
27 | dev |= (uint64(minor) << 0) & 0x000000ff
28 | return dev
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dirent.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | // ParseDirent parses up to max directory entries in buf,
12 | // appending the names to names. It returns the number of
13 | // bytes consumed from buf, the number of entries added
14 | // to names, and the new names slice.
15 | func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
16 | return syscall.ParseDirent(buf, max, names)
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/endian_big.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | // +build ppc64 s390x mips mips64
6 |
7 | package unix
8 |
9 | const isBigEndian = true
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/endian_little.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | // +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le
6 |
7 | package unix
8 |
9 | const isBigEndian = false
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/env_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | // Unix environment variables.
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Getenv(key string) (value string, found bool) {
14 | return syscall.Getenv(key)
15 | }
16 |
17 | func Setenv(key, value string) error {
18 | return syscall.Setenv(key, value)
19 | }
20 |
21 | func Clearenv() {
22 | syscall.Clearenv()
23 | }
24 |
25 | func Environ() []string {
26 | return syscall.Environ()
27 | }
28 |
29 | func Unsetenv(key string) error {
30 | return syscall.Unsetenv(key)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/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 flock_linux_32bit.go to be SYS_FCNTL64.
13 | var fcntl64Syscall uintptr = SYS_FCNTL
14 |
15 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
16 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
17 | valptr, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(arg))
18 | var err error
19 | if errno != 0 {
20 | err = errno
21 | }
22 | return int(valptr), err
23 | }
24 |
25 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
26 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
27 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
28 | if errno == 0 {
29 | return nil
30 | }
31 | return errno
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fcntl_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/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/ioctl.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | import "runtime"
10 |
11 | // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
12 | //
13 | // To change fd's window size, the req argument should be TIOCSWINSZ.
14 | func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
15 | // TODO: if we get the chance, remove the req parameter and
16 | // hardcode TIOCSWINSZ.
17 | err := ioctlSetWinsize(fd, req, value)
18 | runtime.KeepAlive(value)
19 | return err
20 | }
21 |
22 | // IoctlSetTermios performs an ioctl on fd with a *Termios.
23 | //
24 | // The req value will usually be TCSETA or TIOCSETA.
25 | func IoctlSetTermios(fd int, req uint, value *Termios) error {
26 | // TODO: if we get the chance, remove the req parameter.
27 | err := ioctlSetTermios(fd, req, value)
28 | runtime.KeepAlive(value)
29 | return err
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/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_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Socket control messages
6 |
7 | package unix
8 |
9 | import "unsafe"
10 |
11 | // UnixCredentials encodes credentials into a socket control message
12 | // for sending to another process. This can be used for
13 | // authentication.
14 | func UnixCredentials(ucred *Ucred) []byte {
15 | b := make([]byte, CmsgSpace(SizeofUcred))
16 | h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
17 | h.Level = SOL_SOCKET
18 | h.Type = SCM_CREDENTIALS
19 | h.SetLen(CmsgLen(SizeofUcred))
20 | *((*Ucred)(cmsgData(h))) = *ucred
21 | return b
22 | }
23 |
24 | // ParseUnixCredentials decodes a socket control message that contains
25 | // credentials in a Ucred structure. To receive such a message, the
26 | // SO_PASSCRED option must be enabled on the socket.
27 | func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {
28 | if m.Header.Level != SOL_SOCKET {
29 | return nil, EINVAL
30 | }
31 | if m.Header.Type != SCM_CREDENTIALS {
32 | return nil, EINVAL
33 | }
34 | ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
35 | return &ucred, nil
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/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_libSystem.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin,go1.12
6 |
7 | package unix
8 |
9 | import "unsafe"
10 |
11 | // Implemented in the runtime package (runtime/sys_darwin.go)
12 | func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
13 | func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
14 | func syscall_syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
15 | func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // 32-bit only
16 | func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
17 | func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
18 |
19 | //go:linkname syscall_syscall syscall.syscall
20 | //go:linkname syscall_syscall6 syscall.syscall6
21 | //go:linkname syscall_syscall6X syscall.syscall6X
22 | //go:linkname syscall_syscall9 syscall.syscall9
23 | //go:linkname syscall_rawSyscall syscall.rawSyscall
24 | //go:linkname syscall_rawSyscall6 syscall.rawSyscall6
25 |
26 | // Find the entry point for f. See comments in runtime/proc.go for the
27 | // function of the same name.
28 | //go:nosplit
29 | func funcPC(f func()) uintptr {
30 | return **(**uintptr)(unsafe.Pointer(&f))
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_dragonfly_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,dragonfly
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: nsec}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: usec}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint64(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint64(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_freebsd_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,freebsd
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: nsec}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: usec}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint64(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint64(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm64,freebsd
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: nsec}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: usec}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint64(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint64(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,linux
6 | // +build !gccgo
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | //go:noescape
13 | func gettimeofday(tv *Timeval) (err syscall.Errno)
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,!gccgo
6 |
7 | package unix
8 |
9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail.
10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
11 |
12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't
13 | // fail.
14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,!gccgo,386
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | // Underlying system call writes to newoffset via pointer.
12 | // Implemented in assembly to avoid allocation.
13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
14 |
15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,gccgo,386
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
15 | var newoffset int64
16 | offsetLow := uint32(offset & 0xffffffff)
17 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
19 | return newoffset, err
20 | }
21 |
22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
24 | return int(fd), err
25 | }
26 |
27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
29 | return int(fd), err
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,gccgo,arm
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
15 | var newoffset int64
16 | offsetLow := uint32(offset & 0xffffffff)
17 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
19 | return newoffset, err
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_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 (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386,openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
36 | // of openbsd/386 the syscall is called sysctl instead of __sysctl.
37 | const SYS___SYSCTL = SYS_SYSCTL
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
36 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl.
37 | const SYS___SYSCTL = SYS_SYSCTL
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm,openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
36 | // of openbsd/arm the syscall is called sysctl instead of __sysctl.
37 | const SYS___SYSCTL = SYS_SYSCTL
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_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 (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
36 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl.
37 | const SYS___SYSCTL = SYS_SYSCTL
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,solaris
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func (iov *Iovec) SetLen(length int) {
18 | iov.Len = uint64(length)
19 | }
20 |
21 | func (cmsg *Cmsghdr) SetLen(length int) {
22 | cmsg.Len = uint32(length)
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6 | // +build !gccgo,!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/zptracearm_linux.go:
--------------------------------------------------------------------------------
1 | // Code generated by linux/mkall.go generatePtracePair(arm, arm64). DO NOT EDIT.
2 |
3 | // +build linux
4 | // +build arm arm64
5 |
6 | package unix
7 |
8 | import "unsafe"
9 |
10 | // PtraceRegsArm is the registers used by arm binaries.
11 | type PtraceRegsArm struct {
12 | Uregs [18]uint32
13 | }
14 |
15 | // PtraceGetRegsArm fetches the registers used by arm binaries.
16 | func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error {
17 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
18 | }
19 |
20 | // PtraceSetRegsArm sets the registers used by arm binaries.
21 | func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error {
22 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
23 | }
24 |
25 | // PtraceRegsArm64 is the registers used by arm64 binaries.
26 | type PtraceRegsArm64 struct {
27 | Regs [31]uint64
28 | Sp uint64
29 | Pc uint64
30 | Pstate uint64
31 | }
32 |
33 | // PtraceGetRegsArm64 fetches the registers used by arm64 binaries.
34 | func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {
35 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
36 | }
37 |
38 | // PtraceSetRegsArm64 sets the registers used by arm64 binaries.
39 | func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
40 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/ini.v1/.gitignore:
--------------------------------------------------------------------------------
1 | testdata/conf_out.ini
2 | ini.sublime-project
3 | ini.sublime-workspace
4 | testdata/conf_reflect.ini
5 | .idea
6 | /.vscode
7 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/ini.v1/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: go
3 | go:
4 | - 1.6.x
5 | - 1.7.x
6 | - 1.8.x
7 | - 1.9.x
8 | - 1.10.x
9 | - 1.11.x
10 | - 1.12.x
11 | - 1.13.x
12 |
13 | install: skip
14 | script:
15 | - go get golang.org/x/tools/cmd/cover
16 | - go get github.com/smartystreets/goconvey
17 | - mkdir -p $HOME/gopath/src/gopkg.in
18 | - ln -s $HOME/gopath/src/github.com/go-ini/ini $HOME/gopath/src/gopkg.in/ini.v1
19 | - cd $HOME/gopath/src/gopkg.in/ini.v1
20 | - go test -v -cover -race
21 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/ini.v1/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: build test bench vet coverage
2 |
3 | build: vet bench
4 |
5 | test:
6 | go test -v -cover -race
7 |
8 | bench:
9 | go test -v -cover -race -test.bench=. -test.benchmem
10 |
11 | vet:
12 | go vet
13 |
14 | coverage:
15 | go test -coverprofile=c.out && go tool cover -html=c.out && rm c.out
16 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/ini.v1/deprecated.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 Unknwon
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License"): you may
4 | // not use this file except in compliance with the License. You may obtain
5 | // 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, WITHOUT
11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 | // License for the specific language governing permissions and limitations
13 | // under the License.
14 |
15 | package ini
16 |
17 | const (
18 | // Deprecated: Use "DefaultSection" instead.
19 | DEFAULT_SECTION = DefaultSection
20 | )
21 |
22 | var (
23 | // Deprecated: AllCapsUnderscore converts to format ALL_CAPS_UNDERSCORE.
24 | AllCapsUnderscore = SnackCase
25 | )
26 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/ini.v1/error.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 Unknwon
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License"): you may
4 | // not use this file except in compliance with the License. You may obtain
5 | // 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, WITHOUT
11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 | // License for the specific language governing permissions and limitations
13 | // under the License.
14 |
15 | package ini
16 |
17 | import (
18 | "fmt"
19 | )
20 |
21 | // ErrDelimiterNotFound indicates the error type of no delimiter is found which there should be one.
22 | type ErrDelimiterNotFound struct {
23 | Line string
24 | }
25 |
26 | // IsErrDelimiterNotFound returns true if the given error is an instance of ErrDelimiterNotFound.
27 | func IsErrDelimiterNotFound(err error) bool {
28 | _, ok := err.(ErrDelimiterNotFound)
29 | return ok
30 | }
31 |
32 | func (err ErrDelimiterNotFound) Error() string {
33 | return fmt.Sprintf("key-value delimiter not found: %s", err.Line)
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/ini.v1/helper.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 Unknwon
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License"): you may
4 | // not use this file except in compliance with the License. You may obtain
5 | // 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, WITHOUT
11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 | // License for the specific language governing permissions and limitations
13 | // under the License.
14 |
15 | package ini
16 |
17 | func inSlice(str string, s []string) bool {
18 | for _, v := range s {
19 | if str == v {
20 | return true
21 | }
22 | }
23 | return false
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/yaml.v2/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - "1.4.x"
5 | - "1.5.x"
6 | - "1.6.x"
7 | - "1.7.x"
8 | - "1.8.x"
9 | - "1.9.x"
10 | - "1.10.x"
11 | - "1.11.x"
12 | - "1.12.x"
13 | - "1.13.x"
14 | - "1.14.x"
15 | - "tip"
16 |
17 | go_import_path: gopkg.in/yaml.v2
18 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/yaml.v2/LICENSE.libyaml:
--------------------------------------------------------------------------------
1 | The following files were ported to Go from C files of libyaml, and thus
2 | are still covered by their original copyright and license:
3 |
4 | apic.go
5 | emitterc.go
6 | parserc.go
7 | readerc.go
8 | scannerc.go
9 | writerc.go
10 | yamlh.go
11 | yamlprivateh.go
12 |
13 | Copyright (c) 2006 Kirill Simonov
14 |
15 | Permission is hereby granted, free of charge, to any person obtaining a copy of
16 | this software and associated documentation files (the "Software"), to deal in
17 | the Software without restriction, including without limitation the rights to
18 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
19 | of the Software, and to permit persons to whom the Software is furnished to do
20 | so, subject to the following conditions:
21 |
22 | The above copyright notice and this permission notice shall be included in all
23 | copies or substantial portions of the Software.
24 |
25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31 | SOFTWARE.
32 |
--------------------------------------------------------------------------------
/vendor/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 | go 1.15
4 |
5 | require gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
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 |
--------------------------------------------------------------------------------