From c996c12748a7963728de6265e2930cc3bbafd33f Mon Sep 17 00:00:00 2001
From: David Pinheiro
Date: Wed, 15 May 2019 20:22:44 -0700
Subject: [PATCH] Replacing vendor/ with Go modules
---
.gitignore | 2 +
Makefile | 8 +-
cmd/mole/main.go | 2 +-
go.mod | 14 +
go.sum | 29 +
vendor/github.com/BurntSushi/toml/COMPATIBLE | 3 -
vendor/github.com/BurntSushi/toml/COPYING | 21 -
vendor/github.com/BurntSushi/toml/Makefile | 19 -
vendor/github.com/BurntSushi/toml/README.md | 218 --
.../BurntSushi/toml/_examples/example.go | 61 -
.../BurntSushi/toml/_examples/example.toml | 35 -
.../BurntSushi/toml/_examples/hard.toml | 22 -
.../BurntSushi/toml/_examples/implicit.toml | 4 -
.../toml/_examples/invalid-apples.toml | 6 -
.../BurntSushi/toml/_examples/invalid.toml | 35 -
.../BurntSushi/toml/_examples/readme1.toml | 5 -
.../BurntSushi/toml/_examples/readme2.toml | 1 -
.../toml/cmd/toml-test-decoder/COPYING | 21 -
.../toml/cmd/toml-test-decoder/README.md | 13 -
.../toml/cmd/toml-test-decoder/main.go | 90 -
.../toml/cmd/toml-test-encoder/COPYING | 21 -
.../toml/cmd/toml-test-encoder/README.md | 13 -
.../toml/cmd/toml-test-encoder/main.go | 131 -
.../BurntSushi/toml/cmd/tomlv/COPYING | 21 -
.../BurntSushi/toml/cmd/tomlv/README.md | 21 -
.../BurntSushi/toml/cmd/tomlv/main.go | 61 -
vendor/github.com/BurntSushi/toml/decode.go | 509 ---
.../github.com/BurntSushi/toml/decode_meta.go | 121 -
.../github.com/BurntSushi/toml/decode_test.go | 1461 ---------
vendor/github.com/BurntSushi/toml/doc.go | 27 -
vendor/github.com/BurntSushi/toml/encode.go | 568 ----
.../github.com/BurntSushi/toml/encode_test.go | 615 ----
.../BurntSushi/toml/encoding_types.go | 19 -
.../BurntSushi/toml/encoding_types_1.1.go | 18 -
vendor/github.com/BurntSushi/toml/lex.go | 953 ------
vendor/github.com/BurntSushi/toml/parse.go | 592 ----
vendor/github.com/BurntSushi/toml/session.vim | 1 -
.../github.com/BurntSushi/toml/type_check.go | 91 -
.../github.com/BurntSushi/toml/type_fields.go | 242 --
.../github.com/awnumar/memguard/.travis.yml | 14 -
vendor/github.com/awnumar/memguard/AUTHORS | 19 -
.../awnumar/memguard/CODE_OF_CONDUCT.md | 5 -
.../awnumar/memguard/CONTRIBUTING.md | 10 -
vendor/github.com/awnumar/memguard/Gopkg.lock | 18 -
vendor/github.com/awnumar/memguard/Gopkg.toml | 26 -
vendor/github.com/awnumar/memguard/LICENSE | 201 --
vendor/github.com/awnumar/memguard/README.md | 52 -
.../github.com/awnumar/memguard/appveyor.yml | 26 -
.../github.com/awnumar/memguard/container.go | 95 -
vendor/github.com/awnumar/memguard/docs.go | 71 -
.../github.com/awnumar/memguard/docs_test.go | 9 -
vendor/github.com/awnumar/memguard/errors.go | 15 -
.../github.com/awnumar/memguard/internals.go | 103 -
vendor/github.com/awnumar/memguard/logo.svg | 2 -
.../memguard/memcall/memcall_freebsd.go | 79 -
.../memguard/memcall/memcall_openbsd.go | 76 -
.../awnumar/memguard/memcall/memcall_osx.go | 75 -
.../awnumar/memguard/memcall/memcall_test.go | 29 -
.../awnumar/memguard/memcall/memcall_unix.go | 79 -
.../memguard/memcall/memcall_windows.go | 94 -
.../github.com/awnumar/memguard/memguard.go | 875 ------
.../awnumar/memguard/memguard_test.go | 827 -----
.../vendor/golang.org/x/sys/.gitattributes | 10 -
.../vendor/golang.org/x/sys/.gitignore | 2 -
.../memguard/vendor/golang.org/x/sys/AUTHORS | 3 -
.../vendor/golang.org/x/sys/CONTRIBUTING.md | 31 -
.../vendor/golang.org/x/sys/CONTRIBUTORS | 3 -
.../memguard/vendor/golang.org/x/sys/LICENSE | 27 -
.../memguard/vendor/golang.org/x/sys/PATENTS | 22 -
.../vendor/golang.org/x/sys/README.md | 18 -
.../vendor/golang.org/x/sys/codereview.cfg | 1 -
.../vendor/golang.org/x/sys/plan9/asm.s | 8 -
.../golang.org/x/sys/plan9/asm_plan9_386.s | 30 -
.../golang.org/x/sys/plan9/asm_plan9_amd64.s | 30 -
.../golang.org/x/sys/plan9/asm_plan9_arm.s | 25 -
.../golang.org/x/sys/plan9/const_plan9.go | 70 -
.../golang.org/x/sys/plan9/dir_plan9.go | 212 --
.../golang.org/x/sys/plan9/env_plan9.go | 31 -
.../golang.org/x/sys/plan9/errors_plan9.go | 50 -
.../vendor/golang.org/x/sys/plan9/mkall.sh | 138 -
.../vendor/golang.org/x/sys/plan9/mkerrors.sh | 246 --
.../golang.org/x/sys/plan9/mksyscall.pl | 319 --
.../golang.org/x/sys/plan9/mksysnum_plan9.sh | 23 -
.../golang.org/x/sys/plan9/pwd_go15_plan9.go | 21 -
.../golang.org/x/sys/plan9/pwd_plan9.go | 23 -
.../vendor/golang.org/x/sys/plan9/race.go | 30 -
.../vendor/golang.org/x/sys/plan9/race0.go | 25 -
.../vendor/golang.org/x/sys/plan9/str.go | 22 -
.../vendor/golang.org/x/sys/plan9/syscall.go | 74 -
.../golang.org/x/sys/plan9/syscall_plan9.go | 349 ---
.../golang.org/x/sys/plan9/syscall_test.go | 33 -
.../x/sys/plan9/zsyscall_plan9_386.go | 292 --
.../x/sys/plan9/zsyscall_plan9_amd64.go | 292 --
.../x/sys/plan9/zsyscall_plan9_arm.go | 284 --
.../golang.org/x/sys/plan9/zsysnum_plan9.go | 49 -
.../vendor/golang.org/x/sys/unix/.gitignore | 2 -
.../vendor/golang.org/x/sys/unix/README.md | 173 --
.../golang.org/x/sys/unix/affinity_linux.go | 124 -
.../golang.org/x/sys/unix/asm_darwin_386.s | 29 -
.../golang.org/x/sys/unix/asm_darwin_amd64.s | 29 -
.../golang.org/x/sys/unix/asm_darwin_arm.s | 30 -
.../golang.org/x/sys/unix/asm_darwin_arm64.s | 30 -
.../x/sys/unix/asm_dragonfly_amd64.s | 29 -
.../golang.org/x/sys/unix/asm_freebsd_386.s | 29 -
.../golang.org/x/sys/unix/asm_freebsd_amd64.s | 29 -
.../golang.org/x/sys/unix/asm_freebsd_arm.s | 29 -
.../golang.org/x/sys/unix/asm_linux_386.s | 65 -
.../golang.org/x/sys/unix/asm_linux_amd64.s | 57 -
.../golang.org/x/sys/unix/asm_linux_arm.s | 56 -
.../golang.org/x/sys/unix/asm_linux_arm64.s | 52 -
.../golang.org/x/sys/unix/asm_linux_mips64x.s | 56 -
.../golang.org/x/sys/unix/asm_linux_mipsx.s | 54 -
.../golang.org/x/sys/unix/asm_linux_ppc64x.s | 56 -
.../golang.org/x/sys/unix/asm_linux_s390x.s | 56 -
.../golang.org/x/sys/unix/asm_netbsd_386.s | 29 -
.../golang.org/x/sys/unix/asm_netbsd_amd64.s | 29 -
.../golang.org/x/sys/unix/asm_netbsd_arm.s | 29 -
.../golang.org/x/sys/unix/asm_openbsd_386.s | 29 -
.../golang.org/x/sys/unix/asm_openbsd_amd64.s | 29 -
.../golang.org/x/sys/unix/asm_openbsd_arm.s | 29 -
.../golang.org/x/sys/unix/asm_solaris_amd64.s | 17 -
.../golang.org/x/sys/unix/bluetooth_linux.go | 35 -
.../golang.org/x/sys/unix/cap_freebsd.go | 195 --
.../vendor/golang.org/x/sys/unix/constants.go | 13 -
.../golang.org/x/sys/unix/creds_test.go | 152 -
.../golang.org/x/sys/unix/dev_darwin.go | 24 -
.../golang.org/x/sys/unix/dev_darwin_test.go | 51 -
.../golang.org/x/sys/unix/dev_dragonfly.go | 30 -
.../x/sys/unix/dev_dragonfly_test.go | 50 -
.../golang.org/x/sys/unix/dev_freebsd.go | 30 -
.../vendor/golang.org/x/sys/unix/dev_linux.go | 42 -
.../golang.org/x/sys/unix/dev_linux_test.go | 53 -
.../golang.org/x/sys/unix/dev_netbsd.go | 29 -
.../golang.org/x/sys/unix/dev_netbsd_test.go | 50 -
.../golang.org/x/sys/unix/dev_openbsd.go | 29 -
.../golang.org/x/sys/unix/dev_openbsd_test.go | 54 -
.../golang.org/x/sys/unix/dev_solaris_test.go | 51 -
.../vendor/golang.org/x/sys/unix/dirent.go | 17 -
.../golang.org/x/sys/unix/endian_big.go | 9 -
.../golang.org/x/sys/unix/endian_little.go | 9 -
.../vendor/golang.org/x/sys/unix/env_unix.go | 31 -
.../x/sys/unix/errors_freebsd_386.go | 227 --
.../x/sys/unix/errors_freebsd_amd64.go | 227 --
.../x/sys/unix/errors_freebsd_arm.go | 226 --
.../golang.org/x/sys/unix/export_test.go | 9 -
.../vendor/golang.org/x/sys/unix/flock.go | 22 -
.../x/sys/unix/flock_linux_32bit.go | 13 -
.../vendor/golang.org/x/sys/unix/gccgo.go | 61 -
.../vendor/golang.org/x/sys/unix/gccgo_c.c | 47 -
.../x/sys/unix/gccgo_linux_amd64.go | 20 -
.../golang.org/x/sys/unix/linux/Dockerfile | 51 -
.../golang.org/x/sys/unix/linux/mkall.go | 482 ---
.../golang.org/x/sys/unix/linux/mksysnum.pl | 85 -
.../golang.org/x/sys/unix/linux/types.go | 670 ----
.../vendor/golang.org/x/sys/unix/mkall.sh | 188 --
.../vendor/golang.org/x/sys/unix/mkerrors.sh | 580 ----
.../vendor/golang.org/x/sys/unix/mkpost.go | 97 -
.../vendor/golang.org/x/sys/unix/mksyscall.pl | 341 --
.../x/sys/unix/mksyscall_solaris.pl | 289 --
.../golang.org/x/sys/unix/mksysctl_openbsd.pl | 264 --
.../golang.org/x/sys/unix/mksysnum_darwin.pl | 39 -
.../x/sys/unix/mksysnum_dragonfly.pl | 50 -
.../golang.org/x/sys/unix/mksysnum_freebsd.pl | 50 -
.../golang.org/x/sys/unix/mksysnum_netbsd.pl | 58 -
.../golang.org/x/sys/unix/mksysnum_openbsd.pl | 50 -
.../golang.org/x/sys/unix/mmap_unix_test.go | 35 -
.../golang.org/x/sys/unix/openbsd_pledge.go | 38 -
.../golang.org/x/sys/unix/openbsd_test.go | 113 -
.../golang.org/x/sys/unix/pagesize_unix.go | 15 -
.../vendor/golang.org/x/sys/unix/race.go | 30 -
.../vendor/golang.org/x/sys/unix/race0.go | 25 -
.../golang.org/x/sys/unix/sockcmsg_linux.go | 36 -
.../golang.org/x/sys/unix/sockcmsg_unix.go | 104 -
.../vendor/golang.org/x/sys/unix/str.go | 26 -
.../vendor/golang.org/x/sys/unix/syscall.go | 51 -
.../golang.org/x/sys/unix/syscall_bsd.go | 665 ----
.../golang.org/x/sys/unix/syscall_bsd_test.go | 93 -
.../golang.org/x/sys/unix/syscall_darwin.go | 601 ----
.../x/sys/unix/syscall_darwin_386.go | 68 -
.../x/sys/unix/syscall_darwin_amd64.go | 68 -
.../x/sys/unix/syscall_darwin_arm.go | 66 -
.../x/sys/unix/syscall_darwin_arm64.go | 68 -
.../x/sys/unix/syscall_dragonfly.go | 521 ----
.../x/sys/unix/syscall_dragonfly_amd64.go | 52 -
.../golang.org/x/sys/unix/syscall_freebsd.go | 759 -----
.../x/sys/unix/syscall_freebsd_386.go | 52 -
.../x/sys/unix/syscall_freebsd_amd64.go | 52 -
.../x/sys/unix/syscall_freebsd_arm.go | 52 -
.../x/sys/unix/syscall_freebsd_test.go | 297 --
.../golang.org/x/sys/unix/syscall_linux.go | 1503 ---------
.../x/sys/unix/syscall_linux_386.go | 391 ---
.../x/sys/unix/syscall_linux_amd64.go | 144 -
.../x/sys/unix/syscall_linux_amd64_gc.go | 13 -
.../x/sys/unix/syscall_linux_arm.go | 255 --
.../x/sys/unix/syscall_linux_arm64.go | 186 --
.../golang.org/x/sys/unix/syscall_linux_gc.go | 14 -
.../x/sys/unix/syscall_linux_mips64x.go | 206 --
.../x/sys/unix/syscall_linux_mipsx.go | 231 --
.../x/sys/unix/syscall_linux_ppc64x.go | 127 -
.../x/sys/unix/syscall_linux_s390x.go | 320 --
.../x/sys/unix/syscall_linux_sparc64.go | 143 -
.../x/sys/unix/syscall_linux_test.go | 439 ---
.../golang.org/x/sys/unix/syscall_netbsd.go | 565 ----
.../x/sys/unix/syscall_netbsd_386.go | 33 -
.../x/sys/unix/syscall_netbsd_amd64.go | 33 -
.../x/sys/unix/syscall_netbsd_arm.go | 33 -
.../golang.org/x/sys/unix/syscall_openbsd.go | 365 ---
.../x/sys/unix/syscall_openbsd_386.go | 33 -
.../x/sys/unix/syscall_openbsd_amd64.go | 33 -
.../x/sys/unix/syscall_openbsd_arm.go | 33 -
.../golang.org/x/sys/unix/syscall_solaris.go | 717 -----
.../x/sys/unix/syscall_solaris_amd64.go | 28 -
.../x/sys/unix/syscall_solaris_test.go | 55 -
.../golang.org/x/sys/unix/syscall_test.go | 60 -
.../golang.org/x/sys/unix/syscall_unix.go | 307 --
.../golang.org/x/sys/unix/syscall_unix_gc.go | 15 -
.../x/sys/unix/syscall_unix_test.go | 446 ---
.../golang.org/x/sys/unix/timestruct.go | 82 -
.../golang.org/x/sys/unix/timestruct_test.go | 54 -
.../golang.org/x/sys/unix/types_darwin.go | 277 --
.../golang.org/x/sys/unix/types_dragonfly.go | 280 --
.../golang.org/x/sys/unix/types_freebsd.go | 402 ---
.../golang.org/x/sys/unix/types_netbsd.go | 270 --
.../golang.org/x/sys/unix/types_openbsd.go | 282 --
.../golang.org/x/sys/unix/types_solaris.go | 283 --
.../x/sys/unix/zerrors_darwin_386.go | 1769 -----------
.../x/sys/unix/zerrors_darwin_amd64.go | 1769 -----------
.../x/sys/unix/zerrors_darwin_arm.go | 1769 -----------
.../x/sys/unix/zerrors_darwin_arm64.go | 1769 -----------
.../x/sys/unix/zerrors_dragonfly_amd64.go | 1575 ----------
.../x/sys/unix/zerrors_freebsd_386.go | 1756 -----------
.../x/sys/unix/zerrors_freebsd_amd64.go | 1757 -----------
.../x/sys/unix/zerrors_freebsd_arm.go | 1765 -----------
.../x/sys/unix/zerrors_linux_386.go | 2266 --------------
.../x/sys/unix/zerrors_linux_amd64.go | 2267 --------------
.../x/sys/unix/zerrors_linux_arm.go | 2271 --------------
.../x/sys/unix/zerrors_linux_arm64.go | 2257 --------------
.../x/sys/unix/zerrors_linux_mips.go | 2276 --------------
.../x/sys/unix/zerrors_linux_mips64.go | 2276 --------------
.../x/sys/unix/zerrors_linux_mips64le.go | 2276 --------------
.../x/sys/unix/zerrors_linux_mipsle.go | 2276 --------------
.../x/sys/unix/zerrors_linux_ppc64.go | 2329 --------------
.../x/sys/unix/zerrors_linux_ppc64le.go | 2329 --------------
.../x/sys/unix/zerrors_linux_s390x.go | 2328 --------------
.../x/sys/unix/zerrors_linux_sparc64.go | 2142 -------------
.../x/sys/unix/zerrors_netbsd_386.go | 1719 -----------
.../x/sys/unix/zerrors_netbsd_amd64.go | 1709 ----------
.../x/sys/unix/zerrors_netbsd_arm.go | 1698 ----------
.../x/sys/unix/zerrors_openbsd_386.go | 1591 ----------
.../x/sys/unix/zerrors_openbsd_amd64.go | 1590 ----------
.../x/sys/unix/zerrors_openbsd_arm.go | 1593 ----------
.../x/sys/unix/zerrors_solaris_amd64.go | 1489 ---------
.../golang.org/x/sys/unix/zptrace386_linux.go | 80 -
.../golang.org/x/sys/unix/zptracearm_linux.go | 41 -
.../x/sys/unix/zptracemips_linux.go | 50 -
.../x/sys/unix/zptracemipsle_linux.go | 50 -
.../x/sys/unix/zsyscall_darwin_386.go | 1620 ----------
.../x/sys/unix/zsyscall_darwin_amd64.go | 1620 ----------
.../x/sys/unix/zsyscall_darwin_arm.go | 1620 ----------
.../x/sys/unix/zsyscall_darwin_arm64.go | 1620 ----------
.../x/sys/unix/zsyscall_dragonfly_amd64.go | 1478 ---------
.../x/sys/unix/zsyscall_freebsd_386.go | 1922 ------------
.../x/sys/unix/zsyscall_freebsd_amd64.go | 1922 ------------
.../x/sys/unix/zsyscall_freebsd_arm.go | 1922 ------------
.../x/sys/unix/zsyscall_linux_386.go | 1994 ------------
.../x/sys/unix/zsyscall_linux_amd64.go | 2187 -------------
.../x/sys/unix/zsyscall_linux_arm.go | 2096 -------------
.../x/sys/unix/zsyscall_linux_arm64.go | 2044 ------------
.../x/sys/unix/zsyscall_linux_mips.go | 2152 -------------
.../x/sys/unix/zsyscall_linux_mips64.go | 2135 -------------
.../x/sys/unix/zsyscall_linux_mips64le.go | 2135 -------------
.../x/sys/unix/zsyscall_linux_mipsle.go | 2152 -------------
.../x/sys/unix/zsyscall_linux_ppc64.go | 2198 -------------
.../x/sys/unix/zsyscall_linux_ppc64le.go | 2198 -------------
.../x/sys/unix/zsyscall_linux_s390x.go | 1978 ------------
.../x/sys/unix/zsyscall_linux_sparc64.go | 1833 -----------
.../x/sys/unix/zsyscall_netbsd_386.go | 1384 ---------
.../x/sys/unix/zsyscall_netbsd_amd64.go | 1384 ---------
.../x/sys/unix/zsyscall_netbsd_arm.go | 1384 ---------
.../x/sys/unix/zsyscall_openbsd_386.go | 1442 ---------
.../x/sys/unix/zsyscall_openbsd_amd64.go | 1442 ---------
.../x/sys/unix/zsyscall_openbsd_arm.go | 1442 ---------
.../x/sys/unix/zsyscall_solaris_amd64.go | 1653 ----------
.../x/sys/unix/zsysctl_openbsd_386.go | 270 --
.../x/sys/unix/zsysctl_openbsd_amd64.go | 270 --
.../x/sys/unix/zsysctl_openbsd_arm.go | 270 --
.../x/sys/unix/zsysnum_darwin_386.go | 436 ---
.../x/sys/unix/zsysnum_darwin_amd64.go | 436 ---
.../x/sys/unix/zsysnum_darwin_arm.go | 436 ---
.../x/sys/unix/zsysnum_darwin_arm64.go | 436 ---
.../x/sys/unix/zsysnum_dragonfly_amd64.go | 315 --
.../x/sys/unix/zsysnum_freebsd_386.go | 353 ---
.../x/sys/unix/zsysnum_freebsd_amd64.go | 353 ---
.../x/sys/unix/zsysnum_freebsd_arm.go | 353 ---
.../x/sys/unix/zsysnum_linux_386.go | 390 ---
.../x/sys/unix/zsysnum_linux_amd64.go | 342 ---
.../x/sys/unix/zsysnum_linux_arm.go | 362 ---
.../x/sys/unix/zsysnum_linux_arm64.go | 286 --
.../x/sys/unix/zsysnum_linux_mips.go | 375 ---
.../x/sys/unix/zsysnum_linux_mips64.go | 335 --
.../x/sys/unix/zsysnum_linux_mips64le.go | 335 --
.../x/sys/unix/zsysnum_linux_mipsle.go | 375 ---
.../x/sys/unix/zsysnum_linux_ppc64.go | 370 ---
.../x/sys/unix/zsysnum_linux_ppc64le.go | 370 ---
.../x/sys/unix/zsysnum_linux_s390x.go | 333 --
.../x/sys/unix/zsysnum_linux_sparc64.go | 348 ---
.../x/sys/unix/zsysnum_netbsd_386.go | 274 --
.../x/sys/unix/zsysnum_netbsd_amd64.go | 274 --
.../x/sys/unix/zsysnum_netbsd_arm.go | 274 --
.../x/sys/unix/zsysnum_openbsd_386.go | 207 --
.../x/sys/unix/zsysnum_openbsd_amd64.go | 207 --
.../x/sys/unix/zsysnum_openbsd_arm.go | 213 --
.../x/sys/unix/ztypes_darwin_386.go | 489 ---
.../x/sys/unix/ztypes_darwin_amd64.go | 499 ---
.../x/sys/unix/ztypes_darwin_arm.go | 490 ---
.../x/sys/unix/ztypes_darwin_arm64.go | 499 ---
.../x/sys/unix/ztypes_dragonfly_amd64.go | 486 ---
.../x/sys/unix/ztypes_freebsd_386.go | 553 ----
.../x/sys/unix/ztypes_freebsd_amd64.go | 556 ----
.../x/sys/unix/ztypes_freebsd_arm.go | 556 ----
.../golang.org/x/sys/unix/ztypes_linux_386.go | 871 ------
.../x/sys/unix/ztypes_linux_amd64.go | 889 ------
.../golang.org/x/sys/unix/ztypes_linux_arm.go | 860 ------
.../x/sys/unix/ztypes_linux_arm64.go | 868 ------
.../x/sys/unix/ztypes_linux_mips.go | 865 ------
.../x/sys/unix/ztypes_linux_mips64.go | 870 ------
.../x/sys/unix/ztypes_linux_mips64le.go | 870 ------
.../x/sys/unix/ztypes_linux_mipsle.go | 865 ------
.../x/sys/unix/ztypes_linux_ppc64.go | 878 ------
.../x/sys/unix/ztypes_linux_ppc64le.go | 878 ------
.../x/sys/unix/ztypes_linux_s390x.go | 895 ------
.../x/sys/unix/ztypes_linux_sparc64.go | 664 ----
.../x/sys/unix/ztypes_netbsd_386.go | 439 ---
.../x/sys/unix/ztypes_netbsd_amd64.go | 446 ---
.../x/sys/unix/ztypes_netbsd_arm.go | 444 ---
.../x/sys/unix/ztypes_openbsd_386.go | 484 ---
.../x/sys/unix/ztypes_openbsd_amd64.go | 491 ---
.../x/sys/unix/ztypes_openbsd_arm.go | 477 ---
.../x/sys/unix/ztypes_solaris_amd64.go | 459 ---
.../x/sys/windows/asm_windows_386.s | 13 -
.../x/sys/windows/asm_windows_amd64.s | 13 -
.../golang.org/x/sys/windows/dll_windows.go | 378 ---
.../golang.org/x/sys/windows/env_windows.go | 29 -
.../golang.org/x/sys/windows/eventlog.go | 20 -
.../golang.org/x/sys/windows/exec_windows.go | 97 -
.../x/sys/windows/memory_windows.go | 26 -
.../golang.org/x/sys/windows/mksyscall.go | 7 -
.../vendor/golang.org/x/sys/windows/race.go | 30 -
.../vendor/golang.org/x/sys/windows/race0.go | 25 -
.../x/sys/windows/registry/export_test.go | 11 -
.../golang.org/x/sys/windows/registry/key.go | 200 --
.../x/sys/windows/registry/mksyscall.go | 7 -
.../x/sys/windows/registry/registry_test.go | 756 -----
.../x/sys/windows/registry/syscall.go | 32 -
.../x/sys/windows/registry/value.go | 384 ---
.../sys/windows/registry/zsyscall_windows.go | 120 -
.../x/sys/windows/security_windows.go | 476 ---
.../golang.org/x/sys/windows/service.go | 164 -
.../vendor/golang.org/x/sys/windows/str.go | 22 -
.../golang.org/x/sys/windows/svc/debug/log.go | 56 -
.../x/sys/windows/svc/debug/service.go | 45 -
.../golang.org/x/sys/windows/svc/event.go | 48 -
.../x/sys/windows/svc/eventlog/install.go | 80 -
.../x/sys/windows/svc/eventlog/log.go | 70 -
.../x/sys/windows/svc/eventlog/log_test.go | 51 -
.../x/sys/windows/svc/example/beep.go | 22 -
.../x/sys/windows/svc/example/install.go | 92 -
.../x/sys/windows/svc/example/main.go | 76 -
.../x/sys/windows/svc/example/manage.go | 62 -
.../x/sys/windows/svc/example/service.go | 82 -
.../golang.org/x/sys/windows/svc/go12.c | 24 -
.../golang.org/x/sys/windows/svc/go12.go | 11 -
.../golang.org/x/sys/windows/svc/go13.go | 31 -
.../x/sys/windows/svc/mgr/config.go | 139 -
.../golang.org/x/sys/windows/svc/mgr/mgr.go | 162 -
.../x/sys/windows/svc/mgr/mgr_test.go | 169 -
.../x/sys/windows/svc/mgr/service.go | 72 -
.../golang.org/x/sys/windows/svc/security.go | 62 -
.../golang.org/x/sys/windows/svc/service.go | 363 ---
.../golang.org/x/sys/windows/svc/svc_test.go | 118 -
.../golang.org/x/sys/windows/svc/sys_386.s | 68 -
.../golang.org/x/sys/windows/svc/sys_amd64.s | 42 -
.../golang.org/x/sys/windows/syscall.go | 71 -
.../golang.org/x/sys/windows/syscall_test.go | 53 -
.../x/sys/windows/syscall_windows.go | 1153 -------
.../x/sys/windows/syscall_windows_test.go | 107 -
.../golang.org/x/sys/windows/types_windows.go | 1333 --------
.../x/sys/windows/types_windows_386.go | 22 -
.../x/sys/windows/types_windows_amd64.go | 22 -
.../x/sys/windows/zsyscall_windows.go | 2687 ----------------
.../kevinburke/ssh_config/AUTHORS.txt | 4 -
.../github.com/kevinburke/ssh_config/LICENSE | 49 -
.../github.com/kevinburke/ssh_config/Makefile | 32 -
.../kevinburke/ssh_config/README.md | 81 -
.../kevinburke/ssh_config/config.go | 639 ----
.../kevinburke/ssh_config/config_test.go | 364 ---
.../kevinburke/ssh_config/example_test.go | 48 -
.../github.com/kevinburke/ssh_config/lexer.go | 241 --
.../kevinburke/ssh_config/parser.go | 182 --
.../kevinburke/ssh_config/position.go | 25 -
.../ssh_config/testdata/anotherfile | 3 -
.../kevinburke/ssh_config/testdata/config1 | 39 -
.../kevinburke/ssh_config/testdata/config2 | 50 -
.../kevinburke/ssh_config/testdata/config3 | 31 -
.../kevinburke/ssh_config/testdata/config4 | 4 -
.../kevinburke/ssh_config/testdata/dos-lines | 10 -
.../kevinburke/ssh_config/testdata/eqsign | 4 -
.../kevinburke/ssh_config/testdata/extraspace | 2 -
.../kevinburke/ssh_config/testdata/include | 4 -
.../ssh_config/testdata/include-recursive | 4 -
.../ssh_config/testdata/invalid-port | 2 -
.../ssh_config/testdata/match-directive | 2 -
.../kevinburke/ssh_config/testdata/negated | 5 -
.../ssh_config/testdata/system-include | 0
.../github.com/kevinburke/ssh_config/token.go | 49 -
.../kevinburke/ssh_config/validators.go | 162 -
.../kevinburke/ssh_config/validators_test.go | 44 -
vendor/github.com/kr/pty/License | 23 -
vendor/github.com/kr/pty/README.md | 100 -
vendor/github.com/kr/pty/doc.go | 16 -
vendor/github.com/kr/pty/ioctl.go | 13 -
vendor/github.com/kr/pty/ioctl_bsd.go | 39 -
vendor/github.com/kr/pty/mktypes.bash | 19 -
vendor/github.com/kr/pty/pty_darwin.go | 65 -
vendor/github.com/kr/pty/pty_dragonfly.go | 80 -
vendor/github.com/kr/pty/pty_freebsd.go | 78 -
vendor/github.com/kr/pty/pty_linux.go | 51 -
vendor/github.com/kr/pty/pty_openbsd.go | 33 -
vendor/github.com/kr/pty/pty_unsupported.go | 11 -
vendor/github.com/kr/pty/run.go | 50 -
vendor/github.com/kr/pty/types.go | 10 -
vendor/github.com/kr/pty/types_dragonfly.go | 17 -
vendor/github.com/kr/pty/types_freebsd.go | 15 -
vendor/github.com/kr/pty/types_openbsd.go | 14 -
vendor/github.com/kr/pty/util.go | 64 -
vendor/github.com/kr/pty/ztypes_386.go | 9 -
vendor/github.com/kr/pty/ztypes_amd64.go | 9 -
vendor/github.com/kr/pty/ztypes_arm.go | 9 -
vendor/github.com/kr/pty/ztypes_arm64.go | 11 -
.../kr/pty/ztypes_dragonfly_amd64.go | 14 -
.../github.com/kr/pty/ztypes_freebsd_386.go | 13 -
.../github.com/kr/pty/ztypes_freebsd_amd64.go | 14 -
.../github.com/kr/pty/ztypes_freebsd_arm.go | 13 -
vendor/github.com/kr/pty/ztypes_mipsx.go | 12 -
.../github.com/kr/pty/ztypes_openbsd_386.go | 13 -
.../github.com/kr/pty/ztypes_openbsd_amd64.go | 13 -
vendor/github.com/kr/pty/ztypes_ppc64.go | 11 -
vendor/github.com/kr/pty/ztypes_ppc64le.go | 11 -
vendor/github.com/kr/pty/ztypes_s390x.go | 11 -
.../pelletier/go-buffruneio/LICENSE | 21 -
.../pelletier/go-buffruneio/README.md | 61 -
.../pelletier/go-buffruneio/buffruneio.go | 133 -
.../go-buffruneio/buffruneio_test.go | 264 --
vendor/github.com/satori/go.uuid/LICENSE | 20 -
vendor/github.com/satori/go.uuid/README.md | 75 -
vendor/github.com/satori/go.uuid/codec.go | 206 --
.../github.com/satori/go.uuid/codec_test.go | 251 --
vendor/github.com/satori/go.uuid/generator.go | 265 --
.../satori/go.uuid/generator_test.go | 240 --
vendor/github.com/satori/go.uuid/sql.go | 78 -
vendor/github.com/satori/go.uuid/sql_test.go | 136 -
vendor/github.com/satori/go.uuid/uuid.go | 161 -
vendor/github.com/satori/go.uuid/uuid_test.go | 100 -
vendor/github.com/sevlyar/go-daemon/LICENSE | 7 -
vendor/github.com/sevlyar/go-daemon/README.md | 63 -
.../github.com/sevlyar/go-daemon/command.go | 99 -
vendor/github.com/sevlyar/go-daemon/daemon.go | 44 -
.../sevlyar/go-daemon/daemon_stub.go | 52 -
.../sevlyar/go-daemon/daemon_test.go | 68 -
.../sevlyar/go-daemon/daemon_unix.go | 262 --
.../github.com/sevlyar/go-daemon/lock_file.go | 109 -
.../sevlyar/go-daemon/lock_file_stub.go | 11 -
.../sevlyar/go-daemon/lock_file_test.go | 90 -
.../sevlyar/go-daemon/lock_file_unix.go | 23 -
vendor/github.com/sevlyar/go-daemon/signal.go | 59 -
.../sevlyar/go-daemon/syscall_dup.go | 12 -
.../sevlyar/go-daemon/syscall_dup_arm64.go | 11 -
.../github.com/sirupsen/logrus/CHANGELOG.md | 113 -
vendor/github.com/sirupsen/logrus/LICENSE | 21 -
vendor/github.com/sirupsen/logrus/README.md | 507 ---
vendor/github.com/sirupsen/logrus/alt_exit.go | 64 -
.../sirupsen/logrus/alt_exit_test.go | 83 -
.../github.com/sirupsen/logrus/appveyor.yml | 14 -
vendor/github.com/sirupsen/logrus/doc.go | 26 -
vendor/github.com/sirupsen/logrus/entry.go | 279 --
.../github.com/sirupsen/logrus/entry_test.go | 77 -
.../sirupsen/logrus/example_basic_test.go | 69 -
.../sirupsen/logrus/example_hook_test.go | 35 -
vendor/github.com/sirupsen/logrus/exported.go | 193 --
.../github.com/sirupsen/logrus/formatter.go | 45 -
.../sirupsen/logrus/formatter_bench_test.go | 101 -
.../github.com/sirupsen/logrus/hook_test.go | 144 -
vendor/github.com/sirupsen/logrus/hooks.go | 34 -
.../sirupsen/logrus/hooks/syslog/README.md | 39 -
.../sirupsen/logrus/hooks/syslog/syslog.go | 55 -
.../logrus/hooks/syslog/syslog_test.go | 27 -
.../sirupsen/logrus/hooks/test/test.go | 95 -
.../sirupsen/logrus/hooks/test/test_test.go | 39 -
.../sirupsen/logrus/json_formatter.go | 79 -
.../sirupsen/logrus/json_formatter_test.go | 199 --
vendor/github.com/sirupsen/logrus/logger.go | 323 --
.../sirupsen/logrus/logger_bench_test.go | 61 -
vendor/github.com/sirupsen/logrus/logrus.go | 143 -
.../github.com/sirupsen/logrus/logrus_test.go | 386 ---
.../sirupsen/logrus/terminal_bsd.go | 10 -
.../sirupsen/logrus/terminal_linux.go | 14 -
.../sirupsen/logrus/text_formatter.go | 191 --
.../sirupsen/logrus/text_formatter_test.go | 141 -
vendor/github.com/sirupsen/logrus/writer.go | 62 -
.../x/crypto/curve25519/const_amd64.h | 8 -
.../x/crypto/curve25519/const_amd64.s | 20 -
.../x/crypto/curve25519/cswap_amd64.s | 65 -
.../x/crypto/curve25519/curve25519.go | 834 -----
.../x/crypto/curve25519/curve25519_test.go | 39 -
vendor/golang.org/x/crypto/curve25519/doc.go | 23 -
.../x/crypto/curve25519/freeze_amd64.s | 73 -
.../x/crypto/curve25519/ladderstep_amd64.s | 1377 ---------
.../x/crypto/curve25519/mont25519_amd64.go | 240 --
.../x/crypto/curve25519/mul_amd64.s | 169 -
.../x/crypto/curve25519/square_amd64.s | 132 -
vendor/golang.org/x/crypto/ed25519/ed25519.go | 181 --
.../x/crypto/ed25519/ed25519_test.go | 183 --
.../ed25519/internal/edwards25519/const.go | 1422 ---------
.../internal/edwards25519/edwards25519.go | 1771 -----------
.../x/crypto/ed25519/testdata/sign.input.gz | Bin 50330 -> 0 bytes
.../golang.org/x/crypto/ssh/agent/client.go | 683 ----
.../x/crypto/ssh/agent/client_test.go | 379 ---
.../x/crypto/ssh/agent/example_test.go | 41 -
.../golang.org/x/crypto/ssh/agent/forward.go | 103 -
.../golang.org/x/crypto/ssh/agent/keyring.go | 215 --
.../x/crypto/ssh/agent/keyring_test.go | 76 -
.../golang.org/x/crypto/ssh/agent/server.go | 523 ----
.../x/crypto/ssh/agent/server_test.go | 259 --
.../x/crypto/ssh/agent/testdata_test.go | 64 -
.../golang.org/x/crypto/ssh/benchmark_test.go | 122 -
vendor/golang.org/x/crypto/ssh/buffer.go | 97 -
vendor/golang.org/x/crypto/ssh/buffer_test.go | 87 -
vendor/golang.org/x/crypto/ssh/certs.go | 519 ----
vendor/golang.org/x/crypto/ssh/certs_test.go | 222 --
vendor/golang.org/x/crypto/ssh/channel.go | 633 ----
vendor/golang.org/x/crypto/ssh/cipher.go | 629 ----
vendor/golang.org/x/crypto/ssh/cipher_test.go | 129 -
vendor/golang.org/x/crypto/ssh/client.go | 257 --
vendor/golang.org/x/crypto/ssh/client_auth.go | 486 ---
.../x/crypto/ssh/client_auth_test.go | 628 ----
vendor/golang.org/x/crypto/ssh/client_test.go | 81 -
vendor/golang.org/x/crypto/ssh/common.go | 373 ---
vendor/golang.org/x/crypto/ssh/connection.go | 143 -
vendor/golang.org/x/crypto/ssh/doc.go | 21 -
.../golang.org/x/crypto/ssh/example_test.go | 320 --
vendor/golang.org/x/crypto/ssh/handshake.go | 640 ----
.../golang.org/x/crypto/ssh/handshake_test.go | 559 ----
vendor/golang.org/x/crypto/ssh/kex.go | 540 ----
vendor/golang.org/x/crypto/ssh/kex_test.go | 50 -
vendor/golang.org/x/crypto/ssh/keys.go | 1031 -------
vendor/golang.org/x/crypto/ssh/keys_test.go | 500 ---
.../x/crypto/ssh/knownhosts/knownhosts.go | 546 ----
.../crypto/ssh/knownhosts/knownhosts_test.go | 329 --
vendor/golang.org/x/crypto/ssh/mac.go | 61 -
.../golang.org/x/crypto/ssh/mempipe_test.go | 110 -
vendor/golang.org/x/crypto/ssh/messages.go | 758 -----
.../golang.org/x/crypto/ssh/messages_test.go | 288 --
vendor/golang.org/x/crypto/ssh/mux.go | 330 --
vendor/golang.org/x/crypto/ssh/mux_test.go | 505 ---
vendor/golang.org/x/crypto/ssh/server.go | 563 ----
vendor/golang.org/x/crypto/ssh/session.go | 647 ----
.../golang.org/x/crypto/ssh/session_test.go | 774 -----
vendor/golang.org/x/crypto/ssh/streamlocal.go | 115 -
vendor/golang.org/x/crypto/ssh/tcpip.go | 465 ---
vendor/golang.org/x/crypto/ssh/tcpip_test.go | 20 -
.../x/crypto/ssh/terminal/terminal.go | 951 ------
.../x/crypto/ssh/terminal/terminal_test.go | 350 ---
.../golang.org/x/crypto/ssh/terminal/util.go | 123 -
.../x/crypto/ssh/terminal/util_bsd.go | 12 -
.../x/crypto/ssh/terminal/util_linux.go | 10 -
.../x/crypto/ssh/terminal/util_plan9.go | 58 -
.../x/crypto/ssh/terminal/util_solaris.go | 128 -
.../x/crypto/ssh/terminal/util_windows.go | 102 -
.../x/crypto/ssh/test/agent_unix_test.go | 59 -
.../golang.org/x/crypto/ssh/test/cert_test.go | 77 -
.../x/crypto/ssh/test/dial_unix_test.go | 128 -
vendor/golang.org/x/crypto/ssh/test/doc.go | 7 -
.../x/crypto/ssh/test/forward_unix_test.go | 194 --
.../x/crypto/ssh/test/session_test.go | 413 ---
.../x/crypto/ssh/test/test_unix_test.go | 295 --
.../x/crypto/ssh/test/testdata_test.go | 64 -
.../golang.org/x/crypto/ssh/testdata/doc.go | 8 -
.../golang.org/x/crypto/ssh/testdata/keys.go | 177 --
.../golang.org/x/crypto/ssh/testdata_test.go | 63 -
vendor/golang.org/x/crypto/ssh/transport.go | 375 ---
.../golang.org/x/crypto/ssh/transport_test.go | 109 -
vendor/golang.org/x/sys/unix/README.md | 173 --
.../golang.org/x/sys/unix/affinity_linux.go | 124 -
vendor/golang.org/x/sys/unix/aliases.go | 14 -
vendor/golang.org/x/sys/unix/asm_darwin_386.s | 29 -
.../golang.org/x/sys/unix/asm_darwin_amd64.s | 29 -
vendor/golang.org/x/sys/unix/asm_darwin_arm.s | 30 -
.../golang.org/x/sys/unix/asm_darwin_arm64.s | 30 -
.../x/sys/unix/asm_dragonfly_amd64.s | 29 -
.../golang.org/x/sys/unix/asm_freebsd_386.s | 29 -
.../golang.org/x/sys/unix/asm_freebsd_amd64.s | 29 -
.../golang.org/x/sys/unix/asm_freebsd_arm.s | 29 -
vendor/golang.org/x/sys/unix/asm_linux_386.s | 65 -
.../golang.org/x/sys/unix/asm_linux_amd64.s | 57 -
vendor/golang.org/x/sys/unix/asm_linux_arm.s | 56 -
.../golang.org/x/sys/unix/asm_linux_arm64.s | 52 -
.../golang.org/x/sys/unix/asm_linux_mips64x.s | 56 -
.../golang.org/x/sys/unix/asm_linux_mipsx.s | 54 -
.../golang.org/x/sys/unix/asm_linux_ppc64x.s | 56 -
.../golang.org/x/sys/unix/asm_linux_s390x.s | 56 -
vendor/golang.org/x/sys/unix/asm_netbsd_386.s | 29 -
.../golang.org/x/sys/unix/asm_netbsd_amd64.s | 29 -
vendor/golang.org/x/sys/unix/asm_netbsd_arm.s | 29 -
.../golang.org/x/sys/unix/asm_openbsd_386.s | 29 -
.../golang.org/x/sys/unix/asm_openbsd_amd64.s | 29 -
.../golang.org/x/sys/unix/asm_openbsd_arm.s | 29 -
.../golang.org/x/sys/unix/asm_solaris_amd64.s | 17 -
.../golang.org/x/sys/unix/bluetooth_linux.go | 35 -
vendor/golang.org/x/sys/unix/cap_freebsd.go | 195 --
vendor/golang.org/x/sys/unix/constants.go | 13 -
vendor/golang.org/x/sys/unix/creds_test.go | 134 -
vendor/golang.org/x/sys/unix/dev_aix_ppc.go | 27 -
vendor/golang.org/x/sys/unix/dev_aix_ppc64.go | 29 -
vendor/golang.org/x/sys/unix/dev_darwin.go | 24 -
vendor/golang.org/x/sys/unix/dev_dragonfly.go | 30 -
vendor/golang.org/x/sys/unix/dev_freebsd.go | 30 -
vendor/golang.org/x/sys/unix/dev_linux.go | 42 -
.../golang.org/x/sys/unix/dev_linux_test.go | 56 -
vendor/golang.org/x/sys/unix/dev_netbsd.go | 29 -
vendor/golang.org/x/sys/unix/dev_openbsd.go | 29 -
vendor/golang.org/x/sys/unix/dirent.go | 17 -
vendor/golang.org/x/sys/unix/endian_big.go | 9 -
vendor/golang.org/x/sys/unix/endian_little.go | 9 -
vendor/golang.org/x/sys/unix/env_unix.go | 31 -
.../x/sys/unix/errors_freebsd_386.go | 227 --
.../x/sys/unix/errors_freebsd_amd64.go | 227 --
.../x/sys/unix/errors_freebsd_arm.go | 226 --
vendor/golang.org/x/sys/unix/example_test.go | 30 -
vendor/golang.org/x/sys/unix/export_test.go | 9 -
vendor/golang.org/x/sys/unix/fcntl.go | 32 -
.../x/sys/unix/fcntl_linux_32bit.go | 13 -
vendor/golang.org/x/sys/unix/gccgo.go | 62 -
vendor/golang.org/x/sys/unix/gccgo_c.c | 39 -
.../x/sys/unix/gccgo_linux_amd64.go | 20 -
vendor/golang.org/x/sys/unix/ioctl.go | 30 -
vendor/golang.org/x/sys/unix/linux/Dockerfile | 53 -
vendor/golang.org/x/sys/unix/linux/mkall.go | 760 -----
.../golang.org/x/sys/unix/linux/mksysnum.pl | 85 -
vendor/golang.org/x/sys/unix/linux/types.go | 1614 ----------
vendor/golang.org/x/sys/unix/mkall.sh | 198 --
vendor/golang.org/x/sys/unix/mkerrors.sh | 652 ----
vendor/golang.org/x/sys/unix/mkpost.go | 98 -
vendor/golang.org/x/sys/unix/mksyscall.pl | 341 --
vendor/golang.org/x/sys/unix/mksyscall_aix.pl | 385 ---
.../x/sys/unix/mksyscall_solaris.pl | 289 --
.../golang.org/x/sys/unix/mksysctl_openbsd.pl | 265 --
.../golang.org/x/sys/unix/mksysnum_darwin.pl | 39 -
.../x/sys/unix/mksysnum_dragonfly.pl | 50 -
.../golang.org/x/sys/unix/mksysnum_freebsd.pl | 50 -
.../golang.org/x/sys/unix/mksysnum_netbsd.pl | 58 -
.../golang.org/x/sys/unix/mksysnum_openbsd.pl | 50 -
.../golang.org/x/sys/unix/mmap_unix_test.go | 41 -
.../golang.org/x/sys/unix/openbsd_pledge.go | 95 -
vendor/golang.org/x/sys/unix/openbsd_test.go | 113 -
vendor/golang.org/x/sys/unix/pagesize_unix.go | 15 -
vendor/golang.org/x/sys/unix/race.go | 30 -
vendor/golang.org/x/sys/unix/race0.go | 25 -
.../golang.org/x/sys/unix/sockcmsg_linux.go | 36 -
vendor/golang.org/x/sys/unix/sockcmsg_unix.go | 104 -
vendor/golang.org/x/sys/unix/str.go | 26 -
vendor/golang.org/x/sys/unix/syscall.go | 54 -
vendor/golang.org/x/sys/unix/syscall_aix.go | 564 ----
.../golang.org/x/sys/unix/syscall_aix_ppc.go | 34 -
.../x/sys/unix/syscall_aix_ppc64.go | 34 -
.../golang.org/x/sys/unix/syscall_aix_test.go | 162 -
vendor/golang.org/x/sys/unix/syscall_bsd.go | 624 ----
.../golang.org/x/sys/unix/syscall_bsd_test.go | 89 -
.../golang.org/x/sys/unix/syscall_darwin.go | 700 -----
.../x/sys/unix/syscall_darwin_386.go | 68 -
.../x/sys/unix/syscall_darwin_amd64.go | 68 -
.../x/sys/unix/syscall_darwin_arm.go | 66 -
.../x/sys/unix/syscall_darwin_arm64.go | 68 -
.../x/sys/unix/syscall_darwin_test.go | 19 -
.../x/sys/unix/syscall_dragonfly.go | 523 ----
.../x/sys/unix/syscall_dragonfly_amd64.go | 52 -
.../golang.org/x/sys/unix/syscall_freebsd.go | 535 ----
.../x/sys/unix/syscall_freebsd_386.go | 52 -
.../x/sys/unix/syscall_freebsd_amd64.go | 52 -
.../x/sys/unix/syscall_freebsd_arm.go | 52 -
.../x/sys/unix/syscall_freebsd_test.go | 312 --
vendor/golang.org/x/sys/unix/syscall_linux.go | 1628 ----------
.../x/sys/unix/syscall_linux_386.go | 385 ---
.../x/sys/unix/syscall_linux_amd64.go | 162 -
.../x/sys/unix/syscall_linux_amd64_gc.go | 13 -
.../x/sys/unix/syscall_linux_arm.go | 259 --
.../x/sys/unix/syscall_linux_arm64.go | 212 --
.../golang.org/x/sys/unix/syscall_linux_gc.go | 14 -
.../x/sys/unix/syscall_linux_gc_386.go | 16 -
.../x/sys/unix/syscall_linux_gccgo_386.go | 30 -
.../x/sys/unix/syscall_linux_gccgo_arm.go | 20 -
.../x/sys/unix/syscall_linux_mips64x.go | 214 --
.../x/sys/unix/syscall_linux_mipsx.go | 233 --
.../x/sys/unix/syscall_linux_ppc64x.go | 138 -
.../x/sys/unix/syscall_linux_riscv64.go | 212 --
.../x/sys/unix/syscall_linux_s390x.go | 324 --
.../x/sys/unix/syscall_linux_sparc64.go | 146 -
.../x/sys/unix/syscall_linux_test.go | 484 ---
.../golang.org/x/sys/unix/syscall_netbsd.go | 597 ----
.../x/sys/unix/syscall_netbsd_386.go | 33 -
.../x/sys/unix/syscall_netbsd_amd64.go | 33 -
.../x/sys/unix/syscall_netbsd_arm.go | 33 -
.../x/sys/unix/syscall_netbsd_test.go | 35 -
.../golang.org/x/sys/unix/syscall_openbsd.go | 385 ---
.../x/sys/unix/syscall_openbsd_386.go | 33 -
.../x/sys/unix/syscall_openbsd_amd64.go | 37 -
.../x/sys/unix/syscall_openbsd_arm.go | 33 -
.../x/sys/unix/syscall_openbsd_test.go | 19 -
.../golang.org/x/sys/unix/syscall_solaris.go | 730 -----
.../x/sys/unix/syscall_solaris_amd64.go | 23 -
.../x/sys/unix/syscall_solaris_test.go | 55 -
vendor/golang.org/x/sys/unix/syscall_test.go | 60 -
vendor/golang.org/x/sys/unix/syscall_unix.go | 394 ---
.../golang.org/x/sys/unix/syscall_unix_gc.go | 15 -
.../x/sys/unix/syscall_unix_test.go | 660 ----
vendor/golang.org/x/sys/unix/timestruct.go | 82 -
.../golang.org/x/sys/unix/timestruct_test.go | 54 -
vendor/golang.org/x/sys/unix/types_aix.go | 236 --
vendor/golang.org/x/sys/unix/types_darwin.go | 277 --
.../golang.org/x/sys/unix/types_dragonfly.go | 263 --
vendor/golang.org/x/sys/unix/types_freebsd.go | 385 ---
vendor/golang.org/x/sys/unix/types_netbsd.go | 287 --
vendor/golang.org/x/sys/unix/types_openbsd.go | 272 --
vendor/golang.org/x/sys/unix/types_solaris.go | 266 --
vendor/golang.org/x/sys/unix/xattr_bsd.go | 231 --
vendor/golang.org/x/sys/unix/xattr_test.go | 201 --
.../golang.org/x/sys/unix/zerrors_aix_ppc.go | 1372 ---------
.../x/sys/unix/zerrors_aix_ppc64.go | 1373 ---------
.../x/sys/unix/zerrors_darwin_386.go | 1783 -----------
.../x/sys/unix/zerrors_darwin_amd64.go | 1783 -----------
.../x/sys/unix/zerrors_darwin_arm.go | 1783 -----------
.../x/sys/unix/zerrors_darwin_arm64.go | 1783 -----------
.../x/sys/unix/zerrors_dragonfly_amd64.go | 1650 ----------
.../x/sys/unix/zerrors_freebsd_386.go | 1793 -----------
.../x/sys/unix/zerrors_freebsd_amd64.go | 1794 -----------
.../x/sys/unix/zerrors_freebsd_arm.go | 1802 -----------
.../x/sys/unix/zerrors_linux_386.go | 2675 ----------------
.../x/sys/unix/zerrors_linux_amd64.go | 2675 ----------------
.../x/sys/unix/zerrors_linux_arm.go | 2681 ----------------
.../x/sys/unix/zerrors_linux_arm64.go | 2666 ----------------
.../x/sys/unix/zerrors_linux_mips.go | 2682 ----------------
.../x/sys/unix/zerrors_linux_mips64.go | 2682 ----------------
.../x/sys/unix/zerrors_linux_mips64le.go | 2682 ----------------
.../x/sys/unix/zerrors_linux_mipsle.go | 2682 ----------------
.../x/sys/unix/zerrors_linux_ppc64.go | 2735 -----------------
.../x/sys/unix/zerrors_linux_ppc64le.go | 2735 -----------------
.../x/sys/unix/zerrors_linux_riscv64.go | 2662 ----------------
.../x/sys/unix/zerrors_linux_s390x.go | 2735 -----------------
.../x/sys/unix/zerrors_linux_sparc64.go | 2142 -------------
.../x/sys/unix/zerrors_netbsd_386.go | 1772 -----------
.../x/sys/unix/zerrors_netbsd_amd64.go | 1762 -----------
.../x/sys/unix/zerrors_netbsd_arm.go | 1751 -----------
.../x/sys/unix/zerrors_openbsd_386.go | 1654 ----------
.../x/sys/unix/zerrors_openbsd_amd64.go | 1765 -----------
.../x/sys/unix/zerrors_openbsd_arm.go | 1656 ----------
.../x/sys/unix/zerrors_solaris_amd64.go | 1532 ---------
.../golang.org/x/sys/unix/zptrace386_linux.go | 80 -
.../golang.org/x/sys/unix/zptracearm_linux.go | 41 -
.../x/sys/unix/zptracemips_linux.go | 50 -
.../x/sys/unix/zptracemipsle_linux.go | 50 -
.../golang.org/x/sys/unix/zsyscall_aix_ppc.go | 1519 ---------
.../x/sys/unix/zsyscall_aix_ppc64.go | 1519 ---------
.../x/sys/unix/zsyscall_darwin_386.go | 1769 -----------
.../x/sys/unix/zsyscall_darwin_amd64.go | 1769 -----------
.../x/sys/unix/zsyscall_darwin_arm.go | 1769 -----------
.../x/sys/unix/zsyscall_darwin_arm64.go | 1769 -----------
.../x/sys/unix/zsyscall_dragonfly_amd64.go | 1508 ---------
.../x/sys/unix/zsyscall_freebsd_386.go | 1935 ------------
.../x/sys/unix/zsyscall_freebsd_amd64.go | 1935 ------------
.../x/sys/unix/zsyscall_freebsd_arm.go | 1935 ------------
.../x/sys/unix/zsyscall_linux_386.go | 2131 -------------
.../x/sys/unix/zsyscall_linux_amd64.go | 2298 --------------
.../x/sys/unix/zsyscall_linux_arm.go | 2233 --------------
.../x/sys/unix/zsyscall_linux_arm64.go | 2140 -------------
.../x/sys/unix/zsyscall_linux_mips.go | 2311 --------------
.../x/sys/unix/zsyscall_linux_mips64.go | 2282 --------------
.../x/sys/unix/zsyscall_linux_mips64le.go | 2282 --------------
.../x/sys/unix/zsyscall_linux_mipsle.go | 2311 --------------
.../x/sys/unix/zsyscall_linux_ppc64.go | 2345 --------------
.../x/sys/unix/zsyscall_linux_ppc64le.go | 2345 --------------
.../x/sys/unix/zsyscall_linux_riscv64.go | 2140 -------------
.../x/sys/unix/zsyscall_linux_s390x.go | 2115 -------------
.../x/sys/unix/zsyscall_linux_sparc64.go | 2172 -------------
.../x/sys/unix/zsyscall_netbsd_386.go | 1653 ----------
.../x/sys/unix/zsyscall_netbsd_amd64.go | 1653 ----------
.../x/sys/unix/zsyscall_netbsd_arm.go | 1653 ----------
.../x/sys/unix/zsyscall_openbsd_386.go | 1508 ---------
.../x/sys/unix/zsyscall_openbsd_amd64.go | 1508 ---------
.../x/sys/unix/zsyscall_openbsd_arm.go | 1508 ---------
.../x/sys/unix/zsyscall_solaris_amd64.go | 1697 ----------
.../x/sys/unix/zsysctl_openbsd_386.go | 270 --
.../x/sys/unix/zsysctl_openbsd_amd64.go | 270 --
.../x/sys/unix/zsysctl_openbsd_arm.go | 270 --
.../x/sys/unix/zsysnum_darwin_386.go | 436 ---
.../x/sys/unix/zsysnum_darwin_amd64.go | 436 ---
.../x/sys/unix/zsysnum_darwin_arm.go | 436 ---
.../x/sys/unix/zsysnum_darwin_arm64.go | 436 ---
.../x/sys/unix/zsysnum_dragonfly_amd64.go | 315 --
.../x/sys/unix/zsysnum_freebsd_386.go | 403 ---
.../x/sys/unix/zsysnum_freebsd_amd64.go | 403 ---
.../x/sys/unix/zsysnum_freebsd_arm.go | 403 ---
.../x/sys/unix/zsysnum_linux_386.go | 392 ---
.../x/sys/unix/zsysnum_linux_amd64.go | 344 ---
.../x/sys/unix/zsysnum_linux_arm.go | 363 ---
.../x/sys/unix/zsysnum_linux_arm64.go | 287 --
.../x/sys/unix/zsysnum_linux_mips.go | 377 ---
.../x/sys/unix/zsysnum_linux_mips64.go | 337 --
.../x/sys/unix/zsysnum_linux_mips64le.go | 337 --
.../x/sys/unix/zsysnum_linux_mipsle.go | 377 ---
.../x/sys/unix/zsysnum_linux_ppc64.go | 375 ---
.../x/sys/unix/zsysnum_linux_ppc64le.go | 375 ---
.../x/sys/unix/zsysnum_linux_riscv64.go | 286 --
.../x/sys/unix/zsysnum_linux_s390x.go | 337 --
.../x/sys/unix/zsysnum_linux_sparc64.go | 348 ---
.../x/sys/unix/zsysnum_netbsd_386.go | 274 --
.../x/sys/unix/zsysnum_netbsd_amd64.go | 274 --
.../x/sys/unix/zsysnum_netbsd_arm.go | 274 --
.../x/sys/unix/zsysnum_openbsd_386.go | 207 --
.../x/sys/unix/zsysnum_openbsd_amd64.go | 218 --
.../x/sys/unix/zsysnum_openbsd_arm.go | 213 --
.../golang.org/x/sys/unix/ztypes_aix_ppc.go | 345 ---
.../golang.org/x/sys/unix/ztypes_aix_ppc64.go | 354 ---
.../x/sys/unix/ztypes_darwin_386.go | 489 ---
.../x/sys/unix/ztypes_darwin_amd64.go | 499 ---
.../x/sys/unix/ztypes_darwin_arm.go | 490 ---
.../x/sys/unix/ztypes_darwin_arm64.go | 499 ---
.../x/sys/unix/ztypes_dragonfly_amd64.go | 469 ---
.../x/sys/unix/ztypes_freebsd_386.go | 536 ----
.../x/sys/unix/ztypes_freebsd_amd64.go | 539 ----
.../x/sys/unix/ztypes_freebsd_arm.go | 539 ----
.../golang.org/x/sys/unix/ztypes_linux_386.go | 1967 ------------
.../x/sys/unix/ztypes_linux_amd64.go | 1989 ------------
.../golang.org/x/sys/unix/ztypes_linux_arm.go | 1957 ------------
.../x/sys/unix/ztypes_linux_arm64.go | 1968 ------------
.../x/sys/unix/ztypes_linux_mips.go | 1962 ------------
.../x/sys/unix/ztypes_linux_mips64.go | 1970 ------------
.../x/sys/unix/ztypes_linux_mips64le.go | 1970 ------------
.../x/sys/unix/ztypes_linux_mipsle.go | 1962 ------------
.../x/sys/unix/ztypes_linux_ppc64.go | 1978 ------------
.../x/sys/unix/ztypes_linux_ppc64le.go | 1978 ------------
.../x/sys/unix/ztypes_linux_riscv64.go | 1995 ------------
.../x/sys/unix/ztypes_linux_s390x.go | 1995 ------------
.../x/sys/unix/ztypes_linux_sparc64.go | 690 -----
.../x/sys/unix/ztypes_netbsd_386.go | 458 ---
.../x/sys/unix/ztypes_netbsd_amd64.go | 465 ---
.../x/sys/unix/ztypes_netbsd_arm.go | 463 ---
.../x/sys/unix/ztypes_openbsd_386.go | 558 ----
.../x/sys/unix/ztypes_openbsd_amd64.go | 558 ----
.../x/sys/unix/ztypes_openbsd_arm.go | 551 ----
.../x/sys/unix/ztypes_solaris_amd64.go | 442 ---
859 files changed, 50 insertions(+), 391925 deletions(-)
create mode 100644 go.mod
create mode 100644 go.sum
delete mode 100644 vendor/github.com/BurntSushi/toml/COMPATIBLE
delete mode 100644 vendor/github.com/BurntSushi/toml/COPYING
delete mode 100644 vendor/github.com/BurntSushi/toml/Makefile
delete mode 100644 vendor/github.com/BurntSushi/toml/README.md
delete mode 100644 vendor/github.com/BurntSushi/toml/_examples/example.go
delete mode 100644 vendor/github.com/BurntSushi/toml/_examples/example.toml
delete mode 100644 vendor/github.com/BurntSushi/toml/_examples/hard.toml
delete mode 100644 vendor/github.com/BurntSushi/toml/_examples/implicit.toml
delete mode 100644 vendor/github.com/BurntSushi/toml/_examples/invalid-apples.toml
delete mode 100644 vendor/github.com/BurntSushi/toml/_examples/invalid.toml
delete mode 100644 vendor/github.com/BurntSushi/toml/_examples/readme1.toml
delete mode 100644 vendor/github.com/BurntSushi/toml/_examples/readme2.toml
delete mode 100644 vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING
delete mode 100644 vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md
delete mode 100644 vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go
delete mode 100644 vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING
delete mode 100644 vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md
delete mode 100644 vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go
delete mode 100644 vendor/github.com/BurntSushi/toml/cmd/tomlv/COPYING
delete mode 100644 vendor/github.com/BurntSushi/toml/cmd/tomlv/README.md
delete mode 100644 vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go
delete mode 100644 vendor/github.com/BurntSushi/toml/decode.go
delete mode 100644 vendor/github.com/BurntSushi/toml/decode_meta.go
delete mode 100644 vendor/github.com/BurntSushi/toml/decode_test.go
delete mode 100644 vendor/github.com/BurntSushi/toml/doc.go
delete mode 100644 vendor/github.com/BurntSushi/toml/encode.go
delete mode 100644 vendor/github.com/BurntSushi/toml/encode_test.go
delete mode 100644 vendor/github.com/BurntSushi/toml/encoding_types.go
delete mode 100644 vendor/github.com/BurntSushi/toml/encoding_types_1.1.go
delete mode 100644 vendor/github.com/BurntSushi/toml/lex.go
delete mode 100644 vendor/github.com/BurntSushi/toml/parse.go
delete mode 100644 vendor/github.com/BurntSushi/toml/session.vim
delete mode 100644 vendor/github.com/BurntSushi/toml/type_check.go
delete mode 100644 vendor/github.com/BurntSushi/toml/type_fields.go
delete mode 100644 vendor/github.com/awnumar/memguard/.travis.yml
delete mode 100644 vendor/github.com/awnumar/memguard/AUTHORS
delete mode 100644 vendor/github.com/awnumar/memguard/CODE_OF_CONDUCT.md
delete mode 100644 vendor/github.com/awnumar/memguard/CONTRIBUTING.md
delete mode 100644 vendor/github.com/awnumar/memguard/Gopkg.lock
delete mode 100644 vendor/github.com/awnumar/memguard/Gopkg.toml
delete mode 100644 vendor/github.com/awnumar/memguard/LICENSE
delete mode 100644 vendor/github.com/awnumar/memguard/README.md
delete mode 100644 vendor/github.com/awnumar/memguard/appveyor.yml
delete mode 100644 vendor/github.com/awnumar/memguard/container.go
delete mode 100644 vendor/github.com/awnumar/memguard/docs.go
delete mode 100644 vendor/github.com/awnumar/memguard/docs_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/errors.go
delete mode 100644 vendor/github.com/awnumar/memguard/internals.go
delete mode 100644 vendor/github.com/awnumar/memguard/logo.svg
delete mode 100644 vendor/github.com/awnumar/memguard/memcall/memcall_freebsd.go
delete mode 100644 vendor/github.com/awnumar/memguard/memcall/memcall_openbsd.go
delete mode 100644 vendor/github.com/awnumar/memguard/memcall/memcall_osx.go
delete mode 100644 vendor/github.com/awnumar/memguard/memcall/memcall_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/memcall/memcall_unix.go
delete mode 100644 vendor/github.com/awnumar/memguard/memcall/memcall_windows.go
delete mode 100644 vendor/github.com/awnumar/memguard/memguard.go
delete mode 100644 vendor/github.com/awnumar/memguard/memguard_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/.gitattributes
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/.gitignore
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/AUTHORS
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/CONTRIBUTING.md
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/CONTRIBUTORS
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/LICENSE
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/PATENTS
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/README.md
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/codereview.cfg
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/asm.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/asm_plan9_386.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/asm_plan9_arm.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/const_plan9.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/dir_plan9.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/env_plan9.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/errors_plan9.go
delete mode 100755 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/mkall.sh
delete mode 100755 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/mkerrors.sh
delete mode 100755 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/mksyscall.pl
delete mode 100755 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/pwd_plan9.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/race.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/race0.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/str.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/syscall.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/syscall_plan9.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/syscall_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/zsysnum_plan9.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/.gitignore
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/README.md
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/affinity_linux.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_darwin_386.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_darwin_arm.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_freebsd_386.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_386.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_arm.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_netbsd_386.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_openbsd_386.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/bluetooth_linux.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/cap_freebsd.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/constants.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/creds_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_darwin.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_darwin_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_dragonfly.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_dragonfly_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_freebsd.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_linux.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_linux_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_netbsd.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_netbsd_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_openbsd.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_openbsd_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_solaris_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dirent.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/endian_big.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/endian_little.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/env_unix.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/errors_freebsd_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/errors_freebsd_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/export_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/flock.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/flock_linux_32bit.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/gccgo.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/gccgo_c.c
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/linux/Dockerfile
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/linux/mkall.go
delete mode 100755 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/linux/mksysnum.pl
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/linux/types.go
delete mode 100755 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/mkall.sh
delete mode 100755 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/mkerrors.sh
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/mkpost.go
delete mode 100755 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/mksyscall.pl
delete mode 100755 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl
delete mode 100755 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl
delete mode 100755 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl
delete mode 100755 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl
delete mode 100755 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl
delete mode 100755 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl
delete mode 100755 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/mmap_unix_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/openbsd_pledge.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/openbsd_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/pagesize_unix.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/race.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/race0.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/str.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_bsd.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_bsd_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_darwin.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_freebsd.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_freebsd_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_linux.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_linux_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_linux_gc.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_linux_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_netbsd.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_openbsd.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_solaris.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_solaris_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_unix.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/syscall_unix_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/timestruct.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/timestruct_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/types_darwin.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/types_dragonfly.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/types_freebsd.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/types_netbsd.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/types_openbsd.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/types_solaris.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zptrace386_linux.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zptracearm_linux.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zptracemips_linux.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zptracemipsle_linux.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/asm_windows_386.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/asm_windows_amd64.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/dll_windows.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/env_windows.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/eventlog.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/exec_windows.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/memory_windows.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/mksyscall.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/race.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/race0.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/registry/export_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/registry/key.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/registry/mksyscall.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/registry/registry_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/registry/syscall.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/registry/value.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/security_windows.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/service.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/str.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/debug/log.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/debug/service.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/event.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/eventlog/install.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/eventlog/log.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/eventlog/log_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/example/beep.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/example/install.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/example/main.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/example/manage.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/example/service.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/go12.c
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/go12.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/go13.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/mgr/config.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/mgr/mgr.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/mgr/mgr_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/mgr/service.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/security.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/service.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/svc_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/sys_386.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/svc/sys_amd64.s
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/syscall.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/syscall_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/syscall_windows.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/syscall_windows_test.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/types_windows.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/types_windows_386.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/types_windows_amd64.go
delete mode 100644 vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/windows/zsyscall_windows.go
delete mode 100644 vendor/github.com/kevinburke/ssh_config/AUTHORS.txt
delete mode 100644 vendor/github.com/kevinburke/ssh_config/LICENSE
delete mode 100644 vendor/github.com/kevinburke/ssh_config/Makefile
delete mode 100644 vendor/github.com/kevinburke/ssh_config/README.md
delete mode 100644 vendor/github.com/kevinburke/ssh_config/config.go
delete mode 100644 vendor/github.com/kevinburke/ssh_config/config_test.go
delete mode 100644 vendor/github.com/kevinburke/ssh_config/example_test.go
delete mode 100644 vendor/github.com/kevinburke/ssh_config/lexer.go
delete mode 100644 vendor/github.com/kevinburke/ssh_config/parser.go
delete mode 100644 vendor/github.com/kevinburke/ssh_config/position.go
delete mode 100644 vendor/github.com/kevinburke/ssh_config/testdata/anotherfile
delete mode 100644 vendor/github.com/kevinburke/ssh_config/testdata/config1
delete mode 100644 vendor/github.com/kevinburke/ssh_config/testdata/config2
delete mode 100644 vendor/github.com/kevinburke/ssh_config/testdata/config3
delete mode 100644 vendor/github.com/kevinburke/ssh_config/testdata/config4
delete mode 100644 vendor/github.com/kevinburke/ssh_config/testdata/dos-lines
delete mode 100644 vendor/github.com/kevinburke/ssh_config/testdata/eqsign
delete mode 100644 vendor/github.com/kevinburke/ssh_config/testdata/extraspace
delete mode 100644 vendor/github.com/kevinburke/ssh_config/testdata/include
delete mode 100644 vendor/github.com/kevinburke/ssh_config/testdata/include-recursive
delete mode 100644 vendor/github.com/kevinburke/ssh_config/testdata/invalid-port
delete mode 100644 vendor/github.com/kevinburke/ssh_config/testdata/match-directive
delete mode 100644 vendor/github.com/kevinburke/ssh_config/testdata/negated
delete mode 100644 vendor/github.com/kevinburke/ssh_config/testdata/system-include
delete mode 100644 vendor/github.com/kevinburke/ssh_config/token.go
delete mode 100644 vendor/github.com/kevinburke/ssh_config/validators.go
delete mode 100644 vendor/github.com/kevinburke/ssh_config/validators_test.go
delete mode 100644 vendor/github.com/kr/pty/License
delete mode 100644 vendor/github.com/kr/pty/README.md
delete mode 100644 vendor/github.com/kr/pty/doc.go
delete mode 100644 vendor/github.com/kr/pty/ioctl.go
delete mode 100644 vendor/github.com/kr/pty/ioctl_bsd.go
delete mode 100755 vendor/github.com/kr/pty/mktypes.bash
delete mode 100644 vendor/github.com/kr/pty/pty_darwin.go
delete mode 100644 vendor/github.com/kr/pty/pty_dragonfly.go
delete mode 100644 vendor/github.com/kr/pty/pty_freebsd.go
delete mode 100644 vendor/github.com/kr/pty/pty_linux.go
delete mode 100644 vendor/github.com/kr/pty/pty_openbsd.go
delete mode 100644 vendor/github.com/kr/pty/pty_unsupported.go
delete mode 100644 vendor/github.com/kr/pty/run.go
delete mode 100644 vendor/github.com/kr/pty/types.go
delete mode 100644 vendor/github.com/kr/pty/types_dragonfly.go
delete mode 100644 vendor/github.com/kr/pty/types_freebsd.go
delete mode 100644 vendor/github.com/kr/pty/types_openbsd.go
delete mode 100644 vendor/github.com/kr/pty/util.go
delete mode 100644 vendor/github.com/kr/pty/ztypes_386.go
delete mode 100644 vendor/github.com/kr/pty/ztypes_amd64.go
delete mode 100644 vendor/github.com/kr/pty/ztypes_arm.go
delete mode 100644 vendor/github.com/kr/pty/ztypes_arm64.go
delete mode 100644 vendor/github.com/kr/pty/ztypes_dragonfly_amd64.go
delete mode 100644 vendor/github.com/kr/pty/ztypes_freebsd_386.go
delete mode 100644 vendor/github.com/kr/pty/ztypes_freebsd_amd64.go
delete mode 100644 vendor/github.com/kr/pty/ztypes_freebsd_arm.go
delete mode 100644 vendor/github.com/kr/pty/ztypes_mipsx.go
delete mode 100644 vendor/github.com/kr/pty/ztypes_openbsd_386.go
delete mode 100644 vendor/github.com/kr/pty/ztypes_openbsd_amd64.go
delete mode 100644 vendor/github.com/kr/pty/ztypes_ppc64.go
delete mode 100644 vendor/github.com/kr/pty/ztypes_ppc64le.go
delete mode 100644 vendor/github.com/kr/pty/ztypes_s390x.go
delete mode 100644 vendor/github.com/pelletier/go-buffruneio/LICENSE
delete mode 100644 vendor/github.com/pelletier/go-buffruneio/README.md
delete mode 100644 vendor/github.com/pelletier/go-buffruneio/buffruneio.go
delete mode 100644 vendor/github.com/pelletier/go-buffruneio/buffruneio_test.go
delete mode 100644 vendor/github.com/satori/go.uuid/LICENSE
delete mode 100644 vendor/github.com/satori/go.uuid/README.md
delete mode 100644 vendor/github.com/satori/go.uuid/codec.go
delete mode 100644 vendor/github.com/satori/go.uuid/codec_test.go
delete mode 100644 vendor/github.com/satori/go.uuid/generator.go
delete mode 100644 vendor/github.com/satori/go.uuid/generator_test.go
delete mode 100644 vendor/github.com/satori/go.uuid/sql.go
delete mode 100644 vendor/github.com/satori/go.uuid/sql_test.go
delete mode 100644 vendor/github.com/satori/go.uuid/uuid.go
delete mode 100644 vendor/github.com/satori/go.uuid/uuid_test.go
delete mode 100644 vendor/github.com/sevlyar/go-daemon/LICENSE
delete mode 100644 vendor/github.com/sevlyar/go-daemon/README.md
delete mode 100644 vendor/github.com/sevlyar/go-daemon/command.go
delete mode 100644 vendor/github.com/sevlyar/go-daemon/daemon.go
delete mode 100644 vendor/github.com/sevlyar/go-daemon/daemon_stub.go
delete mode 100644 vendor/github.com/sevlyar/go-daemon/daemon_test.go
delete mode 100644 vendor/github.com/sevlyar/go-daemon/daemon_unix.go
delete mode 100644 vendor/github.com/sevlyar/go-daemon/lock_file.go
delete mode 100644 vendor/github.com/sevlyar/go-daemon/lock_file_stub.go
delete mode 100644 vendor/github.com/sevlyar/go-daemon/lock_file_test.go
delete mode 100644 vendor/github.com/sevlyar/go-daemon/lock_file_unix.go
delete mode 100644 vendor/github.com/sevlyar/go-daemon/signal.go
delete mode 100644 vendor/github.com/sevlyar/go-daemon/syscall_dup.go
delete mode 100644 vendor/github.com/sevlyar/go-daemon/syscall_dup_arm64.go
delete mode 100644 vendor/github.com/sirupsen/logrus/CHANGELOG.md
delete mode 100644 vendor/github.com/sirupsen/logrus/LICENSE
delete mode 100644 vendor/github.com/sirupsen/logrus/README.md
delete mode 100644 vendor/github.com/sirupsen/logrus/alt_exit.go
delete mode 100644 vendor/github.com/sirupsen/logrus/alt_exit_test.go
delete mode 100644 vendor/github.com/sirupsen/logrus/appveyor.yml
delete mode 100644 vendor/github.com/sirupsen/logrus/doc.go
delete mode 100644 vendor/github.com/sirupsen/logrus/entry.go
delete mode 100644 vendor/github.com/sirupsen/logrus/entry_test.go
delete mode 100644 vendor/github.com/sirupsen/logrus/example_basic_test.go
delete mode 100644 vendor/github.com/sirupsen/logrus/example_hook_test.go
delete mode 100644 vendor/github.com/sirupsen/logrus/exported.go
delete mode 100644 vendor/github.com/sirupsen/logrus/formatter.go
delete mode 100644 vendor/github.com/sirupsen/logrus/formatter_bench_test.go
delete mode 100644 vendor/github.com/sirupsen/logrus/hook_test.go
delete mode 100644 vendor/github.com/sirupsen/logrus/hooks.go
delete mode 100644 vendor/github.com/sirupsen/logrus/hooks/syslog/README.md
delete mode 100644 vendor/github.com/sirupsen/logrus/hooks/syslog/syslog.go
delete mode 100644 vendor/github.com/sirupsen/logrus/hooks/syslog/syslog_test.go
delete mode 100644 vendor/github.com/sirupsen/logrus/hooks/test/test.go
delete mode 100644 vendor/github.com/sirupsen/logrus/hooks/test/test_test.go
delete mode 100644 vendor/github.com/sirupsen/logrus/json_formatter.go
delete mode 100644 vendor/github.com/sirupsen/logrus/json_formatter_test.go
delete mode 100644 vendor/github.com/sirupsen/logrus/logger.go
delete mode 100644 vendor/github.com/sirupsen/logrus/logger_bench_test.go
delete mode 100644 vendor/github.com/sirupsen/logrus/logrus.go
delete mode 100644 vendor/github.com/sirupsen/logrus/logrus_test.go
delete mode 100644 vendor/github.com/sirupsen/logrus/terminal_bsd.go
delete mode 100644 vendor/github.com/sirupsen/logrus/terminal_linux.go
delete mode 100644 vendor/github.com/sirupsen/logrus/text_formatter.go
delete mode 100644 vendor/github.com/sirupsen/logrus/text_formatter_test.go
delete mode 100644 vendor/github.com/sirupsen/logrus/writer.go
delete mode 100644 vendor/golang.org/x/crypto/curve25519/const_amd64.h
delete mode 100644 vendor/golang.org/x/crypto/curve25519/const_amd64.s
delete mode 100644 vendor/golang.org/x/crypto/curve25519/cswap_amd64.s
delete mode 100644 vendor/golang.org/x/crypto/curve25519/curve25519.go
delete mode 100644 vendor/golang.org/x/crypto/curve25519/curve25519_test.go
delete mode 100644 vendor/golang.org/x/crypto/curve25519/doc.go
delete mode 100644 vendor/golang.org/x/crypto/curve25519/freeze_amd64.s
delete mode 100644 vendor/golang.org/x/crypto/curve25519/ladderstep_amd64.s
delete mode 100644 vendor/golang.org/x/crypto/curve25519/mont25519_amd64.go
delete mode 100644 vendor/golang.org/x/crypto/curve25519/mul_amd64.s
delete mode 100644 vendor/golang.org/x/crypto/curve25519/square_amd64.s
delete mode 100644 vendor/golang.org/x/crypto/ed25519/ed25519.go
delete mode 100644 vendor/golang.org/x/crypto/ed25519/ed25519_test.go
delete mode 100644 vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go
delete mode 100644 vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go
delete mode 100644 vendor/golang.org/x/crypto/ed25519/testdata/sign.input.gz
delete mode 100644 vendor/golang.org/x/crypto/ssh/agent/client.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/agent/client_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/agent/example_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/agent/forward.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/agent/keyring.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/agent/keyring_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/agent/server.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/agent/server_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/agent/testdata_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/benchmark_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/buffer.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/buffer_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/certs.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/certs_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/channel.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/cipher.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/cipher_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/client.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/client_auth.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/client_auth_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/client_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/common.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/connection.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/doc.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/example_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/handshake.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/handshake_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/kex.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/kex_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/keys.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/keys_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/mac.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/mempipe_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/messages.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/messages_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/mux.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/mux_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/server.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/session.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/session_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/streamlocal.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/tcpip.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/tcpip_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/terminal.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_linux.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_windows.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/test/agent_unix_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/test/cert_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/test/dial_unix_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/test/doc.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/test/forward_unix_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/test/session_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/test/test_unix_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/test/testdata_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/testdata/doc.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/testdata/keys.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/testdata_test.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/transport.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/transport_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/README.md
delete mode 100644 vendor/golang.org/x/sys/unix/affinity_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/aliases.go
delete mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_386.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_arm.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_386.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_386.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_amd64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_arm.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_arm64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_s390x.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_386.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_386.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_arm.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
delete mode 100644 vendor/golang.org/x/sys/unix/bluetooth_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/cap_freebsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/constants.go
delete mode 100644 vendor/golang.org/x/sys/unix/creds_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/dev_aix_ppc.go
delete mode 100644 vendor/golang.org/x/sys/unix/dev_aix_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/dev_darwin.go
delete mode 100644 vendor/golang.org/x/sys/unix/dev_dragonfly.go
delete mode 100644 vendor/golang.org/x/sys/unix/dev_freebsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/dev_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/dev_linux_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/dev_netbsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/dev_openbsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/dirent.go
delete mode 100644 vendor/golang.org/x/sys/unix/endian_big.go
delete mode 100644 vendor/golang.org/x/sys/unix/endian_little.go
delete mode 100644 vendor/golang.org/x/sys/unix/env_unix.go
delete mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/example_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/export_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/fcntl.go
delete mode 100644 vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go
delete mode 100644 vendor/golang.org/x/sys/unix/gccgo.go
delete mode 100644 vendor/golang.org/x/sys/unix/gccgo_c.c
delete mode 100644 vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ioctl.go
delete mode 100644 vendor/golang.org/x/sys/unix/linux/Dockerfile
delete mode 100644 vendor/golang.org/x/sys/unix/linux/mkall.go
delete mode 100755 vendor/golang.org/x/sys/unix/linux/mksysnum.pl
delete mode 100644 vendor/golang.org/x/sys/unix/linux/types.go
delete mode 100755 vendor/golang.org/x/sys/unix/mkall.sh
delete mode 100755 vendor/golang.org/x/sys/unix/mkerrors.sh
delete mode 100644 vendor/golang.org/x/sys/unix/mkpost.go
delete mode 100755 vendor/golang.org/x/sys/unix/mksyscall.pl
delete mode 100644 vendor/golang.org/x/sys/unix/mksyscall_aix.pl
delete mode 100755 vendor/golang.org/x/sys/unix/mksyscall_solaris.pl
delete mode 100755 vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl
delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_darwin.pl
delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl
delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl
delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl
delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl
delete mode 100644 vendor/golang.org/x/sys/unix/mmap_unix_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/openbsd_pledge.go
delete mode 100644 vendor/golang.org/x/sys/unix/openbsd_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/pagesize_unix.go
delete mode 100644 vendor/golang.org/x/sys/unix/race.go
delete mode 100644 vendor/golang.org/x/sys/unix/race0.go
delete mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_unix.go
delete mode 100644 vendor/golang.org/x/sys/unix/str.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_aix.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_aix_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_bsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_bsd_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_dragonfly.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gc.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_unix.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_unix_gc.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_unix_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/timestruct.go
delete mode 100644 vendor/golang.org/x/sys/unix/timestruct_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/types_aix.go
delete mode 100644 vendor/golang.org/x/sys/unix/types_darwin.go
delete mode 100644 vendor/golang.org/x/sys/unix/types_dragonfly.go
delete mode 100644 vendor/golang.org/x/sys/unix/types_freebsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/types_netbsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/types_openbsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/types_solaris.go
delete mode 100644 vendor/golang.org/x/sys/unix/xattr_bsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/xattr_test.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zptrace386_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/zptracearm_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/zptracemips_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/zptracemipsle_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
diff --git a/.gitignore b/.gitignore
index 2f1c415..24b1e28 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,5 @@
*.swp
*~
*.un~
+
+/mole
diff --git a/Makefile b/Makefile
index cf6ef91..a2edce1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY: test cover install bin test-env rm-test-env
+.PHONY: test cover build bin test-env rm-test-env
LDFLAGS := -X main.version=$(version)
@@ -6,12 +6,12 @@ test:
ifneq ($(shell go fmt ./...),)
$(error code not formatted. Please run 'go fmt')
endif
- @go test github.com/davrodpin/mole/... -v -race -coverprofile=coverage.txt -covermode=atomic
+ @go test github.com/davrodpin/mole/... -v -race -coverprofile=coverage.txt -covermode=atomic
cover: test
go tool cover -html=coverage.txt
-install:
- @go install github.com/davrodpin/mole/cmd/mole
+build:
+ @go build github.com/davrodpin/mole/cmd/mole
bin:
ifeq ($(version),)
diff --git a/cmd/mole/main.go b/cmd/mole/main.go
index 501b349..a61f42f 100644
--- a/cmd/mole/main.go
+++ b/cmd/mole/main.go
@@ -203,7 +203,7 @@ func start(app cli.App) error {
if app.Alias != "" {
alias = app.Alias
} else {
- alias = uuid.Must(uuid.NewV4()).String()[:8]
+ alias = uuid.NewV4().String()[:8]
}
err := startDaemonProcess(alias)
if err != nil {
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..b729a72
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,14 @@
+module github.com/davrodpin/mole
+
+go 1.12
+
+require (
+ github.com/BurntSushi/toml v0.3.1
+ github.com/awnumar/memguard v0.15.1
+ github.com/kevinburke/ssh_config v0.0.0-20180830205328-81db2a75821e
+ github.com/pelletier/go-buffruneio v0.2.0 // indirect
+ github.com/satori/go.uuid v1.2.0
+ github.com/sevlyar/go-daemon v0.1.5
+ github.com/sirupsen/logrus v1.4.1
+ golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..8848969
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,29 @@
+github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
+github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/awnumar/memguard v0.15.1 h1:RDPYo+e6rm65NLKJqmSVQpO9LuLh7R/hfC6Ed3ahbEU=
+github.com/awnumar/memguard v0.15.1/go.mod h1:77EUD6uwfgcd6zTmn++i5ujEFviGRQfE8ELbDJO1rpA=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/kevinburke/ssh_config v0.0.0-20180830205328-81db2a75821e h1:RgQk53JHp/Cjunrr1WlsXSZpqXn+uREuHvUVcK82CV8=
+github.com/kevinburke/ssh_config v0.0.0-20180830205328-81db2a75821e/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
+github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
+github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/pelletier/go-buffruneio v0.2.0 h1:U4t4R6YkofJ5xHm3dJzuRpPZ0mr5MMCoAWooScCR7aA=
+github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
+github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
+github.com/sevlyar/go-daemon v0.1.5 h1:Zy/6jLbM8CfqJ4x4RPr7MJlSKt90f00kNM1D401C+Qk=
+github.com/sevlyar/go-daemon v0.1.5/go.mod h1:6dJpPatBT9eUwM5VCw9Bt6CdX9Tk6UWvhW3MebLDRKE=
+github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k=
+github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
+github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f h1:R423Cnkcp5JABoeemiGEPlt9tHXFfw5kvc0yqlxRPWo=
+golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
diff --git a/vendor/github.com/BurntSushi/toml/COMPATIBLE b/vendor/github.com/BurntSushi/toml/COMPATIBLE
deleted file mode 100644
index 6efcfd0..0000000
--- a/vendor/github.com/BurntSushi/toml/COMPATIBLE
+++ /dev/null
@@ -1,3 +0,0 @@
-Compatible with TOML version
-[v0.4.0](https://github.com/toml-lang/toml/blob/v0.4.0/versions/en/toml-v0.4.0.md)
-
diff --git a/vendor/github.com/BurntSushi/toml/COPYING b/vendor/github.com/BurntSushi/toml/COPYING
deleted file mode 100644
index 01b5743..0000000
--- a/vendor/github.com/BurntSushi/toml/COPYING
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 TOML authors
-
-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:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-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.
diff --git a/vendor/github.com/BurntSushi/toml/Makefile b/vendor/github.com/BurntSushi/toml/Makefile
deleted file mode 100644
index 3600848..0000000
--- a/vendor/github.com/BurntSushi/toml/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-install:
- go install ./...
-
-test: install
- go test -v
- toml-test toml-test-decoder
- toml-test -encoder toml-test-encoder
-
-fmt:
- gofmt -w *.go */*.go
- colcheck *.go */*.go
-
-tags:
- find ./ -name '*.go' -print0 | xargs -0 gotags > TAGS
-
-push:
- git push origin master
- git push github master
-
diff --git a/vendor/github.com/BurntSushi/toml/README.md b/vendor/github.com/BurntSushi/toml/README.md
deleted file mode 100644
index 7c1b37e..0000000
--- a/vendor/github.com/BurntSushi/toml/README.md
+++ /dev/null
@@ -1,218 +0,0 @@
-## TOML parser and encoder for Go with reflection
-
-TOML stands for Tom's Obvious, Minimal Language. This Go package provides a
-reflection interface similar to Go's standard library `json` and `xml`
-packages. This package also supports the `encoding.TextUnmarshaler` and
-`encoding.TextMarshaler` interfaces so that you can define custom data
-representations. (There is an example of this below.)
-
-Spec: https://github.com/toml-lang/toml
-
-Compatible with TOML version
-[v0.4.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md)
-
-Documentation: https://godoc.org/github.com/BurntSushi/toml
-
-Installation:
-
-```bash
-go get github.com/BurntSushi/toml
-```
-
-Try the toml validator:
-
-```bash
-go get github.com/BurntSushi/toml/cmd/tomlv
-tomlv some-toml-file.toml
-```
-
-[](https://travis-ci.org/BurntSushi/toml) [](https://godoc.org/github.com/BurntSushi/toml)
-
-### Testing
-
-This package passes all tests in
-[toml-test](https://github.com/BurntSushi/toml-test) for both the decoder
-and the encoder.
-
-### Examples
-
-This package works similarly to how the Go standard library handles `XML`
-and `JSON`. Namely, data is loaded into Go values via reflection.
-
-For the simplest example, consider some TOML file as just a list of keys
-and values:
-
-```toml
-Age = 25
-Cats = [ "Cauchy", "Plato" ]
-Pi = 3.14
-Perfection = [ 6, 28, 496, 8128 ]
-DOB = 1987-07-05T05:45:00Z
-```
-
-Which could be defined in Go as:
-
-```go
-type Config struct {
- Age int
- Cats []string
- Pi float64
- Perfection []int
- DOB time.Time // requires `import time`
-}
-```
-
-And then decoded with:
-
-```go
-var conf Config
-if _, err := toml.Decode(tomlData, &conf); err != nil {
- // handle error
-}
-```
-
-You can also use struct tags if your struct field name doesn't map to a TOML
-key value directly:
-
-```toml
-some_key_NAME = "wat"
-```
-
-```go
-type TOML struct {
- ObscureKey string `toml:"some_key_NAME"`
-}
-```
-
-### Using the `encoding.TextUnmarshaler` interface
-
-Here's an example that automatically parses duration strings into
-`time.Duration` values:
-
-```toml
-[[song]]
-name = "Thunder Road"
-duration = "4m49s"
-
-[[song]]
-name = "Stairway to Heaven"
-duration = "8m03s"
-```
-
-Which can be decoded with:
-
-```go
-type song struct {
- Name string
- Duration duration
-}
-type songs struct {
- Song []song
-}
-var favorites songs
-if _, err := toml.Decode(blob, &favorites); err != nil {
- log.Fatal(err)
-}
-
-for _, s := range favorites.Song {
- fmt.Printf("%s (%s)\n", s.Name, s.Duration)
-}
-```
-
-And you'll also need a `duration` type that satisfies the
-`encoding.TextUnmarshaler` interface:
-
-```go
-type duration struct {
- time.Duration
-}
-
-func (d *duration) UnmarshalText(text []byte) error {
- var err error
- d.Duration, err = time.ParseDuration(string(text))
- return err
-}
-```
-
-### More complex usage
-
-Here's an example of how to load the example from the official spec page:
-
-```toml
-# This is a TOML document. Boom.
-
-title = "TOML Example"
-
-[owner]
-name = "Tom Preston-Werner"
-organization = "GitHub"
-bio = "GitHub Cofounder & CEO\nLikes tater tots and beer."
-dob = 1979-05-27T07:32:00Z # First class dates? Why not?
-
-[database]
-server = "192.168.1.1"
-ports = [ 8001, 8001, 8002 ]
-connection_max = 5000
-enabled = true
-
-[servers]
-
- # You can indent as you please. Tabs or spaces. TOML don't care.
- [servers.alpha]
- ip = "10.0.0.1"
- dc = "eqdc10"
-
- [servers.beta]
- ip = "10.0.0.2"
- dc = "eqdc10"
-
-[clients]
-data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it
-
-# Line breaks are OK when inside arrays
-hosts = [
- "alpha",
- "omega"
-]
-```
-
-And the corresponding Go types are:
-
-```go
-type tomlConfig struct {
- Title string
- Owner ownerInfo
- DB database `toml:"database"`
- Servers map[string]server
- Clients clients
-}
-
-type ownerInfo struct {
- Name string
- Org string `toml:"organization"`
- Bio string
- DOB time.Time
-}
-
-type database struct {
- Server string
- Ports []int
- ConnMax int `toml:"connection_max"`
- Enabled bool
-}
-
-type server struct {
- IP string
- DC string
-}
-
-type clients struct {
- Data [][]interface{}
- Hosts []string
-}
-```
-
-Note that a case insensitive match will be tried if an exact match can't be
-found.
-
-A working example of the above can be found in `_examples/example.{go,toml}`.
diff --git a/vendor/github.com/BurntSushi/toml/_examples/example.go b/vendor/github.com/BurntSushi/toml/_examples/example.go
deleted file mode 100644
index 79f31f2..0000000
--- a/vendor/github.com/BurntSushi/toml/_examples/example.go
+++ /dev/null
@@ -1,61 +0,0 @@
-package main
-
-import (
- "fmt"
- "time"
-
- "github.com/BurntSushi/toml"
-)
-
-type tomlConfig struct {
- Title string
- Owner ownerInfo
- DB database `toml:"database"`
- Servers map[string]server
- Clients clients
-}
-
-type ownerInfo struct {
- Name string
- Org string `toml:"organization"`
- Bio string
- DOB time.Time
-}
-
-type database struct {
- Server string
- Ports []int
- ConnMax int `toml:"connection_max"`
- Enabled bool
-}
-
-type server struct {
- IP string
- DC string
-}
-
-type clients struct {
- Data [][]interface{}
- Hosts []string
-}
-
-func main() {
- var config tomlConfig
- if _, err := toml.DecodeFile("example.toml", &config); err != nil {
- fmt.Println(err)
- return
- }
-
- fmt.Printf("Title: %s\n", config.Title)
- fmt.Printf("Owner: %s (%s, %s), Born: %s\n",
- config.Owner.Name, config.Owner.Org, config.Owner.Bio,
- config.Owner.DOB)
- fmt.Printf("Database: %s %v (Max conn. %d), Enabled? %v\n",
- config.DB.Server, config.DB.Ports, config.DB.ConnMax,
- config.DB.Enabled)
- for serverName, server := range config.Servers {
- fmt.Printf("Server: %s (%s, %s)\n", serverName, server.IP, server.DC)
- }
- fmt.Printf("Client data: %v\n", config.Clients.Data)
- fmt.Printf("Client hosts: %v\n", config.Clients.Hosts)
-}
diff --git a/vendor/github.com/BurntSushi/toml/_examples/example.toml b/vendor/github.com/BurntSushi/toml/_examples/example.toml
deleted file mode 100644
index 32c7a4f..0000000
--- a/vendor/github.com/BurntSushi/toml/_examples/example.toml
+++ /dev/null
@@ -1,35 +0,0 @@
-# This is a TOML document. Boom.
-
-title = "TOML Example"
-
-[owner]
-name = "Tom Preston-Werner"
-organization = "GitHub"
-bio = "GitHub Cofounder & CEO\nLikes tater tots and beer."
-dob = 1979-05-27T07:32:00Z # First class dates? Why not?
-
-[database]
-server = "192.168.1.1"
-ports = [ 8001, 8001, 8002 ]
-connection_max = 5000
-enabled = true
-
-[servers]
-
- # You can indent as you please. Tabs or spaces. TOML don't care.
- [servers.alpha]
- ip = "10.0.0.1"
- dc = "eqdc10"
-
- [servers.beta]
- ip = "10.0.0.2"
- dc = "eqdc10"
-
-[clients]
-data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it
-
-# Line breaks are OK when inside arrays
-hosts = [
- "alpha",
- "omega"
-]
diff --git a/vendor/github.com/BurntSushi/toml/_examples/hard.toml b/vendor/github.com/BurntSushi/toml/_examples/hard.toml
deleted file mode 100644
index 26145d2..0000000
--- a/vendor/github.com/BurntSushi/toml/_examples/hard.toml
+++ /dev/null
@@ -1,22 +0,0 @@
-# Test file for TOML
-# Only this one tries to emulate a TOML file written by a user of the kind of parser writers probably hate
-# This part you'll really hate
-
-[the]
-test_string = "You'll hate me after this - #" # " Annoying, isn't it?
-
- [the.hard]
- test_array = [ "] ", " # "] # ] There you go, parse this!
- test_array2 = [ "Test #11 ]proved that", "Experiment #9 was a success" ]
- # You didn't think it'd as easy as chucking out the last #, did you?
- another_test_string = " Same thing, but with a string #"
- harder_test_string = " And when \"'s are in the string, along with # \"" # "and comments are there too"
- # Things will get harder
-
- [the.hard.bit#]
- what? = "You don't think some user won't do that?"
- multi_line_array = [
- "]",
- # ] Oh yes I did
- ]
-
diff --git a/vendor/github.com/BurntSushi/toml/_examples/implicit.toml b/vendor/github.com/BurntSushi/toml/_examples/implicit.toml
deleted file mode 100644
index 1dea5ce..0000000
--- a/vendor/github.com/BurntSushi/toml/_examples/implicit.toml
+++ /dev/null
@@ -1,4 +0,0 @@
-# [x] you
-# [x.y] don't
-# [x.y.z] need these
-[x.y.z.w] # for this to work
diff --git a/vendor/github.com/BurntSushi/toml/_examples/invalid-apples.toml b/vendor/github.com/BurntSushi/toml/_examples/invalid-apples.toml
deleted file mode 100644
index 74e9e33..0000000
--- a/vendor/github.com/BurntSushi/toml/_examples/invalid-apples.toml
+++ /dev/null
@@ -1,6 +0,0 @@
-# DO NOT WANT
-[fruit]
-type = "apple"
-
-[fruit.type]
-apple = "yes"
diff --git a/vendor/github.com/BurntSushi/toml/_examples/invalid.toml b/vendor/github.com/BurntSushi/toml/_examples/invalid.toml
deleted file mode 100644
index beb1dba..0000000
--- a/vendor/github.com/BurntSushi/toml/_examples/invalid.toml
+++ /dev/null
@@ -1,35 +0,0 @@
-# This is an INVALID TOML document. Boom.
-# Can you spot the error without help?
-
-title = "TOML Example"
-
-[owner]
-name = "Tom Preston-Werner"
-organization = "GitHub"
-bio = "GitHub Cofounder & CEO\nLikes tater tots and beer."
-dob = 1979-05-27T7:32:00Z # First class dates? Why not?
-
-[database]
-server = "192.168.1.1"
-ports = [ 8001, 8001, 8002 ]
-connection_max = 5000
-enabled = true
-
-[servers]
- # You can indent as you please. Tabs or spaces. TOML don't care.
- [servers.alpha]
- ip = "10.0.0.1"
- dc = "eqdc10"
-
- [servers.beta]
- ip = "10.0.0.2"
- dc = "eqdc10"
-
-[clients]
-data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it
-
-# Line breaks are OK when inside arrays
-hosts = [
- "alpha",
- "omega"
-]
diff --git a/vendor/github.com/BurntSushi/toml/_examples/readme1.toml b/vendor/github.com/BurntSushi/toml/_examples/readme1.toml
deleted file mode 100644
index 3e1261d..0000000
--- a/vendor/github.com/BurntSushi/toml/_examples/readme1.toml
+++ /dev/null
@@ -1,5 +0,0 @@
-Age = 25
-Cats = [ "Cauchy", "Plato" ]
-Pi = 3.14
-Perfection = [ 6, 28, 496, 8128 ]
-DOB = 1987-07-05T05:45:00Z
diff --git a/vendor/github.com/BurntSushi/toml/_examples/readme2.toml b/vendor/github.com/BurntSushi/toml/_examples/readme2.toml
deleted file mode 100644
index b51cd93..0000000
--- a/vendor/github.com/BurntSushi/toml/_examples/readme2.toml
+++ /dev/null
@@ -1 +0,0 @@
-some_key_NAME = "wat"
diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING b/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING
deleted file mode 100644
index 01b5743..0000000
--- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 TOML authors
-
-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:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-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.
diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md b/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md
deleted file mode 100644
index 93f4e3a..0000000
--- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Implements the TOML test suite interface
-
-This is an implementation of the interface expected by
-[toml-test](https://github.com/BurntSushi/toml-test) for my
-[toml parser written in Go](https://github.com/BurntSushi/toml).
-In particular, it maps TOML data on `stdin` to a JSON format on `stdout`.
-
-
-Compatible with TOML version
-[v0.4.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md)
-
-Compatible with `toml-test` version
-[v0.2.0](https://github.com/BurntSushi/toml-test/tree/v0.2.0)
diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go b/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go
deleted file mode 100644
index 14e7557..0000000
--- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// Command toml-test-decoder satisfies the toml-test interface for testing
-// TOML decoders. Namely, it accepts TOML on stdin and outputs JSON on stdout.
-package main
-
-import (
- "encoding/json"
- "flag"
- "fmt"
- "log"
- "os"
- "path"
- "time"
-
- "github.com/BurntSushi/toml"
-)
-
-func init() {
- log.SetFlags(0)
-
- flag.Usage = usage
- flag.Parse()
-}
-
-func usage() {
- log.Printf("Usage: %s < toml-file\n", path.Base(os.Args[0]))
- flag.PrintDefaults()
-
- os.Exit(1)
-}
-
-func main() {
- if flag.NArg() != 0 {
- flag.Usage()
- }
-
- var tmp interface{}
- if _, err := toml.DecodeReader(os.Stdin, &tmp); err != nil {
- log.Fatalf("Error decoding TOML: %s", err)
- }
-
- typedTmp := translate(tmp)
- if err := json.NewEncoder(os.Stdout).Encode(typedTmp); err != nil {
- log.Fatalf("Error encoding JSON: %s", err)
- }
-}
-
-func translate(tomlData interface{}) interface{} {
- switch orig := tomlData.(type) {
- case map[string]interface{}:
- typed := make(map[string]interface{}, len(orig))
- for k, v := range orig {
- typed[k] = translate(v)
- }
- return typed
- case []map[string]interface{}:
- typed := make([]map[string]interface{}, len(orig))
- for i, v := range orig {
- typed[i] = translate(v).(map[string]interface{})
- }
- return typed
- case []interface{}:
- typed := make([]interface{}, len(orig))
- for i, v := range orig {
- typed[i] = translate(v)
- }
-
- // We don't really need to tag arrays, but let's be future proof.
- // (If TOML ever supports tuples, we'll need this.)
- return tag("array", typed)
- case time.Time:
- return tag("datetime", orig.Format("2006-01-02T15:04:05Z"))
- case bool:
- return tag("bool", fmt.Sprintf("%v", orig))
- case int64:
- return tag("integer", fmt.Sprintf("%d", orig))
- case float64:
- return tag("float", fmt.Sprintf("%v", orig))
- case string:
- return tag("string", orig)
- }
-
- panic(fmt.Sprintf("Unknown type: %T", tomlData))
-}
-
-func tag(typeName string, data interface{}) map[string]interface{} {
- return map[string]interface{}{
- "type": typeName,
- "value": data,
- }
-}
diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING b/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING
deleted file mode 100644
index 01b5743..0000000
--- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 TOML authors
-
-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:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-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.
diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md b/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md
deleted file mode 100644
index a45bd4d..0000000
--- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Implements the TOML test suite interface for TOML encoders
-
-This is an implementation of the interface expected by
-[toml-test](https://github.com/BurntSushi/toml-test) for the
-[TOML encoder](https://github.com/BurntSushi/toml).
-In particular, it maps JSON data on `stdin` to a TOML format on `stdout`.
-
-
-Compatible with TOML version
-[v0.4.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md)
-
-Compatible with `toml-test` version
-[v0.2.0](https://github.com/BurntSushi/toml-test/tree/v0.2.0)
diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go b/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go
deleted file mode 100644
index 092cc68..0000000
--- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go
+++ /dev/null
@@ -1,131 +0,0 @@
-// Command toml-test-encoder satisfies the toml-test interface for testing
-// TOML encoders. Namely, it accepts JSON on stdin and outputs TOML on stdout.
-package main
-
-import (
- "encoding/json"
- "flag"
- "log"
- "os"
- "path"
- "strconv"
- "time"
-
- "github.com/BurntSushi/toml"
-)
-
-func init() {
- log.SetFlags(0)
-
- flag.Usage = usage
- flag.Parse()
-}
-
-func usage() {
- log.Printf("Usage: %s < json-file\n", path.Base(os.Args[0]))
- flag.PrintDefaults()
-
- os.Exit(1)
-}
-
-func main() {
- if flag.NArg() != 0 {
- flag.Usage()
- }
-
- var tmp interface{}
- if err := json.NewDecoder(os.Stdin).Decode(&tmp); err != nil {
- log.Fatalf("Error decoding JSON: %s", err)
- }
-
- tomlData := translate(tmp)
- if err := toml.NewEncoder(os.Stdout).Encode(tomlData); err != nil {
- log.Fatalf("Error encoding TOML: %s", err)
- }
-}
-
-func translate(typedJson interface{}) interface{} {
- switch v := typedJson.(type) {
- case map[string]interface{}:
- if len(v) == 2 && in("type", v) && in("value", v) {
- return untag(v)
- }
- m := make(map[string]interface{}, len(v))
- for k, v2 := range v {
- m[k] = translate(v2)
- }
- return m
- case []interface{}:
- tabArray := make([]map[string]interface{}, len(v))
- for i := range v {
- if m, ok := translate(v[i]).(map[string]interface{}); ok {
- tabArray[i] = m
- } else {
- log.Fatalf("JSON arrays may only contain objects. This " +
- "corresponds to only tables being allowed in " +
- "TOML table arrays.")
- }
- }
- return tabArray
- }
- log.Fatalf("Unrecognized JSON format '%T'.", typedJson)
- panic("unreachable")
-}
-
-func untag(typed map[string]interface{}) interface{} {
- t := typed["type"].(string)
- v := typed["value"]
- switch t {
- case "string":
- return v.(string)
- case "integer":
- v := v.(string)
- n, err := strconv.Atoi(v)
- if err != nil {
- log.Fatalf("Could not parse '%s' as integer: %s", v, err)
- }
- return n
- case "float":
- v := v.(string)
- f, err := strconv.ParseFloat(v, 64)
- if err != nil {
- log.Fatalf("Could not parse '%s' as float64: %s", v, err)
- }
- return f
- case "datetime":
- v := v.(string)
- t, err := time.Parse("2006-01-02T15:04:05Z", v)
- if err != nil {
- log.Fatalf("Could not parse '%s' as a datetime: %s", v, err)
- }
- return t
- case "bool":
- v := v.(string)
- switch v {
- case "true":
- return true
- case "false":
- return false
- }
- log.Fatalf("Could not parse '%s' as a boolean.", v)
- case "array":
- v := v.([]interface{})
- array := make([]interface{}, len(v))
- for i := range v {
- if m, ok := v[i].(map[string]interface{}); ok {
- array[i] = untag(m)
- } else {
- log.Fatalf("Arrays may only contain other arrays or "+
- "primitive values, but found a '%T'.", m)
- }
- }
- return array
- }
- log.Fatalf("Unrecognized tag type '%s'.", t)
- panic("unreachable")
-}
-
-func in(key string, m map[string]interface{}) bool {
- _, ok := m[key]
- return ok
-}
diff --git a/vendor/github.com/BurntSushi/toml/cmd/tomlv/COPYING b/vendor/github.com/BurntSushi/toml/cmd/tomlv/COPYING
deleted file mode 100644
index 01b5743..0000000
--- a/vendor/github.com/BurntSushi/toml/cmd/tomlv/COPYING
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 TOML authors
-
-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:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-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.
diff --git a/vendor/github.com/BurntSushi/toml/cmd/tomlv/README.md b/vendor/github.com/BurntSushi/toml/cmd/tomlv/README.md
deleted file mode 100644
index 51231e2..0000000
--- a/vendor/github.com/BurntSushi/toml/cmd/tomlv/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# TOML Validator
-
-If Go is installed, it's simple to try it out:
-
-```bash
-go get github.com/BurntSushi/toml/cmd/tomlv
-tomlv some-toml-file.toml
-```
-
-You can see the types of every key in a TOML file with:
-
-```bash
-tomlv -types some-toml-file.toml
-```
-
-At the moment, only one error message is reported at a time. Error messages
-include line numbers. No output means that the files given are valid TOML, or
-there is a bug in `tomlv`.
-
-Compatible with TOML version
-[v0.4.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md)
diff --git a/vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go b/vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go
deleted file mode 100644
index c7d689a..0000000
--- a/vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Command tomlv validates TOML documents and prints each key's type.
-package main
-
-import (
- "flag"
- "fmt"
- "log"
- "os"
- "path"
- "strings"
- "text/tabwriter"
-
- "github.com/BurntSushi/toml"
-)
-
-var (
- flagTypes = false
-)
-
-func init() {
- log.SetFlags(0)
-
- flag.BoolVar(&flagTypes, "types", flagTypes,
- "When set, the types of every defined key will be shown.")
-
- flag.Usage = usage
- flag.Parse()
-}
-
-func usage() {
- log.Printf("Usage: %s toml-file [ toml-file ... ]\n",
- path.Base(os.Args[0]))
- flag.PrintDefaults()
-
- os.Exit(1)
-}
-
-func main() {
- if flag.NArg() < 1 {
- flag.Usage()
- }
- for _, f := range flag.Args() {
- var tmp interface{}
- md, err := toml.DecodeFile(f, &tmp)
- if err != nil {
- log.Fatalf("Error in '%s': %s", f, err)
- }
- if flagTypes {
- printTypes(md)
- }
- }
-}
-
-func printTypes(md toml.MetaData) {
- tabw := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
- for _, key := range md.Keys() {
- fmt.Fprintf(tabw, "%s%s\t%s\n",
- strings.Repeat(" ", len(key)-1), key, md.Type(key...))
- }
- tabw.Flush()
-}
diff --git a/vendor/github.com/BurntSushi/toml/decode.go b/vendor/github.com/BurntSushi/toml/decode.go
deleted file mode 100644
index b0fd51d..0000000
--- a/vendor/github.com/BurntSushi/toml/decode.go
+++ /dev/null
@@ -1,509 +0,0 @@
-package toml
-
-import (
- "fmt"
- "io"
- "io/ioutil"
- "math"
- "reflect"
- "strings"
- "time"
-)
-
-func e(format string, args ...interface{}) error {
- return fmt.Errorf("toml: "+format, args...)
-}
-
-// Unmarshaler is the interface implemented by objects that can unmarshal a
-// TOML description of themselves.
-type Unmarshaler interface {
- UnmarshalTOML(interface{}) error
-}
-
-// Unmarshal decodes the contents of `p` in TOML format into a pointer `v`.
-func Unmarshal(p []byte, v interface{}) error {
- _, err := Decode(string(p), v)
- return err
-}
-
-// Primitive is a TOML value that hasn't been decoded into a Go value.
-// When using the various `Decode*` functions, the type `Primitive` may
-// be given to any value, and its decoding will be delayed.
-//
-// A `Primitive` value can be decoded using the `PrimitiveDecode` function.
-//
-// The underlying representation of a `Primitive` value is subject to change.
-// Do not rely on it.
-//
-// N.B. Primitive values are still parsed, so using them will only avoid
-// the overhead of reflection. They can be useful when you don't know the
-// exact type of TOML data until run time.
-type Primitive struct {
- undecoded interface{}
- context Key
-}
-
-// DEPRECATED!
-//
-// Use MetaData.PrimitiveDecode instead.
-func PrimitiveDecode(primValue Primitive, v interface{}) error {
- md := MetaData{decoded: make(map[string]bool)}
- return md.unify(primValue.undecoded, rvalue(v))
-}
-
-// PrimitiveDecode is just like the other `Decode*` functions, except it
-// decodes a TOML value that has already been parsed. Valid primitive values
-// can *only* be obtained from values filled by the decoder functions,
-// including this method. (i.e., `v` may contain more `Primitive`
-// values.)
-//
-// Meta data for primitive values is included in the meta data returned by
-// the `Decode*` functions with one exception: keys returned by the Undecoded
-// method will only reflect keys that were decoded. Namely, any keys hidden
-// behind a Primitive will be considered undecoded. Executing this method will
-// update the undecoded keys in the meta data. (See the example.)
-func (md *MetaData) PrimitiveDecode(primValue Primitive, v interface{}) error {
- md.context = primValue.context
- defer func() { md.context = nil }()
- return md.unify(primValue.undecoded, rvalue(v))
-}
-
-// Decode will decode the contents of `data` in TOML format into a pointer
-// `v`.
-//
-// TOML hashes correspond to Go structs or maps. (Dealer's choice. They can be
-// used interchangeably.)
-//
-// TOML arrays of tables correspond to either a slice of structs or a slice
-// of maps.
-//
-// TOML datetimes correspond to Go `time.Time` values.
-//
-// All other TOML types (float, string, int, bool and array) correspond
-// to the obvious Go types.
-//
-// An exception to the above rules is if a type implements the
-// encoding.TextUnmarshaler interface. In this case, any primitive TOML value
-// (floats, strings, integers, booleans and datetimes) will be converted to
-// a byte string and given to the value's UnmarshalText method. See the
-// Unmarshaler example for a demonstration with time duration strings.
-//
-// Key mapping
-//
-// TOML keys can map to either keys in a Go map or field names in a Go
-// struct. The special `toml` struct tag may be used to map TOML keys to
-// struct fields that don't match the key name exactly. (See the example.)
-// A case insensitive match to struct names will be tried if an exact match
-// can't be found.
-//
-// The mapping between TOML values and Go values is loose. That is, there
-// may exist TOML values that cannot be placed into your representation, and
-// there may be parts of your representation that do not correspond to
-// TOML values. This loose mapping can be made stricter by using the IsDefined
-// and/or Undecoded methods on the MetaData returned.
-//
-// This decoder will not handle cyclic types. If a cyclic type is passed,
-// `Decode` will not terminate.
-func Decode(data string, v interface{}) (MetaData, error) {
- rv := reflect.ValueOf(v)
- if rv.Kind() != reflect.Ptr {
- return MetaData{}, e("Decode of non-pointer %s", reflect.TypeOf(v))
- }
- if rv.IsNil() {
- return MetaData{}, e("Decode of nil %s", reflect.TypeOf(v))
- }
- p, err := parse(data)
- if err != nil {
- return MetaData{}, err
- }
- md := MetaData{
- p.mapping, p.types, p.ordered,
- make(map[string]bool, len(p.ordered)), nil,
- }
- return md, md.unify(p.mapping, indirect(rv))
-}
-
-// DecodeFile is just like Decode, except it will automatically read the
-// contents of the file at `fpath` and decode it for you.
-func DecodeFile(fpath string, v interface{}) (MetaData, error) {
- bs, err := ioutil.ReadFile(fpath)
- if err != nil {
- return MetaData{}, err
- }
- return Decode(string(bs), v)
-}
-
-// DecodeReader is just like Decode, except it will consume all bytes
-// from the reader and decode it for you.
-func DecodeReader(r io.Reader, v interface{}) (MetaData, error) {
- bs, err := ioutil.ReadAll(r)
- if err != nil {
- return MetaData{}, err
- }
- return Decode(string(bs), v)
-}
-
-// unify performs a sort of type unification based on the structure of `rv`,
-// which is the client representation.
-//
-// Any type mismatch produces an error. Finding a type that we don't know
-// how to handle produces an unsupported type error.
-func (md *MetaData) unify(data interface{}, rv reflect.Value) error {
-
- // Special case. Look for a `Primitive` value.
- if rv.Type() == reflect.TypeOf((*Primitive)(nil)).Elem() {
- // Save the undecoded data and the key context into the primitive
- // value.
- context := make(Key, len(md.context))
- copy(context, md.context)
- rv.Set(reflect.ValueOf(Primitive{
- undecoded: data,
- context: context,
- }))
- return nil
- }
-
- // Special case. Unmarshaler Interface support.
- if rv.CanAddr() {
- if v, ok := rv.Addr().Interface().(Unmarshaler); ok {
- return v.UnmarshalTOML(data)
- }
- }
-
- // Special case. Handle time.Time values specifically.
- // TODO: Remove this code when we decide to drop support for Go 1.1.
- // This isn't necessary in Go 1.2 because time.Time satisfies the encoding
- // interfaces.
- if rv.Type().AssignableTo(rvalue(time.Time{}).Type()) {
- return md.unifyDatetime(data, rv)
- }
-
- // Special case. Look for a value satisfying the TextUnmarshaler interface.
- if v, ok := rv.Interface().(TextUnmarshaler); ok {
- return md.unifyText(data, v)
- }
- // BUG(burntsushi)
- // The behavior here is incorrect whenever a Go type satisfies the
- // encoding.TextUnmarshaler interface but also corresponds to a TOML
- // hash or array. In particular, the unmarshaler should only be applied
- // to primitive TOML values. But at this point, it will be applied to
- // all kinds of values and produce an incorrect error whenever those values
- // are hashes or arrays (including arrays of tables).
-
- k := rv.Kind()
-
- // laziness
- if k >= reflect.Int && k <= reflect.Uint64 {
- return md.unifyInt(data, rv)
- }
- switch k {
- case reflect.Ptr:
- elem := reflect.New(rv.Type().Elem())
- err := md.unify(data, reflect.Indirect(elem))
- if err != nil {
- return err
- }
- rv.Set(elem)
- return nil
- case reflect.Struct:
- return md.unifyStruct(data, rv)
- case reflect.Map:
- return md.unifyMap(data, rv)
- case reflect.Array:
- return md.unifyArray(data, rv)
- case reflect.Slice:
- return md.unifySlice(data, rv)
- case reflect.String:
- return md.unifyString(data, rv)
- case reflect.Bool:
- return md.unifyBool(data, rv)
- case reflect.Interface:
- // we only support empty interfaces.
- if rv.NumMethod() > 0 {
- return e("unsupported type %s", rv.Type())
- }
- return md.unifyAnything(data, rv)
- case reflect.Float32:
- fallthrough
- case reflect.Float64:
- return md.unifyFloat64(data, rv)
- }
- return e("unsupported type %s", rv.Kind())
-}
-
-func (md *MetaData) unifyStruct(mapping interface{}, rv reflect.Value) error {
- tmap, ok := mapping.(map[string]interface{})
- if !ok {
- if mapping == nil {
- return nil
- }
- return e("type mismatch for %s: expected table but found %T",
- rv.Type().String(), mapping)
- }
-
- for key, datum := range tmap {
- var f *field
- fields := cachedTypeFields(rv.Type())
- for i := range fields {
- ff := &fields[i]
- if ff.name == key {
- f = ff
- break
- }
- if f == nil && strings.EqualFold(ff.name, key) {
- f = ff
- }
- }
- if f != nil {
- subv := rv
- for _, i := range f.index {
- subv = indirect(subv.Field(i))
- }
- if isUnifiable(subv) {
- md.decoded[md.context.add(key).String()] = true
- md.context = append(md.context, key)
- if err := md.unify(datum, subv); err != nil {
- return err
- }
- md.context = md.context[0 : len(md.context)-1]
- } else if f.name != "" {
- // Bad user! No soup for you!
- return e("cannot write unexported field %s.%s",
- rv.Type().String(), f.name)
- }
- }
- }
- return nil
-}
-
-func (md *MetaData) unifyMap(mapping interface{}, rv reflect.Value) error {
- tmap, ok := mapping.(map[string]interface{})
- if !ok {
- if tmap == nil {
- return nil
- }
- return badtype("map", mapping)
- }
- if rv.IsNil() {
- rv.Set(reflect.MakeMap(rv.Type()))
- }
- for k, v := range tmap {
- md.decoded[md.context.add(k).String()] = true
- md.context = append(md.context, k)
-
- rvkey := indirect(reflect.New(rv.Type().Key()))
- rvval := reflect.Indirect(reflect.New(rv.Type().Elem()))
- if err := md.unify(v, rvval); err != nil {
- return err
- }
- md.context = md.context[0 : len(md.context)-1]
-
- rvkey.SetString(k)
- rv.SetMapIndex(rvkey, rvval)
- }
- return nil
-}
-
-func (md *MetaData) unifyArray(data interface{}, rv reflect.Value) error {
- datav := reflect.ValueOf(data)
- if datav.Kind() != reflect.Slice {
- if !datav.IsValid() {
- return nil
- }
- return badtype("slice", data)
- }
- sliceLen := datav.Len()
- if sliceLen != rv.Len() {
- return e("expected array length %d; got TOML array of length %d",
- rv.Len(), sliceLen)
- }
- return md.unifySliceArray(datav, rv)
-}
-
-func (md *MetaData) unifySlice(data interface{}, rv reflect.Value) error {
- datav := reflect.ValueOf(data)
- if datav.Kind() != reflect.Slice {
- if !datav.IsValid() {
- return nil
- }
- return badtype("slice", data)
- }
- n := datav.Len()
- if rv.IsNil() || rv.Cap() < n {
- rv.Set(reflect.MakeSlice(rv.Type(), n, n))
- }
- rv.SetLen(n)
- return md.unifySliceArray(datav, rv)
-}
-
-func (md *MetaData) unifySliceArray(data, rv reflect.Value) error {
- sliceLen := data.Len()
- for i := 0; i < sliceLen; i++ {
- v := data.Index(i).Interface()
- sliceval := indirect(rv.Index(i))
- if err := md.unify(v, sliceval); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (md *MetaData) unifyDatetime(data interface{}, rv reflect.Value) error {
- if _, ok := data.(time.Time); ok {
- rv.Set(reflect.ValueOf(data))
- return nil
- }
- return badtype("time.Time", data)
-}
-
-func (md *MetaData) unifyString(data interface{}, rv reflect.Value) error {
- if s, ok := data.(string); ok {
- rv.SetString(s)
- return nil
- }
- return badtype("string", data)
-}
-
-func (md *MetaData) unifyFloat64(data interface{}, rv reflect.Value) error {
- if num, ok := data.(float64); ok {
- switch rv.Kind() {
- case reflect.Float32:
- fallthrough
- case reflect.Float64:
- rv.SetFloat(num)
- default:
- panic("bug")
- }
- return nil
- }
- return badtype("float", data)
-}
-
-func (md *MetaData) unifyInt(data interface{}, rv reflect.Value) error {
- if num, ok := data.(int64); ok {
- if rv.Kind() >= reflect.Int && rv.Kind() <= reflect.Int64 {
- switch rv.Kind() {
- case reflect.Int, reflect.Int64:
- // No bounds checking necessary.
- case reflect.Int8:
- if num < math.MinInt8 || num > math.MaxInt8 {
- return e("value %d is out of range for int8", num)
- }
- case reflect.Int16:
- if num < math.MinInt16 || num > math.MaxInt16 {
- return e("value %d is out of range for int16", num)
- }
- case reflect.Int32:
- if num < math.MinInt32 || num > math.MaxInt32 {
- return e("value %d is out of range for int32", num)
- }
- }
- rv.SetInt(num)
- } else if rv.Kind() >= reflect.Uint && rv.Kind() <= reflect.Uint64 {
- unum := uint64(num)
- switch rv.Kind() {
- case reflect.Uint, reflect.Uint64:
- // No bounds checking necessary.
- case reflect.Uint8:
- if num < 0 || unum > math.MaxUint8 {
- return e("value %d is out of range for uint8", num)
- }
- case reflect.Uint16:
- if num < 0 || unum > math.MaxUint16 {
- return e("value %d is out of range for uint16", num)
- }
- case reflect.Uint32:
- if num < 0 || unum > math.MaxUint32 {
- return e("value %d is out of range for uint32", num)
- }
- }
- rv.SetUint(unum)
- } else {
- panic("unreachable")
- }
- return nil
- }
- return badtype("integer", data)
-}
-
-func (md *MetaData) unifyBool(data interface{}, rv reflect.Value) error {
- if b, ok := data.(bool); ok {
- rv.SetBool(b)
- return nil
- }
- return badtype("boolean", data)
-}
-
-func (md *MetaData) unifyAnything(data interface{}, rv reflect.Value) error {
- rv.Set(reflect.ValueOf(data))
- return nil
-}
-
-func (md *MetaData) unifyText(data interface{}, v TextUnmarshaler) error {
- var s string
- switch sdata := data.(type) {
- case TextMarshaler:
- text, err := sdata.MarshalText()
- if err != nil {
- return err
- }
- s = string(text)
- case fmt.Stringer:
- s = sdata.String()
- case string:
- s = sdata
- case bool:
- s = fmt.Sprintf("%v", sdata)
- case int64:
- s = fmt.Sprintf("%d", sdata)
- case float64:
- s = fmt.Sprintf("%f", sdata)
- default:
- return badtype("primitive (string-like)", data)
- }
- if err := v.UnmarshalText([]byte(s)); err != nil {
- return err
- }
- return nil
-}
-
-// rvalue returns a reflect.Value of `v`. All pointers are resolved.
-func rvalue(v interface{}) reflect.Value {
- return indirect(reflect.ValueOf(v))
-}
-
-// indirect returns the value pointed to by a pointer.
-// Pointers are followed until the value is not a pointer.
-// New values are allocated for each nil pointer.
-//
-// An exception to this rule is if the value satisfies an interface of
-// interest to us (like encoding.TextUnmarshaler).
-func indirect(v reflect.Value) reflect.Value {
- if v.Kind() != reflect.Ptr {
- if v.CanSet() {
- pv := v.Addr()
- if _, ok := pv.Interface().(TextUnmarshaler); ok {
- return pv
- }
- }
- return v
- }
- if v.IsNil() {
- v.Set(reflect.New(v.Type().Elem()))
- }
- return indirect(reflect.Indirect(v))
-}
-
-func isUnifiable(rv reflect.Value) bool {
- if rv.CanSet() {
- return true
- }
- if _, ok := rv.Interface().(TextUnmarshaler); ok {
- return true
- }
- return false
-}
-
-func badtype(expected string, data interface{}) error {
- return e("cannot load TOML value of type %T into a Go %s", data, expected)
-}
diff --git a/vendor/github.com/BurntSushi/toml/decode_meta.go b/vendor/github.com/BurntSushi/toml/decode_meta.go
deleted file mode 100644
index b9914a6..0000000
--- a/vendor/github.com/BurntSushi/toml/decode_meta.go
+++ /dev/null
@@ -1,121 +0,0 @@
-package toml
-
-import "strings"
-
-// MetaData allows access to meta information about TOML data that may not
-// be inferrable via reflection. In particular, whether a key has been defined
-// and the TOML type of a key.
-type MetaData struct {
- mapping map[string]interface{}
- types map[string]tomlType
- keys []Key
- decoded map[string]bool
- context Key // Used only during decoding.
-}
-
-// IsDefined returns true if the key given exists in the TOML data. The key
-// should be specified hierarchially. e.g.,
-//
-// // access the TOML key 'a.b.c'
-// IsDefined("a", "b", "c")
-//
-// IsDefined will return false if an empty key given. Keys are case sensitive.
-func (md *MetaData) IsDefined(key ...string) bool {
- if len(key) == 0 {
- return false
- }
-
- var hash map[string]interface{}
- var ok bool
- var hashOrVal interface{} = md.mapping
- for _, k := range key {
- if hash, ok = hashOrVal.(map[string]interface{}); !ok {
- return false
- }
- if hashOrVal, ok = hash[k]; !ok {
- return false
- }
- }
- return true
-}
-
-// Type returns a string representation of the type of the key specified.
-//
-// Type will return the empty string if given an empty key or a key that
-// does not exist. Keys are case sensitive.
-func (md *MetaData) Type(key ...string) string {
- fullkey := strings.Join(key, ".")
- if typ, ok := md.types[fullkey]; ok {
- return typ.typeString()
- }
- return ""
-}
-
-// Key is the type of any TOML key, including key groups. Use (MetaData).Keys
-// to get values of this type.
-type Key []string
-
-func (k Key) String() string {
- return strings.Join(k, ".")
-}
-
-func (k Key) maybeQuotedAll() string {
- var ss []string
- for i := range k {
- ss = append(ss, k.maybeQuoted(i))
- }
- return strings.Join(ss, ".")
-}
-
-func (k Key) maybeQuoted(i int) string {
- quote := false
- for _, c := range k[i] {
- if !isBareKeyChar(c) {
- quote = true
- break
- }
- }
- if quote {
- return "\"" + strings.Replace(k[i], "\"", "\\\"", -1) + "\""
- }
- return k[i]
-}
-
-func (k Key) add(piece string) Key {
- newKey := make(Key, len(k)+1)
- copy(newKey, k)
- newKey[len(k)] = piece
- return newKey
-}
-
-// Keys returns a slice of every key in the TOML data, including key groups.
-// Each key is itself a slice, where the first element is the top of the
-// hierarchy and the last is the most specific.
-//
-// The list will have the same order as the keys appeared in the TOML data.
-//
-// All keys returned are non-empty.
-func (md *MetaData) Keys() []Key {
- return md.keys
-}
-
-// Undecoded returns all keys that have not been decoded in the order in which
-// they appear in the original TOML document.
-//
-// This includes keys that haven't been decoded because of a Primitive value.
-// Once the Primitive value is decoded, the keys will be considered decoded.
-//
-// Also note that decoding into an empty interface will result in no decoding,
-// and so no keys will be considered decoded.
-//
-// In this sense, the Undecoded keys correspond to keys in the TOML document
-// that do not have a concrete type in your representation.
-func (md *MetaData) Undecoded() []Key {
- undecoded := make([]Key, 0, len(md.keys))
- for _, key := range md.keys {
- if !md.decoded[key.String()] {
- undecoded = append(undecoded, key)
- }
- }
- return undecoded
-}
diff --git a/vendor/github.com/BurntSushi/toml/decode_test.go b/vendor/github.com/BurntSushi/toml/decode_test.go
deleted file mode 100644
index 95bc987..0000000
--- a/vendor/github.com/BurntSushi/toml/decode_test.go
+++ /dev/null
@@ -1,1461 +0,0 @@
-package toml
-
-import (
- "fmt"
- "log"
- "math"
- "reflect"
- "strings"
- "testing"
- "time"
-)
-
-func TestDecodeSimple(t *testing.T) {
- var testSimple = `
-age = 250
-andrew = "gallant"
-kait = "brady"
-now = 1987-07-05T05:45:00Z
-nowEast = 2017-06-22T16:15:21+08:00
-nowWest = 2017-06-22T02:14:36-06:00
-yesOrNo = true
-pi = 3.14
-colors = [
- ["red", "green", "blue"],
- ["cyan", "magenta", "yellow", "black"],
-]
-
-[My.Cats]
-plato = "cat 1"
-cauchy = "cat 2"
-`
-
- type cats struct {
- Plato string
- Cauchy string
- }
- type simple struct {
- Age int
- Colors [][]string
- Pi float64
- YesOrNo bool
- Now time.Time
- NowEast time.Time
- NowWest time.Time
- Andrew string
- Kait string
- My map[string]cats
- }
-
- var val simple
- _, err := Decode(testSimple, &val)
- if err != nil {
- t.Fatal(err)
- }
-
- now, err := time.Parse("2006-01-02T15:04:05", "1987-07-05T05:45:00")
- if err != nil {
- panic(err)
- }
- nowEast, err := time.Parse("2006-01-02T15:04:05-07:00", "2017-06-22T16:15:21+08:00")
- if err != nil {
- panic(err)
- }
- nowWest, err := time.Parse("2006-01-02T15:04:05-07:00", "2017-06-22T02:14:36-06:00")
- if err != nil {
- panic(err)
- }
- var answer = simple{
- Age: 250,
- Andrew: "gallant",
- Kait: "brady",
- Now: now,
- NowEast: nowEast,
- NowWest: nowWest,
- YesOrNo: true,
- Pi: 3.14,
- Colors: [][]string{
- {"red", "green", "blue"},
- {"cyan", "magenta", "yellow", "black"},
- },
- My: map[string]cats{
- "Cats": {Plato: "cat 1", Cauchy: "cat 2"},
- },
- }
- if !reflect.DeepEqual(val, answer) {
- t.Fatalf("Expected\n-----\n%#v\n-----\nbut got\n-----\n%#v\n",
- answer, val)
- }
-}
-
-func TestDecodeEmbedded(t *testing.T) {
- type Dog struct{ Name string }
- type Age int
- type cat struct{ Name string }
-
- for _, test := range []struct {
- label string
- input string
- decodeInto interface{}
- wantDecoded interface{}
- }{
- {
- label: "embedded struct",
- input: `Name = "milton"`,
- decodeInto: &struct{ Dog }{},
- wantDecoded: &struct{ Dog }{Dog{"milton"}},
- },
- {
- label: "embedded non-nil pointer to struct",
- input: `Name = "milton"`,
- decodeInto: &struct{ *Dog }{},
- wantDecoded: &struct{ *Dog }{&Dog{"milton"}},
- },
- {
- label: "embedded nil pointer to struct",
- input: ``,
- decodeInto: &struct{ *Dog }{},
- wantDecoded: &struct{ *Dog }{nil},
- },
- {
- label: "unexported embedded struct",
- input: `Name = "socks"`,
- decodeInto: &struct{ cat }{},
- wantDecoded: &struct{ cat }{cat{"socks"}},
- },
- {
- label: "embedded int",
- input: `Age = -5`,
- decodeInto: &struct{ Age }{},
- wantDecoded: &struct{ Age }{-5},
- },
- } {
- _, err := Decode(test.input, test.decodeInto)
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(test.wantDecoded, test.decodeInto) {
- t.Errorf("%s: want decoded == %+v, got %+v",
- test.label, test.wantDecoded, test.decodeInto)
- }
- }
-}
-
-func TestDecodeIgnoredFields(t *testing.T) {
- type simple struct {
- Number int `toml:"-"`
- }
- const input = `
-Number = 123
-- = 234
-`
- var s simple
- if _, err := Decode(input, &s); err != nil {
- t.Fatal(err)
- }
- if s.Number != 0 {
- t.Errorf("got: %d; want 0", s.Number)
- }
-}
-
-func TestTableArrays(t *testing.T) {
- var tomlTableArrays = `
-[[albums]]
-name = "Born to Run"
-
- [[albums.songs]]
- name = "Jungleland"
-
- [[albums.songs]]
- name = "Meeting Across the River"
-
-[[albums]]
-name = "Born in the USA"
-
- [[albums.songs]]
- name = "Glory Days"
-
- [[albums.songs]]
- name = "Dancing in the Dark"
-`
-
- type Song struct {
- Name string
- }
-
- type Album struct {
- Name string
- Songs []Song
- }
-
- type Music struct {
- Albums []Album
- }
-
- expected := Music{[]Album{
- {"Born to Run", []Song{{"Jungleland"}, {"Meeting Across the River"}}},
- {"Born in the USA", []Song{{"Glory Days"}, {"Dancing in the Dark"}}},
- }}
- var got Music
- if _, err := Decode(tomlTableArrays, &got); err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(expected, got) {
- t.Fatalf("\n%#v\n!=\n%#v\n", expected, got)
- }
-}
-
-func TestTableNesting(t *testing.T) {
- for _, tt := range []struct {
- t string
- want []string
- }{
- {"[a.b.c]", []string{"a", "b", "c"}},
- {`[a."b.c"]`, []string{"a", "b.c"}},
- {`[a.'b.c']`, []string{"a", "b.c"}},
- {`[a.' b ']`, []string{"a", " b "}},
- {"[ d.e.f ]", []string{"d", "e", "f"}},
- {"[ g . h . i ]", []string{"g", "h", "i"}},
- {`[ j . "ʞ" . 'l' ]`, []string{"j", "ʞ", "l"}},
- } {
- var m map[string]interface{}
- if _, err := Decode(tt.t, &m); err != nil {
- t.Errorf("Decode(%q): got error: %s", tt.t, err)
- continue
- }
- if keys := extractNestedKeys(m); !reflect.DeepEqual(keys, tt.want) {
- t.Errorf("Decode(%q): got nested keys %#v; want %#v",
- tt.t, keys, tt.want)
- }
- }
-}
-
-func extractNestedKeys(v map[string]interface{}) []string {
- var result []string
- for {
- if len(v) != 1 {
- return result
- }
- for k, m := range v {
- result = append(result, k)
- var ok bool
- v, ok = m.(map[string]interface{})
- if !ok {
- return result
- }
- }
-
- }
-}
-
-// Case insensitive matching tests.
-// A bit more comprehensive than needed given the current implementation,
-// but implementations change.
-// Probably still missing demonstrations of some ugly corner cases regarding
-// case insensitive matching and multiple fields.
-func TestCase(t *testing.T) {
- var caseToml = `
-tOpString = "string"
-tOpInt = 1
-tOpFloat = 1.1
-tOpBool = true
-tOpdate = 2006-01-02T15:04:05Z
-tOparray = [ "array" ]
-Match = "i should be in Match only"
-MatcH = "i should be in MatcH only"
-once = "just once"
-[nEst.eD]
-nEstedString = "another string"
-`
-
- type InsensitiveEd struct {
- NestedString string
- }
-
- type InsensitiveNest struct {
- Ed InsensitiveEd
- }
-
- type Insensitive struct {
- TopString string
- TopInt int
- TopFloat float64
- TopBool bool
- TopDate time.Time
- TopArray []string
- Match string
- MatcH string
- Once string
- OncE string
- Nest InsensitiveNest
- }
-
- tme, err := time.Parse(time.RFC3339, time.RFC3339[:len(time.RFC3339)-5])
- if err != nil {
- panic(err)
- }
- expected := Insensitive{
- TopString: "string",
- TopInt: 1,
- TopFloat: 1.1,
- TopBool: true,
- TopDate: tme,
- TopArray: []string{"array"},
- MatcH: "i should be in MatcH only",
- Match: "i should be in Match only",
- Once: "just once",
- OncE: "",
- Nest: InsensitiveNest{
- Ed: InsensitiveEd{NestedString: "another string"},
- },
- }
- var got Insensitive
- if _, err := Decode(caseToml, &got); err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(expected, got) {
- t.Fatalf("\n%#v\n!=\n%#v\n", expected, got)
- }
-}
-
-func TestPointers(t *testing.T) {
- type Object struct {
- Type string
- Description string
- }
-
- type Dict struct {
- NamedObject map[string]*Object
- BaseObject *Object
- Strptr *string
- Strptrs []*string
- }
- s1, s2, s3 := "blah", "abc", "def"
- expected := &Dict{
- Strptr: &s1,
- Strptrs: []*string{&s2, &s3},
- NamedObject: map[string]*Object{
- "foo": {"FOO", "fooooo!!!"},
- "bar": {"BAR", "ba-ba-ba-ba-barrrr!!!"},
- },
- BaseObject: &Object{"BASE", "da base"},
- }
-
- ex1 := `
-Strptr = "blah"
-Strptrs = ["abc", "def"]
-
-[NamedObject.foo]
-Type = "FOO"
-Description = "fooooo!!!"
-
-[NamedObject.bar]
-Type = "BAR"
-Description = "ba-ba-ba-ba-barrrr!!!"
-
-[BaseObject]
-Type = "BASE"
-Description = "da base"
-`
- dict := new(Dict)
- _, err := Decode(ex1, dict)
- if err != nil {
- t.Errorf("Decode error: %v", err)
- }
- if !reflect.DeepEqual(expected, dict) {
- t.Fatalf("\n%#v\n!=\n%#v\n", expected, dict)
- }
-}
-
-func TestDecodeDatetime(t *testing.T) {
- const noTimestamp = "2006-01-02T15:04:05"
- for _, tt := range []struct {
- s string
- t string
- format string
- }{
- {"1979-05-27T07:32:00Z", "1979-05-27T07:32:00Z", time.RFC3339},
- {"1979-05-27T00:32:00-07:00", "1979-05-27T00:32:00-07:00", time.RFC3339},
- {
- "1979-05-27T00:32:00.999999-07:00",
- "1979-05-27T00:32:00.999999-07:00",
- time.RFC3339,
- },
- {"1979-05-27T07:32:00", "1979-05-27T07:32:00", noTimestamp},
- {
- "1979-05-27T00:32:00.999999",
- "1979-05-27T00:32:00.999999",
- noTimestamp,
- },
- {"1979-05-27", "1979-05-27T00:00:00", noTimestamp},
- } {
- var x struct{ D time.Time }
- input := "d = " + tt.s
- if _, err := Decode(input, &x); err != nil {
- t.Errorf("Decode(%q): got error: %s", input, err)
- continue
- }
- want, err := time.ParseInLocation(tt.format, tt.t, time.Local)
- if err != nil {
- panic(err)
- }
- if !x.D.Equal(want) {
- t.Errorf("Decode(%q): got %s; want %s", input, x.D, want)
- }
- }
-}
-
-func TestDecodeBadDatetime(t *testing.T) {
- var x struct{ T time.Time }
- for _, s := range []string{
- "123",
- "2006-01-50T00:00:00Z",
- "2006-01-30T00:00",
- "2006-01-30T",
- } {
- input := "T = " + s
- if _, err := Decode(input, &x); err == nil {
- t.Errorf("Expected invalid DateTime error for %q", s)
- }
- }
-}
-
-func TestDecodeMultilineStrings(t *testing.T) {
- var x struct {
- S string
- }
- const s0 = `s = """
-a b \n c
-d e f
-"""`
- if _, err := Decode(s0, &x); err != nil {
- t.Fatal(err)
- }
- if want := "a b \n c\nd e f\n"; x.S != want {
- t.Errorf("got: %q; want: %q", x.S, want)
- }
- const s1 = `s = """a b c\
-"""`
- if _, err := Decode(s1, &x); err != nil {
- t.Fatal(err)
- }
- if want := "a b c"; x.S != want {
- t.Errorf("got: %q; want: %q", x.S, want)
- }
-}
-
-type sphere struct {
- Center [3]float64
- Radius float64
-}
-
-func TestDecodeSimpleArray(t *testing.T) {
- var s1 sphere
- if _, err := Decode(`center = [0.0, 1.5, 0.0]`, &s1); err != nil {
- t.Fatal(err)
- }
-}
-
-func TestDecodeArrayWrongSize(t *testing.T) {
- var s1 sphere
- if _, err := Decode(`center = [0.1, 2.3]`, &s1); err == nil {
- t.Fatal("Expected array type mismatch error")
- }
-}
-
-func TestDecodeLargeIntoSmallInt(t *testing.T) {
- type table struct {
- Value int8
- }
- var tab table
- if _, err := Decode(`value = 500`, &tab); err == nil {
- t.Fatal("Expected integer out-of-bounds error.")
- }
-}
-
-func TestDecodeSizedInts(t *testing.T) {
- type table struct {
- U8 uint8
- U16 uint16
- U32 uint32
- U64 uint64
- U uint
- I8 int8
- I16 int16
- I32 int32
- I64 int64
- I int
- }
- answer := table{1, 1, 1, 1, 1, -1, -1, -1, -1, -1}
- toml := `
- u8 = 1
- u16 = 1
- u32 = 1
- u64 = 1
- u = 1
- i8 = -1
- i16 = -1
- i32 = -1
- i64 = -1
- i = -1
- `
- var tab table
- if _, err := Decode(toml, &tab); err != nil {
- t.Fatal(err.Error())
- }
- if answer != tab {
- t.Fatalf("Expected %#v but got %#v", answer, tab)
- }
-}
-
-func TestDecodeInts(t *testing.T) {
- for _, tt := range []struct {
- s string
- want int64
- }{
- {"0", 0},
- {"+99", 99},
- {"-10", -10},
- {"1_234_567", 1234567},
- {"1_2_3_4", 1234},
- {"-9_223_372_036_854_775_808", math.MinInt64},
- {"9_223_372_036_854_775_807", math.MaxInt64},
- } {
- var x struct{ N int64 }
- input := "n = " + tt.s
- if _, err := Decode(input, &x); err != nil {
- t.Errorf("Decode(%q): got error: %s", input, err)
- continue
- }
- if x.N != tt.want {
- t.Errorf("Decode(%q): got %d; want %d", input, x.N, tt.want)
- }
- }
-}
-
-func TestDecodeFloats(t *testing.T) {
- for _, tt := range []struct {
- s string
- want float64
- }{
- {"+1.0", 1},
- {"3.1415", 3.1415},
- {"-0.01", -0.01},
- {"5e+22", 5e22},
- {"1e6", 1e6},
- {"-2E-2", -2e-2},
- {"6.626e-34", 6.626e-34},
- {"9_224_617.445_991_228_313", 9224617.445991228313},
- {"9_876.54_32e1_0", 9876.5432e10},
- } {
- var x struct{ N float64 }
- input := "n = " + tt.s
- if _, err := Decode(input, &x); err != nil {
- t.Errorf("Decode(%q): got error: %s", input, err)
- continue
- }
- if x.N != tt.want {
- t.Errorf("Decode(%q): got %f; want %f", input, x.N, tt.want)
- }
- }
-}
-
-func TestDecodeMalformedNumbers(t *testing.T) {
- for _, tt := range []struct {
- s string
- want string
- }{
- {"++99", "expected a digit"},
- {"0..1", "must be followed by one or more digits"},
- {"0.1.2", "Invalid float value"},
- {"1e2.3", "Invalid float value"},
- {"1e2e3", "Invalid float value"},
- {"_123", "expected value"},
- {"123_", "surrounded by digits"},
- {"1._23", "surrounded by digits"},
- {"1e__23", "surrounded by digits"},
- {"123.", "must be followed by one or more digits"},
- {"1.e2", "must be followed by one or more digits"},
- } {
- var x struct{ N interface{} }
- input := "n = " + tt.s
- _, err := Decode(input, &x)
- if err == nil {
- t.Errorf("Decode(%q): got nil, want error containing %q",
- input, tt.want)
- continue
- }
- if !strings.Contains(err.Error(), tt.want) {
- t.Errorf("Decode(%q): got %q, want error containing %q",
- input, err, tt.want)
- }
- }
-}
-
-func TestDecodeBadValues(t *testing.T) {
- for _, tt := range []struct {
- v interface{}
- want string
- }{
- {3, "non-pointer int"},
- {(*int)(nil), "nil"},
- } {
- _, err := Decode(`x = 3`, tt.v)
- if err == nil {
- t.Errorf("Decode(%v): got nil; want error containing %q",
- tt.v, tt.want)
- continue
- }
- if !strings.Contains(err.Error(), tt.want) {
- t.Errorf("Decode(%v): got %q; want error containing %q",
- tt.v, err, tt.want)
- }
- }
-}
-
-func TestUnmarshaler(t *testing.T) {
-
- var tomlBlob = `
-[dishes.hamboogie]
-name = "Hamboogie with fries"
-price = 10.99
-
-[[dishes.hamboogie.ingredients]]
-name = "Bread Bun"
-
-[[dishes.hamboogie.ingredients]]
-name = "Lettuce"
-
-[[dishes.hamboogie.ingredients]]
-name = "Real Beef Patty"
-
-[[dishes.hamboogie.ingredients]]
-name = "Tomato"
-
-[dishes.eggsalad]
-name = "Egg Salad with rice"
-price = 3.99
-
-[[dishes.eggsalad.ingredients]]
-name = "Egg"
-
-[[dishes.eggsalad.ingredients]]
-name = "Mayo"
-
-[[dishes.eggsalad.ingredients]]
-name = "Rice"
-`
- m := &menu{}
- if _, err := Decode(tomlBlob, m); err != nil {
- t.Fatal(err)
- }
-
- if len(m.Dishes) != 2 {
- t.Log("two dishes should be loaded with UnmarshalTOML()")
- t.Errorf("expected %d but got %d", 2, len(m.Dishes))
- }
-
- eggSalad := m.Dishes["eggsalad"]
- if _, ok := interface{}(eggSalad).(dish); !ok {
- t.Errorf("expected a dish")
- }
-
- if eggSalad.Name != "Egg Salad with rice" {
- t.Errorf("expected the dish to be named 'Egg Salad with rice'")
- }
-
- if len(eggSalad.Ingredients) != 3 {
- t.Log("dish should be loaded with UnmarshalTOML()")
- t.Errorf("expected %d but got %d", 3, len(eggSalad.Ingredients))
- }
-
- found := false
- for _, i := range eggSalad.Ingredients {
- if i.Name == "Rice" {
- found = true
- break
- }
- }
- if !found {
- t.Error("Rice was not loaded in UnmarshalTOML()")
- }
-
- // test on a value - must be passed as *
- o := menu{}
- if _, err := Decode(tomlBlob, &o); err != nil {
- t.Fatal(err)
- }
-
-}
-
-func TestDecodeInlineTable(t *testing.T) {
- input := `
-[CookieJar]
-Types = {Chocolate = "yummy", Oatmeal = "best ever"}
-
-[Seasons]
-Locations = {NY = {Temp = "not cold", Rating = 4}, MI = {Temp = "freezing", Rating = 9}}
-`
- type cookieJar struct {
- Types map[string]string
- }
- type properties struct {
- Temp string
- Rating int
- }
- type seasons struct {
- Locations map[string]properties
- }
- type wrapper struct {
- CookieJar cookieJar
- Seasons seasons
- }
- var got wrapper
-
- meta, err := Decode(input, &got)
- if err != nil {
- t.Fatal(err)
- }
- want := wrapper{
- CookieJar: cookieJar{
- Types: map[string]string{
- "Chocolate": "yummy",
- "Oatmeal": "best ever",
- },
- },
- Seasons: seasons{
- Locations: map[string]properties{
- "NY": {
- Temp: "not cold",
- Rating: 4,
- },
- "MI": {
- Temp: "freezing",
- Rating: 9,
- },
- },
- },
- }
- if !reflect.DeepEqual(got, want) {
- t.Fatalf("after decode, got:\n\n%#v\n\nwant:\n\n%#v", got, want)
- }
- if len(meta.keys) != 12 {
- t.Errorf("after decode, got %d meta keys; want 12", len(meta.keys))
- }
- if len(meta.types) != 12 {
- t.Errorf("after decode, got %d meta types; want 12", len(meta.types))
- }
-}
-
-func TestDecodeInlineTableArray(t *testing.T) {
- type point struct {
- X, Y, Z int
- }
- var got struct {
- Points []point
- }
- // Example inline table array from the spec.
- const in = `
-points = [ { x = 1, y = 2, z = 3 },
- { x = 7, y = 8, z = 9 },
- { x = 2, y = 4, z = 8 } ]
-
-`
- if _, err := Decode(in, &got); err != nil {
- t.Fatal(err)
- }
- want := []point{
- {X: 1, Y: 2, Z: 3},
- {X: 7, Y: 8, Z: 9},
- {X: 2, Y: 4, Z: 8},
- }
- if !reflect.DeepEqual(got.Points, want) {
- t.Errorf("got %#v; want %#v", got.Points, want)
- }
-}
-
-func TestDecodeMalformedInlineTable(t *testing.T) {
- for _, tt := range []struct {
- s string
- want string
- }{
- {"{,}", "unexpected comma"},
- {"{x = 3 y = 4}", "expected a comma or an inline table terminator"},
- {"{x=3,,y=4}", "unexpected comma"},
- {"{x=3,\ny=4}", "newlines not allowed"},
- {"{x=3\n,y=4}", "newlines not allowed"},
- } {
- var x struct{ A map[string]int }
- input := "a = " + tt.s
- _, err := Decode(input, &x)
- if err == nil {
- t.Errorf("Decode(%q): got nil, want error containing %q",
- input, tt.want)
- continue
- }
- if !strings.Contains(err.Error(), tt.want) {
- t.Errorf("Decode(%q): got %q, want error containing %q",
- input, err, tt.want)
- }
- }
-}
-
-type menu struct {
- Dishes map[string]dish
-}
-
-func (m *menu) UnmarshalTOML(p interface{}) error {
- m.Dishes = make(map[string]dish)
- data, _ := p.(map[string]interface{})
- dishes := data["dishes"].(map[string]interface{})
- for n, v := range dishes {
- if d, ok := v.(map[string]interface{}); ok {
- nd := dish{}
- nd.UnmarshalTOML(d)
- m.Dishes[n] = nd
- } else {
- return fmt.Errorf("not a dish")
- }
- }
- return nil
-}
-
-type dish struct {
- Name string
- Price float32
- Ingredients []ingredient
-}
-
-func (d *dish) UnmarshalTOML(p interface{}) error {
- data, _ := p.(map[string]interface{})
- d.Name, _ = data["name"].(string)
- d.Price, _ = data["price"].(float32)
- ingredients, _ := data["ingredients"].([]map[string]interface{})
- for _, e := range ingredients {
- n, _ := interface{}(e).(map[string]interface{})
- name, _ := n["name"].(string)
- i := ingredient{name}
- d.Ingredients = append(d.Ingredients, i)
- }
- return nil
-}
-
-type ingredient struct {
- Name string
-}
-
-func TestDecodeSlices(t *testing.T) {
- type T struct {
- S []string
- }
- for i, tt := range []struct {
- v T
- input string
- want T
- }{
- {T{}, "", T{}},
- {T{[]string{}}, "", T{[]string{}}},
- {T{[]string{"a", "b"}}, "", T{[]string{"a", "b"}}},
- {T{}, "S = []", T{[]string{}}},
- {T{[]string{}}, "S = []", T{[]string{}}},
- {T{[]string{"a", "b"}}, "S = []", T{[]string{}}},
- {T{}, `S = ["x"]`, T{[]string{"x"}}},
- {T{[]string{}}, `S = ["x"]`, T{[]string{"x"}}},
- {T{[]string{"a", "b"}}, `S = ["x"]`, T{[]string{"x"}}},
- } {
- if _, err := Decode(tt.input, &tt.v); err != nil {
- t.Errorf("[%d] %s", i, err)
- continue
- }
- if !reflect.DeepEqual(tt.v, tt.want) {
- t.Errorf("[%d] got %#v; want %#v", i, tt.v, tt.want)
- }
- }
-}
-
-func TestDecodePrimitive(t *testing.T) {
- type S struct {
- P Primitive
- }
- type T struct {
- S []int
- }
- slicep := func(s []int) *[]int { return &s }
- arrayp := func(a [2]int) *[2]int { return &a }
- mapp := func(m map[string]int) *map[string]int { return &m }
- for i, tt := range []struct {
- v interface{}
- input string
- want interface{}
- }{
- // slices
- {slicep(nil), "", slicep(nil)},
- {slicep([]int{}), "", slicep([]int{})},
- {slicep([]int{1, 2, 3}), "", slicep([]int{1, 2, 3})},
- {slicep(nil), "P = [1,2]", slicep([]int{1, 2})},
- {slicep([]int{}), "P = [1,2]", slicep([]int{1, 2})},
- {slicep([]int{1, 2, 3}), "P = [1,2]", slicep([]int{1, 2})},
-
- // arrays
- {arrayp([2]int{2, 3}), "", arrayp([2]int{2, 3})},
- {arrayp([2]int{2, 3}), "P = [3,4]", arrayp([2]int{3, 4})},
-
- // maps
- {mapp(nil), "", mapp(nil)},
- {mapp(map[string]int{}), "", mapp(map[string]int{})},
- {mapp(map[string]int{"a": 1}), "", mapp(map[string]int{"a": 1})},
- {mapp(nil), "[P]\na = 2", mapp(map[string]int{"a": 2})},
- {mapp(map[string]int{}), "[P]\na = 2", mapp(map[string]int{"a": 2})},
- {mapp(map[string]int{"a": 1, "b": 3}), "[P]\na = 2", mapp(map[string]int{"a": 2, "b": 3})},
-
- // structs
- {&T{nil}, "[P]", &T{nil}},
- {&T{[]int{}}, "[P]", &T{[]int{}}},
- {&T{[]int{1, 2, 3}}, "[P]", &T{[]int{1, 2, 3}}},
- {&T{nil}, "[P]\nS = [1,2]", &T{[]int{1, 2}}},
- {&T{[]int{}}, "[P]\nS = [1,2]", &T{[]int{1, 2}}},
- {&T{[]int{1, 2, 3}}, "[P]\nS = [1,2]", &T{[]int{1, 2}}},
- } {
- var s S
- md, err := Decode(tt.input, &s)
- if err != nil {
- t.Errorf("[%d] Decode error: %s", i, err)
- continue
- }
- if err := md.PrimitiveDecode(s.P, tt.v); err != nil {
- t.Errorf("[%d] PrimitiveDecode error: %s", i, err)
- continue
- }
- if !reflect.DeepEqual(tt.v, tt.want) {
- t.Errorf("[%d] got %#v; want %#v", i, tt.v, tt.want)
- }
- }
-}
-
-func TestDecodeErrors(t *testing.T) {
- for _, s := range []string{
- `x="`,
- `x='`,
- `x='''`,
-
- // Cases found by fuzzing in
- // https://github.com/BurntSushi/toml/issues/155.
- `""�`, // used to panic with index out of range
- `e="""`, // used to hang
- } {
- var x struct{}
- _, err := Decode(s, &x)
- if err == nil {
- t.Errorf("Decode(%q): got nil error", s)
- }
- }
-}
-
-// Test for https://github.com/BurntSushi/toml/pull/166.
-func TestDecodeBoolArray(t *testing.T) {
- for _, tt := range []struct {
- s string
- got interface{}
- want interface{}
- }{
- {
- "a = [true, false]",
- &struct{ A []bool }{},
- &struct{ A []bool }{[]bool{true, false}},
- },
- {
- "a = {a = true, b = false}",
- &struct{ A map[string]bool }{},
- &struct{ A map[string]bool }{map[string]bool{"a": true, "b": false}},
- },
- } {
- if _, err := Decode(tt.s, tt.got); err != nil {
- t.Errorf("Decode(%q): %s", tt.s, err)
- continue
- }
- if !reflect.DeepEqual(tt.got, tt.want) {
- t.Errorf("Decode(%q): got %#v; want %#v", tt.s, tt.got, tt.want)
- }
- }
-}
-
-func ExampleMetaData_PrimitiveDecode() {
- var md MetaData
- var err error
-
- var tomlBlob = `
-ranking = ["Springsteen", "J Geils"]
-
-[bands.Springsteen]
-started = 1973
-albums = ["Greetings", "WIESS", "Born to Run", "Darkness"]
-
-[bands."J Geils"]
-started = 1970
-albums = ["The J. Geils Band", "Full House", "Blow Your Face Out"]
-`
-
- type band struct {
- Started int
- Albums []string
- }
- type classics struct {
- Ranking []string
- Bands map[string]Primitive
- }
-
- // Do the initial decode. Reflection is delayed on Primitive values.
- var music classics
- if md, err = Decode(tomlBlob, &music); err != nil {
- log.Fatal(err)
- }
-
- // MetaData still includes information on Primitive values.
- fmt.Printf("Is `bands.Springsteen` defined? %v\n",
- md.IsDefined("bands", "Springsteen"))
-
- // Decode primitive data into Go values.
- for _, artist := range music.Ranking {
- // A band is a primitive value, so we need to decode it to get a
- // real `band` value.
- primValue := music.Bands[artist]
-
- var aBand band
- if err = md.PrimitiveDecode(primValue, &aBand); err != nil {
- log.Fatal(err)
- }
- fmt.Printf("%s started in %d.\n", artist, aBand.Started)
- }
- // Check to see if there were any fields left undecoded.
- // Note that this won't be empty before decoding the Primitive value!
- fmt.Printf("Undecoded: %q\n", md.Undecoded())
-
- // Output:
- // Is `bands.Springsteen` defined? true
- // Springsteen started in 1973.
- // J Geils started in 1970.
- // Undecoded: []
-}
-
-func ExampleDecode() {
- var tomlBlob = `
-# Some comments.
-[alpha]
-ip = "10.0.0.1"
-
- [alpha.config]
- Ports = [ 8001, 8002 ]
- Location = "Toronto"
- Created = 1987-07-05T05:45:00Z
-
-[beta]
-ip = "10.0.0.2"
-
- [beta.config]
- Ports = [ 9001, 9002 ]
- Location = "New Jersey"
- Created = 1887-01-05T05:55:00Z
-`
-
- type serverConfig struct {
- Ports []int
- Location string
- Created time.Time
- }
-
- type server struct {
- IP string `toml:"ip,omitempty"`
- Config serverConfig `toml:"config"`
- }
-
- type servers map[string]server
-
- var config servers
- if _, err := Decode(tomlBlob, &config); err != nil {
- log.Fatal(err)
- }
-
- for _, name := range []string{"alpha", "beta"} {
- s := config[name]
- fmt.Printf("Server: %s (ip: %s) in %s created on %s\n",
- name, s.IP, s.Config.Location,
- s.Config.Created.Format("2006-01-02"))
- fmt.Printf("Ports: %v\n", s.Config.Ports)
- }
-
- // Output:
- // Server: alpha (ip: 10.0.0.1) in Toronto created on 1987-07-05
- // Ports: [8001 8002]
- // Server: beta (ip: 10.0.0.2) in New Jersey created on 1887-01-05
- // Ports: [9001 9002]
-}
-
-type duration struct {
- time.Duration
-}
-
-func (d *duration) UnmarshalText(text []byte) error {
- var err error
- d.Duration, err = time.ParseDuration(string(text))
- return err
-}
-
-// Example Unmarshaler shows how to decode TOML strings into your own
-// custom data type.
-func Example_unmarshaler() {
- blob := `
-[[song]]
-name = "Thunder Road"
-duration = "4m49s"
-
-[[song]]
-name = "Stairway to Heaven"
-duration = "8m03s"
-`
- type song struct {
- Name string
- Duration duration
- }
- type songs struct {
- Song []song
- }
- var favorites songs
- if _, err := Decode(blob, &favorites); err != nil {
- log.Fatal(err)
- }
-
- // Code to implement the TextUnmarshaler interface for `duration`:
- //
- // type duration struct {
- // time.Duration
- // }
- //
- // func (d *duration) UnmarshalText(text []byte) error {
- // var err error
- // d.Duration, err = time.ParseDuration(string(text))
- // return err
- // }
-
- for _, s := range favorites.Song {
- fmt.Printf("%s (%s)\n", s.Name, s.Duration)
- }
- // Output:
- // Thunder Road (4m49s)
- // Stairway to Heaven (8m3s)
-}
-
-// Example StrictDecoding shows how to detect whether there are keys in the
-// TOML document that weren't decoded into the value given. This is useful
-// for returning an error to the user if they've included extraneous fields
-// in their configuration.
-func Example_strictDecoding() {
- var blob = `
-key1 = "value1"
-key2 = "value2"
-key3 = "value3"
-`
- type config struct {
- Key1 string
- Key3 string
- }
-
- var conf config
- md, err := Decode(blob, &conf)
- if err != nil {
- log.Fatal(err)
- }
- fmt.Printf("Undecoded keys: %q\n", md.Undecoded())
- // Output:
- // Undecoded keys: ["key2"]
-}
-
-// Example UnmarshalTOML shows how to implement a struct type that knows how to
-// unmarshal itself. The struct must take full responsibility for mapping the
-// values passed into the struct. The method may be used with interfaces in a
-// struct in cases where the actual type is not known until the data is
-// examined.
-func Example_unmarshalTOML() {
-
- var blob = `
-[[parts]]
-type = "valve"
-id = "valve-1"
-size = 1.2
-rating = 4
-
-[[parts]]
-type = "valve"
-id = "valve-2"
-size = 2.1
-rating = 5
-
-[[parts]]
-type = "pipe"
-id = "pipe-1"
-length = 2.1
-diameter = 12
-
-[[parts]]
-type = "cable"
-id = "cable-1"
-length = 12
-rating = 3.1
-`
- o := &order{}
- err := Unmarshal([]byte(blob), o)
- if err != nil {
- log.Fatal(err)
- }
-
- fmt.Println(len(o.parts))
-
- for _, part := range o.parts {
- fmt.Println(part.Name())
- }
-
- // Code to implement UmarshalJSON.
-
- // type order struct {
- // // NOTE `order.parts` is a private slice of type `part` which is an
- // // interface and may only be loaded from toml using the
- // // UnmarshalTOML() method of the Umarshaler interface.
- // parts parts
- // }
-
- // func (o *order) UnmarshalTOML(data interface{}) error {
-
- // // NOTE the example below contains detailed type casting to show how
- // // the 'data' is retrieved. In operational use, a type cast wrapper
- // // may be preferred e.g.
- // //
- // // func AsMap(v interface{}) (map[string]interface{}, error) {
- // // return v.(map[string]interface{})
- // // }
- // //
- // // resulting in:
- // // d, _ := AsMap(data)
- // //
-
- // d, _ := data.(map[string]interface{})
- // parts, _ := d["parts"].([]map[string]interface{})
-
- // for _, p := range parts {
-
- // typ, _ := p["type"].(string)
- // id, _ := p["id"].(string)
-
- // // detect the type of part and handle each case
- // switch p["type"] {
- // case "valve":
-
- // size := float32(p["size"].(float64))
- // rating := int(p["rating"].(int64))
-
- // valve := &valve{
- // Type: typ,
- // ID: id,
- // Size: size,
- // Rating: rating,
- // }
-
- // o.parts = append(o.parts, valve)
-
- // case "pipe":
-
- // length := float32(p["length"].(float64))
- // diameter := int(p["diameter"].(int64))
-
- // pipe := &pipe{
- // Type: typ,
- // ID: id,
- // Length: length,
- // Diameter: diameter,
- // }
-
- // o.parts = append(o.parts, pipe)
-
- // case "cable":
-
- // length := int(p["length"].(int64))
- // rating := float32(p["rating"].(float64))
-
- // cable := &cable{
- // Type: typ,
- // ID: id,
- // Length: length,
- // Rating: rating,
- // }
-
- // o.parts = append(o.parts, cable)
-
- // }
- // }
-
- // return nil
- // }
-
- // type parts []part
-
- // type part interface {
- // Name() string
- // }
-
- // type valve struct {
- // Type string
- // ID string
- // Size float32
- // Rating int
- // }
-
- // func (v *valve) Name() string {
- // return fmt.Sprintf("VALVE: %s", v.ID)
- // }
-
- // type pipe struct {
- // Type string
- // ID string
- // Length float32
- // Diameter int
- // }
-
- // func (p *pipe) Name() string {
- // return fmt.Sprintf("PIPE: %s", p.ID)
- // }
-
- // type cable struct {
- // Type string
- // ID string
- // Length int
- // Rating float32
- // }
-
- // func (c *cable) Name() string {
- // return fmt.Sprintf("CABLE: %s", c.ID)
- // }
-
- // Output:
- // 4
- // VALVE: valve-1
- // VALVE: valve-2
- // PIPE: pipe-1
- // CABLE: cable-1
-
-}
-
-type order struct {
- // NOTE `order.parts` is a private slice of type `part` which is an
- // interface and may only be loaded from toml using the UnmarshalTOML()
- // method of the Umarshaler interface.
- parts parts
-}
-
-func (o *order) UnmarshalTOML(data interface{}) error {
-
- // NOTE the example below contains detailed type casting to show how
- // the 'data' is retrieved. In operational use, a type cast wrapper
- // may be preferred e.g.
- //
- // func AsMap(v interface{}) (map[string]interface{}, error) {
- // return v.(map[string]interface{})
- // }
- //
- // resulting in:
- // d, _ := AsMap(data)
- //
-
- d, _ := data.(map[string]interface{})
- parts, _ := d["parts"].([]map[string]interface{})
-
- for _, p := range parts {
-
- typ, _ := p["type"].(string)
- id, _ := p["id"].(string)
-
- // detect the type of part and handle each case
- switch p["type"] {
- case "valve":
-
- size := float32(p["size"].(float64))
- rating := int(p["rating"].(int64))
-
- valve := &valve{
- Type: typ,
- ID: id,
- Size: size,
- Rating: rating,
- }
-
- o.parts = append(o.parts, valve)
-
- case "pipe":
-
- length := float32(p["length"].(float64))
- diameter := int(p["diameter"].(int64))
-
- pipe := &pipe{
- Type: typ,
- ID: id,
- Length: length,
- Diameter: diameter,
- }
-
- o.parts = append(o.parts, pipe)
-
- case "cable":
-
- length := int(p["length"].(int64))
- rating := float32(p["rating"].(float64))
-
- cable := &cable{
- Type: typ,
- ID: id,
- Length: length,
- Rating: rating,
- }
-
- o.parts = append(o.parts, cable)
-
- }
- }
-
- return nil
-}
-
-type parts []part
-
-type part interface {
- Name() string
-}
-
-type valve struct {
- Type string
- ID string
- Size float32
- Rating int
-}
-
-func (v *valve) Name() string {
- return fmt.Sprintf("VALVE: %s", v.ID)
-}
-
-type pipe struct {
- Type string
- ID string
- Length float32
- Diameter int
-}
-
-func (p *pipe) Name() string {
- return fmt.Sprintf("PIPE: %s", p.ID)
-}
-
-type cable struct {
- Type string
- ID string
- Length int
- Rating float32
-}
-
-func (c *cable) Name() string {
- return fmt.Sprintf("CABLE: %s", c.ID)
-}
diff --git a/vendor/github.com/BurntSushi/toml/doc.go b/vendor/github.com/BurntSushi/toml/doc.go
deleted file mode 100644
index b371f39..0000000
--- a/vendor/github.com/BurntSushi/toml/doc.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-Package toml provides facilities for decoding and encoding TOML configuration
-files via reflection. There is also support for delaying decoding with
-the Primitive type, and querying the set of keys in a TOML document with the
-MetaData type.
-
-The specification implemented: https://github.com/toml-lang/toml
-
-The sub-command github.com/BurntSushi/toml/cmd/tomlv can be used to verify
-whether a file is a valid TOML document. It can also be used to print the
-type of each key in a TOML document.
-
-Testing
-
-There are two important types of tests used for this package. The first is
-contained inside '*_test.go' files and uses the standard Go unit testing
-framework. These tests are primarily devoted to holistically testing the
-decoder and encoder.
-
-The second type of testing is used to verify the implementation's adherence
-to the TOML specification. These tests have been factored into their own
-project: https://github.com/BurntSushi/toml-test
-
-The reason the tests are in a separate project is so that they can be used by
-any implementation of TOML. Namely, it is language agnostic.
-*/
-package toml
diff --git a/vendor/github.com/BurntSushi/toml/encode.go b/vendor/github.com/BurntSushi/toml/encode.go
deleted file mode 100644
index d905c21..0000000
--- a/vendor/github.com/BurntSushi/toml/encode.go
+++ /dev/null
@@ -1,568 +0,0 @@
-package toml
-
-import (
- "bufio"
- "errors"
- "fmt"
- "io"
- "reflect"
- "sort"
- "strconv"
- "strings"
- "time"
-)
-
-type tomlEncodeError struct{ error }
-
-var (
- errArrayMixedElementTypes = errors.New(
- "toml: cannot encode array with mixed element types")
- errArrayNilElement = errors.New(
- "toml: cannot encode array with nil element")
- errNonString = errors.New(
- "toml: cannot encode a map with non-string key type")
- errAnonNonStruct = errors.New(
- "toml: cannot encode an anonymous field that is not a struct")
- errArrayNoTable = errors.New(
- "toml: TOML array element cannot contain a table")
- errNoKey = errors.New(
- "toml: top-level values must be Go maps or structs")
- errAnything = errors.New("") // used in testing
-)
-
-var quotedReplacer = strings.NewReplacer(
- "\t", "\\t",
- "\n", "\\n",
- "\r", "\\r",
- "\"", "\\\"",
- "\\", "\\\\",
-)
-
-// Encoder controls the encoding of Go values to a TOML document to some
-// io.Writer.
-//
-// The indentation level can be controlled with the Indent field.
-type Encoder struct {
- // A single indentation level. By default it is two spaces.
- Indent string
-
- // hasWritten is whether we have written any output to w yet.
- hasWritten bool
- w *bufio.Writer
-}
-
-// NewEncoder returns a TOML encoder that encodes Go values to the io.Writer
-// given. By default, a single indentation level is 2 spaces.
-func NewEncoder(w io.Writer) *Encoder {
- return &Encoder{
- w: bufio.NewWriter(w),
- Indent: " ",
- }
-}
-
-// Encode writes a TOML representation of the Go value to the underlying
-// io.Writer. If the value given cannot be encoded to a valid TOML document,
-// then an error is returned.
-//
-// The mapping between Go values and TOML values should be precisely the same
-// as for the Decode* functions. Similarly, the TextMarshaler interface is
-// supported by encoding the resulting bytes as strings. (If you want to write
-// arbitrary binary data then you will need to use something like base64 since
-// TOML does not have any binary types.)
-//
-// When encoding TOML hashes (i.e., Go maps or structs), keys without any
-// sub-hashes are encoded first.
-//
-// If a Go map is encoded, then its keys are sorted alphabetically for
-// deterministic output. More control over this behavior may be provided if
-// there is demand for it.
-//
-// Encoding Go values without a corresponding TOML representation---like map
-// types with non-string keys---will cause an error to be returned. Similarly
-// for mixed arrays/slices, arrays/slices with nil elements, embedded
-// non-struct types and nested slices containing maps or structs.
-// (e.g., [][]map[string]string is not allowed but []map[string]string is OK
-// and so is []map[string][]string.)
-func (enc *Encoder) Encode(v interface{}) error {
- rv := eindirect(reflect.ValueOf(v))
- if err := enc.safeEncode(Key([]string{}), rv); err != nil {
- return err
- }
- return enc.w.Flush()
-}
-
-func (enc *Encoder) safeEncode(key Key, rv reflect.Value) (err error) {
- defer func() {
- if r := recover(); r != nil {
- if terr, ok := r.(tomlEncodeError); ok {
- err = terr.error
- return
- }
- panic(r)
- }
- }()
- enc.encode(key, rv)
- return nil
-}
-
-func (enc *Encoder) encode(key Key, rv reflect.Value) {
- // Special case. Time needs to be in ISO8601 format.
- // Special case. If we can marshal the type to text, then we used that.
- // Basically, this prevents the encoder for handling these types as
- // generic structs (or whatever the underlying type of a TextMarshaler is).
- switch rv.Interface().(type) {
- case time.Time, TextMarshaler:
- enc.keyEqElement(key, rv)
- return
- }
-
- k := rv.Kind()
- switch k {
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32,
- reflect.Int64,
- reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32,
- reflect.Uint64,
- reflect.Float32, reflect.Float64, reflect.String, reflect.Bool:
- enc.keyEqElement(key, rv)
- case reflect.Array, reflect.Slice:
- if typeEqual(tomlArrayHash, tomlTypeOfGo(rv)) {
- enc.eArrayOfTables(key, rv)
- } else {
- enc.keyEqElement(key, rv)
- }
- case reflect.Interface:
- if rv.IsNil() {
- return
- }
- enc.encode(key, rv.Elem())
- case reflect.Map:
- if rv.IsNil() {
- return
- }
- enc.eTable(key, rv)
- case reflect.Ptr:
- if rv.IsNil() {
- return
- }
- enc.encode(key, rv.Elem())
- case reflect.Struct:
- enc.eTable(key, rv)
- default:
- panic(e("unsupported type for key '%s': %s", key, k))
- }
-}
-
-// eElement encodes any value that can be an array element (primitives and
-// arrays).
-func (enc *Encoder) eElement(rv reflect.Value) {
- switch v := rv.Interface().(type) {
- case time.Time:
- // Special case time.Time as a primitive. Has to come before
- // TextMarshaler below because time.Time implements
- // encoding.TextMarshaler, but we need to always use UTC.
- enc.wf(v.UTC().Format("2006-01-02T15:04:05Z"))
- return
- case TextMarshaler:
- // Special case. Use text marshaler if it's available for this value.
- if s, err := v.MarshalText(); err != nil {
- encPanic(err)
- } else {
- enc.writeQuoted(string(s))
- }
- return
- }
- switch rv.Kind() {
- case reflect.Bool:
- enc.wf(strconv.FormatBool(rv.Bool()))
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32,
- reflect.Int64:
- enc.wf(strconv.FormatInt(rv.Int(), 10))
- case reflect.Uint, reflect.Uint8, reflect.Uint16,
- reflect.Uint32, reflect.Uint64:
- enc.wf(strconv.FormatUint(rv.Uint(), 10))
- case reflect.Float32:
- enc.wf(floatAddDecimal(strconv.FormatFloat(rv.Float(), 'f', -1, 32)))
- case reflect.Float64:
- enc.wf(floatAddDecimal(strconv.FormatFloat(rv.Float(), 'f', -1, 64)))
- case reflect.Array, reflect.Slice:
- enc.eArrayOrSliceElement(rv)
- case reflect.Interface:
- enc.eElement(rv.Elem())
- case reflect.String:
- enc.writeQuoted(rv.String())
- default:
- panic(e("unexpected primitive type: %s", rv.Kind()))
- }
-}
-
-// By the TOML spec, all floats must have a decimal with at least one
-// number on either side.
-func floatAddDecimal(fstr string) string {
- if !strings.Contains(fstr, ".") {
- return fstr + ".0"
- }
- return fstr
-}
-
-func (enc *Encoder) writeQuoted(s string) {
- enc.wf("\"%s\"", quotedReplacer.Replace(s))
-}
-
-func (enc *Encoder) eArrayOrSliceElement(rv reflect.Value) {
- length := rv.Len()
- enc.wf("[")
- for i := 0; i < length; i++ {
- elem := rv.Index(i)
- enc.eElement(elem)
- if i != length-1 {
- enc.wf(", ")
- }
- }
- enc.wf("]")
-}
-
-func (enc *Encoder) eArrayOfTables(key Key, rv reflect.Value) {
- if len(key) == 0 {
- encPanic(errNoKey)
- }
- for i := 0; i < rv.Len(); i++ {
- trv := rv.Index(i)
- if isNil(trv) {
- continue
- }
- panicIfInvalidKey(key)
- enc.newline()
- enc.wf("%s[[%s]]", enc.indentStr(key), key.maybeQuotedAll())
- enc.newline()
- enc.eMapOrStruct(key, trv)
- }
-}
-
-func (enc *Encoder) eTable(key Key, rv reflect.Value) {
- panicIfInvalidKey(key)
- if len(key) == 1 {
- // Output an extra newline between top-level tables.
- // (The newline isn't written if nothing else has been written though.)
- enc.newline()
- }
- if len(key) > 0 {
- enc.wf("%s[%s]", enc.indentStr(key), key.maybeQuotedAll())
- enc.newline()
- }
- enc.eMapOrStruct(key, rv)
-}
-
-func (enc *Encoder) eMapOrStruct(key Key, rv reflect.Value) {
- switch rv := eindirect(rv); rv.Kind() {
- case reflect.Map:
- enc.eMap(key, rv)
- case reflect.Struct:
- enc.eStruct(key, rv)
- default:
- panic("eTable: unhandled reflect.Value Kind: " + rv.Kind().String())
- }
-}
-
-func (enc *Encoder) eMap(key Key, rv reflect.Value) {
- rt := rv.Type()
- if rt.Key().Kind() != reflect.String {
- encPanic(errNonString)
- }
-
- // Sort keys so that we have deterministic output. And write keys directly
- // underneath this key first, before writing sub-structs or sub-maps.
- var mapKeysDirect, mapKeysSub []string
- for _, mapKey := range rv.MapKeys() {
- k := mapKey.String()
- if typeIsHash(tomlTypeOfGo(rv.MapIndex(mapKey))) {
- mapKeysSub = append(mapKeysSub, k)
- } else {
- mapKeysDirect = append(mapKeysDirect, k)
- }
- }
-
- var writeMapKeys = func(mapKeys []string) {
- sort.Strings(mapKeys)
- for _, mapKey := range mapKeys {
- mrv := rv.MapIndex(reflect.ValueOf(mapKey))
- if isNil(mrv) {
- // Don't write anything for nil fields.
- continue
- }
- enc.encode(key.add(mapKey), mrv)
- }
- }
- writeMapKeys(mapKeysDirect)
- writeMapKeys(mapKeysSub)
-}
-
-func (enc *Encoder) eStruct(key Key, rv reflect.Value) {
- // Write keys for fields directly under this key first, because if we write
- // a field that creates a new table, then all keys under it will be in that
- // table (not the one we're writing here).
- rt := rv.Type()
- var fieldsDirect, fieldsSub [][]int
- var addFields func(rt reflect.Type, rv reflect.Value, start []int)
- addFields = func(rt reflect.Type, rv reflect.Value, start []int) {
- for i := 0; i < rt.NumField(); i++ {
- f := rt.Field(i)
- // skip unexported fields
- if f.PkgPath != "" && !f.Anonymous {
- continue
- }
- frv := rv.Field(i)
- if f.Anonymous {
- t := f.Type
- switch t.Kind() {
- case reflect.Struct:
- // Treat anonymous struct fields with
- // tag names as though they are not
- // anonymous, like encoding/json does.
- if getOptions(f.Tag).name == "" {
- addFields(t, frv, f.Index)
- continue
- }
- case reflect.Ptr:
- if t.Elem().Kind() == reflect.Struct &&
- getOptions(f.Tag).name == "" {
- if !frv.IsNil() {
- addFields(t.Elem(), frv.Elem(), f.Index)
- }
- continue
- }
- // Fall through to the normal field encoding logic below
- // for non-struct anonymous fields.
- }
- }
-
- if typeIsHash(tomlTypeOfGo(frv)) {
- fieldsSub = append(fieldsSub, append(start, f.Index...))
- } else {
- fieldsDirect = append(fieldsDirect, append(start, f.Index...))
- }
- }
- }
- addFields(rt, rv, nil)
-
- var writeFields = func(fields [][]int) {
- for _, fieldIndex := range fields {
- sft := rt.FieldByIndex(fieldIndex)
- sf := rv.FieldByIndex(fieldIndex)
- if isNil(sf) {
- // Don't write anything for nil fields.
- continue
- }
-
- opts := getOptions(sft.Tag)
- if opts.skip {
- continue
- }
- keyName := sft.Name
- if opts.name != "" {
- keyName = opts.name
- }
- if opts.omitempty && isEmpty(sf) {
- continue
- }
- if opts.omitzero && isZero(sf) {
- continue
- }
-
- enc.encode(key.add(keyName), sf)
- }
- }
- writeFields(fieldsDirect)
- writeFields(fieldsSub)
-}
-
-// tomlTypeName returns the TOML type name of the Go value's type. It is
-// used to determine whether the types of array elements are mixed (which is
-// forbidden). If the Go value is nil, then it is illegal for it to be an array
-// element, and valueIsNil is returned as true.
-
-// Returns the TOML type of a Go value. The type may be `nil`, which means
-// no concrete TOML type could be found.
-func tomlTypeOfGo(rv reflect.Value) tomlType {
- if isNil(rv) || !rv.IsValid() {
- return nil
- }
- switch rv.Kind() {
- case reflect.Bool:
- return tomlBool
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32,
- reflect.Int64,
- reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32,
- reflect.Uint64:
- return tomlInteger
- case reflect.Float32, reflect.Float64:
- return tomlFloat
- case reflect.Array, reflect.Slice:
- if typeEqual(tomlHash, tomlArrayType(rv)) {
- return tomlArrayHash
- }
- return tomlArray
- case reflect.Ptr, reflect.Interface:
- return tomlTypeOfGo(rv.Elem())
- case reflect.String:
- return tomlString
- case reflect.Map:
- return tomlHash
- case reflect.Struct:
- switch rv.Interface().(type) {
- case time.Time:
- return tomlDatetime
- case TextMarshaler:
- return tomlString
- default:
- return tomlHash
- }
- default:
- panic("unexpected reflect.Kind: " + rv.Kind().String())
- }
-}
-
-// tomlArrayType returns the element type of a TOML array. The type returned
-// may be nil if it cannot be determined (e.g., a nil slice or a zero length
-// slize). This function may also panic if it finds a type that cannot be
-// expressed in TOML (such as nil elements, heterogeneous arrays or directly
-// nested arrays of tables).
-func tomlArrayType(rv reflect.Value) tomlType {
- if isNil(rv) || !rv.IsValid() || rv.Len() == 0 {
- return nil
- }
- firstType := tomlTypeOfGo(rv.Index(0))
- if firstType == nil {
- encPanic(errArrayNilElement)
- }
-
- rvlen := rv.Len()
- for i := 1; i < rvlen; i++ {
- elem := rv.Index(i)
- switch elemType := tomlTypeOfGo(elem); {
- case elemType == nil:
- encPanic(errArrayNilElement)
- case !typeEqual(firstType, elemType):
- encPanic(errArrayMixedElementTypes)
- }
- }
- // If we have a nested array, then we must make sure that the nested
- // array contains ONLY primitives.
- // This checks arbitrarily nested arrays.
- if typeEqual(firstType, tomlArray) || typeEqual(firstType, tomlArrayHash) {
- nest := tomlArrayType(eindirect(rv.Index(0)))
- if typeEqual(nest, tomlHash) || typeEqual(nest, tomlArrayHash) {
- encPanic(errArrayNoTable)
- }
- }
- return firstType
-}
-
-type tagOptions struct {
- skip bool // "-"
- name string
- omitempty bool
- omitzero bool
-}
-
-func getOptions(tag reflect.StructTag) tagOptions {
- t := tag.Get("toml")
- if t == "-" {
- return tagOptions{skip: true}
- }
- var opts tagOptions
- parts := strings.Split(t, ",")
- opts.name = parts[0]
- for _, s := range parts[1:] {
- switch s {
- case "omitempty":
- opts.omitempty = true
- case "omitzero":
- opts.omitzero = true
- }
- }
- return opts
-}
-
-func isZero(rv reflect.Value) bool {
- switch rv.Kind() {
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- return rv.Int() == 0
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
- return rv.Uint() == 0
- case reflect.Float32, reflect.Float64:
- return rv.Float() == 0.0
- }
- return false
-}
-
-func isEmpty(rv reflect.Value) bool {
- switch rv.Kind() {
- case reflect.Array, reflect.Slice, reflect.Map, reflect.String:
- return rv.Len() == 0
- case reflect.Bool:
- return !rv.Bool()
- }
- return false
-}
-
-func (enc *Encoder) newline() {
- if enc.hasWritten {
- enc.wf("\n")
- }
-}
-
-func (enc *Encoder) keyEqElement(key Key, val reflect.Value) {
- if len(key) == 0 {
- encPanic(errNoKey)
- }
- panicIfInvalidKey(key)
- enc.wf("%s%s = ", enc.indentStr(key), key.maybeQuoted(len(key)-1))
- enc.eElement(val)
- enc.newline()
-}
-
-func (enc *Encoder) wf(format string, v ...interface{}) {
- if _, err := fmt.Fprintf(enc.w, format, v...); err != nil {
- encPanic(err)
- }
- enc.hasWritten = true
-}
-
-func (enc *Encoder) indentStr(key Key) string {
- return strings.Repeat(enc.Indent, len(key)-1)
-}
-
-func encPanic(err error) {
- panic(tomlEncodeError{err})
-}
-
-func eindirect(v reflect.Value) reflect.Value {
- switch v.Kind() {
- case reflect.Ptr, reflect.Interface:
- return eindirect(v.Elem())
- default:
- return v
- }
-}
-
-func isNil(rv reflect.Value) bool {
- switch rv.Kind() {
- case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice:
- return rv.IsNil()
- default:
- return false
- }
-}
-
-func panicIfInvalidKey(key Key) {
- for _, k := range key {
- if len(k) == 0 {
- encPanic(e("Key '%s' is not a valid table name. Key names "+
- "cannot be empty.", key.maybeQuotedAll()))
- }
- }
-}
-
-func isValidKeyName(s string) bool {
- return len(s) != 0
-}
diff --git a/vendor/github.com/BurntSushi/toml/encode_test.go b/vendor/github.com/BurntSushi/toml/encode_test.go
deleted file mode 100644
index 673b7b0..0000000
--- a/vendor/github.com/BurntSushi/toml/encode_test.go
+++ /dev/null
@@ -1,615 +0,0 @@
-package toml
-
-import (
- "bytes"
- "fmt"
- "log"
- "net"
- "testing"
- "time"
-)
-
-func TestEncodeRoundTrip(t *testing.T) {
- type Config struct {
- Age int
- Cats []string
- Pi float64
- Perfection []int
- DOB time.Time
- Ipaddress net.IP
- }
-
- var inputs = Config{
- 13,
- []string{"one", "two", "three"},
- 3.145,
- []int{11, 2, 3, 4},
- time.Now(),
- net.ParseIP("192.168.59.254"),
- }
-
- var firstBuffer bytes.Buffer
- e := NewEncoder(&firstBuffer)
- err := e.Encode(inputs)
- if err != nil {
- t.Fatal(err)
- }
- var outputs Config
- if _, err := Decode(firstBuffer.String(), &outputs); err != nil {
- t.Logf("Could not decode:\n-----\n%s\n-----\n",
- firstBuffer.String())
- t.Fatal(err)
- }
-
- // could test each value individually, but I'm lazy
- var secondBuffer bytes.Buffer
- e2 := NewEncoder(&secondBuffer)
- err = e2.Encode(outputs)
- if err != nil {
- t.Fatal(err)
- }
- if firstBuffer.String() != secondBuffer.String() {
- t.Error(
- firstBuffer.String(),
- "\n\n is not identical to\n\n",
- secondBuffer.String())
- }
-}
-
-// XXX(burntsushi)
-// I think these tests probably should be removed. They are good, but they
-// ought to be obsolete by toml-test.
-func TestEncode(t *testing.T) {
- type Embedded struct {
- Int int `toml:"_int"`
- }
- type NonStruct int
-
- date := time.Date(2014, 5, 11, 20, 30, 40, 0, time.FixedZone("IST", 3600))
- dateStr := "2014-05-11T19:30:40Z"
-
- tests := map[string]struct {
- input interface{}
- wantOutput string
- wantError error
- }{
- "bool field": {
- input: struct {
- BoolTrue bool
- BoolFalse bool
- }{true, false},
- wantOutput: "BoolTrue = true\nBoolFalse = false\n",
- },
- "int fields": {
- input: struct {
- Int int
- Int8 int8
- Int16 int16
- Int32 int32
- Int64 int64
- }{1, 2, 3, 4, 5},
- wantOutput: "Int = 1\nInt8 = 2\nInt16 = 3\nInt32 = 4\nInt64 = 5\n",
- },
- "uint fields": {
- input: struct {
- Uint uint
- Uint8 uint8
- Uint16 uint16
- Uint32 uint32
- Uint64 uint64
- }{1, 2, 3, 4, 5},
- wantOutput: "Uint = 1\nUint8 = 2\nUint16 = 3\nUint32 = 4" +
- "\nUint64 = 5\n",
- },
- "float fields": {
- input: struct {
- Float32 float32
- Float64 float64
- }{1.5, 2.5},
- wantOutput: "Float32 = 1.5\nFloat64 = 2.5\n",
- },
- "string field": {
- input: struct{ String string }{"foo"},
- wantOutput: "String = \"foo\"\n",
- },
- "string field and unexported field": {
- input: struct {
- String string
- unexported int
- }{"foo", 0},
- wantOutput: "String = \"foo\"\n",
- },
- "datetime field in UTC": {
- input: struct{ Date time.Time }{date},
- wantOutput: fmt.Sprintf("Date = %s\n", dateStr),
- },
- "datetime field as primitive": {
- // Using a map here to fail if isStructOrMap() returns true for
- // time.Time.
- input: map[string]interface{}{
- "Date": date,
- "Int": 1,
- },
- wantOutput: fmt.Sprintf("Date = %s\nInt = 1\n", dateStr),
- },
- "array fields": {
- input: struct {
- IntArray0 [0]int
- IntArray3 [3]int
- }{[0]int{}, [3]int{1, 2, 3}},
- wantOutput: "IntArray0 = []\nIntArray3 = [1, 2, 3]\n",
- },
- "slice fields": {
- input: struct{ IntSliceNil, IntSlice0, IntSlice3 []int }{
- nil, []int{}, []int{1, 2, 3},
- },
- wantOutput: "IntSlice0 = []\nIntSlice3 = [1, 2, 3]\n",
- },
- "datetime slices": {
- input: struct{ DatetimeSlice []time.Time }{
- []time.Time{date, date},
- },
- wantOutput: fmt.Sprintf("DatetimeSlice = [%s, %s]\n",
- dateStr, dateStr),
- },
- "nested arrays and slices": {
- input: struct {
- SliceOfArrays [][2]int
- ArrayOfSlices [2][]int
- SliceOfArraysOfSlices [][2][]int
- ArrayOfSlicesOfArrays [2][][2]int
- SliceOfMixedArrays [][2]interface{}
- ArrayOfMixedSlices [2][]interface{}
- }{
- [][2]int{{1, 2}, {3, 4}},
- [2][]int{{1, 2}, {3, 4}},
- [][2][]int{
- {
- {1, 2}, {3, 4},
- },
- {
- {5, 6}, {7, 8},
- },
- },
- [2][][2]int{
- {
- {1, 2}, {3, 4},
- },
- {
- {5, 6}, {7, 8},
- },
- },
- [][2]interface{}{
- {1, 2}, {"a", "b"},
- },
- [2][]interface{}{
- {1, 2}, {"a", "b"},
- },
- },
- wantOutput: `SliceOfArrays = [[1, 2], [3, 4]]
-ArrayOfSlices = [[1, 2], [3, 4]]
-SliceOfArraysOfSlices = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
-ArrayOfSlicesOfArrays = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
-SliceOfMixedArrays = [[1, 2], ["a", "b"]]
-ArrayOfMixedSlices = [[1, 2], ["a", "b"]]
-`,
- },
- "empty slice": {
- input: struct{ Empty []interface{} }{[]interface{}{}},
- wantOutput: "Empty = []\n",
- },
- "(error) slice with element type mismatch (string and integer)": {
- input: struct{ Mixed []interface{} }{[]interface{}{1, "a"}},
- wantError: errArrayMixedElementTypes,
- },
- "(error) slice with element type mismatch (integer and float)": {
- input: struct{ Mixed []interface{} }{[]interface{}{1, 2.5}},
- wantError: errArrayMixedElementTypes,
- },
- "slice with elems of differing Go types, same TOML types": {
- input: struct {
- MixedInts []interface{}
- MixedFloats []interface{}
- }{
- []interface{}{
- int(1), int8(2), int16(3), int32(4), int64(5),
- uint(1), uint8(2), uint16(3), uint32(4), uint64(5),
- },
- []interface{}{float32(1.5), float64(2.5)},
- },
- wantOutput: "MixedInts = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5]\n" +
- "MixedFloats = [1.5, 2.5]\n",
- },
- "(error) slice w/ element type mismatch (one is nested array)": {
- input: struct{ Mixed []interface{} }{
- []interface{}{1, []interface{}{2}},
- },
- wantError: errArrayMixedElementTypes,
- },
- "(error) slice with 1 nil element": {
- input: struct{ NilElement1 []interface{} }{[]interface{}{nil}},
- wantError: errArrayNilElement,
- },
- "(error) slice with 1 nil element (and other non-nil elements)": {
- input: struct{ NilElement []interface{} }{
- []interface{}{1, nil},
- },
- wantError: errArrayNilElement,
- },
- "simple map": {
- input: map[string]int{"a": 1, "b": 2},
- wantOutput: "a = 1\nb = 2\n",
- },
- "map with interface{} value type": {
- input: map[string]interface{}{"a": 1, "b": "c"},
- wantOutput: "a = 1\nb = \"c\"\n",
- },
- "map with interface{} value type, some of which are structs": {
- input: map[string]interface{}{
- "a": struct{ Int int }{2},
- "b": 1,
- },
- wantOutput: "b = 1\n\n[a]\n Int = 2\n",
- },
- "nested map": {
- input: map[string]map[string]int{
- "a": {"b": 1},
- "c": {"d": 2},
- },
- wantOutput: "[a]\n b = 1\n\n[c]\n d = 2\n",
- },
- "nested struct": {
- input: struct{ Struct struct{ Int int } }{
- struct{ Int int }{1},
- },
- wantOutput: "[Struct]\n Int = 1\n",
- },
- "nested struct and non-struct field": {
- input: struct {
- Struct struct{ Int int }
- Bool bool
- }{struct{ Int int }{1}, true},
- wantOutput: "Bool = true\n\n[Struct]\n Int = 1\n",
- },
- "2 nested structs": {
- input: struct{ Struct1, Struct2 struct{ Int int } }{
- struct{ Int int }{1}, struct{ Int int }{2},
- },
- wantOutput: "[Struct1]\n Int = 1\n\n[Struct2]\n Int = 2\n",
- },
- "deeply nested structs": {
- input: struct {
- Struct1, Struct2 struct{ Struct3 *struct{ Int int } }
- }{
- struct{ Struct3 *struct{ Int int } }{&struct{ Int int }{1}},
- struct{ Struct3 *struct{ Int int } }{nil},
- },
- wantOutput: "[Struct1]\n [Struct1.Struct3]\n Int = 1" +
- "\n\n[Struct2]\n",
- },
- "nested struct with nil struct elem": {
- input: struct {
- Struct struct{ Inner *struct{ Int int } }
- }{
- struct{ Inner *struct{ Int int } }{nil},
- },
- wantOutput: "[Struct]\n",
- },
- "nested struct with no fields": {
- input: struct {
- Struct struct{ Inner struct{} }
- }{
- struct{ Inner struct{} }{struct{}{}},
- },
- wantOutput: "[Struct]\n [Struct.Inner]\n",
- },
- "struct with tags": {
- input: struct {
- Struct struct {
- Int int `toml:"_int"`
- } `toml:"_struct"`
- Bool bool `toml:"_bool"`
- }{
- struct {
- Int int `toml:"_int"`
- }{1}, true,
- },
- wantOutput: "_bool = true\n\n[_struct]\n _int = 1\n",
- },
- "embedded struct": {
- input: struct{ Embedded }{Embedded{1}},
- wantOutput: "_int = 1\n",
- },
- "embedded *struct": {
- input: struct{ *Embedded }{&Embedded{1}},
- wantOutput: "_int = 1\n",
- },
- "nested embedded struct": {
- input: struct {
- Struct struct{ Embedded } `toml:"_struct"`
- }{struct{ Embedded }{Embedded{1}}},
- wantOutput: "[_struct]\n _int = 1\n",
- },
- "nested embedded *struct": {
- input: struct {
- Struct struct{ *Embedded } `toml:"_struct"`
- }{struct{ *Embedded }{&Embedded{1}}},
- wantOutput: "[_struct]\n _int = 1\n",
- },
- "embedded non-struct": {
- input: struct{ NonStruct }{5},
- wantOutput: "NonStruct = 5\n",
- },
- "array of tables": {
- input: struct {
- Structs []*struct{ Int int } `toml:"struct"`
- }{
- []*struct{ Int int }{{1}, {3}},
- },
- wantOutput: "[[struct]]\n Int = 1\n\n[[struct]]\n Int = 3\n",
- },
- "array of tables order": {
- input: map[string]interface{}{
- "map": map[string]interface{}{
- "zero": 5,
- "arr": []map[string]int{
- {
- "friend": 5,
- },
- },
- },
- },
- wantOutput: "[map]\n zero = 5\n\n [[map.arr]]\n friend = 5\n",
- },
- "(error) top-level slice": {
- input: []struct{ Int int }{{1}, {2}, {3}},
- wantError: errNoKey,
- },
- "(error) slice of slice": {
- input: struct {
- Slices [][]struct{ Int int }
- }{
- [][]struct{ Int int }{{{1}}, {{2}}, {{3}}},
- },
- wantError: errArrayNoTable,
- },
- "(error) map no string key": {
- input: map[int]string{1: ""},
- wantError: errNonString,
- },
- "(error) empty key name": {
- input: map[string]int{"": 1},
- wantError: errAnything,
- },
- "(error) empty map name": {
- input: map[string]interface{}{
- "": map[string]int{"v": 1},
- },
- wantError: errAnything,
- },
- }
- for label, test := range tests {
- encodeExpected(t, label, test.input, test.wantOutput, test.wantError)
- }
-}
-
-func TestEncodeNestedTableArrays(t *testing.T) {
- type song struct {
- Name string `toml:"name"`
- }
- type album struct {
- Name string `toml:"name"`
- Songs []song `toml:"songs"`
- }
- type springsteen struct {
- Albums []album `toml:"albums"`
- }
- value := springsteen{
- []album{
- {"Born to Run",
- []song{{"Jungleland"}, {"Meeting Across the River"}}},
- {"Born in the USA",
- []song{{"Glory Days"}, {"Dancing in the Dark"}}},
- },
- }
- expected := `[[albums]]
- name = "Born to Run"
-
- [[albums.songs]]
- name = "Jungleland"
-
- [[albums.songs]]
- name = "Meeting Across the River"
-
-[[albums]]
- name = "Born in the USA"
-
- [[albums.songs]]
- name = "Glory Days"
-
- [[albums.songs]]
- name = "Dancing in the Dark"
-`
- encodeExpected(t, "nested table arrays", value, expected, nil)
-}
-
-func TestEncodeArrayHashWithNormalHashOrder(t *testing.T) {
- type Alpha struct {
- V int
- }
- type Beta struct {
- V int
- }
- type Conf struct {
- V int
- A Alpha
- B []Beta
- }
-
- val := Conf{
- V: 1,
- A: Alpha{2},
- B: []Beta{{3}},
- }
- expected := "V = 1\n\n[A]\n V = 2\n\n[[B]]\n V = 3\n"
- encodeExpected(t, "array hash with normal hash order", val, expected, nil)
-}
-
-func TestEncodeWithOmitEmpty(t *testing.T) {
- type simple struct {
- Bool bool `toml:"bool,omitempty"`
- String string `toml:"string,omitempty"`
- Array [0]byte `toml:"array,omitempty"`
- Slice []int `toml:"slice,omitempty"`
- Map map[string]string `toml:"map,omitempty"`
- }
-
- var v simple
- encodeExpected(t, "fields with omitempty are omitted when empty", v, "", nil)
- v = simple{
- Bool: true,
- String: " ",
- Slice: []int{2, 3, 4},
- Map: map[string]string{"foo": "bar"},
- }
- expected := `bool = true
-string = " "
-slice = [2, 3, 4]
-
-[map]
- foo = "bar"
-`
- encodeExpected(t, "fields with omitempty are not omitted when non-empty",
- v, expected, nil)
-}
-
-func TestEncodeWithOmitZero(t *testing.T) {
- type simple struct {
- Number int `toml:"number,omitzero"`
- Real float64 `toml:"real,omitzero"`
- Unsigned uint `toml:"unsigned,omitzero"`
- }
-
- value := simple{0, 0.0, uint(0)}
- expected := ""
-
- encodeExpected(t, "simple with omitzero, all zero", value, expected, nil)
-
- value.Number = 10
- value.Real = 20
- value.Unsigned = 5
- expected = `number = 10
-real = 20.0
-unsigned = 5
-`
- encodeExpected(t, "simple with omitzero, non-zero", value, expected, nil)
-}
-
-func TestEncodeOmitemptyWithEmptyName(t *testing.T) {
- type simple struct {
- S []int `toml:",omitempty"`
- }
- v := simple{[]int{1, 2, 3}}
- expected := "S = [1, 2, 3]\n"
- encodeExpected(t, "simple with omitempty, no name, non-empty field",
- v, expected, nil)
-}
-
-func TestEncodeAnonymousStruct(t *testing.T) {
- type Inner struct{ N int }
- type Outer0 struct{ Inner }
- type Outer1 struct {
- Inner `toml:"inner"`
- }
-
- v0 := Outer0{Inner{3}}
- expected := "N = 3\n"
- encodeExpected(t, "embedded anonymous untagged struct", v0, expected, nil)
-
- v1 := Outer1{Inner{3}}
- expected = "[inner]\n N = 3\n"
- encodeExpected(t, "embedded anonymous tagged struct", v1, expected, nil)
-}
-
-func TestEncodeAnonymousStructPointerField(t *testing.T) {
- type Inner struct{ N int }
- type Outer0 struct{ *Inner }
- type Outer1 struct {
- *Inner `toml:"inner"`
- }
-
- v0 := Outer0{}
- expected := ""
- encodeExpected(t, "nil anonymous untagged struct pointer field", v0, expected, nil)
-
- v0 = Outer0{&Inner{3}}
- expected = "N = 3\n"
- encodeExpected(t, "non-nil anonymous untagged struct pointer field", v0, expected, nil)
-
- v1 := Outer1{}
- expected = ""
- encodeExpected(t, "nil anonymous tagged struct pointer field", v1, expected, nil)
-
- v1 = Outer1{&Inner{3}}
- expected = "[inner]\n N = 3\n"
- encodeExpected(t, "non-nil anonymous tagged struct pointer field", v1, expected, nil)
-}
-
-func TestEncodeIgnoredFields(t *testing.T) {
- type simple struct {
- Number int `toml:"-"`
- }
- value := simple{}
- expected := ""
- encodeExpected(t, "ignored field", value, expected, nil)
-}
-
-func encodeExpected(
- t *testing.T, label string, val interface{}, wantStr string, wantErr error,
-) {
- var buf bytes.Buffer
- enc := NewEncoder(&buf)
- err := enc.Encode(val)
- if err != wantErr {
- if wantErr != nil {
- if wantErr == errAnything && err != nil {
- return
- }
- t.Errorf("%s: want Encode error %v, got %v", label, wantErr, err)
- } else {
- t.Errorf("%s: Encode failed: %s", label, err)
- }
- }
- if err != nil {
- return
- }
- if got := buf.String(); wantStr != got {
- t.Errorf("%s: want\n-----\n%q\n-----\nbut got\n-----\n%q\n-----\n",
- label, wantStr, got)
- }
-}
-
-func ExampleEncoder_Encode() {
- date, _ := time.Parse(time.RFC822, "14 Mar 10 18:00 UTC")
- var config = map[string]interface{}{
- "date": date,
- "counts": []int{1, 1, 2, 3, 5, 8},
- "hash": map[string]string{
- "key1": "val1",
- "key2": "val2",
- },
- }
- buf := new(bytes.Buffer)
- if err := NewEncoder(buf).Encode(config); err != nil {
- log.Fatal(err)
- }
- fmt.Println(buf.String())
-
- // Output:
- // counts = [1, 1, 2, 3, 5, 8]
- // date = 2010-03-14T18:00:00Z
- //
- // [hash]
- // key1 = "val1"
- // key2 = "val2"
-}
diff --git a/vendor/github.com/BurntSushi/toml/encoding_types.go b/vendor/github.com/BurntSushi/toml/encoding_types.go
deleted file mode 100644
index d36e1dd..0000000
--- a/vendor/github.com/BurntSushi/toml/encoding_types.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// +build go1.2
-
-package toml
-
-// In order to support Go 1.1, we define our own TextMarshaler and
-// TextUnmarshaler types. For Go 1.2+, we just alias them with the
-// standard library interfaces.
-
-import (
- "encoding"
-)
-
-// TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here
-// so that Go 1.1 can be supported.
-type TextMarshaler encoding.TextMarshaler
-
-// TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined
-// here so that Go 1.1 can be supported.
-type TextUnmarshaler encoding.TextUnmarshaler
diff --git a/vendor/github.com/BurntSushi/toml/encoding_types_1.1.go b/vendor/github.com/BurntSushi/toml/encoding_types_1.1.go
deleted file mode 100644
index e8d503d..0000000
--- a/vendor/github.com/BurntSushi/toml/encoding_types_1.1.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// +build !go1.2
-
-package toml
-
-// These interfaces were introduced in Go 1.2, so we add them manually when
-// compiling for Go 1.1.
-
-// TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here
-// so that Go 1.1 can be supported.
-type TextMarshaler interface {
- MarshalText() (text []byte, err error)
-}
-
-// TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined
-// here so that Go 1.1 can be supported.
-type TextUnmarshaler interface {
- UnmarshalText(text []byte) error
-}
diff --git a/vendor/github.com/BurntSushi/toml/lex.go b/vendor/github.com/BurntSushi/toml/lex.go
deleted file mode 100644
index e0a742a..0000000
--- a/vendor/github.com/BurntSushi/toml/lex.go
+++ /dev/null
@@ -1,953 +0,0 @@
-package toml
-
-import (
- "fmt"
- "strings"
- "unicode"
- "unicode/utf8"
-)
-
-type itemType int
-
-const (
- itemError itemType = iota
- itemNIL // used in the parser to indicate no type
- itemEOF
- itemText
- itemString
- itemRawString
- itemMultilineString
- itemRawMultilineString
- itemBool
- itemInteger
- itemFloat
- itemDatetime
- itemArray // the start of an array
- itemArrayEnd
- itemTableStart
- itemTableEnd
- itemArrayTableStart
- itemArrayTableEnd
- itemKeyStart
- itemCommentStart
- itemInlineTableStart
- itemInlineTableEnd
-)
-
-const (
- eof = 0
- comma = ','
- tableStart = '['
- tableEnd = ']'
- arrayTableStart = '['
- arrayTableEnd = ']'
- tableSep = '.'
- keySep = '='
- arrayStart = '['
- arrayEnd = ']'
- commentStart = '#'
- stringStart = '"'
- stringEnd = '"'
- rawStringStart = '\''
- rawStringEnd = '\''
- inlineTableStart = '{'
- inlineTableEnd = '}'
-)
-
-type stateFn func(lx *lexer) stateFn
-
-type lexer struct {
- input string
- start int
- pos int
- line int
- state stateFn
- items chan item
-
- // Allow for backing up up to three runes.
- // This is necessary because TOML contains 3-rune tokens (""" and ''').
- prevWidths [3]int
- nprev int // how many of prevWidths are in use
- // If we emit an eof, we can still back up, but it is not OK to call
- // next again.
- atEOF bool
-
- // A stack of state functions used to maintain context.
- // The idea is to reuse parts of the state machine in various places.
- // For example, values can appear at the top level or within arbitrarily
- // nested arrays. The last state on the stack is used after a value has
- // been lexed. Similarly for comments.
- stack []stateFn
-}
-
-type item struct {
- typ itemType
- val string
- line int
-}
-
-func (lx *lexer) nextItem() item {
- for {
- select {
- case item := <-lx.items:
- return item
- default:
- lx.state = lx.state(lx)
- }
- }
-}
-
-func lex(input string) *lexer {
- lx := &lexer{
- input: input,
- state: lexTop,
- line: 1,
- items: make(chan item, 10),
- stack: make([]stateFn, 0, 10),
- }
- return lx
-}
-
-func (lx *lexer) push(state stateFn) {
- lx.stack = append(lx.stack, state)
-}
-
-func (lx *lexer) pop() stateFn {
- if len(lx.stack) == 0 {
- return lx.errorf("BUG in lexer: no states to pop")
- }
- last := lx.stack[len(lx.stack)-1]
- lx.stack = lx.stack[0 : len(lx.stack)-1]
- return last
-}
-
-func (lx *lexer) current() string {
- return lx.input[lx.start:lx.pos]
-}
-
-func (lx *lexer) emit(typ itemType) {
- lx.items <- item{typ, lx.current(), lx.line}
- lx.start = lx.pos
-}
-
-func (lx *lexer) emitTrim(typ itemType) {
- lx.items <- item{typ, strings.TrimSpace(lx.current()), lx.line}
- lx.start = lx.pos
-}
-
-func (lx *lexer) next() (r rune) {
- if lx.atEOF {
- panic("next called after EOF")
- }
- if lx.pos >= len(lx.input) {
- lx.atEOF = true
- return eof
- }
-
- if lx.input[lx.pos] == '\n' {
- lx.line++
- }
- lx.prevWidths[2] = lx.prevWidths[1]
- lx.prevWidths[1] = lx.prevWidths[0]
- if lx.nprev < 3 {
- lx.nprev++
- }
- r, w := utf8.DecodeRuneInString(lx.input[lx.pos:])
- lx.prevWidths[0] = w
- lx.pos += w
- return r
-}
-
-// ignore skips over the pending input before this point.
-func (lx *lexer) ignore() {
- lx.start = lx.pos
-}
-
-// backup steps back one rune. Can be called only twice between calls to next.
-func (lx *lexer) backup() {
- if lx.atEOF {
- lx.atEOF = false
- return
- }
- if lx.nprev < 1 {
- panic("backed up too far")
- }
- w := lx.prevWidths[0]
- lx.prevWidths[0] = lx.prevWidths[1]
- lx.prevWidths[1] = lx.prevWidths[2]
- lx.nprev--
- lx.pos -= w
- if lx.pos < len(lx.input) && lx.input[lx.pos] == '\n' {
- lx.line--
- }
-}
-
-// accept consumes the next rune if it's equal to `valid`.
-func (lx *lexer) accept(valid rune) bool {
- if lx.next() == valid {
- return true
- }
- lx.backup()
- return false
-}
-
-// peek returns but does not consume the next rune in the input.
-func (lx *lexer) peek() rune {
- r := lx.next()
- lx.backup()
- return r
-}
-
-// skip ignores all input that matches the given predicate.
-func (lx *lexer) skip(pred func(rune) bool) {
- for {
- r := lx.next()
- if pred(r) {
- continue
- }
- lx.backup()
- lx.ignore()
- return
- }
-}
-
-// errorf stops all lexing by emitting an error and returning `nil`.
-// Note that any value that is a character is escaped if it's a special
-// character (newlines, tabs, etc.).
-func (lx *lexer) errorf(format string, values ...interface{}) stateFn {
- lx.items <- item{
- itemError,
- fmt.Sprintf(format, values...),
- lx.line,
- }
- return nil
-}
-
-// lexTop consumes elements at the top level of TOML data.
-func lexTop(lx *lexer) stateFn {
- r := lx.next()
- if isWhitespace(r) || isNL(r) {
- return lexSkip(lx, lexTop)
- }
- switch r {
- case commentStart:
- lx.push(lexTop)
- return lexCommentStart
- case tableStart:
- return lexTableStart
- case eof:
- if lx.pos > lx.start {
- return lx.errorf("unexpected EOF")
- }
- lx.emit(itemEOF)
- return nil
- }
-
- // At this point, the only valid item can be a key, so we back up
- // and let the key lexer do the rest.
- lx.backup()
- lx.push(lexTopEnd)
- return lexKeyStart
-}
-
-// lexTopEnd is entered whenever a top-level item has been consumed. (A value
-// or a table.) It must see only whitespace, and will turn back to lexTop
-// upon a newline. If it sees EOF, it will quit the lexer successfully.
-func lexTopEnd(lx *lexer) stateFn {
- r := lx.next()
- switch {
- case r == commentStart:
- // a comment will read to a newline for us.
- lx.push(lexTop)
- return lexCommentStart
- case isWhitespace(r):
- return lexTopEnd
- case isNL(r):
- lx.ignore()
- return lexTop
- case r == eof:
- lx.emit(itemEOF)
- return nil
- }
- return lx.errorf("expected a top-level item to end with a newline, "+
- "comment, or EOF, but got %q instead", r)
-}
-
-// lexTable lexes the beginning of a table. Namely, it makes sure that
-// it starts with a character other than '.' and ']'.
-// It assumes that '[' has already been consumed.
-// It also handles the case that this is an item in an array of tables.
-// e.g., '[[name]]'.
-func lexTableStart(lx *lexer) stateFn {
- if lx.peek() == arrayTableStart {
- lx.next()
- lx.emit(itemArrayTableStart)
- lx.push(lexArrayTableEnd)
- } else {
- lx.emit(itemTableStart)
- lx.push(lexTableEnd)
- }
- return lexTableNameStart
-}
-
-func lexTableEnd(lx *lexer) stateFn {
- lx.emit(itemTableEnd)
- return lexTopEnd
-}
-
-func lexArrayTableEnd(lx *lexer) stateFn {
- if r := lx.next(); r != arrayTableEnd {
- return lx.errorf("expected end of table array name delimiter %q, "+
- "but got %q instead", arrayTableEnd, r)
- }
- lx.emit(itemArrayTableEnd)
- return lexTopEnd
-}
-
-func lexTableNameStart(lx *lexer) stateFn {
- lx.skip(isWhitespace)
- switch r := lx.peek(); {
- case r == tableEnd || r == eof:
- return lx.errorf("unexpected end of table name " +
- "(table names cannot be empty)")
- case r == tableSep:
- return lx.errorf("unexpected table separator " +
- "(table names cannot be empty)")
- case r == stringStart || r == rawStringStart:
- lx.ignore()
- lx.push(lexTableNameEnd)
- return lexValue // reuse string lexing
- default:
- return lexBareTableName
- }
-}
-
-// lexBareTableName lexes the name of a table. It assumes that at least one
-// valid character for the table has already been read.
-func lexBareTableName(lx *lexer) stateFn {
- r := lx.next()
- if isBareKeyChar(r) {
- return lexBareTableName
- }
- lx.backup()
- lx.emit(itemText)
- return lexTableNameEnd
-}
-
-// lexTableNameEnd reads the end of a piece of a table name, optionally
-// consuming whitespace.
-func lexTableNameEnd(lx *lexer) stateFn {
- lx.skip(isWhitespace)
- switch r := lx.next(); {
- case isWhitespace(r):
- return lexTableNameEnd
- case r == tableSep:
- lx.ignore()
- return lexTableNameStart
- case r == tableEnd:
- return lx.pop()
- default:
- return lx.errorf("expected '.' or ']' to end table name, "+
- "but got %q instead", r)
- }
-}
-
-// lexKeyStart consumes a key name up until the first non-whitespace character.
-// lexKeyStart will ignore whitespace.
-func lexKeyStart(lx *lexer) stateFn {
- r := lx.peek()
- switch {
- case r == keySep:
- return lx.errorf("unexpected key separator %q", keySep)
- case isWhitespace(r) || isNL(r):
- lx.next()
- return lexSkip(lx, lexKeyStart)
- case r == stringStart || r == rawStringStart:
- lx.ignore()
- lx.emit(itemKeyStart)
- lx.push(lexKeyEnd)
- return lexValue // reuse string lexing
- default:
- lx.ignore()
- lx.emit(itemKeyStart)
- return lexBareKey
- }
-}
-
-// lexBareKey consumes the text of a bare key. Assumes that the first character
-// (which is not whitespace) has not yet been consumed.
-func lexBareKey(lx *lexer) stateFn {
- switch r := lx.next(); {
- case isBareKeyChar(r):
- return lexBareKey
- case isWhitespace(r):
- lx.backup()
- lx.emit(itemText)
- return lexKeyEnd
- case r == keySep:
- lx.backup()
- lx.emit(itemText)
- return lexKeyEnd
- default:
- return lx.errorf("bare keys cannot contain %q", r)
- }
-}
-
-// lexKeyEnd consumes the end of a key and trims whitespace (up to the key
-// separator).
-func lexKeyEnd(lx *lexer) stateFn {
- switch r := lx.next(); {
- case r == keySep:
- return lexSkip(lx, lexValue)
- case isWhitespace(r):
- return lexSkip(lx, lexKeyEnd)
- default:
- return lx.errorf("expected key separator %q, but got %q instead",
- keySep, r)
- }
-}
-
-// lexValue starts the consumption of a value anywhere a value is expected.
-// lexValue will ignore whitespace.
-// After a value is lexed, the last state on the next is popped and returned.
-func lexValue(lx *lexer) stateFn {
- // We allow whitespace to precede a value, but NOT newlines.
- // In array syntax, the array states are responsible for ignoring newlines.
- r := lx.next()
- switch {
- case isWhitespace(r):
- return lexSkip(lx, lexValue)
- case isDigit(r):
- lx.backup() // avoid an extra state and use the same as above
- return lexNumberOrDateStart
- }
- switch r {
- case arrayStart:
- lx.ignore()
- lx.emit(itemArray)
- return lexArrayValue
- case inlineTableStart:
- lx.ignore()
- lx.emit(itemInlineTableStart)
- return lexInlineTableValue
- case stringStart:
- if lx.accept(stringStart) {
- if lx.accept(stringStart) {
- lx.ignore() // Ignore """
- return lexMultilineString
- }
- lx.backup()
- }
- lx.ignore() // ignore the '"'
- return lexString
- case rawStringStart:
- if lx.accept(rawStringStart) {
- if lx.accept(rawStringStart) {
- lx.ignore() // Ignore """
- return lexMultilineRawString
- }
- lx.backup()
- }
- lx.ignore() // ignore the "'"
- return lexRawString
- case '+', '-':
- return lexNumberStart
- case '.': // special error case, be kind to users
- return lx.errorf("floats must start with a digit, not '.'")
- }
- if unicode.IsLetter(r) {
- // Be permissive here; lexBool will give a nice error if the
- // user wrote something like
- // x = foo
- // (i.e. not 'true' or 'false' but is something else word-like.)
- lx.backup()
- return lexBool
- }
- return lx.errorf("expected value but found %q instead", r)
-}
-
-// lexArrayValue consumes one value in an array. It assumes that '[' or ','
-// have already been consumed. All whitespace and newlines are ignored.
-func lexArrayValue(lx *lexer) stateFn {
- r := lx.next()
- switch {
- case isWhitespace(r) || isNL(r):
- return lexSkip(lx, lexArrayValue)
- case r == commentStart:
- lx.push(lexArrayValue)
- return lexCommentStart
- case r == comma:
- return lx.errorf("unexpected comma")
- case r == arrayEnd:
- // NOTE(caleb): The spec isn't clear about whether you can have
- // a trailing comma or not, so we'll allow it.
- return lexArrayEnd
- }
-
- lx.backup()
- lx.push(lexArrayValueEnd)
- return lexValue
-}
-
-// lexArrayValueEnd consumes everything between the end of an array value and
-// the next value (or the end of the array): it ignores whitespace and newlines
-// and expects either a ',' or a ']'.
-func lexArrayValueEnd(lx *lexer) stateFn {
- r := lx.next()
- switch {
- case isWhitespace(r) || isNL(r):
- return lexSkip(lx, lexArrayValueEnd)
- case r == commentStart:
- lx.push(lexArrayValueEnd)
- return lexCommentStart
- case r == comma:
- lx.ignore()
- return lexArrayValue // move on to the next value
- case r == arrayEnd:
- return lexArrayEnd
- }
- return lx.errorf(
- "expected a comma or array terminator %q, but got %q instead",
- arrayEnd, r,
- )
-}
-
-// lexArrayEnd finishes the lexing of an array.
-// It assumes that a ']' has just been consumed.
-func lexArrayEnd(lx *lexer) stateFn {
- lx.ignore()
- lx.emit(itemArrayEnd)
- return lx.pop()
-}
-
-// lexInlineTableValue consumes one key/value pair in an inline table.
-// It assumes that '{' or ',' have already been consumed. Whitespace is ignored.
-func lexInlineTableValue(lx *lexer) stateFn {
- r := lx.next()
- switch {
- case isWhitespace(r):
- return lexSkip(lx, lexInlineTableValue)
- case isNL(r):
- return lx.errorf("newlines not allowed within inline tables")
- case r == commentStart:
- lx.push(lexInlineTableValue)
- return lexCommentStart
- case r == comma:
- return lx.errorf("unexpected comma")
- case r == inlineTableEnd:
- return lexInlineTableEnd
- }
- lx.backup()
- lx.push(lexInlineTableValueEnd)
- return lexKeyStart
-}
-
-// lexInlineTableValueEnd consumes everything between the end of an inline table
-// key/value pair and the next pair (or the end of the table):
-// it ignores whitespace and expects either a ',' or a '}'.
-func lexInlineTableValueEnd(lx *lexer) stateFn {
- r := lx.next()
- switch {
- case isWhitespace(r):
- return lexSkip(lx, lexInlineTableValueEnd)
- case isNL(r):
- return lx.errorf("newlines not allowed within inline tables")
- case r == commentStart:
- lx.push(lexInlineTableValueEnd)
- return lexCommentStart
- case r == comma:
- lx.ignore()
- return lexInlineTableValue
- case r == inlineTableEnd:
- return lexInlineTableEnd
- }
- return lx.errorf("expected a comma or an inline table terminator %q, "+
- "but got %q instead", inlineTableEnd, r)
-}
-
-// lexInlineTableEnd finishes the lexing of an inline table.
-// It assumes that a '}' has just been consumed.
-func lexInlineTableEnd(lx *lexer) stateFn {
- lx.ignore()
- lx.emit(itemInlineTableEnd)
- return lx.pop()
-}
-
-// lexString consumes the inner contents of a string. It assumes that the
-// beginning '"' has already been consumed and ignored.
-func lexString(lx *lexer) stateFn {
- r := lx.next()
- switch {
- case r == eof:
- return lx.errorf("unexpected EOF")
- case isNL(r):
- return lx.errorf("strings cannot contain newlines")
- case r == '\\':
- lx.push(lexString)
- return lexStringEscape
- case r == stringEnd:
- lx.backup()
- lx.emit(itemString)
- lx.next()
- lx.ignore()
- return lx.pop()
- }
- return lexString
-}
-
-// lexMultilineString consumes the inner contents of a string. It assumes that
-// the beginning '"""' has already been consumed and ignored.
-func lexMultilineString(lx *lexer) stateFn {
- switch lx.next() {
- case eof:
- return lx.errorf("unexpected EOF")
- case '\\':
- return lexMultilineStringEscape
- case stringEnd:
- if lx.accept(stringEnd) {
- if lx.accept(stringEnd) {
- lx.backup()
- lx.backup()
- lx.backup()
- lx.emit(itemMultilineString)
- lx.next()
- lx.next()
- lx.next()
- lx.ignore()
- return lx.pop()
- }
- lx.backup()
- }
- }
- return lexMultilineString
-}
-
-// lexRawString consumes a raw string. Nothing can be escaped in such a string.
-// It assumes that the beginning "'" has already been consumed and ignored.
-func lexRawString(lx *lexer) stateFn {
- r := lx.next()
- switch {
- case r == eof:
- return lx.errorf("unexpected EOF")
- case isNL(r):
- return lx.errorf("strings cannot contain newlines")
- case r == rawStringEnd:
- lx.backup()
- lx.emit(itemRawString)
- lx.next()
- lx.ignore()
- return lx.pop()
- }
- return lexRawString
-}
-
-// lexMultilineRawString consumes a raw string. Nothing can be escaped in such
-// a string. It assumes that the beginning "'''" has already been consumed and
-// ignored.
-func lexMultilineRawString(lx *lexer) stateFn {
- switch lx.next() {
- case eof:
- return lx.errorf("unexpected EOF")
- case rawStringEnd:
- if lx.accept(rawStringEnd) {
- if lx.accept(rawStringEnd) {
- lx.backup()
- lx.backup()
- lx.backup()
- lx.emit(itemRawMultilineString)
- lx.next()
- lx.next()
- lx.next()
- lx.ignore()
- return lx.pop()
- }
- lx.backup()
- }
- }
- return lexMultilineRawString
-}
-
-// lexMultilineStringEscape consumes an escaped character. It assumes that the
-// preceding '\\' has already been consumed.
-func lexMultilineStringEscape(lx *lexer) stateFn {
- // Handle the special case first:
- if isNL(lx.next()) {
- return lexMultilineString
- }
- lx.backup()
- lx.push(lexMultilineString)
- return lexStringEscape(lx)
-}
-
-func lexStringEscape(lx *lexer) stateFn {
- r := lx.next()
- switch r {
- case 'b':
- fallthrough
- case 't':
- fallthrough
- case 'n':
- fallthrough
- case 'f':
- fallthrough
- case 'r':
- fallthrough
- case '"':
- fallthrough
- case '\\':
- return lx.pop()
- case 'u':
- return lexShortUnicodeEscape
- case 'U':
- return lexLongUnicodeEscape
- }
- return lx.errorf("invalid escape character %q; only the following "+
- "escape characters are allowed: "+
- `\b, \t, \n, \f, \r, \", \\, \uXXXX, and \UXXXXXXXX`, r)
-}
-
-func lexShortUnicodeEscape(lx *lexer) stateFn {
- var r rune
- for i := 0; i < 4; i++ {
- r = lx.next()
- if !isHexadecimal(r) {
- return lx.errorf(`expected four hexadecimal digits after '\u', `+
- "but got %q instead", lx.current())
- }
- }
- return lx.pop()
-}
-
-func lexLongUnicodeEscape(lx *lexer) stateFn {
- var r rune
- for i := 0; i < 8; i++ {
- r = lx.next()
- if !isHexadecimal(r) {
- return lx.errorf(`expected eight hexadecimal digits after '\U', `+
- "but got %q instead", lx.current())
- }
- }
- return lx.pop()
-}
-
-// lexNumberOrDateStart consumes either an integer, a float, or datetime.
-func lexNumberOrDateStart(lx *lexer) stateFn {
- r := lx.next()
- if isDigit(r) {
- return lexNumberOrDate
- }
- switch r {
- case '_':
- return lexNumber
- case 'e', 'E':
- return lexFloat
- case '.':
- return lx.errorf("floats must start with a digit, not '.'")
- }
- return lx.errorf("expected a digit but got %q", r)
-}
-
-// lexNumberOrDate consumes either an integer, float or datetime.
-func lexNumberOrDate(lx *lexer) stateFn {
- r := lx.next()
- if isDigit(r) {
- return lexNumberOrDate
- }
- switch r {
- case '-':
- return lexDatetime
- case '_':
- return lexNumber
- case '.', 'e', 'E':
- return lexFloat
- }
-
- lx.backup()
- lx.emit(itemInteger)
- return lx.pop()
-}
-
-// lexDatetime consumes a Datetime, to a first approximation.
-// The parser validates that it matches one of the accepted formats.
-func lexDatetime(lx *lexer) stateFn {
- r := lx.next()
- if isDigit(r) {
- return lexDatetime
- }
- switch r {
- case '-', 'T', ':', '.', 'Z', '+':
- return lexDatetime
- }
-
- lx.backup()
- lx.emit(itemDatetime)
- return lx.pop()
-}
-
-// lexNumberStart consumes either an integer or a float. It assumes that a sign
-// has already been read, but that *no* digits have been consumed.
-// lexNumberStart will move to the appropriate integer or float states.
-func lexNumberStart(lx *lexer) stateFn {
- // We MUST see a digit. Even floats have to start with a digit.
- r := lx.next()
- if !isDigit(r) {
- if r == '.' {
- return lx.errorf("floats must start with a digit, not '.'")
- }
- return lx.errorf("expected a digit but got %q", r)
- }
- return lexNumber
-}
-
-// lexNumber consumes an integer or a float after seeing the first digit.
-func lexNumber(lx *lexer) stateFn {
- r := lx.next()
- if isDigit(r) {
- return lexNumber
- }
- switch r {
- case '_':
- return lexNumber
- case '.', 'e', 'E':
- return lexFloat
- }
-
- lx.backup()
- lx.emit(itemInteger)
- return lx.pop()
-}
-
-// lexFloat consumes the elements of a float. It allows any sequence of
-// float-like characters, so floats emitted by the lexer are only a first
-// approximation and must be validated by the parser.
-func lexFloat(lx *lexer) stateFn {
- r := lx.next()
- if isDigit(r) {
- return lexFloat
- }
- switch r {
- case '_', '.', '-', '+', 'e', 'E':
- return lexFloat
- }
-
- lx.backup()
- lx.emit(itemFloat)
- return lx.pop()
-}
-
-// lexBool consumes a bool string: 'true' or 'false.
-func lexBool(lx *lexer) stateFn {
- var rs []rune
- for {
- r := lx.next()
- if !unicode.IsLetter(r) {
- lx.backup()
- break
- }
- rs = append(rs, r)
- }
- s := string(rs)
- switch s {
- case "true", "false":
- lx.emit(itemBool)
- return lx.pop()
- }
- return lx.errorf("expected value but found %q instead", s)
-}
-
-// lexCommentStart begins the lexing of a comment. It will emit
-// itemCommentStart and consume no characters, passing control to lexComment.
-func lexCommentStart(lx *lexer) stateFn {
- lx.ignore()
- lx.emit(itemCommentStart)
- return lexComment
-}
-
-// lexComment lexes an entire comment. It assumes that '#' has been consumed.
-// It will consume *up to* the first newline character, and pass control
-// back to the last state on the stack.
-func lexComment(lx *lexer) stateFn {
- r := lx.peek()
- if isNL(r) || r == eof {
- lx.emit(itemText)
- return lx.pop()
- }
- lx.next()
- return lexComment
-}
-
-// lexSkip ignores all slurped input and moves on to the next state.
-func lexSkip(lx *lexer, nextState stateFn) stateFn {
- return func(lx *lexer) stateFn {
- lx.ignore()
- return nextState
- }
-}
-
-// isWhitespace returns true if `r` is a whitespace character according
-// to the spec.
-func isWhitespace(r rune) bool {
- return r == '\t' || r == ' '
-}
-
-func isNL(r rune) bool {
- return r == '\n' || r == '\r'
-}
-
-func isDigit(r rune) bool {
- return r >= '0' && r <= '9'
-}
-
-func isHexadecimal(r rune) bool {
- return (r >= '0' && r <= '9') ||
- (r >= 'a' && r <= 'f') ||
- (r >= 'A' && r <= 'F')
-}
-
-func isBareKeyChar(r rune) bool {
- return (r >= 'A' && r <= 'Z') ||
- (r >= 'a' && r <= 'z') ||
- (r >= '0' && r <= '9') ||
- r == '_' ||
- r == '-'
-}
-
-func (itype itemType) String() string {
- switch itype {
- case itemError:
- return "Error"
- case itemNIL:
- return "NIL"
- case itemEOF:
- return "EOF"
- case itemText:
- return "Text"
- case itemString, itemRawString, itemMultilineString, itemRawMultilineString:
- return "String"
- case itemBool:
- return "Bool"
- case itemInteger:
- return "Integer"
- case itemFloat:
- return "Float"
- case itemDatetime:
- return "DateTime"
- case itemTableStart:
- return "TableStart"
- case itemTableEnd:
- return "TableEnd"
- case itemKeyStart:
- return "KeyStart"
- case itemArray:
- return "Array"
- case itemArrayEnd:
- return "ArrayEnd"
- case itemCommentStart:
- return "CommentStart"
- }
- panic(fmt.Sprintf("BUG: Unknown type '%d'.", int(itype)))
-}
-
-func (item item) String() string {
- return fmt.Sprintf("(%s, %s)", item.typ.String(), item.val)
-}
diff --git a/vendor/github.com/BurntSushi/toml/parse.go b/vendor/github.com/BurntSushi/toml/parse.go
deleted file mode 100644
index 50869ef..0000000
--- a/vendor/github.com/BurntSushi/toml/parse.go
+++ /dev/null
@@ -1,592 +0,0 @@
-package toml
-
-import (
- "fmt"
- "strconv"
- "strings"
- "time"
- "unicode"
- "unicode/utf8"
-)
-
-type parser struct {
- mapping map[string]interface{}
- types map[string]tomlType
- lx *lexer
-
- // A list of keys in the order that they appear in the TOML data.
- ordered []Key
-
- // the full key for the current hash in scope
- context Key
-
- // the base key name for everything except hashes
- currentKey string
-
- // rough approximation of line number
- approxLine int
-
- // A map of 'key.group.names' to whether they were created implicitly.
- implicits map[string]bool
-}
-
-type parseError string
-
-func (pe parseError) Error() string {
- return string(pe)
-}
-
-func parse(data string) (p *parser, err error) {
- defer func() {
- if r := recover(); r != nil {
- var ok bool
- if err, ok = r.(parseError); ok {
- return
- }
- panic(r)
- }
- }()
-
- p = &parser{
- mapping: make(map[string]interface{}),
- types: make(map[string]tomlType),
- lx: lex(data),
- ordered: make([]Key, 0),
- implicits: make(map[string]bool),
- }
- for {
- item := p.next()
- if item.typ == itemEOF {
- break
- }
- p.topLevel(item)
- }
-
- return p, nil
-}
-
-func (p *parser) panicf(format string, v ...interface{}) {
- msg := fmt.Sprintf("Near line %d (last key parsed '%s'): %s",
- p.approxLine, p.current(), fmt.Sprintf(format, v...))
- panic(parseError(msg))
-}
-
-func (p *parser) next() item {
- it := p.lx.nextItem()
- if it.typ == itemError {
- p.panicf("%s", it.val)
- }
- return it
-}
-
-func (p *parser) bug(format string, v ...interface{}) {
- panic(fmt.Sprintf("BUG: "+format+"\n\n", v...))
-}
-
-func (p *parser) expect(typ itemType) item {
- it := p.next()
- p.assertEqual(typ, it.typ)
- return it
-}
-
-func (p *parser) assertEqual(expected, got itemType) {
- if expected != got {
- p.bug("Expected '%s' but got '%s'.", expected, got)
- }
-}
-
-func (p *parser) topLevel(item item) {
- switch item.typ {
- case itemCommentStart:
- p.approxLine = item.line
- p.expect(itemText)
- case itemTableStart:
- kg := p.next()
- p.approxLine = kg.line
-
- var key Key
- for ; kg.typ != itemTableEnd && kg.typ != itemEOF; kg = p.next() {
- key = append(key, p.keyString(kg))
- }
- p.assertEqual(itemTableEnd, kg.typ)
-
- p.establishContext(key, false)
- p.setType("", tomlHash)
- p.ordered = append(p.ordered, key)
- case itemArrayTableStart:
- kg := p.next()
- p.approxLine = kg.line
-
- var key Key
- for ; kg.typ != itemArrayTableEnd && kg.typ != itemEOF; kg = p.next() {
- key = append(key, p.keyString(kg))
- }
- p.assertEqual(itemArrayTableEnd, kg.typ)
-
- p.establishContext(key, true)
- p.setType("", tomlArrayHash)
- p.ordered = append(p.ordered, key)
- case itemKeyStart:
- kname := p.next()
- p.approxLine = kname.line
- p.currentKey = p.keyString(kname)
-
- val, typ := p.value(p.next())
- p.setValue(p.currentKey, val)
- p.setType(p.currentKey, typ)
- p.ordered = append(p.ordered, p.context.add(p.currentKey))
- p.currentKey = ""
- default:
- p.bug("Unexpected type at top level: %s", item.typ)
- }
-}
-
-// Gets a string for a key (or part of a key in a table name).
-func (p *parser) keyString(it item) string {
- switch it.typ {
- case itemText:
- return it.val
- case itemString, itemMultilineString,
- itemRawString, itemRawMultilineString:
- s, _ := p.value(it)
- return s.(string)
- default:
- p.bug("Unexpected key type: %s", it.typ)
- panic("unreachable")
- }
-}
-
-// value translates an expected value from the lexer into a Go value wrapped
-// as an empty interface.
-func (p *parser) value(it item) (interface{}, tomlType) {
- switch it.typ {
- case itemString:
- return p.replaceEscapes(it.val), p.typeOfPrimitive(it)
- case itemMultilineString:
- trimmed := stripFirstNewline(stripEscapedWhitespace(it.val))
- return p.replaceEscapes(trimmed), p.typeOfPrimitive(it)
- case itemRawString:
- return it.val, p.typeOfPrimitive(it)
- case itemRawMultilineString:
- return stripFirstNewline(it.val), p.typeOfPrimitive(it)
- case itemBool:
- switch it.val {
- case "true":
- return true, p.typeOfPrimitive(it)
- case "false":
- return false, p.typeOfPrimitive(it)
- }
- p.bug("Expected boolean value, but got '%s'.", it.val)
- case itemInteger:
- if !numUnderscoresOK(it.val) {
- p.panicf("Invalid integer %q: underscores must be surrounded by digits",
- it.val)
- }
- val := strings.Replace(it.val, "_", "", -1)
- num, err := strconv.ParseInt(val, 10, 64)
- if err != nil {
- // Distinguish integer values. Normally, it'd be a bug if the lexer
- // provides an invalid integer, but it's possible that the number is
- // out of range of valid values (which the lexer cannot determine).
- // So mark the former as a bug but the latter as a legitimate user
- // error.
- if e, ok := err.(*strconv.NumError); ok &&
- e.Err == strconv.ErrRange {
-
- p.panicf("Integer '%s' is out of the range of 64-bit "+
- "signed integers.", it.val)
- } else {
- p.bug("Expected integer value, but got '%s'.", it.val)
- }
- }
- return num, p.typeOfPrimitive(it)
- case itemFloat:
- parts := strings.FieldsFunc(it.val, func(r rune) bool {
- switch r {
- case '.', 'e', 'E':
- return true
- }
- return false
- })
- for _, part := range parts {
- if !numUnderscoresOK(part) {
- p.panicf("Invalid float %q: underscores must be "+
- "surrounded by digits", it.val)
- }
- }
- if !numPeriodsOK(it.val) {
- // As a special case, numbers like '123.' or '1.e2',
- // which are valid as far as Go/strconv are concerned,
- // must be rejected because TOML says that a fractional
- // part consists of '.' followed by 1+ digits.
- p.panicf("Invalid float %q: '.' must be followed "+
- "by one or more digits", it.val)
- }
- val := strings.Replace(it.val, "_", "", -1)
- num, err := strconv.ParseFloat(val, 64)
- if err != nil {
- if e, ok := err.(*strconv.NumError); ok &&
- e.Err == strconv.ErrRange {
-
- p.panicf("Float '%s' is out of the range of 64-bit "+
- "IEEE-754 floating-point numbers.", it.val)
- } else {
- p.panicf("Invalid float value: %q", it.val)
- }
- }
- return num, p.typeOfPrimitive(it)
- case itemDatetime:
- var t time.Time
- var ok bool
- var err error
- for _, format := range []string{
- "2006-01-02T15:04:05Z07:00",
- "2006-01-02T15:04:05",
- "2006-01-02",
- } {
- t, err = time.ParseInLocation(format, it.val, time.Local)
- if err == nil {
- ok = true
- break
- }
- }
- if !ok {
- p.panicf("Invalid TOML Datetime: %q.", it.val)
- }
- return t, p.typeOfPrimitive(it)
- case itemArray:
- array := make([]interface{}, 0)
- types := make([]tomlType, 0)
-
- for it = p.next(); it.typ != itemArrayEnd; it = p.next() {
- if it.typ == itemCommentStart {
- p.expect(itemText)
- continue
- }
-
- val, typ := p.value(it)
- array = append(array, val)
- types = append(types, typ)
- }
- return array, p.typeOfArray(types)
- case itemInlineTableStart:
- var (
- hash = make(map[string]interface{})
- outerContext = p.context
- outerKey = p.currentKey
- )
-
- p.context = append(p.context, p.currentKey)
- p.currentKey = ""
- for it := p.next(); it.typ != itemInlineTableEnd; it = p.next() {
- if it.typ != itemKeyStart {
- p.bug("Expected key start but instead found %q, around line %d",
- it.val, p.approxLine)
- }
- if it.typ == itemCommentStart {
- p.expect(itemText)
- continue
- }
-
- // retrieve key
- k := p.next()
- p.approxLine = k.line
- kname := p.keyString(k)
-
- // retrieve value
- p.currentKey = kname
- val, typ := p.value(p.next())
- // make sure we keep metadata up to date
- p.setType(kname, typ)
- p.ordered = append(p.ordered, p.context.add(p.currentKey))
- hash[kname] = val
- }
- p.context = outerContext
- p.currentKey = outerKey
- return hash, tomlHash
- }
- p.bug("Unexpected value type: %s", it.typ)
- panic("unreachable")
-}
-
-// numUnderscoresOK checks whether each underscore in s is surrounded by
-// characters that are not underscores.
-func numUnderscoresOK(s string) bool {
- accept := false
- for _, r := range s {
- if r == '_' {
- if !accept {
- return false
- }
- accept = false
- continue
- }
- accept = true
- }
- return accept
-}
-
-// numPeriodsOK checks whether every period in s is followed by a digit.
-func numPeriodsOK(s string) bool {
- period := false
- for _, r := range s {
- if period && !isDigit(r) {
- return false
- }
- period = r == '.'
- }
- return !period
-}
-
-// establishContext sets the current context of the parser,
-// where the context is either a hash or an array of hashes. Which one is
-// set depends on the value of the `array` parameter.
-//
-// Establishing the context also makes sure that the key isn't a duplicate, and
-// will create implicit hashes automatically.
-func (p *parser) establishContext(key Key, array bool) {
- var ok bool
-
- // Always start at the top level and drill down for our context.
- hashContext := p.mapping
- keyContext := make(Key, 0)
-
- // We only need implicit hashes for key[0:-1]
- for _, k := range key[0 : len(key)-1] {
- _, ok = hashContext[k]
- keyContext = append(keyContext, k)
-
- // No key? Make an implicit hash and move on.
- if !ok {
- p.addImplicit(keyContext)
- hashContext[k] = make(map[string]interface{})
- }
-
- // If the hash context is actually an array of tables, then set
- // the hash context to the last element in that array.
- //
- // Otherwise, it better be a table, since this MUST be a key group (by
- // virtue of it not being the last element in a key).
- switch t := hashContext[k].(type) {
- case []map[string]interface{}:
- hashContext = t[len(t)-1]
- case map[string]interface{}:
- hashContext = t
- default:
- p.panicf("Key '%s' was already created as a hash.", keyContext)
- }
- }
-
- p.context = keyContext
- if array {
- // If this is the first element for this array, then allocate a new
- // list of tables for it.
- k := key[len(key)-1]
- if _, ok := hashContext[k]; !ok {
- hashContext[k] = make([]map[string]interface{}, 0, 5)
- }
-
- // Add a new table. But make sure the key hasn't already been used
- // for something else.
- if hash, ok := hashContext[k].([]map[string]interface{}); ok {
- hashContext[k] = append(hash, make(map[string]interface{}))
- } else {
- p.panicf("Key '%s' was already created and cannot be used as "+
- "an array.", keyContext)
- }
- } else {
- p.setValue(key[len(key)-1], make(map[string]interface{}))
- }
- p.context = append(p.context, key[len(key)-1])
-}
-
-// setValue sets the given key to the given value in the current context.
-// It will make sure that the key hasn't already been defined, account for
-// implicit key groups.
-func (p *parser) setValue(key string, value interface{}) {
- var tmpHash interface{}
- var ok bool
-
- hash := p.mapping
- keyContext := make(Key, 0)
- for _, k := range p.context {
- keyContext = append(keyContext, k)
- if tmpHash, ok = hash[k]; !ok {
- p.bug("Context for key '%s' has not been established.", keyContext)
- }
- switch t := tmpHash.(type) {
- case []map[string]interface{}:
- // The context is a table of hashes. Pick the most recent table
- // defined as the current hash.
- hash = t[len(t)-1]
- case map[string]interface{}:
- hash = t
- default:
- p.bug("Expected hash to have type 'map[string]interface{}', but "+
- "it has '%T' instead.", tmpHash)
- }
- }
- keyContext = append(keyContext, key)
-
- if _, ok := hash[key]; ok {
- // Typically, if the given key has already been set, then we have
- // to raise an error since duplicate keys are disallowed. However,
- // it's possible that a key was previously defined implicitly. In this
- // case, it is allowed to be redefined concretely. (See the
- // `tests/valid/implicit-and-explicit-after.toml` test in `toml-test`.)
- //
- // But we have to make sure to stop marking it as an implicit. (So that
- // another redefinition provokes an error.)
- //
- // Note that since it has already been defined (as a hash), we don't
- // want to overwrite it. So our business is done.
- if p.isImplicit(keyContext) {
- p.removeImplicit(keyContext)
- return
- }
-
- // Otherwise, we have a concrete key trying to override a previous
- // key, which is *always* wrong.
- p.panicf("Key '%s' has already been defined.", keyContext)
- }
- hash[key] = value
-}
-
-// setType sets the type of a particular value at a given key.
-// It should be called immediately AFTER setValue.
-//
-// Note that if `key` is empty, then the type given will be applied to the
-// current context (which is either a table or an array of tables).
-func (p *parser) setType(key string, typ tomlType) {
- keyContext := make(Key, 0, len(p.context)+1)
- for _, k := range p.context {
- keyContext = append(keyContext, k)
- }
- if len(key) > 0 { // allow type setting for hashes
- keyContext = append(keyContext, key)
- }
- p.types[keyContext.String()] = typ
-}
-
-// addImplicit sets the given Key as having been created implicitly.
-func (p *parser) addImplicit(key Key) {
- p.implicits[key.String()] = true
-}
-
-// removeImplicit stops tagging the given key as having been implicitly
-// created.
-func (p *parser) removeImplicit(key Key) {
- p.implicits[key.String()] = false
-}
-
-// isImplicit returns true if the key group pointed to by the key was created
-// implicitly.
-func (p *parser) isImplicit(key Key) bool {
- return p.implicits[key.String()]
-}
-
-// current returns the full key name of the current context.
-func (p *parser) current() string {
- if len(p.currentKey) == 0 {
- return p.context.String()
- }
- if len(p.context) == 0 {
- return p.currentKey
- }
- return fmt.Sprintf("%s.%s", p.context, p.currentKey)
-}
-
-func stripFirstNewline(s string) string {
- if len(s) == 0 || s[0] != '\n' {
- return s
- }
- return s[1:]
-}
-
-func stripEscapedWhitespace(s string) string {
- esc := strings.Split(s, "\\\n")
- if len(esc) > 1 {
- for i := 1; i < len(esc); i++ {
- esc[i] = strings.TrimLeftFunc(esc[i], unicode.IsSpace)
- }
- }
- return strings.Join(esc, "")
-}
-
-func (p *parser) replaceEscapes(str string) string {
- var replaced []rune
- s := []byte(str)
- r := 0
- for r < len(s) {
- if s[r] != '\\' {
- c, size := utf8.DecodeRune(s[r:])
- r += size
- replaced = append(replaced, c)
- continue
- }
- r += 1
- if r >= len(s) {
- p.bug("Escape sequence at end of string.")
- return ""
- }
- switch s[r] {
- default:
- p.bug("Expected valid escape code after \\, but got %q.", s[r])
- return ""
- case 'b':
- replaced = append(replaced, rune(0x0008))
- r += 1
- case 't':
- replaced = append(replaced, rune(0x0009))
- r += 1
- case 'n':
- replaced = append(replaced, rune(0x000A))
- r += 1
- case 'f':
- replaced = append(replaced, rune(0x000C))
- r += 1
- case 'r':
- replaced = append(replaced, rune(0x000D))
- r += 1
- case '"':
- replaced = append(replaced, rune(0x0022))
- r += 1
- case '\\':
- replaced = append(replaced, rune(0x005C))
- r += 1
- case 'u':
- // At this point, we know we have a Unicode escape of the form
- // `uXXXX` at [r, r+5). (Because the lexer guarantees this
- // for us.)
- escaped := p.asciiEscapeToUnicode(s[r+1 : r+5])
- replaced = append(replaced, escaped)
- r += 5
- case 'U':
- // At this point, we know we have a Unicode escape of the form
- // `uXXXX` at [r, r+9). (Because the lexer guarantees this
- // for us.)
- escaped := p.asciiEscapeToUnicode(s[r+1 : r+9])
- replaced = append(replaced, escaped)
- r += 9
- }
- }
- return string(replaced)
-}
-
-func (p *parser) asciiEscapeToUnicode(bs []byte) rune {
- s := string(bs)
- hex, err := strconv.ParseUint(strings.ToLower(s), 16, 32)
- if err != nil {
- p.bug("Could not parse '%s' as a hexadecimal number, but the "+
- "lexer claims it's OK: %s", s, err)
- }
- if !utf8.ValidRune(rune(hex)) {
- p.panicf("Escaped character '\\u%s' is not valid UTF-8.", s)
- }
- return rune(hex)
-}
-
-func isStringType(ty itemType) bool {
- return ty == itemString || ty == itemMultilineString ||
- ty == itemRawString || ty == itemRawMultilineString
-}
diff --git a/vendor/github.com/BurntSushi/toml/session.vim b/vendor/github.com/BurntSushi/toml/session.vim
deleted file mode 100644
index 562164b..0000000
--- a/vendor/github.com/BurntSushi/toml/session.vim
+++ /dev/null
@@ -1 +0,0 @@
-au BufWritePost *.go silent!make tags > /dev/null 2>&1
diff --git a/vendor/github.com/BurntSushi/toml/type_check.go b/vendor/github.com/BurntSushi/toml/type_check.go
deleted file mode 100644
index c73f8af..0000000
--- a/vendor/github.com/BurntSushi/toml/type_check.go
+++ /dev/null
@@ -1,91 +0,0 @@
-package toml
-
-// tomlType represents any Go type that corresponds to a TOML type.
-// While the first draft of the TOML spec has a simplistic type system that
-// probably doesn't need this level of sophistication, we seem to be militating
-// toward adding real composite types.
-type tomlType interface {
- typeString() string
-}
-
-// typeEqual accepts any two types and returns true if they are equal.
-func typeEqual(t1, t2 tomlType) bool {
- if t1 == nil || t2 == nil {
- return false
- }
- return t1.typeString() == t2.typeString()
-}
-
-func typeIsHash(t tomlType) bool {
- return typeEqual(t, tomlHash) || typeEqual(t, tomlArrayHash)
-}
-
-type tomlBaseType string
-
-func (btype tomlBaseType) typeString() string {
- return string(btype)
-}
-
-func (btype tomlBaseType) String() string {
- return btype.typeString()
-}
-
-var (
- tomlInteger tomlBaseType = "Integer"
- tomlFloat tomlBaseType = "Float"
- tomlDatetime tomlBaseType = "Datetime"
- tomlString tomlBaseType = "String"
- tomlBool tomlBaseType = "Bool"
- tomlArray tomlBaseType = "Array"
- tomlHash tomlBaseType = "Hash"
- tomlArrayHash tomlBaseType = "ArrayHash"
-)
-
-// typeOfPrimitive returns a tomlType of any primitive value in TOML.
-// Primitive values are: Integer, Float, Datetime, String and Bool.
-//
-// Passing a lexer item other than the following will cause a BUG message
-// to occur: itemString, itemBool, itemInteger, itemFloat, itemDatetime.
-func (p *parser) typeOfPrimitive(lexItem item) tomlType {
- switch lexItem.typ {
- case itemInteger:
- return tomlInteger
- case itemFloat:
- return tomlFloat
- case itemDatetime:
- return tomlDatetime
- case itemString:
- return tomlString
- case itemMultilineString:
- return tomlString
- case itemRawString:
- return tomlString
- case itemRawMultilineString:
- return tomlString
- case itemBool:
- return tomlBool
- }
- p.bug("Cannot infer primitive type of lex item '%s'.", lexItem)
- panic("unreachable")
-}
-
-// typeOfArray returns a tomlType for an array given a list of types of its
-// values.
-//
-// In the current spec, if an array is homogeneous, then its type is always
-// "Array". If the array is not homogeneous, an error is generated.
-func (p *parser) typeOfArray(types []tomlType) tomlType {
- // Empty arrays are cool.
- if len(types) == 0 {
- return tomlArray
- }
-
- theType := types[0]
- for _, t := range types[1:] {
- if !typeEqual(theType, t) {
- p.panicf("Array contains values of type '%s' and '%s', but "+
- "arrays must be homogeneous.", theType, t)
- }
- }
- return tomlArray
-}
diff --git a/vendor/github.com/BurntSushi/toml/type_fields.go b/vendor/github.com/BurntSushi/toml/type_fields.go
deleted file mode 100644
index 608997c..0000000
--- a/vendor/github.com/BurntSushi/toml/type_fields.go
+++ /dev/null
@@ -1,242 +0,0 @@
-package toml
-
-// Struct field handling is adapted from code in encoding/json:
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the Go distribution.
-
-import (
- "reflect"
- "sort"
- "sync"
-)
-
-// A field represents a single field found in a struct.
-type field struct {
- name string // the name of the field (`toml` tag included)
- tag bool // whether field has a `toml` tag
- index []int // represents the depth of an anonymous field
- typ reflect.Type // the type of the field
-}
-
-// byName sorts field by name, breaking ties with depth,
-// then breaking ties with "name came from toml tag", then
-// breaking ties with index sequence.
-type byName []field
-
-func (x byName) Len() int { return len(x) }
-
-func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-
-func (x byName) Less(i, j int) bool {
- if x[i].name != x[j].name {
- return x[i].name < x[j].name
- }
- if len(x[i].index) != len(x[j].index) {
- return len(x[i].index) < len(x[j].index)
- }
- if x[i].tag != x[j].tag {
- return x[i].tag
- }
- return byIndex(x).Less(i, j)
-}
-
-// byIndex sorts field by index sequence.
-type byIndex []field
-
-func (x byIndex) Len() int { return len(x) }
-
-func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-
-func (x byIndex) Less(i, j int) bool {
- for k, xik := range x[i].index {
- if k >= len(x[j].index) {
- return false
- }
- if xik != x[j].index[k] {
- return xik < x[j].index[k]
- }
- }
- return len(x[i].index) < len(x[j].index)
-}
-
-// typeFields returns a list of fields that TOML should recognize for the given
-// type. The algorithm is breadth-first search over the set of structs to
-// include - the top struct and then any reachable anonymous structs.
-func typeFields(t reflect.Type) []field {
- // Anonymous fields to explore at the current level and the next.
- current := []field{}
- next := []field{{typ: t}}
-
- // Count of queued names for current level and the next.
- count := map[reflect.Type]int{}
- nextCount := map[reflect.Type]int{}
-
- // Types already visited at an earlier level.
- visited := map[reflect.Type]bool{}
-
- // Fields found.
- var fields []field
-
- for len(next) > 0 {
- current, next = next, current[:0]
- count, nextCount = nextCount, map[reflect.Type]int{}
-
- for _, f := range current {
- if visited[f.typ] {
- continue
- }
- visited[f.typ] = true
-
- // Scan f.typ for fields to include.
- for i := 0; i < f.typ.NumField(); i++ {
- sf := f.typ.Field(i)
- if sf.PkgPath != "" && !sf.Anonymous { // unexported
- continue
- }
- opts := getOptions(sf.Tag)
- if opts.skip {
- continue
- }
- index := make([]int, len(f.index)+1)
- copy(index, f.index)
- index[len(f.index)] = i
-
- ft := sf.Type
- if ft.Name() == "" && ft.Kind() == reflect.Ptr {
- // Follow pointer.
- ft = ft.Elem()
- }
-
- // Record found field and index sequence.
- if opts.name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct {
- tagged := opts.name != ""
- name := opts.name
- if name == "" {
- name = sf.Name
- }
- fields = append(fields, field{name, tagged, index, ft})
- if count[f.typ] > 1 {
- // If there were multiple instances, add a second,
- // so that the annihilation code will see a duplicate.
- // It only cares about the distinction between 1 or 2,
- // so don't bother generating any more copies.
- fields = append(fields, fields[len(fields)-1])
- }
- continue
- }
-
- // Record new anonymous struct to explore in next round.
- nextCount[ft]++
- if nextCount[ft] == 1 {
- f := field{name: ft.Name(), index: index, typ: ft}
- next = append(next, f)
- }
- }
- }
- }
-
- sort.Sort(byName(fields))
-
- // Delete all fields that are hidden by the Go rules for embedded fields,
- // except that fields with TOML tags are promoted.
-
- // The fields are sorted in primary order of name, secondary order
- // of field index length. Loop over names; for each name, delete
- // hidden fields by choosing the one dominant field that survives.
- out := fields[:0]
- for advance, i := 0, 0; i < len(fields); i += advance {
- // One iteration per name.
- // Find the sequence of fields with the name of this first field.
- fi := fields[i]
- name := fi.name
- for advance = 1; i+advance < len(fields); advance++ {
- fj := fields[i+advance]
- if fj.name != name {
- break
- }
- }
- if advance == 1 { // Only one field with this name
- out = append(out, fi)
- continue
- }
- dominant, ok := dominantField(fields[i : i+advance])
- if ok {
- out = append(out, dominant)
- }
- }
-
- fields = out
- sort.Sort(byIndex(fields))
-
- return fields
-}
-
-// dominantField looks through the fields, all of which are known to
-// have the same name, to find the single field that dominates the
-// others using Go's embedding rules, modified by the presence of
-// TOML tags. If there are multiple top-level fields, the boolean
-// will be false: This condition is an error in Go and we skip all
-// the fields.
-func dominantField(fields []field) (field, bool) {
- // The fields are sorted in increasing index-length order. The winner
- // must therefore be one with the shortest index length. Drop all
- // longer entries, which is easy: just truncate the slice.
- length := len(fields[0].index)
- tagged := -1 // Index of first tagged field.
- for i, f := range fields {
- if len(f.index) > length {
- fields = fields[:i]
- break
- }
- if f.tag {
- if tagged >= 0 {
- // Multiple tagged fields at the same level: conflict.
- // Return no field.
- return field{}, false
- }
- tagged = i
- }
- }
- if tagged >= 0 {
- return fields[tagged], true
- }
- // All remaining fields have the same length. If there's more than one,
- // we have a conflict (two fields named "X" at the same level) and we
- // return no field.
- if len(fields) > 1 {
- return field{}, false
- }
- return fields[0], true
-}
-
-var fieldCache struct {
- sync.RWMutex
- m map[reflect.Type][]field
-}
-
-// cachedTypeFields is like typeFields but uses a cache to avoid repeated work.
-func cachedTypeFields(t reflect.Type) []field {
- fieldCache.RLock()
- f := fieldCache.m[t]
- fieldCache.RUnlock()
- if f != nil {
- return f
- }
-
- // Compute fields without lock.
- // Might duplicate effort but won't hold other computations back.
- f = typeFields(t)
- if f == nil {
- f = []field{}
- }
-
- fieldCache.Lock()
- if fieldCache.m == nil {
- fieldCache.m = map[reflect.Type][]field{}
- }
- fieldCache.m[t] = f
- fieldCache.Unlock()
- return f
-}
diff --git a/vendor/github.com/awnumar/memguard/.travis.yml b/vendor/github.com/awnumar/memguard/.travis.yml
deleted file mode 100644
index c2abef4..0000000
--- a/vendor/github.com/awnumar/memguard/.travis.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-language: go
-
-os:
- - linux
- - osx
-
-script:
- - go build -race -v .
- - go test -race -v ./...
-
-notifications:
- email: false
- slack:
- secure: hQP7PFP4jC+5csuxeqIxAvfJJuPaSuhVknXMc0UPB1hRYbXHrKsYMxS520KFr6fA+jBpusp2yWkCRKXikFFbkcdMrK5omJ+uxWF7zZteB2ldZ0R9RUpWle1BuJqxcVxjSoDqEr58k3DyGyl34xNDGq1QWvwdgZVGqMwAEUeKS5Y/46rt+7Mm8iZ2p/xKYXaSd/XBw5IhaRaxEflWr4cMgq4ishCSfqMgtSD14A+VjNmjZy4myh3b8JiEoxQWmmY0a+zp9kM5AnsmI87pTYRkvir1bplviKWvfwrYjXXx1pa1QHHxGCJUlhgNzcxNMoM04qT5shXDojapitUX8e957qrie96/nOBBbb2YLuZsi+GG6aupfzbGY3xoz1MiPMoiup1QooBHfC1Biq7pso2cqXttDQT1mwet29C6D5g6z0KfTFmoYJqlSm79C62RSXrKKEGiXwKsCRuj0z6R84NwijtC1Zf6Um0T/ChF4dTgaA8CYR2WScz843wsSgkREXokhCdt9TcBYBZR8QREo6OmcmMgqiA80iiv0ozT99uqiaqzDDxHN7tTcq0fQs3a1xTgE6s88sCV3zP1VqzcvBW16z8IF94pLsu831FpZG11MPjgDeHxaSij6B8/7oeNTByUTtyjneTe9sVFps8MAko6KP/n0P61B72vo8mlNHL6Ne8=
diff --git a/vendor/github.com/awnumar/memguard/AUTHORS b/vendor/github.com/awnumar/memguard/AUTHORS
deleted file mode 100644
index 8dd047c..0000000
--- a/vendor/github.com/awnumar/memguard/AUTHORS
+++ /dev/null
@@ -1,19 +0,0 @@
-# This is the official list of MemGuard authors for copyright purposes.
-
-# Names should be added to this file as
-# Name or Organization
-# - Contribution
-# The email address is not required for organizations.
-
-Awn Umar
- - Main developer.
-
-Carlo Alberto Ferraris
- - Implemented buffer leaking protection via finalizers.
-
-dotcppfile
- - Implemented guard pages.
- - Various bug fixes and optimisations.
-
-Joseph Richey
- - Suggested using system calls for memory allocation.
diff --git a/vendor/github.com/awnumar/memguard/CODE_OF_CONDUCT.md b/vendor/github.com/awnumar/memguard/CODE_OF_CONDUCT.md
deleted file mode 100644
index a734e49..0000000
--- a/vendor/github.com/awnumar/memguard/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Contributor Code of Conduct
-
-This project adheres to No Code of Conduct. We are all adults. We accept anyone's contributions. Nothing else matters.
-
-For more information please visit the [No Code of Conduct](https://github.com/domgetter/NCoC) homepage.
diff --git a/vendor/github.com/awnumar/memguard/CONTRIBUTING.md b/vendor/github.com/awnumar/memguard/CONTRIBUTING.md
deleted file mode 100644
index 8edfb83..0000000
--- a/vendor/github.com/awnumar/memguard/CONTRIBUTING.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# Contributing Guide
-
-We accept contributions from anyone. Here is the general process:
-
-1. Make a fork of the repository.
-2. Make your changes, preferably to the `development` branch.
-3. Add your contribution to the [`AUTHORS`](/AUTHORS) file. If you're a first-time contributor, first add your name and email (in alphabetical order).
-4. Open a PR against the `development` branch.
-
-Changes are squashed and merged into `development`, and then `development` is merged conventionally into `master`.
diff --git a/vendor/github.com/awnumar/memguard/Gopkg.lock b/vendor/github.com/awnumar/memguard/Gopkg.lock
deleted file mode 100644
index f291a54..0000000
--- a/vendor/github.com/awnumar/memguard/Gopkg.lock
+++ /dev/null
@@ -1,18 +0,0 @@
-# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
-
-
-[[projects]]
- branch = "master"
- name = "golang.org/x/sys"
- packages = [
- "unix",
- "windows"
- ]
- revision = "37707fdb30a5b38865cfb95e5aab41707daec7fd"
-
-[solve-meta]
- analyzer-name = "dep"
- analyzer-version = 1
- inputs-digest = "8900ec71a1237344f7e669cf912245b9c86877ba85a7b385ecac946fe4ad2af0"
- solver-name = "gps-cdcl"
- solver-version = 1
diff --git a/vendor/github.com/awnumar/memguard/Gopkg.toml b/vendor/github.com/awnumar/memguard/Gopkg.toml
deleted file mode 100644
index 3154a0e..0000000
--- a/vendor/github.com/awnumar/memguard/Gopkg.toml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-# Gopkg.toml example
-#
-# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
-# for detailed Gopkg.toml documentation.
-#
-# required = ["github.com/user/thing/cmd/thing"]
-# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
-#
-# [[constraint]]
-# name = "github.com/user/project"
-# version = "1.0.0"
-#
-# [[constraint]]
-# name = "github.com/user/project2"
-# branch = "dev"
-# source = "github.com/myfork/project2"
-#
-# [[override]]
-# name = "github.com/x/y"
-# version = "2.4.0"
-
-
-[[constraint]]
- branch = "master"
- name = "golang.org/x/sys"
diff --git a/vendor/github.com/awnumar/memguard/LICENSE b/vendor/github.com/awnumar/memguard/LICENSE
deleted file mode 100644
index 8dada3e..0000000
--- a/vendor/github.com/awnumar/memguard/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright {yyyy} {name of copyright owner}
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/vendor/github.com/awnumar/memguard/README.md b/vendor/github.com/awnumar/memguard/README.md
deleted file mode 100644
index 588abb3..0000000
--- a/vendor/github.com/awnumar/memguard/README.md
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
MemGuard
- Easy and secure handling of sensitive memory, in pure Go.
-
-
-
-
-
-
-
-
----
-
-This is a thread-safe package, designed to allow you to easily handle sensitive values in memory. It supports all major operating systems and is written in pure Go.
-
-## Features
-
-* Interference from the garbage-collector is blocked by using system-calls to manually allocate memory.
-* It is very difficult for another process to find or access sensitive memory as the data is sandwiched between guard-pages. This feature also acts as an immediate access alarm in case of buffer overflows.
-* Buffer overflows are further protected against using a random canary value. If this value changes, the process will panic.
-* We try our best to prevent the system from writing anything sensitive to the disk. The data is locked to prevent swapping, system core dumps can be disabled, and the kernel is advised (where possible) to never include the secure memory in dumps.
-* True kernel-level immutability is implemented. That means that if _anything_ attempts to modify an immutable container, the kernel will throw an access violation and the process will terminate.
-* All sensitive data is wiped before the associated memory is released back to the operating system.
-* Side-channel attacks are mitigated against by making sure that the copying and comparison of data is done in constant-time.
-* Accidental memory leaks are mitigated against by harnessing Go's own garbage-collector to automatically destroy containers that have run out of scope.
-
-Some of these features were inspired by [libsodium](https://github.com/jedisct1/libsodium), so credits to them.
-
-Full documentation and a complete overview of the API can be found [here](https://godoc.org/github.com/awnumar/memguard).
-
-## Installation
-
-Although we do recommend using a release, the simplest way to install the library is to `go get` it:
-
-```
-$ go get github.com/awnumar/memguard
-```
-
-If you would prefer a signed release that you can verify and manually compile yourself, download and extract the [latest release](https://github.com/awnumar/memguard/releases/latest). Then go ahead and run:
-
-```
-$ go install -v ./
-```
-
-The [latest release](https://github.com/awnumar/memguard/releases/latest) is guaranteed to be cryptographically signed with my most recent PGP key, which can be found on [keybase](https://keybase.io/awn). To import it directly into GPG, run:
-
-```
-$ curl https://keybase.io/awn/pgp_keys.asc | gpg --import
-```
-
-We **strongly** encourage you to vendor your dependencies for a clean and reliable build. Go's [dep](https://github.com/golang/dep) makes this task relatively frictionless.
diff --git a/vendor/github.com/awnumar/memguard/appveyor.yml b/vendor/github.com/awnumar/memguard/appveyor.yml
deleted file mode 100644
index ab12143..0000000
--- a/vendor/github.com/awnumar/memguard/appveyor.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-version: '{build}'
-
-platform: Any CPU
-
-clone_folder: c:\go\src\github.com\awnumar\memguard
-
-environment:
- GOPATH: c:\go
-
-install:
-- set PATH=%GOPATH%\bin;c:\go\bin;%PATH%
-- go version
-
-build_script:
-- go build -race -v .
-
-test_script:
-- go test -race -v ./...
-
-notifications:
-- provider: Slack
- incoming_webhook:
- secure: WjopZ/uuTGqqu1XhbjE05ZHSGcoVa7M07WwKQuGLqkO4AD1xGj+G817tMC1Ke0XxB3dBNQ++Ryr/SlzrjUVSHetvUgEpjE380XaCzXIdXP8=
- on_build_success: true
- on_build_failure: true
- on_build_status_changed: true
diff --git a/vendor/github.com/awnumar/memguard/container.go b/vendor/github.com/awnumar/memguard/container.go
deleted file mode 100644
index 86ee007..0000000
--- a/vendor/github.com/awnumar/memguard/container.go
+++ /dev/null
@@ -1,95 +0,0 @@
-package memguard
-
-import (
- "crypto/subtle"
- "runtime"
- "sync"
- "unsafe"
-
- "github.com/awnumar/memguard/memcall"
-)
-
-/*
-LockedBuffer is a structure that holds secure values.
-
-The protected memory itself can be accessed with the Buffer() method. The various states can be accessed with the IsDestroyed() and IsMutable() methods, both of which are pretty self-explanatory.
-
-The number of LockedBuffers that you are able to create is limited by how much memory your system kernel allows each process to mlock/VirtualLock. Therefore you should call Destroy on LockedBuffers that you no longer need, or simply defer a Destroy call after creating a new LockedBuffer.
-
-The entire memguard API handles and passes around pointers to LockedBuffers, and so, for both security and convenience, you should refrain from dereferencing a LockedBuffer.
-
-If an API function that needs to edit a LockedBuffer is given one that is immutable, the call will return an ErrImmutable. Similarly, if a function is given a LockedBuffer that has been destroyed, the call will return an ErrDestroyed.
-*/
-type LockedBuffer struct {
- *container // Import all the container fields.
- *littleBird // Monitor this for auto-destruction.
-}
-
-// container implements the actual data container.
-type container struct {
- sync.Mutex // Local mutex lock.
-
- buffer []byte // Slice that references the protected memory.
- mutable bool // Is this LockedBuffer mutable?
-}
-
-// littleBird is a value that we monitor instead of the LockedBuffer
-// itself. It allows us to tell the GC to auto-destroy LockedBuffers.
-type littleBird [16]byte
-
-// Global internal function used to create new secure containers.
-func newContainer(size int, mutable bool) (*LockedBuffer, error) {
- // Return an error if length < 1.
- if size < 1 {
- return nil, ErrInvalidLength
- }
-
- // Allocate a new LockedBuffer.
- ib := new(container)
- b := &LockedBuffer{ib, new(littleBird)}
-
- // Round length + 32 bytes for the canary to a multiple of the page size..
- roundedLength := roundToPageSize(size + 32)
-
- // Calculate the total size of memory including the guard pages.
- totalSize := (2 * pageSize) + roundedLength
-
- // Allocate it all.
- memory := memcall.Alloc(totalSize)
-
- // Make the guard pages inaccessible.
- memcall.Protect(memory[:pageSize], false, false)
- memcall.Protect(memory[pageSize+roundedLength:], false, false)
-
- // Lock the pages that will hold the sensitive data.
- memcall.Lock(memory[pageSize : pageSize+roundedLength])
-
- // Set the canary.
- subtle.ConstantTimeCopy(1, memory[pageSize+roundedLength-size-32:pageSize+roundedLength-size], canary)
-
- // Set Buffer to a byte slice that describes the reigon of memory that is protected.
- b.buffer = getBytes(uintptr(unsafe.Pointer(&memory[pageSize+roundedLength-size])), size)
-
- // The buffer is filled with weird bytes so let's wipe it.
- wipeBytes(b.buffer)
-
- // Set appropriate mutability state.
- b.mutable = true
- if !mutable {
- b.MakeImmutable()
- }
-
- // Use a finalizer to make sure the buffer gets destroyed if forgotten.
- runtime.SetFinalizer(b.littleBird, func(_ *littleBird) {
- go ib.Destroy()
- })
-
- // Append the container to allLockedBuffers. We have to add container
- // instead of LockedBuffer so that littleBird can become unreachable.
- allLockedBuffersMutex.Lock()
- allLockedBuffers = append(allLockedBuffers, ib)
- allLockedBuffersMutex.Unlock()
-
- // Return a pointer to the LockedBuffer.
- return b, nil
-}
diff --git a/vendor/github.com/awnumar/memguard/docs.go b/vendor/github.com/awnumar/memguard/docs.go
deleted file mode 100644
index 8a61d62..0000000
--- a/vendor/github.com/awnumar/memguard/docs.go
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-Package memguard lets you easily handle sensitive values in memory.
-
- package main
-
- import (
- "fmt"
-
- "github.com/awnumar/memguard"
- )
-
- func main() {
- // Tell memguard to listen out for interrupts, and cleanup in case of one.
- memguard.CatchInterrupt(func() {
- fmt.Println("Interrupt signal received. Exiting...")
- })
- // Make sure to destroy all LockedBuffers when returning.
- defer memguard.DestroyAll()
-
- // Normal code continues from here.
- foo()
- }
-
- func foo() {
- // Create a 32 byte, immutable, random key.
- key, err := memguard.NewImmutableRandom(32)
- if err != nil {
- // Oh no, an error. Safely exit.
- fmt.Println(err)
- memguard.SafeExit(1)
- }
- // Remember to destroy this key when the function returns.
- defer key.Destroy()
-
- // Do something with the key.
- fmt.Printf("This is a %d byte key.\n", key.Size())
- fmt.Printf("This key starts with %x\n", key.Buffer()[0])
- }
-
-The number of LockedBuffers that you are able to create is limited by how much memory your system kernel allows each process to mlock/VirtualLock. Therefore you should call Destroy on LockedBuffers that you no longer need, or simply defer a Destroy call after creating a new LockedBuffer.
-
-If a function that you're using requires an array, you can cast the buffer to an array and then pass around a pointer. Make sure that you do not dereference the pointer and pass around the resulting value, as this will leave copies all over the place.
-
- key, err := memguard.NewImmutableRandom(16)
- if err != nil {
- fmt.Println(err)
- memguard.SafeExit(1)
- }
- defer key.Destroy()
-
- // Make sure the size of the array matches the size of the Buffer.
- // In this case that size is 16. This is very important.
- keyArrayPtr := (*[16]byte)(unsafe.Pointer(&key.Buffer()[0]))
-
-The MemGuard API is thread-safe. You can extend this thread-safety to outside of the API functions by using the Mutex that each LockedBuffer exposes. Don't use the mutex when calling a function that is part of the MemGuard API though, or the process will deadlock.
-
-When terminating your application, care should be taken to securely cleanup everything.
-
- // Start a listener that will wait for interrupt signals and catch them.
- memguard.CatchInterrupt(func() {
- // Over here put anything you want executing before program exit.
- fmt.Println("Interrupt signal received. Exiting...")
- })
-
- // Defer a DestroyAll() in your main() function.
- defer memguard.DestroyAll()
-
- // Use memguard.SafeExit() instead of os.Exit().
- memguard.SafeExit(1) // 1 is the exit code.
-*/
-package memguard
diff --git a/vendor/github.com/awnumar/memguard/docs_test.go b/vendor/github.com/awnumar/memguard/docs_test.go
deleted file mode 100644
index 38f5ff1..0000000
--- a/vendor/github.com/awnumar/memguard/docs_test.go
+++ /dev/null
@@ -1,9 +0,0 @@
-package memguard
-
-import "fmt"
-
-func ExampleCatchInterrupt() {
- CatchInterrupt(func() {
- fmt.Println("Exiting...")
- })
-}
diff --git a/vendor/github.com/awnumar/memguard/errors.go b/vendor/github.com/awnumar/memguard/errors.go
deleted file mode 100644
index 94ce2ee..0000000
--- a/vendor/github.com/awnumar/memguard/errors.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package memguard
-
-import "errors"
-
-// ErrDestroyed is returned when a function is called on a destroyed LockedBuffer.
-var ErrDestroyed = errors.New("memguard.ErrDestroyed: buffer is destroyed")
-
-// ErrImmutable is returned when a function that needs to modify a LockedBuffer is given a LockedBuffer that is immutable.
-var ErrImmutable = errors.New("memguard.ErrImmutable: cannot modify immutable buffer")
-
-// ErrInvalidLength is returned when a LockedBuffer of smaller than one byte is requested.
-var ErrInvalidLength = errors.New("memguard.ErrInvalidLength: length of buffer must be greater than zero")
-
-// ErrInvalidConversion is returned when attempting to get a slice of a LockedBuffer that is of an inappropriate size for that slice type. For example, attempting to get a []uint16 representation of a LockedBuffer of length 9 bytes would trigger this error, since there would be a byte leftover after the conversion.
-var ErrInvalidConversion = errors.New("memguard.ErrInvalidConversion: length of buffer must align with target type")
diff --git a/vendor/github.com/awnumar/memguard/internals.go b/vendor/github.com/awnumar/memguard/internals.go
deleted file mode 100644
index 079675e..0000000
--- a/vendor/github.com/awnumar/memguard/internals.go
+++ /dev/null
@@ -1,103 +0,0 @@
-package memguard
-
-import (
- "crypto/rand"
- "os"
- "sync"
- "unsafe"
-
- "github.com/awnumar/memguard/memcall"
-)
-
-var (
- // Ascertain and store the system memory page size.
- pageSize = os.Getpagesize()
-
- // Canary value that acts as an alarm in case of disallowed memory access.
- canary = createCanary()
-
- // Create a dedicated sync object for the CatchInterrupt function.
- catchInterruptOnce sync.Once
-
- // Array of all active containers, and associated mutex.
- allLockedBuffers []*container
- allLockedBuffersMutex = &sync.Mutex{}
-)
-
-// Create and allocate a canary value. Return to caller.
-func createCanary() []byte {
- // Canary length rounded to page size.
- roundedLen := roundToPageSize(32)
-
- // Therefore the total length is...
- totalLen := (2 * pageSize) + roundedLen
-
- // Allocate it.
- memory := memcall.Alloc(totalLen)
-
- // Make the guard pages inaccessible.
- memcall.Protect(memory[:pageSize], false, false)
- memcall.Protect(memory[pageSize+roundedLen:], false, false)
-
- // Lock the pages that will hold the canary.
- memcall.Lock(memory[pageSize : pageSize+roundedLen])
-
- // Fill the memory with cryptographically-secure random bytes (the canary value).
- c := getBytes(uintptr(unsafe.Pointer(&memory[pageSize+roundedLen-32])), 32)
- fillRandBytes(c)
-
- // Tell the kernel that the canary value should be immutable.
- memcall.Protect(memory[pageSize:pageSize+roundedLen], true, false)
-
- // Return a slice that describes the correct portion of memory.
- return c
-}
-
-// Round a length to a multiple of the system page size.
-func roundToPageSize(length int) int {
- return (length + (pageSize - 1)) & (^(pageSize - 1))
-}
-
-// Get a slice that describes all memory related to a LockedBuffer.
-func getAllMemory(b *container) []byte {
- // Calculate the size of the entire container's memory.
- roundedBufLen := roundToPageSize(len(b.buffer) + 32)
-
- // Calculate the address of the start of the memory.
- memAddr := uintptr(unsafe.Pointer(&b.buffer[0])) - uintptr((roundedBufLen-len(b.buffer))+pageSize)
-
- // Calculate the size of the entire memory.
- memLen := (pageSize * 2) + roundedBufLen
-
- // Use this information to generate a slice and return it.
- return getBytes(memAddr, memLen)
-}
-
-// Convert a pointer and length to a byte slice that describes that memory.
-func getBytes(ptr uintptr, len int) []byte {
- var sl = struct {
- addr uintptr
- len int
- cap int
- }{ptr, len, len}
- return *(*[]byte)(unsafe.Pointer(&sl))
-}
-
-// Takes a byte slice and fills it with random data.
-func fillRandBytes(b []byte) {
- // Read len(b) bytes into the buffer.
- if _, err := rand.Read(b); err != nil {
- panic("memguard.csprng(): could not get random bytes")
- }
-}
-
-// Wipes a byte slice with zeroes.
-func wipeBytes(buf []byte) {
- if len(buf) == 0 {
- return
- }
- buf[0] = 0
- for bp := 1; bp < len(buf); bp *= 2 {
- copy(buf[bp:], buf[:bp])
- }
-}
diff --git a/vendor/github.com/awnumar/memguard/logo.svg b/vendor/github.com/awnumar/memguard/logo.svg
deleted file mode 100644
index 346bba3..0000000
--- a/vendor/github.com/awnumar/memguard/logo.svg
+++ /dev/null
@@ -1,2 +0,0 @@
-
\ No newline at end of file
diff --git a/vendor/github.com/awnumar/memguard/memcall/memcall_freebsd.go b/vendor/github.com/awnumar/memguard/memcall/memcall_freebsd.go
deleted file mode 100644
index 37f29e1..0000000
--- a/vendor/github.com/awnumar/memguard/memcall/memcall_freebsd.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// +build freebsd
-
-package memcall
-
-import (
- "fmt"
-
- "golang.org/x/sys/unix"
-)
-
-// Lock is a wrapper for unix.Mlock(), with extra precautions.
-func Lock(b []byte) {
- // Advise the kernel not to dump. Ignore failure.
- unix.Madvise(b, unix.MADV_DONTDUMP)
-
- // Call mlock.
- if err := unix.Mlock(b); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Lock(): could not acquire lock on %p, limit reached? [Err: %s]", &b[0], err))
- }
-}
-
-// Unlock is a wrapper for unix.Munlock().
-func Unlock(b []byte) {
- if err := unix.Munlock(b); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Unlock(): could not free lock on %p [Err: %s]", &b[0], err))
- }
-}
-
-// Alloc allocates a byte slice of length n and returns it.
-func Alloc(n int) []byte {
- // Allocate the memory.
- b, err := unix.Mmap(-1, 0, n, unix.PROT_READ|unix.PROT_WRITE, unix.MAP_PRIVATE|unix.MAP_ANONYMOUS|unix.MAP_NOCORE)
- if err != nil {
- panic(fmt.Sprintf("memguard.memcall.Alloc(): could not allocate [Err: %s]", err))
- }
-
- // Fill memory with weird bytes in order to help catch bugs due to uninitialized data.
- for i := 0; i < n; i++ {
- b[i] = byte(0xdb)
- }
-
- // Return the allocated memory.
- return b
-}
-
-// Free unallocates the byte slice specified.
-func Free(b []byte) {
- if err := unix.Munmap(b); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Free(): could not unallocate %p [Err: %s]", &b[0], err))
- }
-}
-
-// Protect modifies the PROT_ flags for a specified byte slice.
-func Protect(b []byte, read, write bool) {
- // Ascertain protection value from arguments.
- var prot int
- if read && write {
- prot = unix.PROT_READ | unix.PROT_WRITE
- } else if read {
- prot = unix.PROT_READ
- } else if write {
- prot = unix.PROT_WRITE
- } else {
- prot = unix.PROT_NONE
- }
-
- // Change the protection value of the byte slice.
- if err := unix.Mprotect(b, prot); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Protect(): could not set %d on %p [Err: %s]", prot, &b[0], err))
- }
-}
-
-// DisableCoreDumps disables core dumps on Unix systems.
-func DisableCoreDumps() {
- // Disable core dumps.
- if err := unix.Setrlimit(unix.RLIMIT_CORE, &unix.Rlimit{Cur: 0, Max: 0}); err != nil {
- panic(fmt.Sprintf("memguard.memcall.DisableCoreDumps(): could not set rlimit [Err: %s]", err))
- }
-}
diff --git a/vendor/github.com/awnumar/memguard/memcall/memcall_openbsd.go b/vendor/github.com/awnumar/memguard/memcall/memcall_openbsd.go
deleted file mode 100644
index 990df29..0000000
--- a/vendor/github.com/awnumar/memguard/memcall/memcall_openbsd.go
+++ /dev/null
@@ -1,76 +0,0 @@
-// +build openbsd
-
-package memcall
-
-import (
- "fmt"
-
- "golang.org/x/sys/unix"
-)
-
-// Lock is a wrapper for unix.Mlock(), with extra precautions.
-func Lock(b []byte) {
- // Call mlock.
- if err := unix.Mlock(b); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Lock(): could not acquire lock on %p, limit reached? [Err: %s]", &b[0], err))
- }
-}
-
-// Unlock is a wrapper for unix.Munlock().
-func Unlock(b []byte) {
- if err := unix.Munlock(b); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Unlock(): could not free lock on %p [Err: %s]", &b[0], err))
- }
-}
-
-// Alloc allocates a byte slice of length n and returns it.
-func Alloc(n int) []byte {
- // Allocate the memory.
- b, err := unix.Mmap(-1, 0, n, unix.PROT_READ|unix.PROT_WRITE, unix.MAP_PRIVATE|unix.MAP_ANON)
- if err != nil {
- panic(fmt.Sprintf("memguard.memcall.Alloc(): could not allocate [Err: %s]", err))
- }
-
- // Fill memory with weird bytes in order to help catch bugs due to uninitialized data.
- for i := 0; i < n; i++ {
- b[i] = byte(0xdb)
- }
-
- // Return the allocated memory.
- return b
-}
-
-// Free unallocates the byte slice specified.
-func Free(b []byte) {
- if err := unix.Munmap(b); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Free(): could not unallocate %p [Err: %s]", &b[0], err))
- }
-}
-
-// Protect modifies the PROT_ flags for a specified byte slice.
-func Protect(b []byte, read, write bool) {
- // Ascertain protection value from arguments.
- var prot int
- if read && write {
- prot = unix.PROT_READ | unix.PROT_WRITE
- } else if read {
- prot = unix.PROT_READ
- } else if write {
- prot = unix.PROT_WRITE
- } else {
- prot = unix.PROT_NONE
- }
-
- // Change the protection value of the byte slice.
- if err := unix.Mprotect(b, prot); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Protect(): could not set %d on %p [Err: %s]", prot, &b[0], err))
- }
-}
-
-// DisableCoreDumps disables core dumps on Unix systems.
-func DisableCoreDumps() {
- // Disable core dumps.
- if err := unix.Setrlimit(unix.RLIMIT_CORE, &unix.Rlimit{Cur: 0, Max: 0}); err != nil {
- panic(fmt.Sprintf("memguard.memcall.DisableCoreDumps(): could not set rlimit [Err: %s]", err))
- }
-}
diff --git a/vendor/github.com/awnumar/memguard/memcall/memcall_osx.go b/vendor/github.com/awnumar/memguard/memcall/memcall_osx.go
deleted file mode 100644
index 0d27f6e..0000000
--- a/vendor/github.com/awnumar/memguard/memcall/memcall_osx.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// +build darwin
-
-package memcall
-
-import (
- "fmt"
-
- "golang.org/x/sys/unix"
-)
-
-// Lock is a wrapper for unix.Mlock(), with extra precautions.
-func Lock(b []byte) {
- if err := unix.Mlock(b); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Lock(): could not acquire lock on %p, limit reached? [Err: %s]", &b[0], err))
- }
-}
-
-// Unlock is a wrapper for unix.Munlock().
-func Unlock(b []byte) {
- if err := unix.Munlock(b); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Unlock(): could not free lock on %p [Err: %s]", &b[0], err))
- }
-}
-
-// Alloc allocates a byte slice of length n and returns it.
-func Alloc(n int) []byte {
- // Allocate the memory.
- b, err := unix.Mmap(-1, 0, n, unix.PROT_READ|unix.PROT_WRITE, unix.MAP_PRIVATE|unix.MAP_ANON)
- if err != nil {
- panic(fmt.Sprintf("memguard.memcall.Alloc(): could not allocate [Err: %s]", err))
- }
-
- // Fill memory with weird bytes in order to help catch bugs due to uninitialized data.
- for i := 0; i < n; i++ {
- b[i] = byte(0xdb)
- }
-
- // Return the allocated memory.
- return b
-}
-
-// Free unallocates the byte slice specified.
-func Free(b []byte) {
- if err := unix.Munmap(b); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Free(): could not unallocate %p [Err: %s]", &b[0], err))
- }
-}
-
-// Protect modifies the PROT_ flags for a specified byte slice.
-func Protect(b []byte, read, write bool) {
- // Ascertain protection value from arguments.
- var prot int
- if read && write {
- prot = unix.PROT_READ | unix.PROT_WRITE
- } else if read {
- prot = unix.PROT_READ
- } else if write {
- prot = unix.PROT_WRITE
- } else {
- prot = unix.PROT_NONE
- }
-
- // Change the protection value of the byte slice.
- if err := unix.Mprotect(b, prot); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Protect(): could not set %d on %p [Err: %s]", prot, &b[0], err))
- }
-}
-
-// DisableCoreDumps disables core dumps on Unix systems.
-func DisableCoreDumps() {
- // Disable core dumps.
- if err := unix.Setrlimit(unix.RLIMIT_CORE, &unix.Rlimit{Cur: 0, Max: 0}); err != nil {
- panic(fmt.Sprintf("memguard.memcall.DisableCoreDumps(): could not set rlimit [Err: %s]", err))
- }
-}
diff --git a/vendor/github.com/awnumar/memguard/memcall/memcall_test.go b/vendor/github.com/awnumar/memguard/memcall/memcall_test.go
deleted file mode 100644
index ae55986..0000000
--- a/vendor/github.com/awnumar/memguard/memcall/memcall_test.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package memcall
-
-import "testing"
-
-func TestCycle(t *testing.T) {
- DisableCoreDumps()
- buffer := Alloc(32)
-
- // Test if the whole memory is filled with 0xdb.
- for i := 0; i < 32; i++ {
- if buffer[i] != byte(0xdb) {
- t.Error("unexpected byte:", buffer[i])
- }
- }
-
- Protect(buffer, true, true)
- Lock(buffer)
- Unlock(buffer)
- Free(buffer)
-}
-
-func TestProtect(t *testing.T) {
- buffer := Alloc(32)
- Protect(buffer, true, true)
- Protect(buffer, true, false)
- Protect(buffer, false, true)
- Protect(buffer, false, false)
- Free(buffer)
-}
diff --git a/vendor/github.com/awnumar/memguard/memcall/memcall_unix.go b/vendor/github.com/awnumar/memguard/memcall/memcall_unix.go
deleted file mode 100644
index 62e7ee7..0000000
--- a/vendor/github.com/awnumar/memguard/memcall/memcall_unix.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// +build !windows,!darwin,!openbsd,!freebsd
-
-package memcall
-
-import (
- "fmt"
-
- "golang.org/x/sys/unix"
-)
-
-// Lock is a wrapper for unix.Mlock(), with extra precautions.
-func Lock(b []byte) {
- // Advise the kernel not to dump. Ignore failure.
- unix.Madvise(b, unix.MADV_DONTDUMP)
-
- // Call mlock.
- if err := unix.Mlock(b); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Lock(): could not acquire lock on %p, limit reached? [Err: %s]", &b[0], err))
- }
-}
-
-// Unlock is a wrapper for unix.Munlock().
-func Unlock(b []byte) {
- if err := unix.Munlock(b); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Unlock(): could not free lock on %p [Err: %s]", &b[0], err))
- }
-}
-
-// Alloc allocates a byte slice of length n and returns it.
-func Alloc(n int) []byte {
- // Allocate the memory.
- b, err := unix.Mmap(-1, 0, n, unix.PROT_READ|unix.PROT_WRITE, unix.MAP_PRIVATE|unix.MAP_ANONYMOUS)
- if err != nil {
- panic(fmt.Sprintf("memguard.memcall.Alloc(): could not allocate [Err: %s]", err))
- }
-
- // Fill memory with weird bytes in order to help catch bugs due to uninitialized data.
- for i := 0; i < n; i++ {
- b[i] = byte(0xdb)
- }
-
- // Return the allocated memory.
- return b
-}
-
-// Free unallocates the byte slice specified.
-func Free(b []byte) {
- if err := unix.Munmap(b); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Free(): could not unallocate %p [Err: %s]", &b[0], err))
- }
-}
-
-// Protect modifies the PROT_ flags for a specified byte slice.
-func Protect(b []byte, read, write bool) {
- // Ascertain protection value from arguments.
- var prot int
- if read && write {
- prot = unix.PROT_READ | unix.PROT_WRITE
- } else if read {
- prot = unix.PROT_READ
- } else if write {
- prot = unix.PROT_WRITE
- } else {
- prot = unix.PROT_NONE
- }
-
- // Change the protection value of the byte slice.
- if err := unix.Mprotect(b, prot); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Protect(): could not set %d on %p [Err: %s]", prot, &b[0], err))
- }
-}
-
-// DisableCoreDumps disables core dumps on Unix systems.
-func DisableCoreDumps() {
- // Disable core dumps.
- if err := unix.Setrlimit(unix.RLIMIT_CORE, &unix.Rlimit{Cur: 0, Max: 0}); err != nil {
- panic(fmt.Sprintf("memguard.memcall.DisableCoreDumps(): could not set rlimit [Err: %s]", err))
- }
-}
diff --git a/vendor/github.com/awnumar/memguard/memcall/memcall_windows.go b/vendor/github.com/awnumar/memguard/memcall/memcall_windows.go
deleted file mode 100644
index feccb05..0000000
--- a/vendor/github.com/awnumar/memguard/memcall/memcall_windows.go
+++ /dev/null
@@ -1,94 +0,0 @@
-// +build windows
-
-package memcall
-
-import (
- "fmt"
- "unsafe"
-
- "golang.org/x/sys/windows"
-)
-
-// Placeholder variable for when we need a valid pointer to zero bytes.
-var _zero uintptr
-
-// Lock is a wrapper for windows.VirtualLock()
-func Lock(b []byte) {
- if err := windows.VirtualLock(_getPtr(b), uintptr(len(b))); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Lock(): could not acquire lock on %p, limit reached? [Err: %s]", &b[0], err))
- }
-}
-
-// Unlock is a wrapper for windows.VirtualUnlock()
-func Unlock(b []byte) {
- if err := windows.VirtualUnlock(_getPtr(b), uintptr(len(b))); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Unlock(): could not free lock on %p [Err: %s]", &b[0], err))
- }
-}
-
-// Alloc allocates a byte slice of length n and returns it.
-func Alloc(n int) []byte {
- // Allocate the memory.
- ptr, err := windows.VirtualAlloc(_zero, uintptr(n), 0x1000|0x2000, 0x4)
- if err != nil {
- panic(fmt.Sprintf("memguard.memcall.Alloc(): could not allocate [Err: %s]", err))
- }
-
- // Convert into a byte slice.
- b := _getBytes(ptr, n, n)
-
- // Fill memory with weird bytes in order to help catch bugs due to uninitialized data.
- for i := 0; i < n; i++ {
- b[i] = byte(0xdb)
- }
-
- // Return the allocated memory.
- return b
-}
-
-// Free unallocates the byte slice specified.
-func Free(b []byte) {
- if err := windows.VirtualFree(_getPtr(b), uintptr(0), 0x8000); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Free(): could not unallocate %p [Err: %s]", &b[0], err))
- }
-}
-
-// Protect modifies the Memory Protection Constants for a specified byte slice.
-func Protect(b []byte, read, write bool) {
- // Ascertain protection value from arguments.
- var prot int
- if write {
- prot = 0x4 // PAGE_READWRITE
- } else if read {
- prot = 0x2 // PAGE_READ
- } else {
- prot = 0x1 // PAGE_NOACCESS
- }
-
- var oldProtect uint32
- if err := windows.VirtualProtect(_getPtr(b), uintptr(len(b)), uint32(prot), &oldProtect); err != nil {
- panic(fmt.Sprintf("memguard.memcall.Protect(): could not set %d on %p [Err: %s]", prot, &b[0], err))
- }
-}
-
-// DisableCoreDumps is included for compatibility reasons. On windows it is a no-op function.
-func DisableCoreDumps() {}
-
-func _getPtr(b []byte) uintptr {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- return uintptr(_p0)
-}
-
-func _getBytes(ptr uintptr, len int, cap int) []byte {
- var sl = struct {
- addr uintptr
- len int
- cap int
- }{ptr, len, cap}
- return *(*[]byte)(unsafe.Pointer(&sl))
-}
diff --git a/vendor/github.com/awnumar/memguard/memguard.go b/vendor/github.com/awnumar/memguard/memguard.go
deleted file mode 100644
index 08a5700..0000000
--- a/vendor/github.com/awnumar/memguard/memguard.go
+++ /dev/null
@@ -1,875 +0,0 @@
-package memguard
-
-import (
- "bytes"
- "crypto/subtle"
- "os"
- "os/signal"
- "syscall"
- "unsafe"
-
- "github.com/awnumar/memguard/memcall"
-)
-
-/*
-NewImmutable creates a new, immutable LockedBuffer of a specified size.
-
-The mutability can later be toggled with the MakeImmutable and MakeMutable methods.
-
-If the given length is less than one, the call will return an ErrInvalidLength.
-*/
-func NewImmutable(size int) (*LockedBuffer, error) {
- return newContainer(size, false)
-}
-
-/*
-NewMutable creates a new, mutable LockedBuffer of a specified length.
-
-The mutability can later be toggled with the MakeImmutable and MakeMutable methods.
-
-If the given length is less than one, the call will return an ErrInvalidLength.
-*/
-func NewMutable(size int) (*LockedBuffer, error) {
- return newContainer(size, true)
-}
-
-/*
-NewImmutableFromBytes is identical to NewImmutable but for the fact that the created LockedBuffer is of the same length and has the same contents as a given slice. The slice is wiped after the bytes have been copied over.
-
-If the size of the slice is zero, the call will return an ErrInvalidLength.
-*/
-func NewImmutableFromBytes(buf []byte) (*LockedBuffer, error) {
- // Create a new LockedBuffer.
- b, err := NewMutableFromBytes(buf)
- if err != nil {
- return nil, err
- }
-
- // Mark as immutable.
- b.MakeImmutable()
-
- // Return a pointer to the LockedBuffer.
- return b, nil
-}
-
-/*
-NewMutableFromBytes is identical to NewMutable but for the fact that the created LockedBuffer is of the same length and has the same contents as a given slice. The slice is wiped after the bytes have been copied over.
-
-If the size of the slice is zero, the call will return an ErrInvalidLength.
-*/
-func NewMutableFromBytes(buf []byte) (*LockedBuffer, error) {
- // Create a new LockedBuffer.
- b, err := newContainer(len(buf), true)
- if err != nil {
- return nil, err
- }
-
- // Copy the bytes from buf, wiping afterwards.
- b.Move(buf)
-
- // Return a pointer to the LockedBuffer.
- return b, nil
-}
-
-/*
-NewImmutableRandom is identical to NewImmutable but for the fact that the created LockedBuffer is filled with cryptographically-secure pseudo-random bytes instead of zeroes. Therefore a LockedBuffer created with NewImmutableRandom can safely be used as an encryption key.
-*/
-func NewImmutableRandom(size int) (*LockedBuffer, error) {
- // Create a new LockedBuffer for the key.
- b, err := NewMutableRandom(size)
- if err != nil {
- return nil, err
- }
-
- // Mark as immutable if specified.
- b.MakeImmutable()
-
- // Return the LockedBuffer.
- return b, nil
-}
-
-/*
-NewMutableRandom is identical to NewMutable but for the fact that the created LockedBuffer is filled with cryptographically-secure pseudo-random bytes instead of zeroes. Therefore a LockedBuffer created with NewMutableRandom can safely be used as an encryption key.
-*/
-func NewMutableRandom(size int) (*LockedBuffer, error) {
- // Create a new LockedBuffer for the key.
- b, err := newContainer(size, true)
- if err != nil {
- return nil, err
- }
-
- // Fill it with random data.
- fillRandBytes(b.buffer)
-
- // Return the LockedBuffer.
- return b, nil
-}
-
-/*
-Buffer returns a slice that references the secure, protected portion of memory.
-
-If the LockedBuffer that you call Buffer on has been destroyed, the returned slice will be nil (it will have a length and capacity of zero).
-
-If a function that you're using requires an array, you can cast the buffer to an array and then pass around a pointer:
-
- // Make sure the size of the array matches the size of the buffer.
- // In this case that size is 16. This is *very* important.
- keyArrayPtr := (*[16]byte)(unsafe.Pointer(&b.Buffer()[0]))
-
-Make sure that you do not dereference the pointer and pass around the resulting value, as this will leave copies all over the place.
-*/
-func (b *container) Buffer() []byte {
- return b.buffer
-}
-
-/*
-Uint8 returns a slice (of type []uint8) that references the secure, protected portion of memory.
-
-Uint8 is practically identical to Buffer, but it has been added for completeness' sake. Buffer will usually be the faster and easier option.
-*/
-func (b *container) Uint8() ([]uint8, error) {
- // Attain the mutex lock.
- b.Lock()
- defer b.Unlock()
-
- // Check to see if it's destroyed.
- if len(b.buffer) == 0 {
- return nil, ErrDestroyed
- }
-
- // Return the slice.
- return []uint8(b.buffer), nil
-}
-
-/*
-Uint16 returns a slice (of type []uint16) that references the secure, protected portion of memory.
-
-The LockedBuffer must be a multiple of 2 bytes in length, or else an error will be returned.
-*/
-func (b *container) Uint16() ([]uint16, error) {
- // Attain the mutex lock.
- b.Lock()
- defer b.Unlock()
-
- // Check to see if it's destroyed.
- if len(b.buffer) == 0 {
- return nil, ErrDestroyed
- }
-
- // Check to see if it's an appropriate length.
- if len(b.buffer)%2 != 0 {
- return nil, ErrInvalidConversion
- }
-
- // Perform the conversion.
- var sl = struct {
- addr uintptr
- len int
- cap int
- }{uintptr(unsafe.Pointer(&b.buffer[0])), b.Size() / 2, b.Size() / 2}
-
- // Return the new slice.
- return *(*[]uint16)(unsafe.Pointer(&sl)), nil
-}
-
-/*
-Uint32 returns a slice (of type []uint32) that references the secure, protected portion of memory.
-
-The LockedBuffer must be a multiple of 4 bytes in length, or else an error will be returned.
-*/
-func (b *container) Uint32() ([]uint32, error) {
- // Attain the mutex lock.
- b.Lock()
- defer b.Unlock()
-
- // Check to see if it's destroyed.
- if len(b.buffer) == 0 {
- return nil, ErrDestroyed
- }
-
- // Check to see if it's an appropriate length.
- if len(b.buffer)%4 != 0 {
- return nil, ErrInvalidConversion
- }
-
- // Perform the conversion.
- var sl = struct {
- addr uintptr
- len int
- cap int
- }{uintptr(unsafe.Pointer(&b.buffer[0])), b.Size() / 4, b.Size() / 4}
-
- // Return the new slice.
- return *(*[]uint32)(unsafe.Pointer(&sl)), nil
-}
-
-/*
-Uint64 returns a slice (of type []uint64) that references the secure, protected portion of memory.
-
-The LockedBuffer must be a multiple of 8 bytes in length, or else an error will be returned.
-*/
-func (b *container) Uint64() ([]uint64, error) {
- // Attain the mutex lock.
- b.Lock()
- defer b.Unlock()
-
- // Check to see if it's destroyed.
- if len(b.buffer) == 0 {
- return nil, ErrDestroyed
- }
-
- // Check to see if it's an appropriate length.
- if len(b.buffer)%8 != 0 {
- return nil, ErrInvalidConversion
- }
-
- // Perform the conversion.
- var sl = struct {
- addr uintptr
- len int
- cap int
- }{uintptr(unsafe.Pointer(&b.buffer[0])), b.Size() / 8, b.Size() / 8}
-
- // Return the new slice.
- return *(*[]uint64)(unsafe.Pointer(&sl)), nil
-}
-
-/*
-Int8 returns a slice (of type []int8) that references the secure, protected portion of memory.
-*/
-func (b *container) Int8() ([]int8, error) {
- // Attain the mutex lock.
- b.Lock()
- defer b.Unlock()
-
- // Check to see if it's destroyed.
- if len(b.buffer) == 0 {
- return nil, ErrDestroyed
- }
-
- // Perform the conversion.
- var sl = struct {
- addr uintptr
- len int
- cap int
- }{uintptr(unsafe.Pointer(&b.buffer[0])), b.Size(), b.Size()}
-
- // Return the new slice.
- return *(*[]int8)(unsafe.Pointer(&sl)), nil
-}
-
-/*
-Int16 returns a slice (of type []int16) that references the secure, protected portion of memory.
-
-The LockedBuffer must be a multiple of 2 bytes in length, or else an error will be returned.
-*/
-func (b *container) Int16() ([]int16, error) {
- // Attain the mutex lock.
- b.Lock()
- defer b.Unlock()
-
- // Check to see if it's destroyed.
- if len(b.buffer) == 0 {
- return nil, ErrDestroyed
- }
-
- // Check to see if it's an appropriate length.
- if len(b.buffer)%2 != 0 {
- return nil, ErrInvalidConversion
- }
-
- // Perform the conversion.
- var sl = struct {
- addr uintptr
- len int
- cap int
- }{uintptr(unsafe.Pointer(&b.buffer[0])), b.Size() / 2, b.Size() / 2}
-
- // Return the new slice.
- return *(*[]int16)(unsafe.Pointer(&sl)), nil
-}
-
-/*
-Int32 returns a slice (of type []int32) that references the secure, protected portion of memory.
-
-The LockedBuffer must be a multiple of 4 bytes in length, or else an error will be returned.
-*/
-func (b *container) Int32() ([]int32, error) {
- // Attain the mutex lock.
- b.Lock()
- defer b.Unlock()
-
- // Check to see if it's destroyed.
- if len(b.buffer) == 0 {
- return nil, ErrDestroyed
- }
-
- // Check to see if it's an appropriate length.
- if len(b.buffer)%4 != 0 {
- return nil, ErrInvalidConversion
- }
-
- // Perform the conversion.
- var sl = struct {
- addr uintptr
- len int
- cap int
- }{uintptr(unsafe.Pointer(&b.buffer[0])), b.Size() / 4, b.Size() / 4}
-
- // Return the new slice.
- return *(*[]int32)(unsafe.Pointer(&sl)), nil
-}
-
-/*
-Int64 returns a slice (of type []int64) that references the secure, protected portion of memory.
-
-The LockedBuffer must be a multiple of 8 bytes in length, or else an error will be returned.
-*/
-func (b *container) Int64() ([]int64, error) {
- // Attain the mutex lock.
- b.Lock()
- defer b.Unlock()
-
- // Check to see if it's destroyed.
- if len(b.buffer) == 0 {
- return nil, ErrDestroyed
- }
-
- // Check to see if it's an appropriate length.
- if len(b.buffer)%8 != 0 {
- return nil, ErrInvalidConversion
- }
-
- // Perform the conversion.
- var sl = struct {
- addr uintptr
- len int
- cap int
- }{uintptr(unsafe.Pointer(&b.buffer[0])), b.Size() / 8, b.Size() / 8}
-
- // Return the new slice.
- return *(*[]int64)(unsafe.Pointer(&sl)), nil
-}
-
-/*
-IsMutable returns a boolean value indicating if a LockedBuffer is marked read-only.
-*/
-func (b *container) IsMutable() bool {
- // Get a mutex lock on this LockedBuffer.
- b.Lock()
- defer b.Unlock()
-
- return b.mutable
-}
-
-/*
-IsDestroyed returns a boolean value indicating if a LockedBuffer has been destroyed.
-*/
-func (b *container) IsDestroyed() bool {
- // Get a mutex lock on this LockedBuffer.
- b.Lock()
- defer b.Unlock()
-
- // Return the appropriate value.
- return len(b.buffer) == 0
-}
-
-/*
-EqualBytes compares a LockedBuffer to a byte slice in constant time.
-*/
-func (b *container) EqualBytes(buf []byte) (bool, error) {
- // Get a mutex lock on this LockedBuffer.
- b.Lock()
- defer b.Unlock()
-
- // Check if it's destroyed.
- if len(b.buffer) == 0 {
- return false, ErrDestroyed
- }
-
- // Do a time-constant comparison.
- if subtle.ConstantTimeCompare(b.buffer, buf) == 1 {
- // They're equal.
- return true, nil
- }
-
- // They're not equal.
- return false, nil
-}
-
-/*
-MakeImmutable asks the kernel to mark the LockedBuffer's memory as immutable. Any subsequent attempts to modify this memory will result in the process crashing with a SIGSEGV memory violation.
-
-To make the memory mutable again, MakeMutable is called.
-*/
-func (b *container) MakeImmutable() error {
- // Get a mutex lock on this LockedBuffer.
- b.Lock()
- defer b.Unlock()
-
- // Check if it's destroyed.
- if len(b.buffer) == 0 {
- return ErrDestroyed
- }
-
- if b.mutable {
- // Mark the memory as mutable.
- memcall.Protect(getAllMemory(b)[pageSize:pageSize+roundToPageSize(len(b.buffer)+32)], true, false)
-
- // Tell everyone about the change we made.
- b.mutable = false
- }
-
- // Everything went well.
- return nil
-}
-
-/*
-MakeMutable asks the kernel to mark the LockedBuffer's memory as mutable.
-
-To make the memory immutable again, MakeImmutable is called.
-*/
-func (b *container) MakeMutable() error {
- // Get a mutex lock on this LockedBuffer.
- b.Lock()
- defer b.Unlock()
-
- // Check if it's destroyed.
- if len(b.buffer) == 0 {
- return ErrDestroyed
- }
-
- if !b.mutable {
- // Mark the memory as mutable.
- memcall.Protect(getAllMemory(b)[pageSize:pageSize+roundToPageSize(len(b.buffer)+32)], true, true)
-
- // Tell everyone about the change we made.
- b.mutable = true
- }
-
- // Everything went well.
- return nil
-}
-
-/*
-Copy copies bytes from a byte slice into a LockedBuffer in constant-time. Just like Golang's built-in copy function, Copy only copies up to the smallest of the two buffers.
-
-It does not wipe the original slice so using Copy is less secure than using Move. Therefore Move should be favoured unless you have a good reason.
-
-You should aim to call WipeBytes on the original slice as soon as possible.
-
-If the LockedBuffer is marked as read-only, the call will fail and return an ErrReadOnly.
-*/
-func (b *container) Copy(buf []byte) error {
- // Just call CopyAt with a zero offset.
- return b.CopyAt(buf, 0)
-}
-
-/*
-CopyAt is identical to Copy but it copies into the LockedBuffer at a specified offset.
-*/
-func (b *container) CopyAt(buf []byte, offset int) error {
- // Get a mutex lock on this LockedBuffer.
- b.Lock()
- defer b.Unlock()
-
- // Check if it's destroyed.
- if len(b.buffer) == 0 {
- return ErrDestroyed
- }
-
- // Check if it's immutable.
- if !b.mutable {
- return ErrImmutable
- }
-
- // Do a time-constant copying of the bytes, copying only up to the length of the buffer.
- if len(b.buffer[offset:]) > len(buf) {
- subtle.ConstantTimeCopy(1, b.buffer[offset:offset+len(buf)], buf)
- } else if len(b.buffer[offset:]) < len(buf) {
- subtle.ConstantTimeCopy(1, b.buffer[offset:], buf[:len(b.buffer[offset:])])
- } else {
- subtle.ConstantTimeCopy(1, b.buffer[offset:], buf)
- }
-
- return nil
-}
-
-/*
-Move moves bytes from a byte slice into a LockedBuffer in constant-time. Just like Golang's built-in copy function, Move only moves up to the smallest of the two buffers.
-
-Unlike Copy, Move wipes the entire original slice after copying the appropriate number of bytes over, and so it should be favoured unless you have a good reason.
-
-If the LockedBuffer is marked as read-only, the call will fail and return an ErrReadOnly.
-*/
-func (b *container) Move(buf []byte) error {
- // Just call MoveAt with a zero offset.
- return b.MoveAt(buf, 0)
-}
-
-/*
-MoveAt is identical to Move but it copies into the LockedBuffer at a specified offset.
-*/
-func (b *container) MoveAt(buf []byte, offset int) error {
- // Copy buf into the LockedBuffer.
- if err := b.CopyAt(buf, offset); err != nil {
- return err
- }
-
- // Wipe the old bytes.
- wipeBytes(buf)
-
- // Everything went well.
- return nil
-}
-
-/*
-FillRandomBytes fills a LockedBuffer with cryptographically-secure pseudo-random bytes.
-*/
-func (b *container) FillRandomBytes() error {
- // Just call FillRandomBytesAt.
- return b.FillRandomBytesAt(0, b.Size())
-}
-
-/*
-FillRandomBytesAt fills a LockedBuffer with cryptographically-secure pseudo-random bytes, starting at an offset and ending after a given number of bytes.
-*/
-func (b *container) FillRandomBytesAt(offset, length int) error {
- // Get a mutex lock on this LockedBuffer.
- b.Lock()
- defer b.Unlock()
-
- // Check if it's destroyed.
- if len(b.buffer) == 0 {
- return ErrDestroyed
- }
-
- // Check if it's immutable.
- if !b.mutable {
- return ErrImmutable
- }
-
- // Fill with random bytes.
- fillRandBytes(b.buffer[offset : offset+length])
-
- // Everything went well.
- return nil
-}
-
-/*
-Destroy verifies that no buffer underflows occurred and then wipes, unlocks, and frees all related memory. If a buffer underflow is detected, the process panics.
-
-This function must be called on all LockedBuffers before exiting. DestroyAll is designed for this purpose, as is CatchInterrupt and SafeExit. We recommend using all of them together.
-
-If the LockedBuffer has already been destroyed then the call makes no changes.
-*/
-func (b *container) Destroy() {
- // Attain a mutex lock on this LockedBuffer.
- b.Lock()
- defer b.Unlock()
-
- // Return if it's already destroyed.
- if len(b.buffer) == 0 {
- return
- }
-
- // Remove this one from global slice.
- allLockedBuffersMutex.Lock()
- for i, v := range allLockedBuffers {
- if v == b {
- allLockedBuffers = append(allLockedBuffers[:i], allLockedBuffers[i+1:]...)
- break
- }
- }
- allLockedBuffersMutex.Unlock()
-
- // Get all of the memory related to this LockedBuffer.
- memory := getAllMemory(b)
-
- // Get the total size of all the pages between the guards.
- roundedLength := len(memory) - (pageSize * 2)
-
- // Verify the canary.
- if !bytes.Equal(memory[pageSize+roundedLength-len(b.buffer)-32:pageSize+roundedLength-len(b.buffer)], canary) {
- panic("memguard.Destroy(): buffer overflow detected")
- }
-
- // Make all of the memory readable and writable.
- memcall.Protect(memory, true, true)
-
- // Wipe the pages that hold our data.
- wipeBytes(memory[pageSize : pageSize+roundedLength])
-
- // Unlock the pages that hold our data.
- memcall.Unlock(memory[pageSize : pageSize+roundedLength])
-
- // Free all related memory.
- memcall.Free(memory)
-
- // Set the metadata appropriately.
- b.mutable = false
-
- // Set the buffer to nil.
- b.buffer = nil
-}
-
-/*
-Size returns an integer representing the total length, in bytes, of a LockedBuffer.
-
-If this size is zero, it is safe to assume that the LockedBuffer has been destroyed.
-*/
-func (b *container) Size() int {
- return len(b.buffer)
-}
-
-/*
-Wipe wipes a LockedBuffer's contents by overwriting the buffer with zeroes.
-*/
-func (b *container) Wipe() error {
- // Get a mutex lock on this LockedBuffer.
- b.Lock()
- defer b.Unlock()
-
- // Check if it's destroyed.
- if len(b.buffer) == 0 {
- return ErrDestroyed
- }
-
- // Check if it's immutable.
- if !b.mutable {
- return ErrImmutable
- }
-
- // Wipe the buffer.
- wipeBytes(b.buffer)
-
- // Everything went well.
- return nil
-}
-
-/*
-Concatenate takes two LockedBuffers and concatenates them.
-
-If one of the given LockedBuffers is immutable, the resulting LockedBuffer will also be immutable. The original LockedBuffers are not destroyed.
-*/
-func Concatenate(a, b *LockedBuffer) (*LockedBuffer, error) {
- // Get a mutex lock on the LockedBuffers.
- a.Lock()
- b.Lock()
- defer a.Unlock()
- defer b.Unlock()
-
- // Check if either are destroyed.
- if len(a.buffer) == 0 || len(b.buffer) == 0 {
- return nil, ErrDestroyed
- }
-
- // Create a new LockedBuffer to hold the concatenated value.
- c, _ := NewMutable(len(a.buffer) + len(b.buffer))
-
- // Copy the values across.
- c.Copy(a.buffer)
- c.CopyAt(b.buffer, len(a.buffer))
-
- // Set permissions accordingly.
- if !a.mutable || !b.mutable {
- c.MakeImmutable()
- }
-
- // Return the resulting LockedBuffer.
- return c, nil
-}
-
-/*
-Duplicate takes a LockedBuffer and creates a new one with the same contents and mutability state as the original.
-*/
-func Duplicate(b *LockedBuffer) (*LockedBuffer, error) {
- // Get a mutex lock on this LockedBuffer.
- b.Lock()
- defer b.Unlock()
-
- // Check if it's destroyed.
- if len(b.buffer) == 0 {
- return nil, ErrDestroyed
- }
-
- // Create new LockedBuffer.
- newBuf, _ := NewMutable(b.Size())
-
- // Copy bytes into it.
- newBuf.Copy(b.buffer)
-
- // Set permissions accordingly.
- if !b.mutable {
- newBuf.MakeImmutable()
- }
-
- // Return duplicated.
- return newBuf, nil
-}
-
-/*
-Equal compares the contents of two LockedBuffers in constant time.
-*/
-func Equal(a, b *LockedBuffer) (bool, error) {
- // Get a mutex lock on the LockedBuffers.
- a.Lock()
- b.Lock()
- defer a.Unlock()
- defer b.Unlock()
-
- // Check if either are destroyed.
- if len(a.buffer) == 0 || len(b.buffer) == 0 {
- return false, ErrDestroyed
- }
-
- // Do a time-constant comparison on the two buffers.
- if subtle.ConstantTimeCompare(a.buffer, b.buffer) == 1 {
- // They're equal.
- return true, nil
- }
-
- // They're not equal.
- return false, nil
-}
-
-/*
-Split takes a LockedBuffer, splits it at a specified offset, and then returns the two newly created LockedBuffers. The mutability state of the original is preserved in the new LockedBuffers, and the original LockedBuffer is not destroyed.
-*/
-func Split(b *LockedBuffer, offset int) (*LockedBuffer, *LockedBuffer, error) {
- // Get a mutex lock on this LockedBuffer.
- b.Lock()
- defer b.Unlock()
-
- // Check if it's destroyed.
- if len(b.buffer) == 0 {
- return nil, nil, ErrDestroyed
- }
-
- // Create two new LockedBuffers.
- firstBuf, err := NewMutable(len(b.buffer[:offset]))
- if err != nil {
- return nil, nil, err
- }
-
- secondBuf, err := NewMutable(len(b.buffer[offset:]))
- if err != nil {
- firstBuf.Destroy()
- return nil, nil, err
- }
-
- // Copy the values into them.
- firstBuf.Copy(b.buffer[:offset])
- secondBuf.Copy(b.buffer[offset:])
-
- // Copy over permissions.
- if !b.mutable {
- firstBuf.MakeImmutable()
- secondBuf.MakeImmutable()
- }
-
- // Return the new LockedBuffers.
- return firstBuf, secondBuf, nil
-}
-
-/*
-Trim shortens a LockedBuffer according to the given specifications. The mutability state of the original is preserved in the new LockedBuffer, and the original LockedBuffer is not destroyed.
-
-Trim takes an offset and a size as arguments. The resulting LockedBuffer starts at index [offset] and ends at index [offset+size].
-*/
-func Trim(b *LockedBuffer, offset, size int) (*LockedBuffer, error) {
- // Get a mutex lock on this LockedBuffer.
- b.Lock()
- defer b.Unlock()
-
- // Check if it's destroyed.
- if len(b.buffer) == 0 {
- return nil, ErrDestroyed
- }
-
- // Create new LockedBuffer and copy over the old.
- newBuf, err := NewMutable(size)
- if err != nil {
- return nil, err
- }
- newBuf.Copy(b.buffer[offset : offset+size])
-
- // Copy over permissions.
- if !b.mutable {
- newBuf.MakeImmutable()
- }
-
- // Return the new LockedBuffer.
- return newBuf, nil
-}
-
-/*
-WipeBytes zeroes out a given byte slice. It is recommended that you call WipeBytes on slices after utilizing the Copy or CopyAt methods.
-
-Due to the nature of memory allocated by the Go runtime, WipeBytes cannot guarantee that the data does not exist elsewhere in memory. Therefore, your program should aim to (when possible) store sensitive data only in LockedBuffers.
-*/
-func WipeBytes(b []byte) {
- wipeBytes(b)
-}
-
-/*
-DestroyAll calls Destroy on all LockedBuffers that have not already been destroyed.
-
-CatchInterrupt and SafeExit both call DestroyAll before exiting.
-*/
-func DestroyAll() {
- // Get a Mutex lock on allLockedBuffers, and get a copy.
- allLockedBuffersMutex.Lock()
- containers := make([]*container, len(allLockedBuffers))
- copy(containers, allLockedBuffers)
- allLockedBuffersMutex.Unlock()
-
- for _, b := range containers {
- b.Destroy()
- }
-}
-
-/*
-CatchInterrupt starts a goroutine that monitors for interrupt signals. It accepts a function of type func() and executes that before calling SafeExit(0).
-
-If CatchInterrupt is called multiple times, only the first call is executed and all subsequent calls are ignored.
-*/
-func CatchInterrupt(f func()) {
- // Only do this if it hasn't been done before.
- catchInterruptOnce.Do(func() {
- // Create a channel to listen on.
- c := make(chan os.Signal, 2)
-
- // Notify the channel if we receive a signal.
- signal.Notify(c, os.Interrupt, syscall.SIGTERM)
-
- // Start a goroutine to listen on the channel.
- go func() {
- <-c // Wait for signal.
- f() // Execute user function.
- SafeExit(0) // Exit securely.
- }()
- })
-}
-
-/*
-SafeExit exits the program with a specified exit-code, but calls DestroyAll first.
-*/
-func SafeExit(c int) {
- // Cleanup protected memory.
- DestroyAll()
-
- // Exit with a specified exit-code.
- os.Exit(c)
-}
-
-/*
-DisableUnixCoreDumps disables core-dumps.
-
-Since core-dumps are only relevant on Unix systems, if DisableUnixCoreDumps is called on any other system it will do nothing and return immediately.
-
-This function is precautonary as core-dumps are usually disabled by default on most systems.
-*/
-func DisableUnixCoreDumps() {
- memcall.DisableCoreDumps()
-}
diff --git a/vendor/github.com/awnumar/memguard/memguard_test.go b/vendor/github.com/awnumar/memguard/memguard_test.go
deleted file mode 100644
index 8e0fa46..0000000
--- a/vendor/github.com/awnumar/memguard/memguard_test.go
+++ /dev/null
@@ -1,827 +0,0 @@
-package memguard
-
-import (
- "bytes"
- "runtime"
- "sync"
- "testing"
- "unsafe"
-)
-
-func TestNew(t *testing.T) {
- b, err := NewImmutable(8)
- if err != nil {
- t.Error("unexpected error")
- }
- if len(b.Buffer()) != 8 || cap(b.Buffer()) != 8 {
- t.Error("length or capacity != required; len, cap =", len(b.Buffer()), cap(b.Buffer()))
- }
- if b.IsMutable() {
- t.Error("unexpected state")
- }
- b.Destroy()
-
- c, err := NewImmutable(0)
- if err != ErrInvalidLength {
- t.Error("expected err; got nil")
- }
- if c != nil {
- t.Error("expected nil, got *LockedBuffer")
- }
-
- a, err := NewMutable(8)
- if err != nil {
- t.Error("unexpected error")
- }
- if !a.IsMutable() {
- t.Error("unexpected state")
- }
- a.Destroy()
-}
-
-func TestNewFromBytes(t *testing.T) {
- b, err := NewImmutableFromBytes([]byte("test"))
- if err != nil {
- t.Error("unexpected error")
- }
- if !bytes.Equal(b.Buffer(), []byte("test")) {
- t.Error("b.Buffer() != required")
- }
- if b.IsMutable() {
- t.Error("unexpected state")
- }
- b.Destroy()
-
- c, err := NewImmutableFromBytes([]byte(""))
- if err != ErrInvalidLength {
- t.Error("expected err; got nil")
- }
- if c != nil {
- t.Error("expected nil, got *LockedBuffer")
- }
-
- a, err := NewMutableFromBytes([]byte("test"))
- if err != nil {
- t.Error("unexpected error")
- }
- if !a.IsMutable() {
- t.Error("unexpected state")
- }
- a.Destroy()
-}
-
-func TestNewRandom(t *testing.T) {
- b, _ := NewImmutableRandom(32)
- if bytes.Equal(b.Buffer(), make([]byte, 32)) {
- t.Error("was not filled with random data")
- }
- if b.IsMutable() {
- t.Error("unexpected state")
- }
-
- b.Destroy()
-
- c, err := NewImmutableRandom(0)
- if err != ErrInvalidLength {
- t.Error("expected ErrInvalidLength")
- }
- if c != nil {
- t.Error("expected nil, got *LockedBuffer")
- }
-
- a, err := NewMutableRandom(8)
- if err != nil {
- t.Error("unexpected error")
- }
- if !a.IsMutable() {
- t.Error("unexpected state")
- }
- a.Destroy()
-}
-
-func TestBuffer(t *testing.T) {
- b, _ := NewImmutableRandom(8)
-
- if !bytes.Equal(b.buffer, b.Buffer()) {
- t.Error("buffers inequal")
- }
-
- b.Destroy()
-
- if len(b.Buffer()) != 0 || cap(b.Buffer()) != 0 {
- t.Error("expected zero length")
- }
-}
-
-func TestUint8(t *testing.T) {
- b, _ := NewImmutableRandom(8)
-
- x, err := b.Uint8()
- if err != nil {
- t.Error("unexpected error")
- }
- if !bytes.Equal(b.buffer, x) {
- t.Error("conversion failed")
- }
-
- if &b.buffer[0] != &x[0] {
- t.Error("conversion points incorrectly")
- }
- if len(x) != 8 || cap(x) != 8 {
- t.Error("unexpected length or capacity")
- }
-
- b.Destroy()
-
- if _, err := b.Uint8(); err != ErrDestroyed {
- t.Error("expected ErrDestroyed")
- }
-}
-
-func TestUint16(t *testing.T) {
- b, _ := NewImmutable(8)
- c, _ := NewImmutable(9)
-
- x, err := b.Uint16()
- if err != nil {
- t.Error("unexpected error")
- }
- _, err = c.Uint16()
- if err != ErrInvalidConversion {
- t.Error("expected ErrInvalidConversion")
- }
-
- if unsafe.Pointer(&b.buffer[0]) != unsafe.Pointer(&x[0]) {
- t.Error("conversion points incorrectly")
- }
- if len(x) != 4 || cap(x) != 4 {
- t.Error("unexpected length or capacity")
- }
-
- b.Destroy()
- c.Destroy()
-
- if _, err := b.Uint16(); err != ErrDestroyed {
- t.Error("expected ErrDestroyed")
- }
-}
-
-func TestUint32(t *testing.T) {
- b, _ := NewImmutable(8)
- c, _ := NewImmutable(9)
-
- x, err := b.Uint32()
- if err != nil {
- t.Error("unexpected error")
- }
- _, err = c.Uint32()
- if err != ErrInvalidConversion {
- t.Error("expected ErrInvalidConversion")
- }
-
- if unsafe.Pointer(&b.buffer[0]) != unsafe.Pointer(&x[0]) {
- t.Error("conversion points incorrectly")
- }
- if len(x) != 2 || cap(x) != 2 {
- t.Error("unexpected length or capacity")
- }
-
- b.Destroy()
- c.Destroy()
-
- if _, err := b.Uint32(); err != ErrDestroyed {
- t.Error("expected ErrDestroyed")
- }
-}
-
-func TestUint64(t *testing.T) {
- b, _ := NewImmutable(8)
- c, _ := NewImmutable(9)
-
- x, err := b.Uint64()
- if err != nil {
- t.Error("unexpected error")
- }
- _, err = c.Uint64()
- if err != ErrInvalidConversion {
- t.Error("expected ErrInvalidConversion")
- }
-
- if unsafe.Pointer(&b.buffer[0]) != unsafe.Pointer(&x[0]) {
- t.Error("conversion points incorrectly")
- }
- if len(x) != 1 || cap(x) != 1 {
- t.Error("unexpected length or capacity")
- }
-
- b.Destroy()
- c.Destroy()
-
- if _, err := b.Uint64(); err != ErrDestroyed {
- t.Error("expected ErrDestroyed")
- }
-}
-
-func TestInt8(t *testing.T) {
- b, _ := NewImmutable(8)
- c, _ := NewImmutable(9)
-
- x, err := b.Int8()
- if err != nil {
- t.Error("unexpected error")
- }
-
- if unsafe.Pointer(&b.buffer[0]) != unsafe.Pointer(&x[0]) {
- t.Error("conversion points incorrectly")
- }
- if len(x) != 8 || cap(x) != 8 {
- t.Error("unexpected length or capacity")
- }
-
- b.Destroy()
- c.Destroy()
-
- if _, err := b.Int8(); err != ErrDestroyed {
- t.Error("expected ErrDestroyed")
- }
-}
-
-func TestInt16(t *testing.T) {
- b, _ := NewImmutable(8)
- c, _ := NewImmutable(9)
-
- x, err := b.Int16()
- if err != nil {
- t.Error("unexpected error")
- }
- _, err = c.Int16()
- if err != ErrInvalidConversion {
- t.Error("expected ErrInvalidConversion")
- }
-
- if unsafe.Pointer(&b.buffer[0]) != unsafe.Pointer(&x[0]) {
- t.Error("conversion points incorrectly")
- }
- if len(x) != 4 || cap(x) != 4 {
- t.Error("unexpected length or capacity")
- }
-
- b.Destroy()
- c.Destroy()
-
- if _, err := b.Int16(); err != ErrDestroyed {
- t.Error("expected ErrDestroyed")
- }
-}
-
-func TestInt32(t *testing.T) {
- b, _ := NewImmutable(8)
- c, _ := NewImmutable(9)
-
- x, err := b.Int32()
- if err != nil {
- t.Error("unexpected error")
- }
- _, err = c.Int32()
- if err != ErrInvalidConversion {
- t.Error("expected ErrInvalidConversion")
- }
-
- if unsafe.Pointer(&b.buffer[0]) != unsafe.Pointer(&x[0]) {
- t.Error("conversion points incorrectly")
- }
- if len(x) != 2 || cap(x) != 2 {
- t.Error("unexpected length or capacity")
- }
-
- b.Destroy()
- c.Destroy()
-
- if _, err := b.Int32(); err != ErrDestroyed {
- t.Error("expected ErrDestroyed")
- }
-}
-
-func TestInt64(t *testing.T) {
- b, _ := NewImmutable(8)
- c, _ := NewImmutable(9)
-
- x, err := b.Int64()
- if err != nil {
- t.Error("unexpected error")
- }
- _, err = c.Int64()
- if err != ErrInvalidConversion {
- t.Error("expected ErrInvalidConversion")
- }
-
- if unsafe.Pointer(&b.buffer[0]) != unsafe.Pointer(&x[0]) {
- t.Error("conversion points incorrectly")
- }
- if len(x) != 1 || cap(x) != 1 {
- t.Error("unexpected length or capacity")
- }
-
- b.Destroy()
- c.Destroy()
-
- if _, err := b.Int64(); err != ErrDestroyed {
- t.Error("expected ErrDestroyed")
- }
-}
-
-func TestGetMetadata(t *testing.T) {
- b, _ := NewMutable(8)
-
- if b.IsMutable() != true {
- t.Error("incorrect value")
- }
- if b.IsDestroyed() != false {
- t.Error("incorrect value")
- }
-
- b.MakeImmutable()
- if b.IsMutable() != false {
- t.Error("incorrect value")
- }
-
- b.Destroy()
- if b.IsDestroyed() != true {
- t.Error("incorrect value")
- }
-}
-
-func TestEqualTo(t *testing.T) {
- a, _ := NewImmutableFromBytes([]byte("test"))
-
- equal, err := a.EqualBytes([]byte("test"))
- if err != nil {
- t.Error("unexpected error")
- }
-
- if !equal {
- t.Error("should be equal")
- }
-
- equal, err = a.EqualBytes([]byte("toast"))
- if err != nil {
- t.Error("unexpected error")
- }
-
- if equal {
- t.Error("should not be equal")
- }
-
- a.Destroy()
-
- if equal, err := a.EqualBytes([]byte("test")); equal || err != ErrDestroyed {
- t.Error("unexpected return values with destroyed LockedBuffer")
- }
-}
-
-func TestReadOnly(t *testing.T) {
- b, _ := NewMutable(8)
-
- if err := b.MakeImmutable(); err != nil {
- t.Error("unexpected error")
- }
- if b.IsMutable() {
- t.Error("unexpected state")
- }
- if err := b.MakeMutable(); err != nil {
- t.Error("unexpected error")
- }
- if !b.IsMutable() {
- t.Error("unexpected state")
- }
-
- b.Destroy()
-
- if err := b.MakeImmutable(); err != ErrDestroyed {
- t.Error("expected ErrDestroyed")
- }
-
- if err := b.MakeMutable(); err != ErrDestroyed {
- t.Error("expected ErrDestroyed")
- }
-}
-
-func TestMove(t *testing.T) {
- // When buf is larger than LockedBuffer.
- b, _ := NewMutable(16)
- buf := []byte("this is a very large buffer")
- b.Move(buf)
- if !bytes.Equal(buf, make([]byte, len(buf))) {
- t.Error("expected buf to be nil")
- }
- if !bytes.Equal(b.Buffer(), []byte("this is a very l")) {
- t.Error("bytes were't copied properly")
- }
- b.Destroy()
-
- // When buf is smaller than LockedBuffer.
- b, _ = NewMutable(16)
- buf = []byte("diz small buf")
- b.Move(buf)
- if !bytes.Equal(buf, make([]byte, len(buf))) {
- t.Error("expected buf to be nil")
- }
- if !bytes.Equal(b.Buffer()[:len(buf)], []byte("diz small buf")) {
- t.Error("bytes weren't copied properly")
- }
- if !bytes.Equal(b.Buffer()[len(buf):], make([]byte, 16-len(buf))) {
- t.Error("bytes were't copied properly;", b.Buffer()[len(buf):])
- }
- b.Destroy()
-
- // When buf is equal in size to LockedBuffer.
- b, _ = NewMutable(16)
- buf = []byte("yellow submarine")
- b.Move(buf)
- if !bytes.Equal(buf, make([]byte, len(buf))) {
- t.Error("expected buf to be nil")
- }
- if !bytes.Equal(b.Buffer(), []byte("yellow submarine")) {
- t.Error("bytes were't copied properly")
- }
-
- b.MakeImmutable()
-
- err := b.Move([]byte("test"))
- if err != ErrImmutable {
- t.Error("expected ErrImmutable")
- }
-
- b.Destroy()
-
- if err := b.Move([]byte("test")); err != ErrDestroyed {
- t.Error("expected ErrDestroyed")
- }
-}
-
-func TestFillRandomBytes(t *testing.T) {
- a, _ := NewMutable(32)
- a.FillRandomBytes()
-
- if bytes.Equal(a.Buffer(), make([]byte, 32)) {
- t.Error("not random")
- }
-
- a.Wipe()
- a.FillRandomBytesAt(16, 16)
-
- if !bytes.Equal(a.Buffer()[:16], make([]byte, 16)) || bytes.Equal(a.Buffer()[16:], make([]byte, 16)) {
- t.Error("incorrect offset/size;", a.Buffer()[:16], a.Buffer()[16:])
- }
-
- a.MakeImmutable()
- if err := a.FillRandomBytes(); err != ErrImmutable {
- t.Error("expected ErrImmutable")
- }
-
- a.Destroy()
- if err := a.FillRandomBytes(); err != ErrDestroyed {
- t.Error("expected ErrDestroyed")
- }
-}
-
-func TestDestroyAll(t *testing.T) {
- b, _ := NewMutable(16)
- c, _ := NewMutable(16)
-
- b.Copy([]byte("yellow submarine"))
- c.Copy([]byte("yellow submarine"))
-
- DestroyAll()
-
- if b.Buffer() != nil || c.Buffer() != nil {
- t.Error("expected buffers to be nil")
- }
-
- if b.IsMutable() || c.IsMutable() {
- t.Error("expected permissions to be immutable")
- }
-
- if !b.IsDestroyed() || !c.IsDestroyed() {
- t.Error("expected it to be destroyed")
- }
-}
-
-func TestSize(t *testing.T) {
- b, _ := NewMutable(16)
-
- if b.Size() != 16 {
- t.Error("unexpected size")
- }
-
- b.Destroy()
-
- if b.Size() != 0 {
- t.Error("unexpected size")
- }
-}
-
-func TestWipe(t *testing.T) {
- b, _ := NewMutableFromBytes([]byte("yellow submarine"))
-
- if err := b.Wipe(); err != nil {
- t.Error("failed to wipe:", err)
- }
-
- if !bytes.Equal(b.Buffer(), make([]byte, 16)) {
- t.Error("bytes not wiped; b =", b.Buffer())
- }
-
- b.FillRandomBytes()
- b.MakeImmutable()
-
- if err := b.Wipe(); err != ErrImmutable {
- t.Error("expected ErrImmutable")
- }
-
- if bytes.Equal(b.Buffer(), make([]byte, 16)) {
- t.Error("bytes wiped")
- }
-
- b.MakeMutable()
- b.FillRandomBytes()
- b.Destroy()
-
- if err := b.Wipe(); err != ErrDestroyed {
- t.Error("expected ErrDestroyed")
- }
-}
-
-func TestConcatenate(t *testing.T) {
- a, _ := NewImmutableFromBytes([]byte("xxxx"))
- b, _ := NewMutableFromBytes([]byte("yyyy"))
-
- c, err := Concatenate(a, b)
- if err != nil {
- t.Error("unexpected error")
- }
-
- if !bytes.Equal(c.Buffer(), []byte("xxxxyyyy")) {
- t.Error("unexpected output;", c.Buffer())
- }
- if c.IsMutable() {
- t.Error("expected immutability")
- }
-
- a.Destroy()
- b.Destroy()
- c.Destroy()
-
- if _, err := Concatenate(a, b); err != ErrDestroyed {
- t.Error("expected ErrDestroyed")
- }
-}
-
-func TestDuplicate(t *testing.T) {
- b, _ := NewImmutableFromBytes([]byte("test"))
-
- c, err := Duplicate(b)
- if err != nil {
- t.Error("unexpected error")
- }
- if !bytes.Equal(b.Buffer(), c.Buffer()) {
- t.Error("duplicated buffer has different contents")
- }
- if c.IsMutable() {
- t.Error("permissions not copied")
- }
- b.Destroy()
- c.Destroy()
-
- if _, err := Duplicate(b); err != ErrDestroyed {
- t.Error("expected ErrDestroyed")
- }
-}
-
-func TestEqual(t *testing.T) {
- b, _ := NewMutable(16)
- c, _ := NewMutable(16)
-
- equal, err := Equal(b, c)
- if err != nil {
- t.Error("unexpected error")
- }
- if !equal {
- t.Error("should be equal")
- }
-
- a, _ := NewMutable(8)
- equal, err = Equal(a, b)
- if err != nil {
- t.Error("unexpected error")
- }
- if equal {
- t.Error("should not be equal")
- }
-
- a.Destroy()
- b.Destroy()
- c.Destroy()
-
- if _, err := Equal(a, b); err != ErrDestroyed {
- t.Error("expected ErrDestroyed")
- }
-}
-
-func TestSplit(t *testing.T) {
- a, _ := NewImmutableFromBytes([]byte("xxxxyyyy"))
-
- b, c, err := Split(a, 4)
- if err != nil {
- t.Error("unexpected error")
- }
- if !bytes.Equal(b.Buffer(), []byte("xxxx")) {
- t.Error("first buffer has unexpected value")
- }
- if !bytes.Equal(c.Buffer(), []byte("yyyy")) {
- t.Error("second buffer has unexpected value")
- }
- if b.IsMutable() || c.IsMutable() {
- t.Error("permissions not preserved")
- }
- if !bytes.Equal(a.Buffer(), []byte("xxxxyyyy")) {
- t.Error("original is not preserved")
- }
-
- b.Destroy()
- c.Destroy()
-
- if _, _, err := Split(a, 0); err != ErrInvalidLength {
- t.Error("expected ErrInvalidLength")
- }
- if _, _, err := Split(a, 8); err != ErrInvalidLength {
- t.Error("expected ErrInvalidLength")
- }
-
- a.Destroy()
-
- if _, _, err := Split(a, 4); err != ErrDestroyed {
- t.Error("expected ErrDestroyed")
- }
-}
-
-func TestTrim(t *testing.T) {
- b, _ := NewImmutableFromBytes([]byte("xxxxyyyy"))
-
- c, err := Trim(b, 2, 4)
- if err != nil {
- t.Error("unexpected error")
- }
-
- if !bytes.Equal(c.Buffer(), []byte("xxyy")) {
- t.Error("unexpected value:", c.Buffer())
- }
-
- if c.IsMutable() {
- t.Error("unexpected state")
- }
- c.Destroy()
-
- if _, err := Trim(b, 4, 0); err != ErrInvalidLength {
- t.Error("expected ErrInvalidLength")
- }
-
- b.Destroy()
-
- if _, err := Trim(b, 2, 4); err != ErrDestroyed {
- t.Error("expected ErrDestroyed")
- }
-}
-
-func TestWipeBytes(t *testing.T) {
- // Create random byte slice.
- b := make([]byte, 32)
- fillRandBytes(b)
-
- // Wipe it.
- WipeBytes(b)
-
- // Check.
- if !bytes.Equal(b, make([]byte, 32)) {
- t.Error("unsuccessful wipe")
- }
-
- // Try with empty list.
- ebuf := make([]byte, 0)
- WipeBytes(ebuf)
- if len(ebuf) != 0 || cap(ebuf) != 0 {
- t.Error("changes made to zero-sized slice")
- }
-}
-
-func TestCatchInterrupt(t *testing.T) {
- CatchInterrupt(func() {})
-
- var i int
- for x := 0; x < 1024; x++ {
- catchInterruptOnce.Do(func() {
- i++
- })
- }
- if i != 0 {
- t.Error("sync.Once failed")
- }
-}
-
-func TestConcurrent(t *testing.T) {
- var wg sync.WaitGroup
-
- b, _ := NewMutable(16)
- for i := 0; i < 1024; i++ {
- wg.Add(1)
- go func() {
- CatchInterrupt(func() {
- return
- })
-
- b.MakeImmutable()
- b.MakeMutable()
-
- b.Move([]byte("Test"))
- b.Copy([]byte("test"))
-
- b.FillRandomBytes()
-
- b.Wipe()
-
- wg.Done()
- }()
- }
-
- wg.Wait()
- b.Destroy()
-}
-
-func TestDisableUnixCoreDumps(t *testing.T) {
- DisableUnixCoreDumps()
-}
-
-func TestRoundPage(t *testing.T) {
- if roundToPageSize(pageSize) != pageSize {
- t.Error("incorrect rounding;", roundToPageSize(pageSize))
- }
-
- if roundToPageSize(pageSize+1) != 2*pageSize {
- t.Error("incorrect rounding;", roundToPageSize(pageSize+1))
- }
-}
-
-func TestGetBytes(t *testing.T) {
- b := []byte("yellow submarine")
-
- ptr := unsafe.Pointer(&b[0])
- length := len(b)
- bBytes := getBytes(uintptr(ptr), length)
-
- copy(bBytes, []byte("fellow submarine"))
-
- if !bytes.Equal(b, bBytes) {
- t.Error("pointer does not describe actual memory")
- }
-}
-
-func TestFinalizer(t *testing.T) {
- b, err := NewMutable(8)
- if err != nil {
- t.Error("unexpected error")
- }
- ib := b.container
-
- c, err := NewImmutable(8)
- if err != nil {
- t.Error("unexpected error")
- }
- ic := c.container
-
- if ib.IsDestroyed() != false {
- t.Error("expected b to not be destroyed")
- }
- if ic.IsDestroyed() != false {
- t.Error("expected c to not be destroyed")
- }
-
- runtime.KeepAlive(b)
- // b is now unreachable
-
- runtime.GC() // should collect b
- for ib.IsDestroyed() != true {
- runtime.Gosched()
- }
-
- if ic.IsDestroyed() != false {
- t.Error("expected c to not be destroyed")
- }
-
- runtime.KeepAlive(c)
- // c is now unreachable
-
- runtime.GC() // should collect c
- for ic.IsDestroyed() != true {
- runtime.Gosched()
- }
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/.gitattributes b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/.gitattributes
deleted file mode 100644
index d2f212e..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/.gitattributes
+++ /dev/null
@@ -1,10 +0,0 @@
-# Treat all files in this repo as binary, with no git magic updating
-# line endings. Windows users contributing to Go will need to use a
-# modern version of git and editors capable of LF line endings.
-#
-# We'll prevent accidental CRLF line endings from entering the repo
-# via the git-review gofmt checks.
-#
-# See golang.org/issue/9281
-
-* -text
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/.gitignore b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/.gitignore
deleted file mode 100644
index 8339fd6..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-# Add no patterns to .hgignore except for files generated by the build.
-last-change
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/AUTHORS b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/AUTHORS
deleted file mode 100644
index 15167cd..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/AUTHORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/CONTRIBUTING.md b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/CONTRIBUTING.md
deleted file mode 100644
index 88dff59..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/CONTRIBUTING.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Contributing to Go
-
-Go is an open source project.
-
-It is the work of hundreds of contributors. We appreciate your help!
-
-
-## Filing issues
-
-When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:
-
-1. What version of Go are you using (`go version`)?
-2. What operating system and processor architecture are you using?
-3. What did you do?
-4. What did you expect to see?
-5. What did you see instead?
-
-General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
-The gophers there will answer or ask you to file an issue if you've tripped over a bug.
-
-## Contributing code
-
-Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
-before sending patches.
-
-**We do not accept GitHub pull requests**
-(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review).
-
-Unless otherwise noted, the Go source files are distributed under
-the BSD-style license found in the LICENSE file.
-
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/CONTRIBUTORS b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/CONTRIBUTORS
deleted file mode 100644
index 1c4577e..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/CONTRIBUTORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/LICENSE b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/LICENSE
deleted file mode 100644
index 6a66aea..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2009 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/PATENTS b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/PATENTS
deleted file mode 100644
index 7330990..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/PATENTS
+++ /dev/null
@@ -1,22 +0,0 @@
-Additional IP Rights Grant (Patents)
-
-"This implementation" means the copyrightable works distributed by
-Google as part of the Go project.
-
-Google hereby grants to You a perpetual, worldwide, non-exclusive,
-no-charge, royalty-free, irrevocable (except as stated in this section)
-patent license to make, have made, use, offer to sell, sell, import,
-transfer and otherwise run, modify and propagate the contents of this
-implementation of Go, where such license applies only to those patent
-claims, both currently owned or controlled by Google and acquired in
-the future, licensable by Google that are necessarily infringed by this
-implementation of Go. This grant does not include claims that would be
-infringed only as a consequence of further modification of this
-implementation. If you or your agent or exclusive licensee institute or
-order or agree to the institution of patent litigation against any
-entity (including a cross-claim or counterclaim in a lawsuit) alleging
-that this implementation of Go or any code incorporated within this
-implementation of Go constitutes direct or contributory patent
-infringement, or inducement of patent infringement, then any patent
-rights granted to you under this License for this implementation of Go
-shall terminate as of the date such litigation is filed.
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/README.md b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/README.md
deleted file mode 100644
index ef6c9e5..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# sys
-
-This repository holds supplemental Go packages for low-level interactions with
-the operating system.
-
-## Download/Install
-
-The easiest way to install is to run `go get -u golang.org/x/sys`. You can
-also manually git clone the repository to `$GOPATH/src/golang.org/x/sys`.
-
-## Report Issues / Send Patches
-
-This repository uses Gerrit for code changes. To learn how to submit changes to
-this repository, see https://golang.org/doc/contribute.html.
-
-The main issue tracker for the sys repository is located at
-https://github.com/golang/go/issues. Prefix your issue with "x/sys:" in the
-subject line, so it is easy to find.
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/codereview.cfg b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/codereview.cfg
deleted file mode 100644
index 3f8b14b..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/codereview.cfg
+++ /dev/null
@@ -1 +0,0 @@
-issuerepo: golang/go
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/asm.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/asm.s
deleted file mode 100644
index 06449eb..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/asm.s
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-TEXT ·use(SB),NOSPLIT,$0
- RET
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/asm_plan9_386.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/asm_plan9_386.s
deleted file mode 100644
index bc5cab1..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/asm_plan9_386.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-//
-// System call support for 386, Plan 9
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-32
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-44
- JMP syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
-
-TEXT ·seek(SB),NOSPLIT,$0-36
- JMP syscall·seek(SB)
-
-TEXT ·exit(SB),NOSPLIT,$4-4
- JMP syscall·exit(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s
deleted file mode 100644
index d3448e6..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-//
-// System call support for amd64, Plan 9
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-64
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-88
- JMP syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
-
-TEXT ·seek(SB),NOSPLIT,$0-56
- JMP syscall·seek(SB)
-
-TEXT ·exit(SB),NOSPLIT,$8-8
- JMP syscall·exit(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/asm_plan9_arm.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/asm_plan9_arm.s
deleted file mode 100644
index afb7c0a..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/asm_plan9_arm.s
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-// System call support for plan9 on arm
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-32
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-44
- JMP syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
-
-TEXT ·seek(SB),NOSPLIT,$0-36
- JMP syscall·exit(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/const_plan9.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/const_plan9.go
deleted file mode 100644
index b4e85a3..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/const_plan9.go
+++ /dev/null
@@ -1,70 +0,0 @@
-package plan9
-
-// Plan 9 Constants
-
-// Open modes
-const (
- O_RDONLY = 0
- O_WRONLY = 1
- O_RDWR = 2
- O_TRUNC = 16
- O_CLOEXEC = 32
- O_EXCL = 0x1000
-)
-
-// Rfork flags
-const (
- RFNAMEG = 1 << 0
- RFENVG = 1 << 1
- RFFDG = 1 << 2
- RFNOTEG = 1 << 3
- RFPROC = 1 << 4
- RFMEM = 1 << 5
- RFNOWAIT = 1 << 6
- RFCNAMEG = 1 << 10
- RFCENVG = 1 << 11
- RFCFDG = 1 << 12
- RFREND = 1 << 13
- RFNOMNT = 1 << 14
-)
-
-// Qid.Type bits
-const (
- QTDIR = 0x80
- QTAPPEND = 0x40
- QTEXCL = 0x20
- QTMOUNT = 0x10
- QTAUTH = 0x08
- QTTMP = 0x04
- QTFILE = 0x00
-)
-
-// Dir.Mode bits
-const (
- DMDIR = 0x80000000
- DMAPPEND = 0x40000000
- DMEXCL = 0x20000000
- DMMOUNT = 0x10000000
- DMAUTH = 0x08000000
- DMTMP = 0x04000000
- DMREAD = 0x4
- DMWRITE = 0x2
- DMEXEC = 0x1
-)
-
-const (
- STATMAX = 65535
- ERRMAX = 128
- STATFIXLEN = 49
-)
-
-// Mount and bind flags
-const (
- MREPL = 0x0000
- MBEFORE = 0x0001
- MAFTER = 0x0002
- MORDER = 0x0003
- MCREATE = 0x0004
- MCACHE = 0x0010
- MMASK = 0x0017
-)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/dir_plan9.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/dir_plan9.go
deleted file mode 100644
index 0955e0c..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/dir_plan9.go
+++ /dev/null
@@ -1,212 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Plan 9 directory marshalling. See intro(5).
-
-package plan9
-
-import "errors"
-
-var (
- ErrShortStat = errors.New("stat buffer too short")
- ErrBadStat = errors.New("malformed stat buffer")
- ErrBadName = errors.New("bad character in file name")
-)
-
-// A Qid represents a 9P server's unique identification for a file.
-type Qid struct {
- Path uint64 // the file server's unique identification for the file
- Vers uint32 // version number for given Path
- Type uint8 // the type of the file (plan9.QTDIR for example)
-}
-
-// A Dir contains the metadata for a file.
-type Dir struct {
- // system-modified data
- Type uint16 // server type
- Dev uint32 // server subtype
-
- // file data
- Qid Qid // unique id from server
- Mode uint32 // permissions
- Atime uint32 // last read time
- Mtime uint32 // last write time
- Length int64 // file length
- Name string // last element of path
- Uid string // owner name
- Gid string // group name
- Muid string // last modifier name
-}
-
-var nullDir = Dir{
- Type: ^uint16(0),
- Dev: ^uint32(0),
- Qid: Qid{
- Path: ^uint64(0),
- Vers: ^uint32(0),
- Type: ^uint8(0),
- },
- Mode: ^uint32(0),
- Atime: ^uint32(0),
- Mtime: ^uint32(0),
- Length: ^int64(0),
-}
-
-// Null assigns special "don't touch" values to members of d to
-// avoid modifying them during plan9.Wstat.
-func (d *Dir) Null() { *d = nullDir }
-
-// Marshal encodes a 9P stat message corresponding to d into b
-//
-// If there isn't enough space in b for a stat message, ErrShortStat is returned.
-func (d *Dir) Marshal(b []byte) (n int, err error) {
- n = STATFIXLEN + len(d.Name) + len(d.Uid) + len(d.Gid) + len(d.Muid)
- if n > len(b) {
- return n, ErrShortStat
- }
-
- for _, c := range d.Name {
- if c == '/' {
- return n, ErrBadName
- }
- }
-
- b = pbit16(b, uint16(n)-2)
- b = pbit16(b, d.Type)
- b = pbit32(b, d.Dev)
- b = pbit8(b, d.Qid.Type)
- b = pbit32(b, d.Qid.Vers)
- b = pbit64(b, d.Qid.Path)
- b = pbit32(b, d.Mode)
- b = pbit32(b, d.Atime)
- b = pbit32(b, d.Mtime)
- b = pbit64(b, uint64(d.Length))
- b = pstring(b, d.Name)
- b = pstring(b, d.Uid)
- b = pstring(b, d.Gid)
- b = pstring(b, d.Muid)
-
- return n, nil
-}
-
-// UnmarshalDir decodes a single 9P stat message from b and returns the resulting Dir.
-//
-// If b is too small to hold a valid stat message, ErrShortStat is returned.
-//
-// If the stat message itself is invalid, ErrBadStat is returned.
-func UnmarshalDir(b []byte) (*Dir, error) {
- if len(b) < STATFIXLEN {
- return nil, ErrShortStat
- }
- size, buf := gbit16(b)
- if len(b) != int(size)+2 {
- return nil, ErrBadStat
- }
- b = buf
-
- var d Dir
- d.Type, b = gbit16(b)
- d.Dev, b = gbit32(b)
- d.Qid.Type, b = gbit8(b)
- d.Qid.Vers, b = gbit32(b)
- d.Qid.Path, b = gbit64(b)
- d.Mode, b = gbit32(b)
- d.Atime, b = gbit32(b)
- d.Mtime, b = gbit32(b)
-
- n, b := gbit64(b)
- d.Length = int64(n)
-
- var ok bool
- if d.Name, b, ok = gstring(b); !ok {
- return nil, ErrBadStat
- }
- if d.Uid, b, ok = gstring(b); !ok {
- return nil, ErrBadStat
- }
- if d.Gid, b, ok = gstring(b); !ok {
- return nil, ErrBadStat
- }
- if d.Muid, b, ok = gstring(b); !ok {
- return nil, ErrBadStat
- }
-
- return &d, nil
-}
-
-// pbit8 copies the 8-bit number v to b and returns the remaining slice of b.
-func pbit8(b []byte, v uint8) []byte {
- b[0] = byte(v)
- return b[1:]
-}
-
-// pbit16 copies the 16-bit number v to b in little-endian order and returns the remaining slice of b.
-func pbit16(b []byte, v uint16) []byte {
- b[0] = byte(v)
- b[1] = byte(v >> 8)
- return b[2:]
-}
-
-// pbit32 copies the 32-bit number v to b in little-endian order and returns the remaining slice of b.
-func pbit32(b []byte, v uint32) []byte {
- b[0] = byte(v)
- b[1] = byte(v >> 8)
- b[2] = byte(v >> 16)
- b[3] = byte(v >> 24)
- return b[4:]
-}
-
-// pbit64 copies the 64-bit number v to b in little-endian order and returns the remaining slice of b.
-func pbit64(b []byte, v uint64) []byte {
- b[0] = byte(v)
- b[1] = byte(v >> 8)
- b[2] = byte(v >> 16)
- b[3] = byte(v >> 24)
- b[4] = byte(v >> 32)
- b[5] = byte(v >> 40)
- b[6] = byte(v >> 48)
- b[7] = byte(v >> 56)
- return b[8:]
-}
-
-// pstring copies the string s to b, prepending it with a 16-bit length in little-endian order, and
-// returning the remaining slice of b..
-func pstring(b []byte, s string) []byte {
- b = pbit16(b, uint16(len(s)))
- n := copy(b, s)
- return b[n:]
-}
-
-// gbit8 reads an 8-bit number from b and returns it with the remaining slice of b.
-func gbit8(b []byte) (uint8, []byte) {
- return uint8(b[0]), b[1:]
-}
-
-// gbit16 reads a 16-bit number in little-endian order from b and returns it with the remaining slice of b.
-func gbit16(b []byte) (uint16, []byte) {
- return uint16(b[0]) | uint16(b[1])<<8, b[2:]
-}
-
-// gbit32 reads a 32-bit number in little-endian order from b and returns it with the remaining slice of b.
-func gbit32(b []byte) (uint32, []byte) {
- return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24, b[4:]
-}
-
-// gbit64 reads a 64-bit number in little-endian order from b and returns it with the remaining slice of b.
-func gbit64(b []byte) (uint64, []byte) {
- lo := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
- hi := uint32(b[4]) | uint32(b[5])<<8 | uint32(b[6])<<16 | uint32(b[7])<<24
- return uint64(lo) | uint64(hi)<<32, b[8:]
-}
-
-// gstring reads a string from b, prefixed with a 16-bit length in little-endian order.
-// It returns the string with the remaining slice of b and a boolean. If the length is
-// greater than the number of bytes in b, the boolean will be false.
-func gstring(b []byte) (string, []byte, bool) {
- n, b := gbit16(b)
- if int(n) > len(b) {
- return "", b, false
- }
- return string(b[:n]), b[n:], true
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/env_plan9.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/env_plan9.go
deleted file mode 100644
index 8f19180..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/env_plan9.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Plan 9 environment variables.
-
-package plan9
-
-import (
- "syscall"
-)
-
-func Getenv(key string) (value string, found bool) {
- return syscall.Getenv(key)
-}
-
-func Setenv(key, value string) error {
- return syscall.Setenv(key, value)
-}
-
-func Clearenv() {
- syscall.Clearenv()
-}
-
-func Environ() []string {
- return syscall.Environ()
-}
-
-func Unsetenv(key string) error {
- return syscall.Unsetenv(key)
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/errors_plan9.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/errors_plan9.go
deleted file mode 100644
index 65fe74d..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/errors_plan9.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package plan9
-
-import "syscall"
-
-// Constants
-const (
- // Invented values to support what package os expects.
- O_CREAT = 0x02000
- O_APPEND = 0x00400
- O_NOCTTY = 0x00000
- O_NONBLOCK = 0x00000
- O_SYNC = 0x00000
- O_ASYNC = 0x00000
-
- S_IFMT = 0x1f000
- S_IFIFO = 0x1000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFBLK = 0x6000
- S_IFREG = 0x8000
- S_IFLNK = 0xa000
- S_IFSOCK = 0xc000
-)
-
-// Errors
-var (
- EINVAL = syscall.NewError("bad arg in system call")
- ENOTDIR = syscall.NewError("not a directory")
- EISDIR = syscall.NewError("file is a directory")
- ENOENT = syscall.NewError("file does not exist")
- EEXIST = syscall.NewError("file already exists")
- EMFILE = syscall.NewError("no free file descriptors")
- EIO = syscall.NewError("i/o error")
- ENAMETOOLONG = syscall.NewError("file name too long")
- EINTR = syscall.NewError("interrupted")
- EPERM = syscall.NewError("permission denied")
- EBUSY = syscall.NewError("no free devices")
- ETIMEDOUT = syscall.NewError("connection timed out")
- EPLAN9 = syscall.NewError("not supported by plan 9")
-
- // The following errors do not correspond to any
- // Plan 9 system messages. Invented to support
- // what package os and others expect.
- EACCES = syscall.NewError("access permission denied")
- EAFNOSUPPORT = syscall.NewError("address family not supported by protocol")
-)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/mkall.sh b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/mkall.sh
deleted file mode 100755
index 9f73c60..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/mkall.sh
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# The plan9 package provides access to the raw system call
-# interface of the underlying operating system. Porting Go to
-# a new architecture/operating system combination requires
-# some manual effort, though there are tools that automate
-# much of the process. The auto-generated files have names
-# beginning with z.
-#
-# This script runs or (given -n) prints suggested commands to generate z files
-# for the current system. Running those commands is not automatic.
-# This script is documentation more than anything else.
-#
-# * asm_${GOOS}_${GOARCH}.s
-#
-# This hand-written assembly file implements system call dispatch.
-# There are three entry points:
-#
-# func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-# func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
-# func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-#
-# The first and second are the standard ones; they differ only in
-# how many arguments can be passed to the kernel.
-# The third is for low-level use by the ForkExec wrapper;
-# unlike the first two, it does not call into the scheduler to
-# let it know that a system call is running.
-#
-# * syscall_${GOOS}.go
-#
-# This hand-written Go file implements system calls that need
-# special handling and lists "//sys" comments giving prototypes
-# for ones that can be auto-generated. Mksyscall reads those
-# comments to generate the stubs.
-#
-# * syscall_${GOOS}_${GOARCH}.go
-#
-# Same as syscall_${GOOS}.go except that it contains code specific
-# to ${GOOS} on one particular architecture.
-#
-# * types_${GOOS}.c
-#
-# This hand-written C file includes standard C headers and then
-# creates typedef or enum names beginning with a dollar sign
-# (use of $ in variable names is a gcc extension). The hardest
-# part about preparing this file is figuring out which headers to
-# include and which symbols need to be #defined to get the
-# actual data structures that pass through to the kernel system calls.
-# Some C libraries present alternate versions for binary compatibility
-# and translate them on the way in and out of system calls, but
-# there is almost always a #define that can get the real ones.
-# See types_darwin.c and types_linux.c for examples.
-#
-# * zerror_${GOOS}_${GOARCH}.go
-#
-# This machine-generated file defines the system's error numbers,
-# error strings, and signal numbers. The generator is "mkerrors.sh".
-# Usually no arguments are needed, but mkerrors.sh will pass its
-# arguments on to godefs.
-#
-# * zsyscall_${GOOS}_${GOARCH}.go
-#
-# Generated by mksyscall.pl; see syscall_${GOOS}.go above.
-#
-# * zsysnum_${GOOS}_${GOARCH}.go
-#
-# Generated by mksysnum_${GOOS}.
-#
-# * ztypes_${GOOS}_${GOARCH}.go
-#
-# Generated by godefs; see types_${GOOS}.c above.
-
-GOOSARCH="${GOOS}_${GOARCH}"
-
-# defaults
-mksyscall="./mksyscall.pl"
-mkerrors="./mkerrors.sh"
-zerrors="zerrors_$GOOSARCH.go"
-mksysctl=""
-zsysctl="zsysctl_$GOOSARCH.go"
-mksysnum=
-mktypes=
-run="sh"
-
-case "$1" in
--syscalls)
- for i in zsyscall*go
- do
- sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i
- rm _$i
- done
- exit 0
- ;;
--n)
- run="cat"
- shift
-esac
-
-case "$#" in
-0)
- ;;
-*)
- echo 'usage: mkall.sh [-n]' 1>&2
- exit 2
-esac
-
-case "$GOOSARCH" in
-_* | *_ | _)
- echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2
- exit 1
- ;;
-plan9_386)
- mkerrors=
- mksyscall="./mksyscall.pl -l32 -plan9"
- mksysnum="./mksysnum_plan9.sh /n/sources/plan9/sys/src/libc/9syscall/sys.h"
- mktypes="XXX"
- ;;
-*)
- echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2
- exit 1
- ;;
-esac
-
-(
- if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi
- case "$GOOS" in
- plan9)
- syscall_goos="syscall_$GOOS.go"
- if [ -n "$mksyscall" ]; then echo "$mksyscall $syscall_goos syscall_$GOOSARCH.go |gofmt >zsyscall_$GOOSARCH.go"; fi
- ;;
- esac
- if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
- if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
- if [ -n "$mktypes" ]; then echo "$mktypes types_$GOOS.go |gofmt >ztypes_$GOOSARCH.go"; fi
-) | $run
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/mkerrors.sh b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/mkerrors.sh
deleted file mode 100755
index 052c86d..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/mkerrors.sh
+++ /dev/null
@@ -1,246 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# Generate Go code listing errors and other #defined constant
-# values (ENAMETOOLONG etc.), by asking the preprocessor
-# about the definitions.
-
-unset LANG
-export LC_ALL=C
-export LC_CTYPE=C
-
-CC=${CC:-gcc}
-
-uname=$(uname)
-
-includes='
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-'
-
-ccflags="$@"
-
-# Write go tool cgo -godefs input.
-(
- echo package plan9
- echo
- echo '/*'
- indirect="includes_$(uname)"
- echo "${!indirect} $includes"
- echo '*/'
- echo 'import "C"'
- echo
- echo 'const ('
-
- # The gcc command line prints all the #defines
- # it encounters while processing the input
- echo "${!indirect} $includes" | $CC -x c - -E -dM $ccflags |
- awk '
- $1 != "#define" || $2 ~ /\(/ || $3 == "" {next}
-
- $2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next} # 386 registers
- $2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next}
- $2 ~ /^(SCM_SRCRT)$/ {next}
- $2 ~ /^(MAP_FAILED)$/ {next}
-
- $2 !~ /^ETH_/ &&
- $2 !~ /^EPROC_/ &&
- $2 !~ /^EQUIV_/ &&
- $2 !~ /^EXPR_/ &&
- $2 ~ /^E[A-Z0-9_]+$/ ||
- $2 ~ /^B[0-9_]+$/ ||
- $2 ~ /^V[A-Z0-9]+$/ ||
- $2 ~ /^CS[A-Z0-9]/ ||
- $2 ~ /^I(SIG|CANON|CRNL|EXTEN|MAXBEL|STRIP|UTF8)$/ ||
- $2 ~ /^IGN/ ||
- $2 ~ /^IX(ON|ANY|OFF)$/ ||
- $2 ~ /^IN(LCR|PCK)$/ ||
- $2 ~ /(^FLU?SH)|(FLU?SH$)/ ||
- $2 ~ /^C(LOCAL|READ)$/ ||
- $2 == "BRKINT" ||
- $2 == "HUPCL" ||
- $2 == "PENDIN" ||
- $2 == "TOSTOP" ||
- $2 ~ /^PAR/ ||
- $2 ~ /^SIG[^_]/ ||
- $2 ~ /^O[CNPFP][A-Z]+[^_][A-Z]+$/ ||
- $2 ~ /^IN_/ ||
- $2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
- $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
- $2 == "ICMPV6_FILTER" ||
- $2 == "SOMAXCONN" ||
- $2 == "NAME_MAX" ||
- $2 == "IFNAMSIZ" ||
- $2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ ||
- $2 ~ /^SYSCTL_VERS/ ||
- $2 ~ /^(MS|MNT)_/ ||
- $2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
- $2 ~ /^(O|F|FD|NAME|S|PTRACE|PT)_/ ||
- $2 ~ /^LINUX_REBOOT_CMD_/ ||
- $2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
- $2 !~ "NLA_TYPE_MASK" &&
- $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ ||
- $2 ~ /^SIOC/ ||
- $2 ~ /^TIOC/ ||
- $2 !~ "RTF_BITS" &&
- $2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||
- $2 ~ /^BIOC/ ||
- $2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ ||
- $2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|NOFILE|STACK)|RLIM_INFINITY/ ||
- $2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||
- $2 ~ /^CLONE_[A-Z_]+/ ||
- $2 !~ /^(BPF_TIMEVAL)$/ &&
- $2 ~ /^(BPF|DLT)_/ ||
- $2 !~ "WMESGLEN" &&
- $2 ~ /^W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", $2, $2)}
- $2 ~ /^__WCOREFLAG$/ {next}
- $2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
-
- {next}
- ' | sort
-
- echo ')'
-) >_const.go
-
-# Pull out the error names for later.
-errors=$(
- echo '#include ' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print $2 }' |
- sort
-)
-
-# Pull out the signal names for later.
-signals=$(
- echo '#include ' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
- egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
- sort
-)
-
-# Again, writing regexps to a file.
-echo '#include ' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print "^\t" $2 "[ \t]*=" }' |
- sort >_error.grep
-echo '#include ' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
- egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
- sort >_signal.grep
-
-echo '// mkerrors.sh' "$@"
-echo '// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT'
-echo
-go tool cgo -godefs -- "$@" _const.go >_error.out
-cat _error.out | grep -vf _error.grep | grep -vf _signal.grep
-echo
-echo '// Errors'
-echo 'const ('
-cat _error.out | grep -f _error.grep | sed 's/=\(.*\)/= Errno(\1)/'
-echo ')'
-
-echo
-echo '// Signals'
-echo 'const ('
-cat _error.out | grep -f _signal.grep | sed 's/=\(.*\)/= Signal(\1)/'
-echo ')'
-
-# Run C program to print error and syscall strings.
-(
- echo -E "
-#include
-#include
-#include
-#include
-#include
-#include
-
-#define nelem(x) (sizeof(x)/sizeof((x)[0]))
-
-enum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below
-
-int errors[] = {
-"
- for i in $errors
- do
- echo -E ' '$i,
- done
-
- echo -E "
-};
-
-int signals[] = {
-"
- for i in $signals
- do
- echo -E ' '$i,
- done
-
- # Use -E because on some systems bash builtin interprets \n itself.
- echo -E '
-};
-
-static int
-intcmp(const void *a, const void *b)
-{
- return *(int*)a - *(int*)b;
-}
-
-int
-main(void)
-{
- int i, j, e;
- char buf[1024], *p;
-
- printf("\n\n// Error table\n");
- printf("var errors = [...]string {\n");
- qsort(errors, nelem(errors), sizeof errors[0], intcmp);
- for(i=0; i 0 && errors[i-1] == e)
- continue;
- strcpy(buf, strerror(e));
- // lowercase first letter: Bad -> bad, but STREAM -> STREAM.
- if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
- buf[0] += a - A;
- printf("\t%d: \"%s\",\n", e, buf);
- }
- printf("}\n\n");
-
- printf("\n\n// Signal table\n");
- printf("var signals = [...]string {\n");
- qsort(signals, nelem(signals), sizeof signals[0], intcmp);
- for(i=0; i 0 && signals[i-1] == e)
- continue;
- strcpy(buf, strsignal(e));
- // lowercase first letter: Bad -> bad, but STREAM -> STREAM.
- if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
- buf[0] += a - A;
- // cut trailing : number.
- p = strrchr(buf, ":"[0]);
- if(p)
- *p = '\0';
- printf("\t%d: \"%s\",\n", e, buf);
- }
- printf("}\n\n");
-
- return 0;
-}
-
-'
-) >_errors.c
-
-$CC $ccflags -o _errors _errors.c && $GORUN ./_errors && rm -f _errors.c _errors _const.go _error.grep _signal.grep _error.out
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/mksyscall.pl b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/mksyscall.pl
deleted file mode 100755
index ce8e1e4..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/mksyscall.pl
+++ /dev/null
@@ -1,319 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# This program reads a file containing function prototypes
-# (like syscall_plan9.go) and generates system call bodies.
-# The prototypes are marked by lines beginning with "//sys"
-# and read like func declarations if //sys is replaced by func, but:
-# * The parameter lists must give a name for each argument.
-# This includes return parameters.
-# * The parameter lists must give a type for each argument:
-# the (x, y, z int) shorthand is not allowed.
-# * If the return parameter is an error number, it must be named errno.
-
-# A line beginning with //sysnb is like //sys, except that the
-# goroutine will not be suspended during the execution of the system
-# call. This must only be used for system calls which can never
-# block, as otherwise the system call could cause all goroutines to
-# hang.
-
-use strict;
-
-my $cmdline = "mksyscall.pl " . join(' ', @ARGV);
-my $errors = 0;
-my $_32bit = "";
-my $plan9 = 0;
-my $openbsd = 0;
-my $netbsd = 0;
-my $dragonfly = 0;
-my $nacl = 0;
-my $arm = 0; # 64-bit value should use (even, odd)-pair
-
-if($ARGV[0] eq "-b32") {
- $_32bit = "big-endian";
- shift;
-} elsif($ARGV[0] eq "-l32") {
- $_32bit = "little-endian";
- shift;
-}
-if($ARGV[0] eq "-plan9") {
- $plan9 = 1;
- shift;
-}
-if($ARGV[0] eq "-openbsd") {
- $openbsd = 1;
- shift;
-}
-if($ARGV[0] eq "-netbsd") {
- $netbsd = 1;
- shift;
-}
-if($ARGV[0] eq "-dragonfly") {
- $dragonfly = 1;
- shift;
-}
-if($ARGV[0] eq "-nacl") {
- $nacl = 1;
- shift;
-}
-if($ARGV[0] eq "-arm") {
- $arm = 1;
- shift;
-}
-
-if($ARGV[0] =~ /^-/) {
- print STDERR "usage: mksyscall.pl [-b32 | -l32] [file ...]\n";
- exit 1;
-}
-
-sub parseparamlist($) {
- my ($list) = @_;
- $list =~ s/^\s*//;
- $list =~ s/\s*$//;
- if($list eq "") {
- return ();
- }
- return split(/\s*,\s*/, $list);
-}
-
-sub parseparam($) {
- my ($p) = @_;
- if($p !~ /^(\S*) (\S*)$/) {
- print STDERR "$ARGV:$.: malformed parameter: $p\n";
- $errors = 1;
- return ("xx", "int");
- }
- return ($1, $2);
-}
-
-my $text = "";
-while(<>) {
- chomp;
- s/\s+/ /g;
- s/^\s+//;
- s/\s+$//;
- my $nonblock = /^\/\/sysnb /;
- next if !/^\/\/sys / && !$nonblock;
-
- # Line must be of the form
- # func Open(path string, mode int, perm int) (fd int, errno error)
- # Split into name, in params, out params.
- if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$/) {
- print STDERR "$ARGV:$.: malformed //sys declaration\n";
- $errors = 1;
- next;
- }
- my ($func, $in, $out, $sysname) = ($2, $3, $4, $5);
-
- # Split argument lists on comma.
- my @in = parseparamlist($in);
- my @out = parseparamlist($out);
-
- # Try in vain to keep people from editing this file.
- # The theory is that they jump into the middle of the file
- # without reading the header.
- $text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
-
- # Go function header.
- my $out_decl = @out ? sprintf(" (%s)", join(', ', @out)) : "";
- $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out_decl;
-
- # Check if err return available
- my $errvar = "";
- foreach my $p (@out) {
- my ($name, $type) = parseparam($p);
- if($type eq "error") {
- $errvar = $name;
- last;
- }
- }
-
- # Prepare arguments to Syscall.
- my @args = ();
- my @uses = ();
- my $n = 0;
- foreach my $p (@in) {
- my ($name, $type) = parseparam($p);
- if($type =~ /^\*/) {
- push @args, "uintptr(unsafe.Pointer($name))";
- } elsif($type eq "string" && $errvar ne "") {
- $text .= "\tvar _p$n *byte\n";
- $text .= "\t_p$n, $errvar = BytePtrFromString($name)\n";
- $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))";
- push @uses, "use(unsafe.Pointer(_p$n))";
- $n++;
- } elsif($type eq "string") {
- print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
- $text .= "\tvar _p$n *byte\n";
- $text .= "\t_p$n, _ = BytePtrFromString($name)\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))";
- push @uses, "use(unsafe.Pointer(_p$n))";
- $n++;
- } elsif($type =~ /^\[\](.*)/) {
- # Convert slice into pointer, length.
- # Have to be careful not to take address of &a[0] if len == 0:
- # pass dummy pointer in that case.
- # Used to pass nil, but some OSes or simulators reject write(fd, nil, 0).
- $text .= "\tvar _p$n unsafe.Pointer\n";
- $text .= "\tif len($name) > 0 {\n\t\t_p$n = unsafe.Pointer(\&${name}[0])\n\t}";
- $text .= " else {\n\t\t_p$n = unsafe.Pointer(&_zero)\n\t}";
- $text .= "\n";
- push @args, "uintptr(_p$n)", "uintptr(len($name))";
- $n++;
- } elsif($type eq "int64" && ($openbsd || $netbsd)) {
- push @args, "0";
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name>>32)", "uintptr($name)";
- } elsif($_32bit eq "little-endian") {
- push @args, "uintptr($name)", "uintptr($name>>32)";
- } else {
- push @args, "uintptr($name)";
- }
- } elsif($type eq "int64" && $dragonfly) {
- if ($func !~ /^extp(read|write)/i) {
- push @args, "0";
- }
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name>>32)", "uintptr($name)";
- } elsif($_32bit eq "little-endian") {
- push @args, "uintptr($name)", "uintptr($name>>32)";
- } else {
- push @args, "uintptr($name)";
- }
- } elsif($type eq "int64" && $_32bit ne "") {
- if(@args % 2 && $arm) {
- # arm abi specifies 64-bit argument uses
- # (even, odd) pair
- push @args, "0"
- }
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name>>32)", "uintptr($name)";
- } else {
- push @args, "uintptr($name)", "uintptr($name>>32)";
- }
- } else {
- push @args, "uintptr($name)";
- }
- }
-
- # Determine which form to use; pad args with zeros.
- my $asm = "Syscall";
- if ($nonblock) {
- $asm = "RawSyscall";
- }
- if(@args <= 3) {
- while(@args < 3) {
- push @args, "0";
- }
- } elsif(@args <= 6) {
- $asm .= "6";
- while(@args < 6) {
- push @args, "0";
- }
- } elsif(@args <= 9) {
- $asm .= "9";
- while(@args < 9) {
- push @args, "0";
- }
- } else {
- print STDERR "$ARGV:$.: too many arguments to system call\n";
- }
-
- # System call number.
- if($sysname eq "") {
- $sysname = "SYS_$func";
- $sysname =~ s/([a-z])([A-Z])/${1}_$2/g; # turn FooBar into Foo_Bar
- $sysname =~ y/a-z/A-Z/;
- if($nacl) {
- $sysname =~ y/A-Z/a-z/;
- }
- }
-
- # Actual call.
- my $args = join(', ', @args);
- my $call = "$asm($sysname, $args)";
-
- # Assign return values.
- my $body = "";
- my @ret = ("_", "_", "_");
- my $do_errno = 0;
- for(my $i=0; $i<@out; $i++) {
- my $p = $out[$i];
- my ($name, $type) = parseparam($p);
- my $reg = "";
- if($name eq "err" && !$plan9) {
- $reg = "e1";
- $ret[2] = $reg;
- $do_errno = 1;
- } elsif($name eq "err" && $plan9) {
- $ret[0] = "r0";
- $ret[2] = "e1";
- next;
- } else {
- $reg = sprintf("r%d", $i);
- $ret[$i] = $reg;
- }
- if($type eq "bool") {
- $reg = "$reg != 0";
- }
- if($type eq "int64" && $_32bit ne "") {
- # 64-bit number in r1:r0 or r0:r1.
- if($i+2 > @out) {
- print STDERR "$ARGV:$.: not enough registers for int64 return\n";
- }
- if($_32bit eq "big-endian") {
- $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1);
- } else {
- $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
- }
- $ret[$i] = sprintf("r%d", $i);
- $ret[$i+1] = sprintf("r%d", $i+1);
- }
- if($reg ne "e1" || $plan9) {
- $body .= "\t$name = $type($reg)\n";
- }
- }
- if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
- $text .= "\t$call\n";
- } else {
- $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
- }
- foreach my $use (@uses) {
- $text .= "\t$use\n";
- }
- $text .= $body;
-
- if ($plan9 && $ret[2] eq "e1") {
- $text .= "\tif int32(r0) == -1 {\n";
- $text .= "\t\terr = e1\n";
- $text .= "\t}\n";
- } elsif ($do_errno) {
- $text .= "\tif e1 != 0 {\n";
- $text .= "\t\terr = e1\n";
- $text .= "\t}\n";
- }
- $text .= "\treturn\n";
- $text .= "}\n\n";
-}
-
-chomp $text;
-chomp $text;
-
-if($errors) {
- exit 1;
-}
-
-print <= 10 {
- buf[i] = byte(val%10 + '0')
- i--
- val /= 10
- }
- buf[i] = byte(val + '0')
- return string(buf[i:])
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/syscall.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/syscall.go
deleted file mode 100644
index 5046cfe..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/syscall.go
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build plan9
-
-// Package plan9 contains an interface to the low-level operating system
-// primitives. OS details vary depending on the underlying system, and
-// by default, godoc will display the OS-specific documentation for the current
-// system. If you want godoc to display documentation for another
-// system, set $GOOS and $GOARCH to the desired system. For example, if
-// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS
-// to freebsd and $GOARCH to arm.
-// The primary use of this package is inside other packages that provide a more
-// portable interface to the system, such as "os", "time" and "net". Use
-// those packages rather than this one if you can.
-// For details of the functions and data types in this package consult
-// the manuals for the appropriate operating system.
-// These calls return err == nil to indicate success; otherwise
-// err represents an operating system error describing the failure and
-// holds a value of type syscall.ErrorString.
-package plan9 // import "golang.org/x/sys/plan9"
-
-import "unsafe"
-
-// ByteSliceFromString returns a NUL-terminated slice of bytes
-// containing the text of s. If s contains a NUL byte at any
-// location, it returns (nil, EINVAL).
-func ByteSliceFromString(s string) ([]byte, error) {
- for i := 0; i < len(s); i++ {
- if s[i] == 0 {
- return nil, EINVAL
- }
- }
- a := make([]byte, len(s)+1)
- copy(a, s)
- return a, nil
-}
-
-// BytePtrFromString returns a pointer to a NUL-terminated array of
-// bytes containing the text of s. If s contains a NUL byte at any
-// location, it returns (nil, EINVAL).
-func BytePtrFromString(s string) (*byte, error) {
- a, err := ByteSliceFromString(s)
- if err != nil {
- return nil, err
- }
- return &a[0], nil
-}
-
-// Single-word zero for use when we need a valid pointer to 0 bytes.
-// See mksyscall.pl.
-var _zero uintptr
-
-func (ts *Timespec) Unix() (sec int64, nsec int64) {
- return int64(ts.Sec), int64(ts.Nsec)
-}
-
-func (tv *Timeval) Unix() (sec int64, nsec int64) {
- return int64(tv.Sec), int64(tv.Usec) * 1000
-}
-
-func (ts *Timespec) Nano() int64 {
- return int64(ts.Sec)*1e9 + int64(ts.Nsec)
-}
-
-func (tv *Timeval) Nano() int64 {
- return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000
-}
-
-// use is a no-op, but the compiler cannot see that it is.
-// Calling use(p) ensures that p is kept live until that point.
-//go:noescape
-func use(p unsafe.Pointer)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/syscall_plan9.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/syscall_plan9.go
deleted file mode 100644
index d39d07d..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/syscall_plan9.go
+++ /dev/null
@@ -1,349 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Plan 9 system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and
-// wrap it in our own nicer implementation.
-
-package plan9
-
-import (
- "syscall"
- "unsafe"
-)
-
-// A Note is a string describing a process note.
-// It implements the os.Signal interface.
-type Note string
-
-func (n Note) Signal() {}
-
-func (n Note) String() string {
- return string(n)
-}
-
-var (
- Stdin = 0
- Stdout = 1
- Stderr = 2
-)
-
-// For testing: clients can set this flag to force
-// creation of IPv6 sockets to return EAFNOSUPPORT.
-var SocketDisableIPv6 bool
-
-func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.ErrorString)
-func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.ErrorString)
-func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
-func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
-
-func atoi(b []byte) (n uint) {
- n = 0
- for i := 0; i < len(b); i++ {
- n = n*10 + uint(b[i]-'0')
- }
- return
-}
-
-func cstring(s []byte) string {
- for i := range s {
- if s[i] == 0 {
- return string(s[0:i])
- }
- }
- return string(s)
-}
-
-func errstr() string {
- var buf [ERRMAX]byte
-
- RawSyscall(SYS_ERRSTR, uintptr(unsafe.Pointer(&buf[0])), uintptr(len(buf)), 0)
-
- buf[len(buf)-1] = 0
- return cstring(buf[:])
-}
-
-// Implemented in assembly to import from runtime.
-func exit(code int)
-
-func Exit(code int) { exit(code) }
-
-func readnum(path string) (uint, error) {
- var b [12]byte
-
- fd, e := Open(path, O_RDONLY)
- if e != nil {
- return 0, e
- }
- defer Close(fd)
-
- n, e := Pread(fd, b[:], 0)
-
- if e != nil {
- return 0, e
- }
-
- m := 0
- for ; m < n && b[m] == ' '; m++ {
- }
-
- return atoi(b[m : n-1]), nil
-}
-
-func Getpid() (pid int) {
- n, _ := readnum("#c/pid")
- return int(n)
-}
-
-func Getppid() (ppid int) {
- n, _ := readnum("#c/ppid")
- return int(n)
-}
-
-func Read(fd int, p []byte) (n int, err error) {
- return Pread(fd, p, -1)
-}
-
-func Write(fd int, p []byte) (n int, err error) {
- return Pwrite(fd, p, -1)
-}
-
-var ioSync int64
-
-//sys fd2path(fd int, buf []byte) (err error)
-func Fd2path(fd int) (path string, err error) {
- var buf [512]byte
-
- e := fd2path(fd, buf[:])
- if e != nil {
- return "", e
- }
- return cstring(buf[:]), nil
-}
-
-//sys pipe(p *[2]int32) (err error)
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return syscall.ErrorString("bad arg in system call")
- }
- var pp [2]int32
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-// Underlying system call writes to newoffset via pointer.
-// Implemented in assembly to avoid allocation.
-func seek(placeholder uintptr, fd int, offset int64, whence int) (newoffset int64, err string)
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- newoffset, e := seek(0, fd, offset, whence)
-
- if newoffset == -1 {
- err = syscall.ErrorString(e)
- }
- return
-}
-
-func Mkdir(path string, mode uint32) (err error) {
- fd, err := Create(path, O_RDONLY, DMDIR|mode)
-
- if fd != -1 {
- Close(fd)
- }
-
- return
-}
-
-type Waitmsg struct {
- Pid int
- Time [3]uint32
- Msg string
-}
-
-func (w Waitmsg) Exited() bool { return true }
-func (w Waitmsg) Signaled() bool { return false }
-
-func (w Waitmsg) ExitStatus() int {
- if len(w.Msg) == 0 {
- // a normal exit returns no message
- return 0
- }
- return 1
-}
-
-//sys await(s []byte) (n int, err error)
-func Await(w *Waitmsg) (err error) {
- var buf [512]byte
- var f [5][]byte
-
- n, err := await(buf[:])
-
- if err != nil || w == nil {
- return
- }
-
- nf := 0
- p := 0
- for i := 0; i < n && nf < len(f)-1; i++ {
- if buf[i] == ' ' {
- f[nf] = buf[p:i]
- p = i + 1
- nf++
- }
- }
- f[nf] = buf[p:]
- nf++
-
- if nf != len(f) {
- return syscall.ErrorString("invalid wait message")
- }
- w.Pid = int(atoi(f[0]))
- w.Time[0] = uint32(atoi(f[1]))
- w.Time[1] = uint32(atoi(f[2]))
- w.Time[2] = uint32(atoi(f[3]))
- w.Msg = cstring(f[4])
- if w.Msg == "''" {
- // await() returns '' for no error
- w.Msg = ""
- }
- return
-}
-
-func Unmount(name, old string) (err error) {
- fixwd()
- oldp, err := BytePtrFromString(old)
- if err != nil {
- return err
- }
- oldptr := uintptr(unsafe.Pointer(oldp))
-
- var r0 uintptr
- var e syscall.ErrorString
-
- // bind(2) man page: If name is zero, everything bound or mounted upon old is unbound or unmounted.
- if name == "" {
- r0, _, e = Syscall(SYS_UNMOUNT, _zero, oldptr, 0)
- } else {
- namep, err := BytePtrFromString(name)
- if err != nil {
- return err
- }
- r0, _, e = Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(namep)), oldptr, 0)
- }
-
- if int32(r0) == -1 {
- err = e
- }
- return
-}
-
-func Fchdir(fd int) (err error) {
- path, err := Fd2path(fd)
-
- if err != nil {
- return
- }
-
- return Chdir(path)
-}
-
-type Timespec struct {
- Sec int32
- Nsec int32
-}
-
-type Timeval struct {
- Sec int32
- Usec int32
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int32(nsec / 1e9)
- return
-}
-
-func nsec() int64 {
- var scratch int64
-
- r0, _, _ := Syscall(SYS_NSEC, uintptr(unsafe.Pointer(&scratch)), 0, 0)
- // TODO(aram): remove hack after I fix _nsec in the pc64 kernel.
- if r0 == 0 {
- return scratch
- }
- return int64(r0)
-}
-
-func Gettimeofday(tv *Timeval) error {
- nsec := nsec()
- *tv = NsecToTimeval(nsec)
- return nil
-}
-
-func Getpagesize() int { return 0x1000 }
-
-func Getegid() (egid int) { return -1 }
-func Geteuid() (euid int) { return -1 }
-func Getgid() (gid int) { return -1 }
-func Getuid() (uid int) { return -1 }
-
-func Getgroups() (gids []int, err error) {
- return make([]int, 0), nil
-}
-
-//sys open(path string, mode int) (fd int, err error)
-func Open(path string, mode int) (fd int, err error) {
- fixwd()
- return open(path, mode)
-}
-
-//sys create(path string, mode int, perm uint32) (fd int, err error)
-func Create(path string, mode int, perm uint32) (fd int, err error) {
- fixwd()
- return create(path, mode, perm)
-}
-
-//sys remove(path string) (err error)
-func Remove(path string) error {
- fixwd()
- return remove(path)
-}
-
-//sys stat(path string, edir []byte) (n int, err error)
-func Stat(path string, edir []byte) (n int, err error) {
- fixwd()
- return stat(path, edir)
-}
-
-//sys bind(name string, old string, flag int) (err error)
-func Bind(name string, old string, flag int) (err error) {
- fixwd()
- return bind(name, old, flag)
-}
-
-//sys mount(fd int, afd int, old string, flag int, aname string) (err error)
-func Mount(fd int, afd int, old string, flag int, aname string) (err error) {
- fixwd()
- return mount(fd, afd, old, flag, aname)
-}
-
-//sys wstat(path string, edir []byte) (err error)
-func Wstat(path string, edir []byte) (err error) {
- fixwd()
- return wstat(path, edir)
-}
-
-//sys chdir(path string) (err error)
-//sys Dup(oldfd int, newfd int) (fd int, err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys Close(fd int) (err error)
-//sys Fstat(fd int, edir []byte) (n int, err error)
-//sys Fwstat(fd int, edir []byte) (err error)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/syscall_test.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/syscall_test.go
deleted file mode 100644
index 8f829ba..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/syscall_test.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build plan9
-
-package plan9_test
-
-import (
- "testing"
-
- "golang.org/x/sys/plan9"
-)
-
-func testSetGetenv(t *testing.T, key, value string) {
- err := plan9.Setenv(key, value)
- if err != nil {
- t.Fatalf("Setenv failed to set %q: %v", value, err)
- }
- newvalue, found := plan9.Getenv(key)
- if !found {
- t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value)
- }
- if newvalue != value {
- t.Fatalf("Getenv(%v) = %q; want %q", key, newvalue, value)
- }
-}
-
-func TestEnv(t *testing.T) {
- testSetGetenv(t, "TESTENV", "AVALUE")
- // make sure TESTENV gets set to "", not deleted
- testSetGetenv(t, "TESTENV", "")
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go
deleted file mode 100644
index b35598a..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go
+++ /dev/null
@@ -1,292 +0,0 @@
-// mksyscall.pl -l32 -plan9 syscall_plan9.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package plan9
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fd2path(fd int, buf []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]int32) (err error) {
- r0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func await(s []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(s) > 0 {
- _p0 = unsafe.Pointer(&s[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0)
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func open(path string, mode int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func create(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func remove(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func stat(path string, edir []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(edir) > 0 {
- _p1 = unsafe.Pointer(&edir[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(name string, old string, flag int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(old)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(fd int, afd int, old string, flag int, aname string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(old)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(aname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wstat(path string, edir []byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(edir) > 0 {
- _p1 = unsafe.Pointer(&edir[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))
- use(unsafe.Pointer(_p0))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int, newfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0)
- fd = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- r0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, edir []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(edir) > 0 {
- _p0 = unsafe.Pointer(&edir[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fwstat(fd int, edir []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(edir) > 0 {
- _p0 = unsafe.Pointer(&edir[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go
deleted file mode 100644
index b35598a..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go
+++ /dev/null
@@ -1,292 +0,0 @@
-// mksyscall.pl -l32 -plan9 syscall_plan9.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package plan9
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fd2path(fd int, buf []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]int32) (err error) {
- r0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func await(s []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(s) > 0 {
- _p0 = unsafe.Pointer(&s[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0)
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func open(path string, mode int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func create(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- use(unsafe.Pointer(_p0))
- fd = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func remove(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func stat(path string, edir []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(edir) > 0 {
- _p1 = unsafe.Pointer(&edir[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))
- use(unsafe.Pointer(_p0))
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(name string, old string, flag int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(old)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(fd int, afd int, old string, flag int, aname string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(old)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(aname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0)
- use(unsafe.Pointer(_p0))
- use(unsafe.Pointer(_p1))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wstat(path string, edir []byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(edir) > 0 {
- _p1 = unsafe.Pointer(&edir[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))
- use(unsafe.Pointer(_p0))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- use(unsafe.Pointer(_p0))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int, newfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0)
- fd = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- r0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, edir []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(edir) > 0 {
- _p0 = unsafe.Pointer(&edir[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fwstat(fd int, edir []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(edir) > 0 {
- _p0 = unsafe.Pointer(&edir[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go
deleted file mode 100644
index 8dd8723..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go
+++ /dev/null
@@ -1,284 +0,0 @@
-// mksyscall.pl -l32 -plan9 -tags plan9,arm syscall_plan9.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build plan9,arm
-
-package plan9
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fd2path(fd int, buf []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]int32) (err error) {
- r0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func await(s []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(s) > 0 {
- _p0 = unsafe.Pointer(&s[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0)
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func open(path string, mode int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- fd = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func create(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func remove(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func stat(path string, edir []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(edir) > 0 {
- _p1 = unsafe.Pointer(&edir[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(name string, old string, flag int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(old)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(fd int, afd int, old string, flag int, aname string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(old)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(aname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wstat(path string, edir []byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(edir) > 0 {
- _p1 = unsafe.Pointer(&edir[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int, newfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0)
- fd = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- r0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, edir []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(edir) > 0 {
- _p0 = unsafe.Pointer(&edir[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fwstat(fd int, edir []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(edir) > 0 {
- _p0 = unsafe.Pointer(&edir[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/zsysnum_plan9.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/zsysnum_plan9.go
deleted file mode 100644
index 22e8abd..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/plan9/zsysnum_plan9.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// mksysnum_plan9.sh /opt/plan9/sys/src/libc/9syscall/sys.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package plan9
-
-const (
- SYS_SYSR1 = 0
- SYS_BIND = 2
- SYS_CHDIR = 3
- SYS_CLOSE = 4
- SYS_DUP = 5
- SYS_ALARM = 6
- SYS_EXEC = 7
- SYS_EXITS = 8
- SYS_FAUTH = 10
- SYS_SEGBRK = 12
- SYS_OPEN = 14
- SYS_OSEEK = 16
- SYS_SLEEP = 17
- SYS_RFORK = 19
- SYS_PIPE = 21
- SYS_CREATE = 22
- SYS_FD2PATH = 23
- SYS_BRK_ = 24
- SYS_REMOVE = 25
- SYS_NOTIFY = 28
- SYS_NOTED = 29
- SYS_SEGATTACH = 30
- SYS_SEGDETACH = 31
- SYS_SEGFREE = 32
- SYS_SEGFLUSH = 33
- SYS_RENDEZVOUS = 34
- SYS_UNMOUNT = 35
- SYS_SEMACQUIRE = 37
- SYS_SEMRELEASE = 38
- SYS_SEEK = 39
- SYS_FVERSION = 40
- SYS_ERRSTR = 41
- SYS_STAT = 42
- SYS_FSTAT = 43
- SYS_WSTAT = 44
- SYS_FWSTAT = 45
- SYS_MOUNT = 46
- SYS_AWAIT = 47
- SYS_PREAD = 50
- SYS_PWRITE = 51
- SYS_TSEMACQUIRE = 52
- SYS_NSEC = 53
-)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/.gitignore b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/.gitignore
deleted file mode 100644
index e3e0fc6..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-_obj/
-unix.test
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/README.md b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/README.md
deleted file mode 100644
index bc6f603..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/README.md
+++ /dev/null
@@ -1,173 +0,0 @@
-# Building `sys/unix`
-
-The sys/unix package provides access to the raw system call interface of the
-underlying operating system. See: https://godoc.org/golang.org/x/sys/unix
-
-Porting Go to a new architecture/OS combination or adding syscalls, types, or
-constants to an existing architecture/OS pair requires some manual effort;
-however, there are tools that automate much of the process.
-
-## Build Systems
-
-There are currently two ways we generate the necessary files. We are currently
-migrating the build system to use containers so the builds are reproducible.
-This is being done on an OS-by-OS basis. Please update this documentation as
-components of the build system change.
-
-### Old Build System (currently for `GOOS != "Linux" || GOARCH == "sparc64"`)
-
-The old build system generates the Go files based on the C header files
-present on your system. This means that files
-for a given GOOS/GOARCH pair must be generated on a system with that OS and
-architecture. This also means that the generated code can differ from system
-to system, based on differences in the header files.
-
-To avoid this, if you are using the old build system, only generate the Go
-files on an installation with unmodified header files. It is also important to
-keep track of which version of the OS the files were generated from (ex.
-Darwin 14 vs Darwin 15). This makes it easier to track the progress of changes
-and have each OS upgrade correspond to a single change.
-
-To build the files for your current OS and architecture, make sure GOOS and
-GOARCH are set correctly and run `mkall.sh`. This will generate the files for
-your specific system. Running `mkall.sh -n` shows the commands that will be run.
-
-Requirements: bash, perl, go
-
-### New Build System (currently for `GOOS == "Linux" && GOARCH != "sparc64"`)
-
-The new build system uses a Docker container to generate the go files directly
-from source checkouts of the kernel and various system libraries. This means
-that on any platform that supports Docker, all the files using the new build
-system can be generated at once, and generated files will not change based on
-what the person running the scripts has installed on their computer.
-
-The OS specific files for the new build system are located in the `${GOOS}`
-directory, and the build is coordinated by the `${GOOS}/mkall.go` program. When
-the kernel or system library updates, modify the Dockerfile at
-`${GOOS}/Dockerfile` to checkout the new release of the source.
-
-To build all the files under the new build system, you must be on an amd64/Linux
-system and have your GOOS and GOARCH set accordingly. Running `mkall.sh` will
-then generate all of the files for all of the GOOS/GOARCH pairs in the new build
-system. Running `mkall.sh -n` shows the commands that will be run.
-
-Requirements: bash, perl, go, docker
-
-## Component files
-
-This section describes the various files used in the code generation process.
-It also contains instructions on how to modify these files to add a new
-architecture/OS or to add additional syscalls, types, or constants. Note that
-if you are using the new build system, the scripts cannot be called normally.
-They must be called from within the docker container.
-
-### asm files
-
-The hand-written assembly file at `asm_${GOOS}_${GOARCH}.s` implements system
-call dispatch. There are three entry points:
-```
- func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
- func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
- func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
-```
-The first and second are the standard ones; they differ only in how many
-arguments can be passed to the kernel. The third is for low-level use by the
-ForkExec wrapper. Unlike the first two, it does not call into the scheduler to
-let it know that a system call is running.
-
-When porting Go to an new architecture/OS, this file must be implemented for
-each GOOS/GOARCH pair.
-
-### mksysnum
-
-Mksysnum is a script located at `${GOOS}/mksysnum.pl` (or `mksysnum_${GOOS}.pl`
-for the old system). This script takes in a list of header files containing the
-syscall number declarations and parses them to produce the corresponding list of
-Go numeric constants. See `zsysnum_${GOOS}_${GOARCH}.go` for the generated
-constants.
-
-Adding new syscall numbers is mostly done by running the build on a sufficiently
-new installation of the target OS (or updating the source checkouts for the
-new build system). However, depending on the OS, you make need to update the
-parsing in mksysnum.
-
-### mksyscall.pl
-
-The `syscall.go`, `syscall_${GOOS}.go`, `syscall_${GOOS}_${GOARCH}.go` are
-hand-written Go files which implement system calls (for unix, the specific OS,
-or the specific OS/Architecture pair respectively) that need special handling
-and list `//sys` comments giving prototypes for ones that can be generated.
-
-The mksyscall.pl script takes the `//sys` and `//sysnb` comments and converts
-them into syscalls. This requires the name of the prototype in the comment to
-match a syscall number in the `zsysnum_${GOOS}_${GOARCH}.go` file. The function
-prototype can be exported (capitalized) or not.
-
-Adding a new syscall often just requires adding a new `//sys` function prototype
-with the desired arguments and a capitalized name so it is exported. However, if
-you want the interface to the syscall to be different, often one will make an
-unexported `//sys` prototype, an then write a custom wrapper in
-`syscall_${GOOS}.go`.
-
-### types files
-
-For each OS, there is a hand-written Go file at `${GOOS}/types.go` (or
-`types_${GOOS}.go` on the old system). This file includes standard C headers and
-creates Go type aliases to the corresponding C types. The file is then fed
-through godef to get the Go compatible definitions. Finally, the generated code
-is fed though mkpost.go to format the code correctly and remove any hidden or
-private identifiers. This cleaned-up code is written to
-`ztypes_${GOOS}_${GOARCH}.go`.
-
-The hardest part about preparing this file is figuring out which headers to
-include and which symbols need to be `#define`d to get the actual data
-structures that pass through to the kernel system calls. Some C libraries
-preset alternate versions for binary compatibility and translate them on the
-way in and out of system calls, but there is almost always a `#define` that can
-get the real ones.
-See `types_darwin.go` and `linux/types.go` for examples.
-
-To add a new type, add in the necessary include statement at the top of the
-file (if it is not already there) and add in a type alias line. Note that if
-your type is significantly different on different architectures, you may need
-some `#if/#elif` macros in your include statements.
-
-### mkerrors.sh
-
-This script is used to generate the system's various constants. This doesn't
-just include the error numbers and error strings, but also the signal numbers
-an a wide variety of miscellaneous constants. The constants come from the list
-of include files in the `includes_${uname}` variable. A regex then picks out
-the desired `#define` statements, and generates the corresponding Go constants.
-The error numbers and strings are generated from `#include `, and the
-signal numbers and strings are generated from `#include `. All of
-these constants are written to `zerrors_${GOOS}_${GOARCH}.go` via a C program,
-`_errors.c`, which prints out all the constants.
-
-To add a constant, add the header that includes it to the appropriate variable.
-Then, edit the regex (if necessary) to match the desired constant. Avoid making
-the regex too broad to avoid matching unintended constants.
-
-
-## Generated files
-
-### `zerror_${GOOS}_${GOARCH}.go`
-
-A file containing all of the system's generated error numbers, error strings,
-signal numbers, and constants. Generated by `mkerrors.sh` (see above).
-
-### `zsyscall_${GOOS}_${GOARCH}.go`
-
-A file containing all the generated syscalls for a specific GOOS and GOARCH.
-Generated by `mksyscall.pl` (see above).
-
-### `zsysnum_${GOOS}_${GOARCH}.go`
-
-A list of numeric constants for all the syscall number of the specific GOOS
-and GOARCH. Generated by mksysnum (see above).
-
-### `ztypes_${GOOS}_${GOARCH}.go`
-
-A file containing Go types for passing into (or returning from) syscalls.
-Generated by godefs and the types file (see above).
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/affinity_linux.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/affinity_linux.go
deleted file mode 100644
index 72afe33..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/affinity_linux.go
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright 2018 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// CPU affinity functions
-
-package unix
-
-import (
- "unsafe"
-)
-
-const cpuSetSize = _CPU_SETSIZE / _NCPUBITS
-
-// CPUSet represents a CPU affinity mask.
-type CPUSet [cpuSetSize]cpuMask
-
-func schedAffinity(trap uintptr, pid int, set *CPUSet) error {
- _, _, e := RawSyscall(trap, uintptr(pid), uintptr(unsafe.Sizeof(*set)), uintptr(unsafe.Pointer(set)))
- if e != 0 {
- return errnoErr(e)
- }
- return nil
-}
-
-// SchedGetaffinity gets the CPU affinity mask of the thread specified by pid.
-// If pid is 0 the calling thread is used.
-func SchedGetaffinity(pid int, set *CPUSet) error {
- return schedAffinity(SYS_SCHED_GETAFFINITY, pid, set)
-}
-
-// SchedSetaffinity sets the CPU affinity mask of the thread specified by pid.
-// If pid is 0 the calling thread is used.
-func SchedSetaffinity(pid int, set *CPUSet) error {
- return schedAffinity(SYS_SCHED_SETAFFINITY, pid, set)
-}
-
-// Zero clears the set s, so that it contains no CPUs.
-func (s *CPUSet) Zero() {
- for i := range s {
- s[i] = 0
- }
-}
-
-func cpuBitsIndex(cpu int) int {
- return cpu / _NCPUBITS
-}
-
-func cpuBitsMask(cpu int) cpuMask {
- return cpuMask(1 << (uint(cpu) % _NCPUBITS))
-}
-
-// Set adds cpu to the set s.
-func (s *CPUSet) Set(cpu int) {
- i := cpuBitsIndex(cpu)
- if i < len(s) {
- s[i] |= cpuBitsMask(cpu)
- }
-}
-
-// Clear removes cpu from the set s.
-func (s *CPUSet) Clear(cpu int) {
- i := cpuBitsIndex(cpu)
- if i < len(s) {
- s[i] &^= cpuBitsMask(cpu)
- }
-}
-
-// IsSet reports whether cpu is in the set s.
-func (s *CPUSet) IsSet(cpu int) bool {
- i := cpuBitsIndex(cpu)
- if i < len(s) {
- return s[i]&cpuBitsMask(cpu) != 0
- }
- return false
-}
-
-// Count returns the number of CPUs in the set s.
-func (s *CPUSet) Count() int {
- c := 0
- for _, b := range s {
- c += onesCount64(uint64(b))
- }
- return c
-}
-
-// onesCount64 is a copy of Go 1.9's math/bits.OnesCount64.
-// Once this package can require Go 1.9, we can delete this
-// and update the caller to use bits.OnesCount64.
-func onesCount64(x uint64) int {
- const m0 = 0x5555555555555555 // 01010101 ...
- const m1 = 0x3333333333333333 // 00110011 ...
- const m2 = 0x0f0f0f0f0f0f0f0f // 00001111 ...
- const m3 = 0x00ff00ff00ff00ff // etc.
- const m4 = 0x0000ffff0000ffff
-
- // Implementation: Parallel summing of adjacent bits.
- // See "Hacker's Delight", Chap. 5: Counting Bits.
- // The following pattern shows the general approach:
- //
- // x = x>>1&(m0&m) + x&(m0&m)
- // x = x>>2&(m1&m) + x&(m1&m)
- // x = x>>4&(m2&m) + x&(m2&m)
- // x = x>>8&(m3&m) + x&(m3&m)
- // x = x>>16&(m4&m) + x&(m4&m)
- // x = x>>32&(m5&m) + x&(m5&m)
- // return int(x)
- //
- // Masking (& operations) can be left away when there's no
- // danger that a field's sum will carry over into the next
- // field: Since the result cannot be > 64, 8 bits is enough
- // and we can ignore the masks for the shifts by 8 and up.
- // Per "Hacker's Delight", the first line can be simplified
- // more, but it saves at best one instruction, so we leave
- // it alone for clarity.
- const m = 1<<64 - 1
- x = x>>1&(m0&m) + x&(m0&m)
- x = x>>2&(m1&m) + x&(m1&m)
- x = (x>>4 + x) & (m2 & m)
- x += x >> 8
- x += x >> 16
- x += x >> 32
- return int(x) & (1<<7 - 1)
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_darwin_386.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_darwin_386.s
deleted file mode 100644
index 8a72783..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_darwin_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
deleted file mode 100644
index 6321421..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_darwin_arm.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_darwin_arm.s
deleted file mode 100644
index 333242d..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_darwin_arm.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-// +build arm,darwin
-
-#include "textflag.h"
-
-//
-// System call support for ARM, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
deleted file mode 100644
index 97e0174..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-// +build arm64,darwin
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- B syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
deleted file mode 100644
index d5ed672..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, DragonFly
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-64
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-88
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-112
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-64
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-88
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_freebsd_386.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_freebsd_386.s
deleted file mode 100644
index c9a0a26..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_freebsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
deleted file mode 100644
index 3517247..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
deleted file mode 100644
index 9227c87..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for ARM, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_386.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_386.s
deleted file mode 100644
index 448bebb..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_386.s
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for 386, Linux
-//
-
-// See ../runtime/sys_linux_386.s for the reason why we always use int 0x80
-// instead of the glibc-specific "CALL 0x10(GS)".
-#define INVOKE_SYSCALL INT $0x80
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
- CALL runtime·entersyscall(SB)
- MOVL trap+0(FP), AX // syscall entry
- MOVL a1+4(FP), BX
- MOVL a2+8(FP), CX
- MOVL a3+12(FP), DX
- MOVL $0, SI
- MOVL $0, DI
- INVOKE_SYSCALL
- MOVL AX, r1+16(FP)
- MOVL DX, r2+20(FP)
- CALL runtime·exitsyscall(SB)
- RET
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
-
-TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
- MOVL trap+0(FP), AX // syscall entry
- MOVL a1+4(FP), BX
- MOVL a2+8(FP), CX
- MOVL a3+12(FP), DX
- MOVL $0, SI
- MOVL $0, DI
- INVOKE_SYSCALL
- MOVL AX, r1+16(FP)
- MOVL DX, r2+20(FP)
- RET
-
-TEXT ·socketcall(SB),NOSPLIT,$0-36
- JMP syscall·socketcall(SB)
-
-TEXT ·rawsocketcall(SB),NOSPLIT,$0-36
- JMP syscall·rawsocketcall(SB)
-
-TEXT ·seek(SB),NOSPLIT,$0-28
- JMP syscall·seek(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_amd64.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
deleted file mode 100644
index c6468a9..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for AMD64, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
- CALL runtime·entersyscall(SB)
- MOVQ a1+8(FP), DI
- MOVQ a2+16(FP), SI
- MOVQ a3+24(FP), DX
- MOVQ $0, R10
- MOVQ $0, R8
- MOVQ $0, R9
- MOVQ trap+0(FP), AX // syscall entry
- SYSCALL
- MOVQ AX, r1+32(FP)
- MOVQ DX, r2+40(FP)
- CALL runtime·exitsyscall(SB)
- RET
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
-
-TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
- MOVQ a1+8(FP), DI
- MOVQ a2+16(FP), SI
- MOVQ a3+24(FP), DX
- MOVQ $0, R10
- MOVQ $0, R8
- MOVQ $0, R9
- MOVQ trap+0(FP), AX // syscall entry
- SYSCALL
- MOVQ AX, r1+32(FP)
- MOVQ DX, r2+40(FP)
- RET
-
-TEXT ·gettimeofday(SB),NOSPLIT,$0-16
- JMP syscall·gettimeofday(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_arm.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_arm.s
deleted file mode 100644
index cf0f357..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_arm.s
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for arm, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
- BL runtime·entersyscall(SB)
- MOVW trap+0(FP), R7
- MOVW a1+4(FP), R0
- MOVW a2+8(FP), R1
- MOVW a3+12(FP), R2
- MOVW $0, R3
- MOVW $0, R4
- MOVW $0, R5
- SWI $0
- MOVW R0, r1+16(FP)
- MOVW $0, R0
- MOVW R0, r2+20(FP)
- BL runtime·exitsyscall(SB)
- RET
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
-
-TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
- MOVW trap+0(FP), R7 // syscall entry
- MOVW a1+4(FP), R0
- MOVW a2+8(FP), R1
- MOVW a3+12(FP), R2
- SWI $0
- MOVW R0, r1+16(FP)
- MOVW $0, R0
- MOVW R0, r2+20(FP)
- RET
-
-TEXT ·seek(SB),NOSPLIT,$0-28
- B syscall·seek(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_arm64.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
deleted file mode 100644
index afe6fdf..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build arm64
-// +build !gccgo
-
-#include "textflag.h"
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- B syscall·Syscall6(SB)
-
-TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
- BL runtime·entersyscall(SB)
- MOVD a1+8(FP), R0
- MOVD a2+16(FP), R1
- MOVD a3+24(FP), R2
- MOVD $0, R3
- MOVD $0, R4
- MOVD $0, R5
- MOVD trap+0(FP), R8 // syscall entry
- SVC
- MOVD R0, r1+32(FP) // r1
- MOVD R1, r2+40(FP) // r2
- BL runtime·exitsyscall(SB)
- RET
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- B syscall·RawSyscall6(SB)
-
-TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
- MOVD a1+8(FP), R0
- MOVD a2+16(FP), R1
- MOVD a3+24(FP), R2
- MOVD $0, R3
- MOVD $0, R4
- MOVD $0, R5
- MOVD trap+0(FP), R8 // syscall entry
- SVC
- MOVD R0, r1+32(FP)
- MOVD R1, r2+40(FP)
- RET
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
deleted file mode 100644
index ab9d638..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build mips64 mips64le
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for mips64, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
- JAL runtime·entersyscall(SB)
- MOVV a1+8(FP), R4
- MOVV a2+16(FP), R5
- MOVV a3+24(FP), R6
- MOVV R0, R7
- MOVV R0, R8
- MOVV R0, R9
- MOVV trap+0(FP), R2 // syscall entry
- SYSCALL
- MOVV R2, r1+32(FP)
- MOVV R3, r2+40(FP)
- JAL runtime·exitsyscall(SB)
- RET
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
-
-TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
- MOVV a1+8(FP), R4
- MOVV a2+16(FP), R5
- MOVV a3+24(FP), R6
- MOVV R0, R7
- MOVV R0, R8
- MOVV R0, R9
- MOVV trap+0(FP), R2 // syscall entry
- SYSCALL
- MOVV R2, r1+32(FP)
- MOVV R3, r2+40(FP)
- RET
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
deleted file mode 100644
index 99e5399..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build mips mipsle
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for mips, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
- JAL runtime·entersyscall(SB)
- MOVW a1+4(FP), R4
- MOVW a2+8(FP), R5
- MOVW a3+12(FP), R6
- MOVW R0, R7
- MOVW trap+0(FP), R2 // syscall entry
- SYSCALL
- MOVW R2, r1+16(FP) // r1
- MOVW R3, r2+20(FP) // r2
- JAL runtime·exitsyscall(SB)
- RET
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
-
-TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
- MOVW a1+4(FP), R4
- MOVW a2+8(FP), R5
- MOVW a3+12(FP), R6
- MOVW trap+0(FP), R2 // syscall entry
- SYSCALL
- MOVW R2, r1+16(FP)
- MOVW R3, r2+20(FP)
- RET
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
deleted file mode 100644
index 649e587..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build ppc64 ppc64le
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for ppc64, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- BR syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- BR syscall·Syscall6(SB)
-
-TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
- BL runtime·entersyscall(SB)
- MOVD a1+8(FP), R3
- MOVD a2+16(FP), R4
- MOVD a3+24(FP), R5
- MOVD R0, R6
- MOVD R0, R7
- MOVD R0, R8
- MOVD trap+0(FP), R9 // syscall entry
- SYSCALL R9
- MOVD R3, r1+32(FP)
- MOVD R4, r2+40(FP)
- BL runtime·exitsyscall(SB)
- RET
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- BR syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- BR syscall·RawSyscall6(SB)
-
-TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
- MOVD a1+8(FP), R3
- MOVD a2+16(FP), R4
- MOVD a3+24(FP), R5
- MOVD R0, R6
- MOVD R0, R7
- MOVD R0, R8
- MOVD trap+0(FP), R9 // syscall entry
- SYSCALL R9
- MOVD R3, r1+32(FP)
- MOVD R4, r2+40(FP)
- RET
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_s390x.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
deleted file mode 100644
index a5a863c..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build s390x
-// +build linux
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for s390x, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- BR syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- BR syscall·Syscall6(SB)
-
-TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
- BL runtime·entersyscall(SB)
- MOVD a1+8(FP), R2
- MOVD a2+16(FP), R3
- MOVD a3+24(FP), R4
- MOVD $0, R5
- MOVD $0, R6
- MOVD $0, R7
- MOVD trap+0(FP), R1 // syscall entry
- SYSCALL
- MOVD R2, r1+32(FP)
- MOVD R3, r2+40(FP)
- BL runtime·exitsyscall(SB)
- RET
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- BR syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- BR syscall·RawSyscall6(SB)
-
-TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
- MOVD a1+8(FP), R2
- MOVD a2+16(FP), R3
- MOVD a3+24(FP), R4
- MOVD $0, R5
- MOVD $0, R6
- MOVD $0, R7
- MOVD trap+0(FP), R1 // syscall entry
- SYSCALL
- MOVD R2, r1+32(FP)
- MOVD R3, r2+40(FP)
- RET
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_netbsd_386.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_netbsd_386.s
deleted file mode 100644
index 48bdcd7..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_netbsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
deleted file mode 100644
index 2ede05c..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
deleted file mode 100644
index e892857..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for ARM, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_openbsd_386.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_openbsd_386.s
deleted file mode 100644
index 00576f3..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_openbsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
deleted file mode 100644
index 790ef77..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s
deleted file mode 100644
index 469bfa1..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for ARM, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
deleted file mode 100644
index ded8260..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go
-//
-
-TEXT ·sysvicall6(SB),NOSPLIT,$0-88
- JMP syscall·sysvicall6(SB)
-
-TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88
- JMP syscall·rawSysvicall6(SB)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/bluetooth_linux.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/bluetooth_linux.go
deleted file mode 100644
index 6e32296..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/bluetooth_linux.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Bluetooth sockets and messages
-
-package unix
-
-// Bluetooth Protocols
-const (
- BTPROTO_L2CAP = 0
- BTPROTO_HCI = 1
- BTPROTO_SCO = 2
- BTPROTO_RFCOMM = 3
- BTPROTO_BNEP = 4
- BTPROTO_CMTP = 5
- BTPROTO_HIDP = 6
- BTPROTO_AVDTP = 7
-)
-
-const (
- HCI_CHANNEL_RAW = 0
- HCI_CHANNEL_USER = 1
- HCI_CHANNEL_MONITOR = 2
- HCI_CHANNEL_CONTROL = 3
-)
-
-// Socketoption Level
-const (
- SOL_BLUETOOTH = 0x112
- SOL_HCI = 0x0
- SOL_L2CAP = 0x6
- SOL_RFCOMM = 0x12
- SOL_SCO = 0x11
-)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/cap_freebsd.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/cap_freebsd.go
deleted file mode 100644
index 83b6bce..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/cap_freebsd.go
+++ /dev/null
@@ -1,195 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build freebsd
-
-package unix
-
-import (
- errorspkg "errors"
- "fmt"
-)
-
-// Go implementation of C mostly found in /usr/src/sys/kern/subr_capability.c
-
-const (
- // This is the version of CapRights this package understands. See C implementation for parallels.
- capRightsGoVersion = CAP_RIGHTS_VERSION_00
- capArSizeMin = CAP_RIGHTS_VERSION_00 + 2
- capArSizeMax = capRightsGoVersion + 2
-)
-
-var (
- bit2idx = []int{
- -1, 0, 1, -1, 2, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1,
- 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- }
-)
-
-func capidxbit(right uint64) int {
- return int((right >> 57) & 0x1f)
-}
-
-func rightToIndex(right uint64) (int, error) {
- idx := capidxbit(right)
- if idx < 0 || idx >= len(bit2idx) {
- return -2, fmt.Errorf("index for right 0x%x out of range", right)
- }
- return bit2idx[idx], nil
-}
-
-func caprver(right uint64) int {
- return int(right >> 62)
-}
-
-func capver(rights *CapRights) int {
- return caprver(rights.Rights[0])
-}
-
-func caparsize(rights *CapRights) int {
- return capver(rights) + 2
-}
-
-// CapRightsSet sets the permissions in setrights in rights.
-func CapRightsSet(rights *CapRights, setrights []uint64) error {
- // This is essentially a copy of cap_rights_vset()
- if capver(rights) != CAP_RIGHTS_VERSION_00 {
- return fmt.Errorf("bad rights version %d", capver(rights))
- }
-
- n := caparsize(rights)
- if n < capArSizeMin || n > capArSizeMax {
- return errorspkg.New("bad rights size")
- }
-
- for _, right := range setrights {
- if caprver(right) != CAP_RIGHTS_VERSION_00 {
- return errorspkg.New("bad right version")
- }
- i, err := rightToIndex(right)
- if err != nil {
- return err
- }
- if i >= n {
- return errorspkg.New("index overflow")
- }
- if capidxbit(rights.Rights[i]) != capidxbit(right) {
- return errorspkg.New("index mismatch")
- }
- rights.Rights[i] |= right
- if capidxbit(rights.Rights[i]) != capidxbit(right) {
- return errorspkg.New("index mismatch (after assign)")
- }
- }
-
- return nil
-}
-
-// CapRightsClear clears the permissions in clearrights from rights.
-func CapRightsClear(rights *CapRights, clearrights []uint64) error {
- // This is essentially a copy of cap_rights_vclear()
- if capver(rights) != CAP_RIGHTS_VERSION_00 {
- return fmt.Errorf("bad rights version %d", capver(rights))
- }
-
- n := caparsize(rights)
- if n < capArSizeMin || n > capArSizeMax {
- return errorspkg.New("bad rights size")
- }
-
- for _, right := range clearrights {
- if caprver(right) != CAP_RIGHTS_VERSION_00 {
- return errorspkg.New("bad right version")
- }
- i, err := rightToIndex(right)
- if err != nil {
- return err
- }
- if i >= n {
- return errorspkg.New("index overflow")
- }
- if capidxbit(rights.Rights[i]) != capidxbit(right) {
- return errorspkg.New("index mismatch")
- }
- rights.Rights[i] &= ^(right & 0x01FFFFFFFFFFFFFF)
- if capidxbit(rights.Rights[i]) != capidxbit(right) {
- return errorspkg.New("index mismatch (after assign)")
- }
- }
-
- return nil
-}
-
-// CapRightsIsSet checks whether all the permissions in setrights are present in rights.
-func CapRightsIsSet(rights *CapRights, setrights []uint64) (bool, error) {
- // This is essentially a copy of cap_rights_is_vset()
- if capver(rights) != CAP_RIGHTS_VERSION_00 {
- return false, fmt.Errorf("bad rights version %d", capver(rights))
- }
-
- n := caparsize(rights)
- if n < capArSizeMin || n > capArSizeMax {
- return false, errorspkg.New("bad rights size")
- }
-
- for _, right := range setrights {
- if caprver(right) != CAP_RIGHTS_VERSION_00 {
- return false, errorspkg.New("bad right version")
- }
- i, err := rightToIndex(right)
- if err != nil {
- return false, err
- }
- if i >= n {
- return false, errorspkg.New("index overflow")
- }
- if capidxbit(rights.Rights[i]) != capidxbit(right) {
- return false, errorspkg.New("index mismatch")
- }
- if (rights.Rights[i] & right) != right {
- return false, nil
- }
- }
-
- return true, nil
-}
-
-func capright(idx uint64, bit uint64) uint64 {
- return ((1 << (57 + idx)) | bit)
-}
-
-// CapRightsInit returns a pointer to an initialised CapRights structure filled with rights.
-// See man cap_rights_init(3) and rights(4).
-func CapRightsInit(rights []uint64) (*CapRights, error) {
- var r CapRights
- r.Rights[0] = (capRightsGoVersion << 62) | capright(0, 0)
- r.Rights[1] = capright(1, 0)
-
- err := CapRightsSet(&r, rights)
- if err != nil {
- return nil, err
- }
- return &r, nil
-}
-
-// CapRightsLimit reduces the operations permitted on fd to at most those contained in rights.
-// The capability rights on fd can never be increased by CapRightsLimit.
-// See man cap_rights_limit(2) and rights(4).
-func CapRightsLimit(fd uintptr, rights *CapRights) error {
- return capRightsLimit(int(fd), rights)
-}
-
-// CapRightsGet returns a CapRights structure containing the operations permitted on fd.
-// See man cap_rights_get(3) and rights(4).
-func CapRightsGet(fd uintptr) (*CapRights, error) {
- r, err := CapRightsInit(nil)
- if err != nil {
- return nil, err
- }
- err = capRightsGet(capRightsGoVersion, int(fd), r)
- if err != nil {
- return nil, err
- }
- return r, nil
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/constants.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/constants.go
deleted file mode 100644
index a96f0eb..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/constants.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package unix
-
-const (
- R_OK = 0x4
- W_OK = 0x2
- X_OK = 0x1
-)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/creds_test.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/creds_test.go
deleted file mode 100644
index 6b292b1..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/creds_test.go
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-
-package unix_test
-
-import (
- "bytes"
- "go/build"
- "net"
- "os"
- "syscall"
- "testing"
-
- "golang.org/x/sys/unix"
-)
-
-// TestSCMCredentials tests the sending and receiving of credentials
-// (PID, UID, GID) in an ancillary message between two UNIX
-// sockets. The SO_PASSCRED socket option is enabled on the sending
-// socket for this to work.
-func TestSCMCredentials(t *testing.T) {
- socketTypeTests := []struct {
- socketType int
- dataLen int
- }{
- {
- unix.SOCK_STREAM,
- 1,
- }, {
- unix.SOCK_DGRAM,
- 0,
- },
- }
-
- for _, tt := range socketTypeTests {
- if tt.socketType == unix.SOCK_DGRAM && !atLeast1p10() {
- t.Log("skipping DGRAM test on pre-1.10")
- continue
- }
-
- fds, err := unix.Socketpair(unix.AF_LOCAL, tt.socketType, 0)
- if err != nil {
- t.Fatalf("Socketpair: %v", err)
- }
- defer unix.Close(fds[0])
- defer unix.Close(fds[1])
-
- err = unix.SetsockoptInt(fds[0], unix.SOL_SOCKET, unix.SO_PASSCRED, 1)
- if err != nil {
- t.Fatalf("SetsockoptInt: %v", err)
- }
-
- srvFile := os.NewFile(uintptr(fds[0]), "server")
- defer srvFile.Close()
- srv, err := net.FileConn(srvFile)
- if err != nil {
- t.Errorf("FileConn: %v", err)
- return
- }
- defer srv.Close()
-
- cliFile := os.NewFile(uintptr(fds[1]), "client")
- defer cliFile.Close()
- cli, err := net.FileConn(cliFile)
- if err != nil {
- t.Errorf("FileConn: %v", err)
- return
- }
- defer cli.Close()
-
- var ucred unix.Ucred
- if os.Getuid() != 0 {
- ucred.Pid = int32(os.Getpid())
- ucred.Uid = 0
- ucred.Gid = 0
- oob := unix.UnixCredentials(&ucred)
- _, _, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil)
- if op, ok := err.(*net.OpError); ok {
- err = op.Err
- }
- if sys, ok := err.(*os.SyscallError); ok {
- err = sys.Err
- }
- if err != syscall.EPERM {
- t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err)
- }
- }
-
- ucred.Pid = int32(os.Getpid())
- ucred.Uid = uint32(os.Getuid())
- ucred.Gid = uint32(os.Getgid())
- oob := unix.UnixCredentials(&ucred)
-
- // On SOCK_STREAM, this is internally going to send a dummy byte
- n, oobn, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil)
- if err != nil {
- t.Fatalf("WriteMsgUnix: %v", err)
- }
- if n != 0 {
- t.Fatalf("WriteMsgUnix n = %d, want 0", n)
- }
- if oobn != len(oob) {
- t.Fatalf("WriteMsgUnix oobn = %d, want %d", oobn, len(oob))
- }
-
- oob2 := make([]byte, 10*len(oob))
- n, oobn2, flags, _, err := srv.(*net.UnixConn).ReadMsgUnix(nil, oob2)
- if err != nil {
- t.Fatalf("ReadMsgUnix: %v", err)
- }
- if flags != 0 {
- t.Fatalf("ReadMsgUnix flags = 0x%x, want 0", flags)
- }
- if n != tt.dataLen {
- t.Fatalf("ReadMsgUnix n = %d, want %d", n, tt.dataLen)
- }
- if oobn2 != oobn {
- // without SO_PASSCRED set on the socket, ReadMsgUnix will
- // return zero oob bytes
- t.Fatalf("ReadMsgUnix oobn = %d, want %d", oobn2, oobn)
- }
- oob2 = oob2[:oobn2]
- if !bytes.Equal(oob, oob2) {
- t.Fatal("ReadMsgUnix oob bytes don't match")
- }
-
- scm, err := unix.ParseSocketControlMessage(oob2)
- if err != nil {
- t.Fatalf("ParseSocketControlMessage: %v", err)
- }
- newUcred, err := unix.ParseUnixCredentials(&scm[0])
- if err != nil {
- t.Fatalf("ParseUnixCredentials: %v", err)
- }
- if *newUcred != ucred {
- t.Fatalf("ParseUnixCredentials = %+v, want %+v", newUcred, ucred)
- }
- }
-}
-
-// atLeast1p10 reports whether we are running on Go 1.10 or later.
-func atLeast1p10() bool {
- for _, ver := range build.Default.ReleaseTags {
- if ver == "go1.10" {
- return true
- }
- }
- return false
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_darwin.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_darwin.go
deleted file mode 100644
index 8d1dc0f..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_darwin.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Functions to access/create device major and minor numbers matching the
-// encoding used in Darwin's sys/types.h header.
-
-package unix
-
-// Major returns the major component of a Darwin device number.
-func Major(dev uint64) uint32 {
- return uint32((dev >> 24) & 0xff)
-}
-
-// Minor returns the minor component of a Darwin device number.
-func Minor(dev uint64) uint32 {
- return uint32(dev & 0xffffff)
-}
-
-// Mkdev returns a Darwin device number generated from the given major and minor
-// components.
-func Mkdev(major, minor uint32) uint64 {
- return (uint64(major) << 24) | uint64(minor)
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_darwin_test.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_darwin_test.go
deleted file mode 100644
index bf1adf3..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_darwin_test.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.7
-
-package unix_test
-
-import (
- "fmt"
- "testing"
-
- "golang.org/x/sys/unix"
-)
-
-func TestDevices(t *testing.T) {
- testCases := []struct {
- path string
- major uint32
- minor uint32
- }{
- // Most of the device major/minor numbers on Darwin are
- // dynamically generated by devfs. These are some well-known
- // static numbers.
- {"/dev/ttyp0", 4, 0},
- {"/dev/ttys0", 4, 48},
- {"/dev/ptyp0", 5, 0},
- {"/dev/ptyr0", 5, 32},
- }
- for _, tc := range testCases {
- t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) {
- var stat unix.Stat_t
- err := unix.Stat(tc.path, &stat)
- if err != nil {
- t.Errorf("failed to stat device: %v", err)
- return
- }
-
- dev := uint64(stat.Rdev)
- if unix.Major(dev) != tc.major {
- t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major)
- }
- if unix.Minor(dev) != tc.minor {
- t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor)
- }
- if unix.Mkdev(tc.major, tc.minor) != dev {
- t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev)
- }
- })
- }
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_dragonfly.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_dragonfly.go
deleted file mode 100644
index 8502f20..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_dragonfly.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Functions to access/create device major and minor numbers matching the
-// encoding used in Dragonfly's sys/types.h header.
-//
-// The information below is extracted and adapted from sys/types.h:
-//
-// Minor gives a cookie instead of an index since in order to avoid changing the
-// meanings of bits 0-15 or wasting time and space shifting bits 16-31 for
-// devices that don't use them.
-
-package unix
-
-// Major returns the major component of a DragonFlyBSD device number.
-func Major(dev uint64) uint32 {
- return uint32((dev >> 8) & 0xff)
-}
-
-// Minor returns the minor component of a DragonFlyBSD device number.
-func Minor(dev uint64) uint32 {
- return uint32(dev & 0xffff00ff)
-}
-
-// Mkdev returns a DragonFlyBSD device number generated from the given major and
-// minor components.
-func Mkdev(major, minor uint32) uint64 {
- return (uint64(major) << 8) | uint64(minor)
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_dragonfly_test.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_dragonfly_test.go
deleted file mode 100644
index 9add376..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_dragonfly_test.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.7
-
-package unix_test
-
-import (
- "fmt"
- "testing"
-
- "golang.org/x/sys/unix"
-)
-
-func TestDevices(t *testing.T) {
- testCases := []struct {
- path string
- major uint32
- minor uint32
- }{
- // Minor is a cookie instead of an index on DragonFlyBSD
- {"/dev/null", 10, 0x00000002},
- {"/dev/random", 10, 0x00000003},
- {"/dev/urandom", 10, 0x00000004},
- {"/dev/zero", 10, 0x0000000c},
- {"/dev/bpf", 15, 0xffff00ff},
- }
- for _, tc := range testCases {
- t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) {
- var stat unix.Stat_t
- err := unix.Stat(tc.path, &stat)
- if err != nil {
- t.Errorf("failed to stat device: %v", err)
- return
- }
-
- dev := uint64(stat.Rdev)
- if unix.Major(dev) != tc.major {
- t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major)
- }
- if unix.Minor(dev) != tc.minor {
- t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor)
- }
- if unix.Mkdev(tc.major, tc.minor) != dev {
- t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev)
- }
- })
- }
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_freebsd.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_freebsd.go
deleted file mode 100644
index eba3b4b..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_freebsd.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Functions to access/create device major and minor numbers matching the
-// encoding used in FreeBSD's sys/types.h header.
-//
-// The information below is extracted and adapted from sys/types.h:
-//
-// Minor gives a cookie instead of an index since in order to avoid changing the
-// meanings of bits 0-15 or wasting time and space shifting bits 16-31 for
-// devices that don't use them.
-
-package unix
-
-// Major returns the major component of a FreeBSD device number.
-func Major(dev uint64) uint32 {
- return uint32((dev >> 8) & 0xff)
-}
-
-// Minor returns the minor component of a FreeBSD device number.
-func Minor(dev uint64) uint32 {
- return uint32(dev & 0xffff00ff)
-}
-
-// Mkdev returns a FreeBSD device number generated from the given major and
-// minor components.
-func Mkdev(major, minor uint32) uint64 {
- return (uint64(major) << 8) | uint64(minor)
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_linux.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_linux.go
deleted file mode 100644
index d165d6f..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_linux.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Functions to access/create device major and minor numbers matching the
-// encoding used by the Linux kernel and glibc.
-//
-// The information below is extracted and adapted from bits/sysmacros.h in the
-// glibc sources:
-//
-// dev_t in glibc is 64-bit, with 32-bit major and minor numbers. glibc's
-// default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of the major
-// number and m is a hex digit of the minor number. This is backward compatible
-// with legacy systems where dev_t is 16 bits wide, encoded as MMmm. It is also
-// backward compatible with the Linux kernel, which for some architectures uses
-// 32-bit dev_t, encoded as mmmM MMmm.
-
-package unix
-
-// Major returns the major component of a Linux device number.
-func Major(dev uint64) uint32 {
- major := uint32((dev & 0x00000000000fff00) >> 8)
- major |= uint32((dev & 0xfffff00000000000) >> 32)
- return major
-}
-
-// Minor returns the minor component of a Linux device number.
-func Minor(dev uint64) uint32 {
- minor := uint32((dev & 0x00000000000000ff) >> 0)
- minor |= uint32((dev & 0x00000ffffff00000) >> 12)
- return minor
-}
-
-// Mkdev returns a Linux device number generated from the given major and minor
-// components.
-func Mkdev(major, minor uint32) uint64 {
- dev := (uint64(major) & 0x00000fff) << 8
- dev |= (uint64(major) & 0xfffff000) << 32
- dev |= (uint64(minor) & 0x000000ff) << 0
- dev |= (uint64(minor) & 0xffffff00) << 12
- return dev
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_linux_test.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_linux_test.go
deleted file mode 100644
index 2fd3ead..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_linux_test.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.7
-
-package unix_test
-
-import (
- "fmt"
- "testing"
-
- "golang.org/x/sys/unix"
-)
-
-func TestDevices(t *testing.T) {
- testCases := []struct {
- path string
- major uint32
- minor uint32
- }{
- // well known major/minor numbers according to
- // https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/admin-guide/devices.txt
- {"/dev/null", 1, 3},
- {"/dev/zero", 1, 5},
- {"/dev/random", 1, 8},
- {"/dev/full", 1, 7},
- {"/dev/urandom", 1, 9},
- {"/dev/tty", 5, 0},
- }
- for _, tc := range testCases {
- t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) {
- var stat unix.Stat_t
- err := unix.Stat(tc.path, &stat)
- if err != nil {
- t.Errorf("failed to stat device: %v", err)
- return
- }
-
- dev := uint64(stat.Rdev)
- if unix.Major(dev) != tc.major {
- t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major)
- }
- if unix.Minor(dev) != tc.minor {
- t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor)
- }
- if unix.Mkdev(tc.major, tc.minor) != dev {
- t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev)
- }
- })
-
- }
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_netbsd.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_netbsd.go
deleted file mode 100644
index b4a203d..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_netbsd.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Functions to access/create device major and minor numbers matching the
-// encoding used in NetBSD's sys/types.h header.
-
-package unix
-
-// Major returns the major component of a NetBSD device number.
-func Major(dev uint64) uint32 {
- return uint32((dev & 0x000fff00) >> 8)
-}
-
-// Minor returns the minor component of a NetBSD device number.
-func Minor(dev uint64) uint32 {
- minor := uint32((dev & 0x000000ff) >> 0)
- minor |= uint32((dev & 0xfff00000) >> 12)
- return minor
-}
-
-// Mkdev returns a NetBSD device number generated from the given major and minor
-// components.
-func Mkdev(major, minor uint32) uint64 {
- dev := (uint64(major) << 8) & 0x000fff00
- dev |= (uint64(minor) << 12) & 0xfff00000
- dev |= (uint64(minor) << 0) & 0x000000ff
- return dev
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_netbsd_test.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_netbsd_test.go
deleted file mode 100644
index 441058a..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_netbsd_test.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.7
-
-package unix_test
-
-import (
- "fmt"
- "testing"
-
- "golang.org/x/sys/unix"
-)
-
-func TestDevices(t *testing.T) {
- testCases := []struct {
- path string
- major uint32
- minor uint32
- }{
- // well known major/minor numbers according to /dev/MAKEDEV on
- // NetBSD 8.0
- {"/dev/null", 2, 2},
- {"/dev/zero", 2, 12},
- {"/dev/random", 46, 0},
- {"/dev/urandom", 46, 1},
- }
- for _, tc := range testCases {
- t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) {
- var stat unix.Stat_t
- err := unix.Stat(tc.path, &stat)
- if err != nil {
- t.Errorf("failed to stat device: %v", err)
- return
- }
-
- dev := uint64(stat.Rdev)
- if unix.Major(dev) != tc.major {
- t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major)
- }
- if unix.Minor(dev) != tc.minor {
- t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor)
- }
- if unix.Mkdev(tc.major, tc.minor) != dev {
- t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev)
- }
- })
- }
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_openbsd.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_openbsd.go
deleted file mode 100644
index f3430c4..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_openbsd.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Functions to access/create device major and minor numbers matching the
-// encoding used in OpenBSD's sys/types.h header.
-
-package unix
-
-// Major returns the major component of an OpenBSD device number.
-func Major(dev uint64) uint32 {
- return uint32((dev & 0x0000ff00) >> 8)
-}
-
-// Minor returns the minor component of an OpenBSD device number.
-func Minor(dev uint64) uint32 {
- minor := uint32((dev & 0x000000ff) >> 0)
- minor |= uint32((dev & 0xffff0000) >> 8)
- return minor
-}
-
-// Mkdev returns an OpenBSD device number generated from the given major and minor
-// components.
-func Mkdev(major, minor uint32) uint64 {
- dev := (uint64(major) << 8) & 0x0000ff00
- dev |= (uint64(minor) << 8) & 0xffff0000
- dev |= (uint64(minor) << 0) & 0x000000ff
- return dev
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_openbsd_test.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_openbsd_test.go
deleted file mode 100644
index e6cb64f..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_openbsd_test.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.7
-
-package unix_test
-
-import (
- "fmt"
- "testing"
-
- "golang.org/x/sys/unix"
-)
-
-func TestDevices(t *testing.T) {
- testCases := []struct {
- path string
- major uint32
- minor uint32
- }{
- // well known major/minor numbers according to /dev/MAKEDEV on
- // OpenBSD 6.0
- {"/dev/null", 2, 2},
- {"/dev/zero", 2, 12},
- {"/dev/ttyp0", 5, 0},
- {"/dev/ttyp1", 5, 1},
- {"/dev/random", 45, 0},
- {"/dev/srandom", 45, 1},
- {"/dev/urandom", 45, 2},
- {"/dev/arandom", 45, 3},
- }
- for _, tc := range testCases {
- t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) {
- var stat unix.Stat_t
- err := unix.Stat(tc.path, &stat)
- if err != nil {
- t.Errorf("failed to stat device: %v", err)
- return
- }
-
- dev := uint64(stat.Rdev)
- if unix.Major(dev) != tc.major {
- t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major)
- }
- if unix.Minor(dev) != tc.minor {
- t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor)
- }
- if unix.Mkdev(tc.major, tc.minor) != dev {
- t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev)
- }
- })
- }
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_solaris_test.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_solaris_test.go
deleted file mode 100644
index 656508c..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dev_solaris_test.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.7
-
-package unix_test
-
-import (
- "fmt"
- "testing"
-
- "golang.org/x/sys/unix"
-)
-
-func TestDevices(t *testing.T) {
- testCases := []struct {
- path string
- major uint32
- minor uint32
- }{
- // Well-known major/minor numbers on OpenSolaris according to
- // /etc/name_to_major
- {"/dev/zero", 134, 12},
- {"/dev/null", 134, 2},
- {"/dev/ptyp0", 172, 0},
- {"/dev/ttyp0", 175, 0},
- {"/dev/ttyp1", 175, 1},
- }
- for _, tc := range testCases {
- t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) {
- var stat unix.Stat_t
- err := unix.Stat(tc.path, &stat)
- if err != nil {
- t.Errorf("failed to stat device: %v", err)
- return
- }
-
- dev := uint64(stat.Rdev)
- if unix.Major(dev) != tc.major {
- t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major)
- }
- if unix.Minor(dev) != tc.minor {
- t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor)
- }
- if unix.Mkdev(tc.major, tc.minor) != dev {
- t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev)
- }
- })
- }
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dirent.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dirent.go
deleted file mode 100644
index 95fd353..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/dirent.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
-
-package unix
-
-import "syscall"
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number of
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- return syscall.ParseDirent(buf, max, names)
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/endian_big.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/endian_big.go
deleted file mode 100644
index 5e92690..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/endian_big.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-//
-// +build ppc64 s390x mips mips64
-
-package unix
-
-const isBigEndian = true
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/endian_little.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/endian_little.go
deleted file mode 100644
index 085df2d..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/endian_little.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-//
-// +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le
-
-package unix
-
-const isBigEndian = false
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/env_unix.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/env_unix.go
deleted file mode 100644
index 706b3cd..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/env_unix.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-// Unix environment variables.
-
-package unix
-
-import "syscall"
-
-func Getenv(key string) (value string, found bool) {
- return syscall.Getenv(key)
-}
-
-func Setenv(key, value string) error {
- return syscall.Setenv(key, value)
-}
-
-func Clearenv() {
- syscall.Clearenv()
-}
-
-func Environ() []string {
- return syscall.Environ()
-}
-
-func Unsetenv(key string) error {
- return syscall.Unsetenv(key)
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/errors_freebsd_386.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/errors_freebsd_386.go
deleted file mode 100644
index c56bc8b..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/errors_freebsd_386.go
+++ /dev/null
@@ -1,227 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
-// them here for backwards compatibility.
-
-package unix
-
-const (
- IFF_SMART = 0x20
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BSC = 0x53
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_IPXIP = 0xf9
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf6
- IFT_PFSYNC = 0xf7
- IFT_PLC = 0xae
- IFT_POS = 0xab
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf1
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_STF = 0xd7
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VOICEEM = 0x64
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IPPROTO_MAXID = 0x34
- IPV6_FAITH = 0x1d
- IP_FAITH = 0x16
- MAP_NORESERVE = 0x40
- MAP_RENAME = 0x20
- NET_RT_MAXID = 0x6
- RTF_PRCLONING = 0x10000
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- SIOCADDRT = 0x8030720a
- SIOCALIFADDR = 0x8118691b
- SIOCDELRT = 0x8030720b
- SIOCDLIFADDR = 0x8118691d
- SIOCGLIFADDR = 0xc118691c
- SIOCGLIFPHYADDR = 0xc118694b
- SIOCSLIFPHYADDR = 0x8118694a
-)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
deleted file mode 100644
index 3e97711..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
+++ /dev/null
@@ -1,227 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
-// them here for backwards compatibility.
-
-package unix
-
-const (
- IFF_SMART = 0x20
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BSC = 0x53
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_IPXIP = 0xf9
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf6
- IFT_PFSYNC = 0xf7
- IFT_PLC = 0xae
- IFT_POS = 0xab
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf1
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_STF = 0xd7
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VOICEEM = 0x64
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IPPROTO_MAXID = 0x34
- IPV6_FAITH = 0x1d
- IP_FAITH = 0x16
- MAP_NORESERVE = 0x40
- MAP_RENAME = 0x20
- NET_RT_MAXID = 0x6
- RTF_PRCLONING = 0x10000
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- SIOCADDRT = 0x8040720a
- SIOCALIFADDR = 0x8118691b
- SIOCDELRT = 0x8040720b
- SIOCDLIFADDR = 0x8118691d
- SIOCGLIFADDR = 0xc118691c
- SIOCGLIFPHYADDR = 0xc118694b
- SIOCSLIFPHYADDR = 0x8118694a
-)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/errors_freebsd_arm.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/errors_freebsd_arm.go
deleted file mode 100644
index 856dca3..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/errors_freebsd_arm.go
+++ /dev/null
@@ -1,226 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package unix
-
-const (
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BSC = 0x53
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf6
- IFT_PFSYNC = 0xf7
- IFT_PLC = 0xae
- IFT_POS = 0xab
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf1
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_STF = 0xd7
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VOICEEM = 0x64
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
-
- // missing constants on FreeBSD-11.1-RELEASE, copied from old values in ztypes_freebsd_arm.go
- IFF_SMART = 0x20
- IFT_FAITH = 0xf2
- IFT_IPXIP = 0xf9
- IPPROTO_MAXID = 0x34
- IPV6_FAITH = 0x1d
- IP_FAITH = 0x16
- MAP_NORESERVE = 0x40
- MAP_RENAME = 0x20
- NET_RT_MAXID = 0x6
- RTF_PRCLONING = 0x10000
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- SIOCADDRT = 0x8030720a
- SIOCALIFADDR = 0x8118691b
- SIOCDELRT = 0x8030720b
- SIOCDLIFADDR = 0x8118691d
- SIOCGLIFADDR = 0xc118691c
- SIOCGLIFPHYADDR = 0xc118694b
- SIOCSLIFPHYADDR = 0x8118694a
-)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/export_test.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/export_test.go
deleted file mode 100644
index e802469..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/export_test.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package unix
-
-var Itoa = itoa
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/flock.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/flock.go
deleted file mode 100644
index 2994ce7..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/flock.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd
-
-package unix
-
-import "unsafe"
-
-// fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux
-// systems by flock_linux_32bit.go to be SYS_FCNTL64.
-var fcntl64Syscall uintptr = SYS_FCNTL
-
-// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
-func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
- _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
- if errno == 0 {
- return nil
- }
- return errno
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/flock_linux_32bit.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/flock_linux_32bit.go
deleted file mode 100644
index fc0e50e..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/flock_linux_32bit.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// +build linux,386 linux,arm linux,mips linux,mipsle
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package unix
-
-func init() {
- // On 32-bit Linux systems, the fcntl syscall that matches Go's
- // Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
- fcntl64Syscall = SYS_FCNTL64
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/gccgo.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/gccgo.go
deleted file mode 100644
index 50062e3..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/gccgo.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gccgo
-
-package unix
-
-import "syscall"
-
-// We can't use the gc-syntax .s files for gccgo. On the plus side
-// much of the functionality can be written directly in Go.
-
-//extern gccgoRealSyscallNoError
-func realSyscallNoError(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r uintptr)
-
-//extern gccgoRealSyscall
-func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr)
-
-func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {
- syscall.Entersyscall()
- r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
- syscall.Exitsyscall()
- return r, 0
-}
-
-func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- syscall.Entersyscall()
- r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
- syscall.Exitsyscall()
- return r, 0, syscall.Errno(errno)
-}
-
-func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- syscall.Entersyscall()
- r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0)
- syscall.Exitsyscall()
- return r, 0, syscall.Errno(errno)
-}
-
-func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- syscall.Entersyscall()
- r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9)
- syscall.Exitsyscall()
- return r, 0, syscall.Errno(errno)
-}
-
-func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {
- r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
- return r, 0
-}
-
-func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
- return r, 0, syscall.Errno(errno)
-}
-
-func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0)
- return r, 0, syscall.Errno(errno)
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/gccgo_c.c b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/gccgo_c.c
deleted file mode 100644
index 24e96b1..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/gccgo_c.c
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gccgo
-
-#include
-#include
-#include
-
-#define _STRINGIFY2_(x) #x
-#define _STRINGIFY_(x) _STRINGIFY2_(x)
-#define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__)
-
-// Call syscall from C code because the gccgo support for calling from
-// Go to C does not support varargs functions.
-
-struct ret {
- uintptr_t r;
- uintptr_t err;
-};
-
-struct ret
-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)
-{
- struct ret r;
-
- errno = 0;
- r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);
- r.err = errno;
- return r;
-}
-
-uintptr_t
-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)
-{
- return syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);
-}
-
-// Define the use function in C so that it is not inlined.
-
-extern void use(void *) __asm__ (GOSYM_PREFIX GOPKGPATH ".use") __attribute__((noinline));
-
-void
-use(void *p __attribute__ ((unused)))
-{
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
deleted file mode 100644
index 251a977..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gccgo,linux,amd64
-
-package unix
-
-import "syscall"
-
-//extern gettimeofday
-func realGettimeofday(*Timeval, *byte) int32
-
-func gettimeofday(tv *Timeval) (err syscall.Errno) {
- r := realGettimeofday(tv, nil)
- if r < 0 {
- return syscall.GetErrno()
- }
- return 0
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/linux/Dockerfile b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/linux/Dockerfile
deleted file mode 100644
index 7fe5fc3..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/linux/Dockerfile
+++ /dev/null
@@ -1,51 +0,0 @@
-FROM ubuntu:16.04
-
-# Use the most recent ubuntu sources
-RUN echo 'deb http://en.archive.ubuntu.com/ubuntu/ artful main universe' >> /etc/apt/sources.list
-
-# Dependencies to get the git sources and go binaries
-RUN apt-get update && apt-get install -y \
- curl \
- git \
- && rm -rf /var/lib/apt/lists/*
-
-# Get the git sources. If not cached, this takes O(5 minutes).
-WORKDIR /git
-RUN git config --global advice.detachedHead false
-# Linux Kernel: Released 03 Sep 2017
-RUN git clone --branch v4.13 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
-# GNU C library: Released 02 Aug 2017 (we should try to get a secure way to clone this)
-RUN git clone --branch glibc-2.26 --depth 1 git://sourceware.org/git/glibc.git
-
-# Get Go 1.9.2
-ENV GOLANG_VERSION 1.9.2
-ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
-ENV GOLANG_DOWNLOAD_SHA256 de874549d9a8d8d8062be05808509c09a88a248e77ec14eb77453530829ac02b
-
-RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
- && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
- && tar -C /usr/local -xzf golang.tar.gz \
- && rm golang.tar.gz
-
-ENV PATH /usr/local/go/bin:$PATH
-
-# Linux and Glibc build dependencies
-RUN apt-get update && apt-get install -y \
- gawk make python \
- gcc gcc-multilib \
- gettext texinfo \
- && rm -rf /var/lib/apt/lists/*
-# Emulator and cross compilers
-RUN apt-get update && apt-get install -y \
- qemu \
- gcc-aarch64-linux-gnu gcc-arm-linux-gnueabi \
- gcc-mips-linux-gnu gcc-mips64-linux-gnuabi64 \
- gcc-mips64el-linux-gnuabi64 gcc-mipsel-linux-gnu \
- gcc-powerpc64-linux-gnu gcc-powerpc64le-linux-gnu \
- gcc-s390x-linux-gnu gcc-sparc64-linux-gnu \
- && rm -rf /var/lib/apt/lists/*
-
-# Let the scripts know they are in the docker environment
-ENV GOLANG_SYS_BUILD docker
-WORKDIR /build
-ENTRYPOINT ["go", "run", "linux/mkall.go", "/git/linux", "/git/glibc"]
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/linux/mkall.go b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/linux/mkall.go
deleted file mode 100644
index 89b2fe8..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/linux/mkall.go
+++ /dev/null
@@ -1,482 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// linux/mkall.go - Generates all Linux zsysnum, zsyscall, zerror, and ztype
-// files for all 11 linux architectures supported by the go compiler. See
-// README.md for more information about the build system.
-
-// To run it you must have a git checkout of the Linux kernel and glibc. Once
-// the appropriate sources are ready, the program is run as:
-// go run linux/mkall.go
-
-// +build ignore
-
-package main
-
-import (
- "bufio"
- "bytes"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "os/exec"
- "path/filepath"
- "runtime"
- "strings"
- "unicode"
-)
-
-// These will be paths to the appropriate source directories.
-var LinuxDir string
-var GlibcDir string
-
-const TempDir = "/tmp"
-const IncludeDir = TempDir + "/include" // To hold our C headers
-const BuildDir = TempDir + "/build" // To hold intermediate build files
-
-const GOOS = "linux" // Only for Linux targets
-const BuildArch = "amd64" // Must be built on this architecture
-const MinKernel = "2.6.23" // https://golang.org/doc/install#requirements
-
-type target struct {
- GoArch string // Architecture name according to Go
- LinuxArch string // Architecture name according to the Linux Kernel
- GNUArch string // Architecture name according to GNU tools (https://wiki.debian.org/Multiarch/Tuples)
- BigEndian bool // Default Little Endian
- SignedChar bool // Is -fsigned-char needed (default no)
- Bits int
-}
-
-// List of the 11 Linux targets supported by the go compiler. sparc64 is not
-// currently supported, though a port is in progress.
-var targets = []target{
- {
- GoArch: "386",
- LinuxArch: "x86",
- GNUArch: "i686-linux-gnu", // Note "i686" not "i386"
- Bits: 32,
- },
- {
- GoArch: "amd64",
- LinuxArch: "x86",
- GNUArch: "x86_64-linux-gnu",
- Bits: 64,
- },
- {
- GoArch: "arm64",
- LinuxArch: "arm64",
- GNUArch: "aarch64-linux-gnu",
- SignedChar: true,
- Bits: 64,
- },
- {
- GoArch: "arm",
- LinuxArch: "arm",
- GNUArch: "arm-linux-gnueabi",
- Bits: 32,
- },
- {
- GoArch: "mips",
- LinuxArch: "mips",
- GNUArch: "mips-linux-gnu",
- BigEndian: true,
- Bits: 32,
- },
- {
- GoArch: "mipsle",
- LinuxArch: "mips",
- GNUArch: "mipsel-linux-gnu",
- Bits: 32,
- },
- {
- GoArch: "mips64",
- LinuxArch: "mips",
- GNUArch: "mips64-linux-gnuabi64",
- BigEndian: true,
- Bits: 64,
- },
- {
- GoArch: "mips64le",
- LinuxArch: "mips",
- GNUArch: "mips64el-linux-gnuabi64",
- Bits: 64,
- },
- {
- GoArch: "ppc64",
- LinuxArch: "powerpc",
- GNUArch: "powerpc64-linux-gnu",
- BigEndian: true,
- Bits: 64,
- },
- {
- GoArch: "ppc64le",
- LinuxArch: "powerpc",
- GNUArch: "powerpc64le-linux-gnu",
- Bits: 64,
- },
- {
- GoArch: "s390x",
- LinuxArch: "s390",
- GNUArch: "s390x-linux-gnu",
- BigEndian: true,
- SignedChar: true,
- Bits: 64,
- },
- // {
- // GoArch: "sparc64",
- // LinuxArch: "sparc",
- // GNUArch: "sparc64-linux-gnu",
- // BigEndian: true,
- // Bits: 64,
- // },
-}
-
-// ptracePairs is a list of pairs of targets that can, in some cases,
-// run each other's binaries.
-var ptracePairs = []struct{ a1, a2 string }{
- {"386", "amd64"},
- {"arm", "arm64"},
- {"mips", "mips64"},
- {"mipsle", "mips64le"},
-}
-
-func main() {
- if runtime.GOOS != GOOS || runtime.GOARCH != BuildArch {
- fmt.Printf("Build system has GOOS_GOARCH = %s_%s, need %s_%s\n",
- runtime.GOOS, runtime.GOARCH, GOOS, BuildArch)
- return
- }
-
- // Check that we are using the new build system if we should
- if os.Getenv("GOLANG_SYS_BUILD") != "docker" {
- fmt.Println("In the new build system, mkall.go should not be called directly.")
- fmt.Println("See README.md")
- return
- }
-
- // Parse the command line options
- if len(os.Args) != 3 {
- fmt.Println("USAGE: go run linux/mkall.go ")
- return
- }
- LinuxDir = os.Args[1]
- GlibcDir = os.Args[2]
-
- for _, t := range targets {
- fmt.Printf("----- GENERATING: %s -----\n", t.GoArch)
- if err := t.generateFiles(); err != nil {
- fmt.Printf("%v\n***** FAILURE: %s *****\n\n", err, t.GoArch)
- } else {
- fmt.Printf("----- SUCCESS: %s -----\n\n", t.GoArch)
- }
- }
-
- fmt.Printf("----- GENERATING ptrace pairs -----\n")
- ok := true
- for _, p := range ptracePairs {
- if err := generatePtracePair(p.a1, p.a2); err != nil {
- fmt.Printf("%v\n***** FAILURE: %s/%s *****\n\n", err, p.a1, p.a2)
- ok = false
- }
- }
- if ok {
- fmt.Printf("----- SUCCESS ptrace pairs -----\n\n")
- }
-}
-
-// Makes an exec.Cmd with Stderr attached to os.Stderr
-func makeCommand(name string, args ...string) *exec.Cmd {
- cmd := exec.Command(name, args...)
- cmd.Stderr = os.Stderr
- return cmd
-}
-
-// Runs the command, pipes output to a formatter, pipes that to an output file.
-func (t *target) commandFormatOutput(formatter string, outputFile string,
- name string, args ...string) (err error) {
- mainCmd := makeCommand(name, args...)
-
- fmtCmd := makeCommand(formatter)
- if formatter == "mkpost" {
- fmtCmd = makeCommand("go", "run", "mkpost.go")
- // Set GOARCH_TARGET so mkpost knows what GOARCH is..
- fmtCmd.Env = append(os.Environ(), "GOARCH_TARGET="+t.GoArch)
- // Set GOARCH to host arch for mkpost, so it can run natively.
- for i, s := range fmtCmd.Env {
- if strings.HasPrefix(s, "GOARCH=") {
- fmtCmd.Env[i] = "GOARCH=" + BuildArch
- }
- }
- }
-
- // mainCmd | fmtCmd > outputFile
- if fmtCmd.Stdin, err = mainCmd.StdoutPipe(); err != nil {
- return
- }
- if fmtCmd.Stdout, err = os.Create(outputFile); err != nil {
- return
- }
-
- // Make sure the formatter eventually closes
- if err = fmtCmd.Start(); err != nil {
- return
- }
- defer func() {
- fmtErr := fmtCmd.Wait()
- if err == nil {
- err = fmtErr
- }
- }()
-
- return mainCmd.Run()
-}
-
-// Generates all the files for a Linux target
-func (t *target) generateFiles() error {
- // Setup environment variables
- os.Setenv("GOOS", GOOS)
- os.Setenv("GOARCH", t.GoArch)
-
- // Get appropriate compiler and emulator (unless on x86)
- if t.LinuxArch != "x86" {
- // Check/Setup cross compiler
- compiler := t.GNUArch + "-gcc"
- if _, err := exec.LookPath(compiler); err != nil {
- return err
- }
- os.Setenv("CC", compiler)
-
- // Check/Setup emulator (usually first component of GNUArch)
- qemuArchName := t.GNUArch[:strings.Index(t.GNUArch, "-")]
- if t.LinuxArch == "powerpc" {
- qemuArchName = t.GoArch
- }
- os.Setenv("GORUN", "qemu-"+qemuArchName)
- } else {
- os.Setenv("CC", "gcc")
- }
-
- // Make the include directory and fill it with headers
- if err := os.MkdirAll(IncludeDir, os.ModePerm); err != nil {
- return err
- }
- defer os.RemoveAll(IncludeDir)
- if err := t.makeHeaders(); err != nil {
- return fmt.Errorf("could not make header files: %v", err)
- }
- fmt.Println("header files generated")
-
- // Make each of the four files
- if err := t.makeZSysnumFile(); err != nil {
- return fmt.Errorf("could not make zsysnum file: %v", err)
- }
- fmt.Println("zsysnum file generated")
-
- if err := t.makeZSyscallFile(); err != nil {
- return fmt.Errorf("could not make zsyscall file: %v", err)
- }
- fmt.Println("zsyscall file generated")
-
- if err := t.makeZTypesFile(); err != nil {
- return fmt.Errorf("could not make ztypes file: %v", err)
- }
- fmt.Println("ztypes file generated")
-
- if err := t.makeZErrorsFile(); err != nil {
- return fmt.Errorf("could not make zerrors file: %v", err)
- }
- fmt.Println("zerrors file generated")
-
- return nil
-}
-
-// Create the Linux and glibc headers in the include directory.
-func (t *target) makeHeaders() error {
- // Make the Linux headers we need for this architecture
- linuxMake := makeCommand("make", "headers_install", "ARCH="+t.LinuxArch, "INSTALL_HDR_PATH="+TempDir)
- linuxMake.Dir = LinuxDir
- if err := linuxMake.Run(); err != nil {
- return err
- }
-
- // A Temporary build directory for glibc
- if err := os.MkdirAll(BuildDir, os.ModePerm); err != nil {
- return err
- }
- defer os.RemoveAll(BuildDir)
-
- // Make the glibc headers we need for this architecture
- confScript := filepath.Join(GlibcDir, "configure")
- glibcConf := makeCommand(confScript, "--prefix="+TempDir, "--host="+t.GNUArch, "--enable-kernel="+MinKernel)
- glibcConf.Dir = BuildDir
- if err := glibcConf.Run(); err != nil {
- return err
- }
- glibcMake := makeCommand("make", "install-headers")
- glibcMake.Dir = BuildDir
- if err := glibcMake.Run(); err != nil {
- return err
- }
- // We only need an empty stubs file
- stubsFile := filepath.Join(IncludeDir, "gnu/stubs.h")
- if file, err := os.Create(stubsFile); err != nil {
- return err
- } else {
- file.Close()
- }
-
- return nil
-}
-
-// makes the zsysnum_linux_$GOARCH.go file
-func (t *target) makeZSysnumFile() error {
- zsysnumFile := fmt.Sprintf("zsysnum_linux_%s.go", t.GoArch)
- unistdFile := filepath.Join(IncludeDir, "asm/unistd.h")
-
- args := append(t.cFlags(), unistdFile)
- return t.commandFormatOutput("gofmt", zsysnumFile, "linux/mksysnum.pl", args...)
-}
-
-// makes the zsyscall_linux_$GOARCH.go file
-func (t *target) makeZSyscallFile() error {
- zsyscallFile := fmt.Sprintf("zsyscall_linux_%s.go", t.GoArch)
- // Find the correct architecture syscall file (might end with x.go)
- archSyscallFile := fmt.Sprintf("syscall_linux_%s.go", t.GoArch)
- if _, err := os.Stat(archSyscallFile); os.IsNotExist(err) {
- shortArch := strings.TrimSuffix(t.GoArch, "le")
- archSyscallFile = fmt.Sprintf("syscall_linux_%sx.go", shortArch)
- }
-
- args := append(t.mksyscallFlags(), "-tags", "linux,"+t.GoArch,
- "syscall_linux.go", archSyscallFile)
- return t.commandFormatOutput("gofmt", zsyscallFile, "./mksyscall.pl", args...)
-}
-
-// makes the zerrors_linux_$GOARCH.go file
-func (t *target) makeZErrorsFile() error {
- zerrorsFile := fmt.Sprintf("zerrors_linux_%s.go", t.GoArch)
-
- return t.commandFormatOutput("gofmt", zerrorsFile, "./mkerrors.sh", t.cFlags()...)
-}
-
-// makes the ztypes_linux_$GOARCH.go file
-func (t *target) makeZTypesFile() error {
- ztypesFile := fmt.Sprintf("ztypes_linux_%s.go", t.GoArch)
-
- args := []string{"tool", "cgo", "-godefs", "--"}
- args = append(args, t.cFlags()...)
- args = append(args, "linux/types.go")
- return t.commandFormatOutput("mkpost", ztypesFile, "go", args...)
-}
-
-// Flags that should be given to gcc and cgo for this target
-func (t *target) cFlags() []string {
- // Compile statically to avoid cross-architecture dynamic linking.
- flags := []string{"-Wall", "-Werror", "-static", "-I" + IncludeDir}
-
- // Architecture-specific flags
- if t.SignedChar {
- flags = append(flags, "-fsigned-char")
- }
- if t.LinuxArch == "x86" {
- flags = append(flags, fmt.Sprintf("-m%d", t.Bits))
- }
-
- return flags
-}
-
-// Flags that should be given to mksyscall for this target
-func (t *target) mksyscallFlags() (flags []string) {
- if t.Bits == 32 {
- if t.BigEndian {
- flags = append(flags, "-b32")
- } else {
- flags = append(flags, "-l32")
- }
- }
-
- // This flag menas a 64-bit value should use (even, odd)-pair.
- if t.GoArch == "arm" || (t.LinuxArch == "mips" && t.Bits == 32) {
- flags = append(flags, "-arm")
- }
- return
-}
-
-// generatePtracePair takes a pair of GOARCH values that can run each
-// other's binaries, such as 386 and amd64. It extracts the PtraceRegs
-// type for each one. It writes a new file defining the types
-// PtraceRegsArch1 and PtraceRegsArch2 and the corresponding functions
-// Ptrace{Get,Set}Regs{arch1,arch2}. This permits debugging the other
-// binary on a native system.
-func generatePtracePair(arch1, arch2 string) error {
- def1, err := ptraceDef(arch1)
- if err != nil {
- return err
- }
- def2, err := ptraceDef(arch2)
- if err != nil {
- return err
- }
- f, err := os.Create(fmt.Sprintf("zptrace%s_linux.go", arch1))
- if err != nil {
- return err
- }
- buf := bufio.NewWriter(f)
- fmt.Fprintf(buf, "// Code generated by linux/mkall.go generatePtracePair(%s, %s). DO NOT EDIT.\n", arch1, arch2)
- fmt.Fprintf(buf, "\n")
- fmt.Fprintf(buf, "// +build linux\n")
- fmt.Fprintf(buf, "// +build %s %s\n", arch1, arch2)
- fmt.Fprintf(buf, "\n")
- fmt.Fprintf(buf, "package unix\n")
- fmt.Fprintf(buf, "\n")
- fmt.Fprintf(buf, "%s\n", `import "unsafe"`)
- fmt.Fprintf(buf, "\n")
- writeOnePtrace(buf, arch1, def1)
- fmt.Fprintf(buf, "\n")
- writeOnePtrace(buf, arch2, def2)
- if err := buf.Flush(); err != nil {
- return err
- }
- if err := f.Close(); err != nil {
- return err
- }
- return nil
-}
-
-// ptraceDef returns the definition of PtraceRegs for arch.
-func ptraceDef(arch string) (string, error) {
- filename := fmt.Sprintf("ztypes_linux_%s.go", arch)
- data, err := ioutil.ReadFile(filename)
- if err != nil {
- return "", fmt.Errorf("reading %s: %v", filename, err)
- }
- start := bytes.Index(data, []byte("type PtraceRegs struct"))
- if start < 0 {
- return "", fmt.Errorf("%s: no definition of PtraceRegs", filename)
- }
- data = data[start:]
- end := bytes.Index(data, []byte("\n}\n"))
- if end < 0 {
- return "", fmt.Errorf("%s: can't find end of PtraceRegs definition", filename)
- }
- return string(data[:end+2]), nil
-}
-
-// writeOnePtrace writes out the ptrace definitions for arch.
-func writeOnePtrace(w io.Writer, arch, def string) {
- uarch := string(unicode.ToUpper(rune(arch[0]))) + arch[1:]
- fmt.Fprintf(w, "// PtraceRegs%s is the registers used by %s binaries.\n", uarch, arch)
- fmt.Fprintf(w, "%s\n", strings.Replace(def, "PtraceRegs", "PtraceRegs"+uarch, 1))
- fmt.Fprintf(w, "\n")
- fmt.Fprintf(w, "// PtraceGetRegs%s fetches the registers used by %s binaries.\n", uarch, arch)
- fmt.Fprintf(w, "func PtraceGetRegs%s(pid int, regsout *PtraceRegs%s) error {\n", uarch, uarch)
- fmt.Fprintf(w, "\treturn ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))\n")
- fmt.Fprintf(w, "}\n")
- fmt.Fprintf(w, "\n")
- fmt.Fprintf(w, "// PtraceSetRegs%s sets the registers used by %s binaries.\n", uarch, arch)
- fmt.Fprintf(w, "func PtraceSetRegs%s(pid int, regs *PtraceRegs%s) error {\n", uarch, uarch)
- fmt.Fprintf(w, "\treturn ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))\n")
- fmt.Fprintf(w, "}\n")
-}
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/linux/mksysnum.pl b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/linux/mksysnum.pl
deleted file mode 100755
index 63fd800..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/linux/mksysnum.pl
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-use strict;
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
- print STDERR "GOARCH or GOOS not defined in environment\n";
- exit 1;
-}
-
-# Check that we are using the new build system if we should
-if($ENV{'GOLANG_SYS_BUILD'} ne "docker") {
- print STDERR "In the new build system, mksysnum should not be called directly.\n";
- print STDERR "See README.md\n";
- exit 1;
-}
-
-my $command = "$0 ". join(' ', @ARGV);
-
-print < 999){
- # ignore deprecated syscalls that are no longer implemented
- # https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h?id=refs/heads/master#n716
- return;
- }
- $name =~ y/a-z/A-Z/;
- $num = $num + $offset;
- print " SYS_$name = $num;\n";
-}
-
-my $prev;
-open(CC, "$ENV{'CC'} -E -dD @ARGV |") || die "can't run $ENV{'CC'}";
-while(){
- if(/^#define __NR_Linux\s+([0-9]+)/){
- # mips/mips64: extract offset
- $offset = $1;
- }
- elsif(/^#define __NR(\w*)_SYSCALL_BASE\s+([0-9]+)/){
- # arm: extract offset
- $offset = $1;
- }
- elsif(/^#define __NR_syscalls\s+/) {
- # ignore redefinitions of __NR_syscalls
- }
- elsif(/^#define __NR_(\w*)Linux_syscalls\s+/) {
- # mips/mips64: ignore definitions about the number of syscalls
- }
- elsif(/^#define __NR_(\w+)\s+([0-9]+)/){
- $prev = $2;
- fmt($1, $2);
- }
- elsif(/^#define __NR3264_(\w+)\s+([0-9]+)/){
- $prev = $2;
- fmt($1, $2);
- }
- elsif(/^#define __NR_(\w+)\s+\(\w+\+\s*([0-9]+)\)/){
- fmt($1, $prev+$2)
- }
- elsif(/^#define __NR_(\w+)\s+\(__NR_Linux \+ ([0-9]+)/){
- fmt($1, $2);
- }
- elsif(/^#define __NR_(\w+)\s+\(__NR_SYSCALL_BASE \+ ([0-9]+)/){
- fmt($1, $2);
- }
-}
-
-print <
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-// On mips64, the glibc stat and kernel stat do not agree
-#if (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI64)
-
-// Use the stat defined by the kernel with a few modifications. These are:
-// * The time fields (like st_atime and st_atimensec) use the timespec
-// struct (like st_atim) for consitancy with the glibc fields.
-// * The padding fields get different names to not break compatibility.
-// * st_blocks is signed, again for compatibility.
-struct stat {
- unsigned int st_dev;
- unsigned int st_pad1[3]; // Reserved for st_dev expansion
-
- unsigned long st_ino;
-
- mode_t st_mode;
- __u32 st_nlink;
-
- uid_t st_uid;
- gid_t st_gid;
-
- unsigned int st_rdev;
- unsigned int st_pad2[3]; // Reserved for st_rdev expansion
-
- off_t st_size;
-
- // These are declared as speperate fields in the kernel. Here we use
- // the timespec struct for consistancy with the other stat structs.
- struct timespec st_atim;
- struct timespec st_mtim;
- struct timespec st_ctim;
-
- unsigned int st_blksize;
- unsigned int st_pad4;
-
- long st_blocks;
-};
-
-// These are needed because we do not include fcntl.h or sys/types.h
-#include
-#include
-
-#else
-
-// Use the stat defined by glibc
-#include
-#include
-
-#endif
-
-// These are defined in linux/fcntl.h, but including it globally causes
-// conflicts with fcntl.h
-#ifndef AT_STATX_SYNC_TYPE
-# define AT_STATX_SYNC_TYPE 0x6000 // Type of synchronisation required from statx()
-#endif
-#ifndef AT_STATX_SYNC_AS_STAT
-# define AT_STATX_SYNC_AS_STAT 0x0000 // - Do whatever stat() does
-#endif
-#ifndef AT_STATX_FORCE_SYNC
-# define AT_STATX_FORCE_SYNC 0x2000 // - Force the attributes to be sync'd with the server
-#endif
-#ifndef AT_STATX_DONT_SYNC
-# define AT_STATX_DONT_SYNC 0x4000 // - Don't sync attributes with the server
-#endif
-
-#ifdef TCSETS2
-// On systems that have "struct termios2" use this as type Termios.
-typedef struct termios2 termios_t;
-#else
-typedef struct termios termios_t;
-#endif
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_ll s5;
- struct sockaddr_nl s6;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-// copied from /usr/include/bluetooth/hci.h
-struct sockaddr_hci {
- sa_family_t hci_family;
- unsigned short hci_dev;
- unsigned short hci_channel;
-};
-
-// copied from /usr/include/bluetooth/bluetooth.h
-#define BDADDR_BREDR 0x00
-#define BDADDR_LE_PUBLIC 0x01
-#define BDADDR_LE_RANDOM 0x02
-
-// copied from /usr/include/bluetooth/l2cap.h
-struct sockaddr_l2 {
- sa_family_t l2_family;
- unsigned short l2_psm;
- uint8_t l2_bdaddr[6];
- unsigned short l2_cid;
- uint8_t l2_bdaddr_type;
-};
-
-// copied from /usr/include/linux/un.h
-struct my_sockaddr_un {
- sa_family_t sun_family;
-#if defined(__ARM_EABI__) || defined(__powerpc64__)
- // on ARM char is by default unsigned
- signed char sun_path[108];
-#else
- char sun_path[108];
-#endif
-};
-
-#ifdef __ARM_EABI__
-typedef struct user_regs PtraceRegs;
-#elif defined(__aarch64__)
-typedef struct user_pt_regs PtraceRegs;
-#elif defined(__mips__) || defined(__powerpc64__)
-typedef struct pt_regs PtraceRegs;
-#elif defined(__s390x__)
-typedef struct _user_regs_struct PtraceRegs;
-#elif defined(__sparc__)
-#include
-typedef struct pt_regs PtraceRegs;
-#else
-typedef struct user_regs_struct PtraceRegs;
-#endif
-
-#if defined(__s390x__)
-typedef struct _user_psw_struct ptracePsw;
-typedef struct _user_fpregs_struct ptraceFpregs;
-typedef struct _user_per_struct ptracePer;
-#else
-typedef struct {} ptracePsw;
-typedef struct {} ptraceFpregs;
-typedef struct {} ptracePer;
-#endif
-
-// The real epoll_event is a union, and godefs doesn't handle it well.
-struct my_epoll_event {
- uint32_t events;
-#if defined(__ARM_EABI__) || defined(__aarch64__) || (defined(__mips__) && _MIPS_SIM == _ABIO32)
- // padding is not specified in linux/eventpoll.h but added to conform to the
- // alignment requirements of EABI
- int32_t padFd;
-#elif defined(__powerpc64__) || defined(__s390x__) || defined(__sparc__)
- int32_t _padFd;
-#endif
- int32_t fd;
- int32_t pad;
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
- PathMax = C.PATH_MAX
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-type Timex C.struct_timex
-
-type Time_t C.time_t
-
-type Tms C.struct_tms
-
-type Utimbuf C.struct_utimbuf
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-type Stat_t C.struct_stat
-
-type Statfs_t C.struct_statfs
-
-type StatxTimestamp C.struct_statx_timestamp
-
-type Statx_t C.struct_statx
-
-type Dirent C.struct_dirent
-
-type Fsid C.fsid_t
-
-type Flock_t C.struct_flock
-
-// Filesystem Encryption
-
-type FscryptPolicy C.struct_fscrypt_policy
-
-type FscryptKey C.struct_fscrypt_key
-
-// Structure for Keyctl
-
-type KeyctlDHParams C.struct_keyctl_dh_params
-
-// Advice to Fadvise
-
-const (
- FADV_NORMAL = C.POSIX_FADV_NORMAL
- FADV_RANDOM = C.POSIX_FADV_RANDOM
- FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL
- FADV_WILLNEED = C.POSIX_FADV_WILLNEED
- FADV_DONTNEED = C.POSIX_FADV_DONTNEED
- FADV_NOREUSE = C.POSIX_FADV_NOREUSE
-)
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_my_sockaddr_un
-
-type RawSockaddrLinklayer C.struct_sockaddr_ll
-
-type RawSockaddrNetlink C.struct_sockaddr_nl
-
-type RawSockaddrHCI C.struct_sockaddr_hci
-
-type RawSockaddrL2 C.struct_sockaddr_l2
-
-type RawSockaddrCAN C.struct_sockaddr_can
-
-type RawSockaddrALG C.struct_sockaddr_alg
-
-type RawSockaddrVM C.struct_sockaddr_vm
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPMreqn C.struct_ip_mreqn
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type PacketMreq C.struct_packet_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet4Pktinfo C.struct_in_pktinfo
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-type Ucred C.struct_ucred
-
-type TCPInfo C.struct_tcp_info
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrLinklayer = C.sizeof_struct_sockaddr_ll
- SizeofSockaddrNetlink = C.sizeof_struct_sockaddr_nl
- SizeofSockaddrHCI = C.sizeof_struct_sockaddr_hci
- SizeofSockaddrL2 = C.sizeof_struct_sockaddr_l2
- SizeofSockaddrCAN = C.sizeof_struct_sockaddr_can
- SizeofSockaddrALG = C.sizeof_struct_sockaddr_alg
- SizeofSockaddrVM = C.sizeof_struct_sockaddr_vm
- SizeofLinger = C.sizeof_struct_linger
- SizeofIovec = C.sizeof_struct_iovec
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPMreqn = C.sizeof_struct_ip_mreqn
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofPacketMreq = C.sizeof_struct_packet_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
- SizeofUcred = C.sizeof_struct_ucred
- SizeofTCPInfo = C.sizeof_struct_tcp_info
-)
-
-// Netlink routing and interface messages
-
-const (
- IFA_UNSPEC = C.IFA_UNSPEC
- IFA_ADDRESS = C.IFA_ADDRESS
- IFA_LOCAL = C.IFA_LOCAL
- IFA_LABEL = C.IFA_LABEL
- IFA_BROADCAST = C.IFA_BROADCAST
- IFA_ANYCAST = C.IFA_ANYCAST
- IFA_CACHEINFO = C.IFA_CACHEINFO
- IFA_MULTICAST = C.IFA_MULTICAST
- IFLA_UNSPEC = C.IFLA_UNSPEC
- IFLA_ADDRESS = C.IFLA_ADDRESS
- IFLA_BROADCAST = C.IFLA_BROADCAST
- IFLA_IFNAME = C.IFLA_IFNAME
- IFLA_MTU = C.IFLA_MTU
- IFLA_LINK = C.IFLA_LINK
- IFLA_QDISC = C.IFLA_QDISC
- IFLA_STATS = C.IFLA_STATS
- IFLA_COST = C.IFLA_COST
- IFLA_PRIORITY = C.IFLA_PRIORITY
- IFLA_MASTER = C.IFLA_MASTER
- IFLA_WIRELESS = C.IFLA_WIRELESS
- IFLA_PROTINFO = C.IFLA_PROTINFO
- IFLA_TXQLEN = C.IFLA_TXQLEN
- IFLA_MAP = C.IFLA_MAP
- IFLA_WEIGHT = C.IFLA_WEIGHT
- IFLA_OPERSTATE = C.IFLA_OPERSTATE
- IFLA_LINKMODE = C.IFLA_LINKMODE
- IFLA_LINKINFO = C.IFLA_LINKINFO
- IFLA_NET_NS_PID = C.IFLA_NET_NS_PID
- IFLA_IFALIAS = C.IFLA_IFALIAS
- IFLA_MAX = C.IFLA_MAX
- RT_SCOPE_UNIVERSE = C.RT_SCOPE_UNIVERSE
- RT_SCOPE_SITE = C.RT_SCOPE_SITE
- RT_SCOPE_LINK = C.RT_SCOPE_LINK
- RT_SCOPE_HOST = C.RT_SCOPE_HOST
- RT_SCOPE_NOWHERE = C.RT_SCOPE_NOWHERE
- RT_TABLE_UNSPEC = C.RT_TABLE_UNSPEC
- RT_TABLE_COMPAT = C.RT_TABLE_COMPAT
- RT_TABLE_DEFAULT = C.RT_TABLE_DEFAULT
- RT_TABLE_MAIN = C.RT_TABLE_MAIN
- RT_TABLE_LOCAL = C.RT_TABLE_LOCAL
- RT_TABLE_MAX = C.RT_TABLE_MAX
- RTA_UNSPEC = C.RTA_UNSPEC
- RTA_DST = C.RTA_DST
- RTA_SRC = C.RTA_SRC
- RTA_IIF = C.RTA_IIF
- RTA_OIF = C.RTA_OIF
- RTA_GATEWAY = C.RTA_GATEWAY
- RTA_PRIORITY = C.RTA_PRIORITY
- RTA_PREFSRC = C.RTA_PREFSRC
- RTA_METRICS = C.RTA_METRICS
- RTA_MULTIPATH = C.RTA_MULTIPATH
- RTA_FLOW = C.RTA_FLOW
- RTA_CACHEINFO = C.RTA_CACHEINFO
- RTA_TABLE = C.RTA_TABLE
- RTN_UNSPEC = C.RTN_UNSPEC
- RTN_UNICAST = C.RTN_UNICAST
- RTN_LOCAL = C.RTN_LOCAL
- RTN_BROADCAST = C.RTN_BROADCAST
- RTN_ANYCAST = C.RTN_ANYCAST
- RTN_MULTICAST = C.RTN_MULTICAST
- RTN_BLACKHOLE = C.RTN_BLACKHOLE
- RTN_UNREACHABLE = C.RTN_UNREACHABLE
- RTN_PROHIBIT = C.RTN_PROHIBIT
- RTN_THROW = C.RTN_THROW
- RTN_NAT = C.RTN_NAT
- RTN_XRESOLVE = C.RTN_XRESOLVE
- RTNLGRP_NONE = C.RTNLGRP_NONE
- RTNLGRP_LINK = C.RTNLGRP_LINK
- RTNLGRP_NOTIFY = C.RTNLGRP_NOTIFY
- RTNLGRP_NEIGH = C.RTNLGRP_NEIGH
- RTNLGRP_TC = C.RTNLGRP_TC
- RTNLGRP_IPV4_IFADDR = C.RTNLGRP_IPV4_IFADDR
- RTNLGRP_IPV4_MROUTE = C.RTNLGRP_IPV4_MROUTE
- RTNLGRP_IPV4_ROUTE = C.RTNLGRP_IPV4_ROUTE
- RTNLGRP_IPV4_RULE = C.RTNLGRP_IPV4_RULE
- RTNLGRP_IPV6_IFADDR = C.RTNLGRP_IPV6_IFADDR
- RTNLGRP_IPV6_MROUTE = C.RTNLGRP_IPV6_MROUTE
- RTNLGRP_IPV6_ROUTE = C.RTNLGRP_IPV6_ROUTE
- RTNLGRP_IPV6_IFINFO = C.RTNLGRP_IPV6_IFINFO
- RTNLGRP_IPV6_PREFIX = C.RTNLGRP_IPV6_PREFIX
- RTNLGRP_IPV6_RULE = C.RTNLGRP_IPV6_RULE
- RTNLGRP_ND_USEROPT = C.RTNLGRP_ND_USEROPT
- SizeofNlMsghdr = C.sizeof_struct_nlmsghdr
- SizeofNlMsgerr = C.sizeof_struct_nlmsgerr
- SizeofRtGenmsg = C.sizeof_struct_rtgenmsg
- SizeofNlAttr = C.sizeof_struct_nlattr
- SizeofRtAttr = C.sizeof_struct_rtattr
- SizeofIfInfomsg = C.sizeof_struct_ifinfomsg
- SizeofIfAddrmsg = C.sizeof_struct_ifaddrmsg
- SizeofRtMsg = C.sizeof_struct_rtmsg
- SizeofRtNexthop = C.sizeof_struct_rtnexthop
-)
-
-type NlMsghdr C.struct_nlmsghdr
-
-type NlMsgerr C.struct_nlmsgerr
-
-type RtGenmsg C.struct_rtgenmsg
-
-type NlAttr C.struct_nlattr
-
-type RtAttr C.struct_rtattr
-
-type IfInfomsg C.struct_ifinfomsg
-
-type IfAddrmsg C.struct_ifaddrmsg
-
-type RtMsg C.struct_rtmsg
-
-type RtNexthop C.struct_rtnexthop
-
-// Linux socket filter
-
-const (
- SizeofSockFilter = C.sizeof_struct_sock_filter
- SizeofSockFprog = C.sizeof_struct_sock_fprog
-)
-
-type SockFilter C.struct_sock_filter
-
-type SockFprog C.struct_sock_fprog
-
-// Inotify
-
-type InotifyEvent C.struct_inotify_event
-
-const SizeofInotifyEvent = C.sizeof_struct_inotify_event
-
-// Ptrace
-
-// Register structures
-type PtraceRegs C.PtraceRegs
-
-// Structures contained in PtraceRegs on s390x (exported by mkpost.go)
-type PtracePsw C.ptracePsw
-
-type PtraceFpregs C.ptraceFpregs
-
-type PtracePer C.ptracePer
-
-// Misc
-
-type FdSet C.fd_set
-
-type Sysinfo_t C.struct_sysinfo
-
-type Utsname C.struct_utsname
-
-type Ustat_t C.struct_ustat
-
-type EpollEvent C.struct_my_epoll_event
-
-const (
- AT_EMPTY_PATH = C.AT_EMPTY_PATH
- AT_FDCWD = C.AT_FDCWD
- AT_NO_AUTOMOUNT = C.AT_NO_AUTOMOUNT
- AT_REMOVEDIR = C.AT_REMOVEDIR
-
- AT_STATX_SYNC_AS_STAT = C.AT_STATX_SYNC_AS_STAT
- AT_STATX_FORCE_SYNC = C.AT_STATX_FORCE_SYNC
- AT_STATX_DONT_SYNC = C.AT_STATX_DONT_SYNC
-
- AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW
- AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
-)
-
-type PollFd C.struct_pollfd
-
-const (
- POLLIN = C.POLLIN
- POLLPRI = C.POLLPRI
- POLLOUT = C.POLLOUT
- POLLRDHUP = C.POLLRDHUP
- POLLERR = C.POLLERR
- POLLHUP = C.POLLHUP
- POLLNVAL = C.POLLNVAL
-)
-
-type Sigset_t C.sigset_t
-
-const RNDGETENTCNT = C.RNDGETENTCNT
-
-const PERF_IOC_FLAG_GROUP = C.PERF_IOC_FLAG_GROUP
-
-// Terminal handling
-
-type Termios C.termios_t
-
-type Winsize C.struct_winsize
-
-// Taskstats and cgroup stats.
-
-type Taskstats C.struct_taskstats
-
-const (
- TASKSTATS_CMD_UNSPEC = C.TASKSTATS_CMD_UNSPEC
- TASKSTATS_CMD_GET = C.TASKSTATS_CMD_GET
- TASKSTATS_CMD_NEW = C.TASKSTATS_CMD_NEW
- TASKSTATS_TYPE_UNSPEC = C.TASKSTATS_TYPE_UNSPEC
- TASKSTATS_TYPE_PID = C.TASKSTATS_TYPE_PID
- TASKSTATS_TYPE_TGID = C.TASKSTATS_TYPE_TGID
- TASKSTATS_TYPE_STATS = C.TASKSTATS_TYPE_STATS
- TASKSTATS_TYPE_AGGR_PID = C.TASKSTATS_TYPE_AGGR_PID
- TASKSTATS_TYPE_AGGR_TGID = C.TASKSTATS_TYPE_AGGR_TGID
- TASKSTATS_TYPE_NULL = C.TASKSTATS_TYPE_NULL
- TASKSTATS_CMD_ATTR_UNSPEC = C.TASKSTATS_CMD_ATTR_UNSPEC
- TASKSTATS_CMD_ATTR_PID = C.TASKSTATS_CMD_ATTR_PID
- TASKSTATS_CMD_ATTR_TGID = C.TASKSTATS_CMD_ATTR_TGID
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = C.TASKSTATS_CMD_ATTR_REGISTER_CPUMASK
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = C.TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK
-)
-
-type CGroupStats C.struct_cgroupstats
-
-const (
- CGROUPSTATS_CMD_UNSPEC = C.__TASKSTATS_CMD_MAX
- CGROUPSTATS_CMD_GET = C.CGROUPSTATS_CMD_GET
- CGROUPSTATS_CMD_NEW = C.CGROUPSTATS_CMD_NEW
- CGROUPSTATS_TYPE_UNSPEC = C.CGROUPSTATS_TYPE_UNSPEC
- CGROUPSTATS_TYPE_CGROUP_STATS = C.CGROUPSTATS_TYPE_CGROUP_STATS
- CGROUPSTATS_CMD_ATTR_UNSPEC = C.CGROUPSTATS_CMD_ATTR_UNSPEC
- CGROUPSTATS_CMD_ATTR_FD = C.CGROUPSTATS_CMD_ATTR_FD
-)
-
-// Generic netlink
-
-type Genlmsghdr C.struct_genlmsghdr
-
-const (
- CTRL_CMD_UNSPEC = C.CTRL_CMD_UNSPEC
- CTRL_CMD_NEWFAMILY = C.CTRL_CMD_NEWFAMILY
- CTRL_CMD_DELFAMILY = C.CTRL_CMD_DELFAMILY
- CTRL_CMD_GETFAMILY = C.CTRL_CMD_GETFAMILY
- CTRL_CMD_NEWOPS = C.CTRL_CMD_NEWOPS
- CTRL_CMD_DELOPS = C.CTRL_CMD_DELOPS
- CTRL_CMD_GETOPS = C.CTRL_CMD_GETOPS
- CTRL_CMD_NEWMCAST_GRP = C.CTRL_CMD_NEWMCAST_GRP
- CTRL_CMD_DELMCAST_GRP = C.CTRL_CMD_DELMCAST_GRP
- CTRL_CMD_GETMCAST_GRP = C.CTRL_CMD_GETMCAST_GRP
- CTRL_ATTR_UNSPEC = C.CTRL_ATTR_UNSPEC
- CTRL_ATTR_FAMILY_ID = C.CTRL_ATTR_FAMILY_ID
- CTRL_ATTR_FAMILY_NAME = C.CTRL_ATTR_FAMILY_NAME
- CTRL_ATTR_VERSION = C.CTRL_ATTR_VERSION
- CTRL_ATTR_HDRSIZE = C.CTRL_ATTR_HDRSIZE
- CTRL_ATTR_MAXATTR = C.CTRL_ATTR_MAXATTR
- CTRL_ATTR_OPS = C.CTRL_ATTR_OPS
- CTRL_ATTR_MCAST_GROUPS = C.CTRL_ATTR_MCAST_GROUPS
- CTRL_ATTR_OP_UNSPEC = C.CTRL_ATTR_OP_UNSPEC
- CTRL_ATTR_OP_ID = C.CTRL_ATTR_OP_ID
- CTRL_ATTR_OP_FLAGS = C.CTRL_ATTR_OP_FLAGS
- CTRL_ATTR_MCAST_GRP_UNSPEC = C.CTRL_ATTR_MCAST_GRP_UNSPEC
- CTRL_ATTR_MCAST_GRP_NAME = C.CTRL_ATTR_MCAST_GRP_NAME
- CTRL_ATTR_MCAST_GRP_ID = C.CTRL_ATTR_MCAST_GRP_ID
-)
-
-// CPU affinity
-
-type cpuMask C.__cpu_mask
-
-const (
- _CPU_SETSIZE = C.__CPU_SETSIZE
- _NCPUBITS = C.__NCPUBITS
-)
-
-// Bluetooth
-
-const (
- BDADDR_BREDR = C.BDADDR_BREDR
- BDADDR_LE_PUBLIC = C.BDADDR_LE_PUBLIC
- BDADDR_LE_RANDOM = C.BDADDR_LE_RANDOM
-)
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/mkall.sh
deleted file mode 100755
index 1715122..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/mkall.sh
+++ /dev/null
@@ -1,188 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# This script runs or (given -n) prints suggested commands to generate files for
-# the Architecture/OS specified by the GOARCH and GOOS environment variables.
-# See README.md for more information about how the build system works.
-
-GOOSARCH="${GOOS}_${GOARCH}"
-
-# defaults
-mksyscall="./mksyscall.pl"
-mkerrors="./mkerrors.sh"
-zerrors="zerrors_$GOOSARCH.go"
-mksysctl=""
-zsysctl="zsysctl_$GOOSARCH.go"
-mksysnum=
-mktypes=
-run="sh"
-cmd=""
-
-case "$1" in
--syscalls)
- for i in zsyscall*go
- do
- # Run the command line that appears in the first line
- # of the generated file to regenerate it.
- sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i
- rm _$i
- done
- exit 0
- ;;
--n)
- run="cat"
- cmd="echo"
- shift
-esac
-
-case "$#" in
-0)
- ;;
-*)
- echo 'usage: mkall.sh [-n]' 1>&2
- exit 2
-esac
-
-if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then
- # Use then new build system
- # Files generated through docker (use $cmd so you can Ctl-C the build or run)
- $cmd docker build --tag generate:$GOOS $GOOS
- $cmd docker run --interactive --tty --volume $(dirname "$(readlink -f "$0")"):/build generate:$GOOS
- exit
-fi
-
-GOOSARCH_in=syscall_$GOOSARCH.go
-case "$GOOSARCH" in
-_* | *_ | _)
- echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2
- exit 1
- ;;
-darwin_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32"
- mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-darwin_amd64)
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-darwin_arm)
- mkerrors="$mkerrors"
- mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-darwin_arm64)
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-dragonfly_amd64)
- mkerrors="$mkerrors -m64"
- mksyscall="./mksyscall.pl -dragonfly"
- mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-freebsd_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32"
- mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-freebsd_amd64)
- mkerrors="$mkerrors -m64"
- mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-freebsd_arm)
- mkerrors="$mkerrors"
- mksyscall="./mksyscall.pl -l32 -arm"
- mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- # Let the type of C char be signed for making the bare syscall
- # API consistent across platforms.
- mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
- ;;
-linux_sparc64)
- GOOSARCH_in=syscall_linux_sparc64.go
- unistd_h=/usr/include/sparc64-linux-gnu/asm/unistd.h
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_linux.pl $unistd_h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-netbsd_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32 -netbsd"
- mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-netbsd_amd64)
- mkerrors="$mkerrors -m64"
- mksyscall="./mksyscall.pl -netbsd"
- mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-netbsd_arm)
- mkerrors="$mkerrors"
- mksyscall="./mksyscall.pl -l32 -netbsd -arm"
- mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
- # Let the type of C char be signed for making the bare syscall
- # API consistent across platforms.
- mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
- ;;
-openbsd_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32 -openbsd"
- mksysctl="./mksysctl_openbsd.pl"
- mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-openbsd_amd64)
- mkerrors="$mkerrors -m64"
- mksyscall="./mksyscall.pl -openbsd"
- mksysctl="./mksysctl_openbsd.pl"
- mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-openbsd_arm)
- mkerrors="$mkerrors"
- mksyscall="./mksyscall.pl -l32 -openbsd -arm"
- mksysctl="./mksysctl_openbsd.pl"
- mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
- # Let the type of C char be signed for making the bare syscall
- # API consistent across platforms.
- mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
- ;;
-solaris_amd64)
- mksyscall="./mksyscall_solaris.pl"
- mkerrors="$mkerrors -m64"
- mksysnum=
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-*)
- echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2
- exit 1
- ;;
-esac
-
-(
- if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi
- case "$GOOS" in
- *)
- syscall_goos="syscall_$GOOS.go"
- case "$GOOS" in
- darwin | dragonfly | freebsd | netbsd | openbsd)
- syscall_goos="syscall_bsd.go $syscall_goos"
- ;;
- esac
- if [ -n "$mksyscall" ]; then echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go"; fi
- ;;
- esac
- if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
- if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
- if [ -n "$mktypes" ]; then
- echo "$mktypes types_$GOOS.go | go run mkpost.go > ztypes_$GOOSARCH.go";
- fi
-) | $run
diff --git a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/mkerrors.sh
deleted file mode 100755
index 4dd40c1..0000000
--- a/vendor/github.com/awnumar/memguard/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ /dev/null
@@ -1,580 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# Generate Go code listing errors and other #defined constant
-# values (ENAMETOOLONG etc.), by asking the preprocessor
-# about the definitions.
-
-unset LANG
-export LC_ALL=C
-export LC_CTYPE=C
-
-if test -z "$GOARCH" -o -z "$GOOS"; then
- echo 1>&2 "GOARCH or GOOS not defined in environment"
- exit 1
-fi
-
-# Check that we are using the new build system if we should
-if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then
- if [[ "$GOLANG_SYS_BUILD" != "docker" ]]; then
- echo 1>&2 "In the new build system, mkerrors should not be called directly."
- echo 1>&2 "See README.md"
- exit 1
- fi
-fi
-
-CC=${CC:-cc}
-
-if [[ "$GOOS" = "solaris" ]]; then
- # Assumes GNU versions of utilities in PATH.
- export PATH=/usr/gnu/bin:$PATH
-fi
-
-uname=$(uname)
-
-includes_Darwin='
-#define _DARWIN_C_SOURCE
-#define KERNEL
-#define _DARWIN_USE_64_BIT_INODE
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-'
-
-includes_DragonFly='
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-'
-
-includes_FreeBSD='
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#if __FreeBSD__ >= 10
-#define IFT_CARP 0xf8 // IFT_CARP is deprecated in FreeBSD 10
-#undef SIOCAIFADDR
-#define SIOCAIFADDR _IOW(105, 26, struct oifaliasreq) // ifaliasreq contains if_data
-#undef SIOCSIFPHYADDR
-#define SIOCSIFPHYADDR _IOW(105, 70, struct oifaliasreq) // ifaliasreq contains if_data
-#endif
-'
-
-includes_Linux='
-#define _LARGEFILE_SOURCE
-#define _LARGEFILE64_SOURCE
-#ifndef __LP64__
-#define _FILE_OFFSET_BITS 64
-#endif
-#define _GNU_SOURCE
-
-// is broken on powerpc64, as it fails to include definitions of
-// these structures. We just include them copied from .
-#if defined(__powerpc__)
-struct sgttyb {
- char sg_ispeed;
- char sg_ospeed;
- char sg_erase;
- char sg_kill;
- short sg_flags;
-};
-
-struct tchars {
- char t_intrc;
- char t_quitc;
- char t_startc;
- char t_stopc;
- char t_eofc;
- char t_brkc;
-};
-
-struct ltchars {
- char t_suspc;
- char t_dsuspc;
- char t_rprntc;
- char t_flushc;
- char t_werasc;
- char t_lnextc;
-};
-#endif
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#ifndef MSG_FASTOPEN
-#define MSG_FASTOPEN 0x20000000
-#endif
-
-#ifndef PTRACE_GETREGS
-#define PTRACE_GETREGS 0xc
-#endif
-
-#ifndef PTRACE_SETREGS
-#define PTRACE_SETREGS 0xd
-#endif
-
-#ifndef SOL_NETLINK
-#define SOL_NETLINK 270
-#endif
-
-#ifdef SOL_BLUETOOTH
-// SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h
-// but it is already in bluetooth_linux.go
-#undef SOL_BLUETOOTH
-#endif
-
-// Certain constants are missing from the fs/crypto UAPI
-#define FS_KEY_DESC_PREFIX "fscrypt:"
-#define FS_KEY_DESC_PREFIX_SIZE 8
-#define FS_MAX_KEY_SIZE 64
-'
-
-includes_NetBSD='
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-// Needed since refers to it...
-#define schedppq 1
-'
-
-includes_OpenBSD='
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-// We keep some constants not supported in OpenBSD 5.5 and beyond for
-// the promise of compatibility.
-#define EMUL_ENABLED 0x1
-#define EMUL_NATIVE 0x2
-#define IPV6_FAITH 0x1d
-#define IPV6_OPTIONS 0x1
-#define IPV6_RTHDR_STRICT 0x1
-#define IPV6_SOCKOPT_RESERVED1 0x3
-#define SIOCGIFGENERIC 0xc020693a
-#define SIOCSIFGENERIC 0x80206939
-#define WALTSIG 0x4
-'
-
-includes_SunOS='
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-'
-
-
-includes='
-#include
-#include
-#include
-#include
-#include