├── .gitignore ├── .travis.yml ├── LICENSE ├── Makefile ├── README.md ├── cmd └── dns-over-https-proxy │ └── main.go ├── tools ├── .gitignore ├── Makefile ├── README.md ├── pre-commit ├── src └── vendor │ ├── github.com │ ├── Bowery │ │ └── prompt │ │ │ ├── CONTRIBUTORS.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── ansi_unix.go │ │ │ ├── ansi_windows.go │ │ │ ├── buffer.go │ │ │ ├── buffer_unix.go │ │ │ ├── buffer_windows.go │ │ │ ├── ioctl_bsd.go │ │ │ ├── ioctl_linux.go │ │ │ ├── ioctl_solaris.go │ │ │ ├── ioctl_unix.go │ │ │ ├── keys.go │ │ │ ├── keys_unix.go │ │ │ ├── keys_windows.go │ │ │ ├── prompt.go │ │ │ ├── term.go │ │ │ ├── term_unix.go │ │ │ └── term_windows.go │ ├── GoASTScanner │ │ └── gas │ │ │ ├── Dockerfile │ │ │ ├── LICENSE.txt │ │ │ ├── README.md │ │ │ ├── core │ │ │ ├── analyzer.go │ │ │ ├── call_list.go │ │ │ ├── helpers.go │ │ │ ├── issue.go │ │ │ ├── resolve.go │ │ │ └── select.go │ │ │ ├── filelist.go │ │ │ ├── main.go │ │ │ ├── output │ │ │ ├── formatter.go │ │ │ └── template.go │ │ │ ├── rulelist.go │ │ │ ├── rules │ │ │ ├── big.go │ │ │ ├── bind.go │ │ │ ├── blacklist.go │ │ │ ├── errors.go │ │ │ ├── fileperms.go │ │ │ ├── hardcoded_credentials.go │ │ │ ├── rand.go │ │ │ ├── rsa.go │ │ │ ├── sql.go │ │ │ ├── subproc.go │ │ │ ├── tempfiles.go │ │ │ ├── templates.go │ │ │ ├── tls.go │ │ │ ├── unsafe.go │ │ │ └── weakcrypto.go │ │ │ ├── tools.go │ │ │ └── vendor.conf │ ├── alecthomas │ │ ├── gocyclo │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── gocyclo.go │ │ ├── gometalinter │ │ │ ├── CONTRIBUTING.md │ │ │ ├── COPYING │ │ │ ├── README.md │ │ │ ├── aggregate.go │ │ │ ├── checkstyle.go │ │ │ ├── config.go │ │ │ ├── directives.go │ │ │ ├── execute.go │ │ │ ├── issue.go │ │ │ ├── linters.go │ │ │ ├── main.go │ │ │ ├── partition.go │ │ │ └── stringset.go │ │ └── units │ │ │ ├── COPYING │ │ │ ├── README.md │ │ │ ├── bytes.go │ │ │ ├── doc.go │ │ │ ├── si.go │ │ │ └── util.go │ ├── alexflint │ │ ├── go-arg │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc.go │ │ │ ├── parse.go │ │ │ └── usage.go │ │ └── go-scalar │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── scalar.go │ ├── alexkohler │ │ └── nakedret │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── import.go │ │ │ └── nakedret.go │ ├── client9 │ │ └── misspell │ │ │ ├── Dockerfile │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── ascii.go │ │ │ ├── case.go │ │ │ ├── cmd │ │ │ └── misspell │ │ │ │ └── main.go │ │ │ ├── godownloader-misspell.sh │ │ │ ├── goreleaser.yml │ │ │ ├── legal.go │ │ │ ├── mime.go │ │ │ ├── notwords.go │ │ │ ├── replace.go │ │ │ ├── stringreplacer.go │ │ │ ├── stringreplacer_test.gox │ │ │ ├── url.go │ │ │ └── words.go │ ├── dchest │ │ └── safefile │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── appveyor.yml │ │ │ ├── rename.go │ │ │ ├── rename_nonatomic.go │ │ │ └── safefile.go │ ├── dnephin │ │ └── govet │ │ │ ├── LICENSE │ │ │ ├── README │ │ │ ├── asmdecl.go │ │ │ ├── assign.go │ │ │ ├── atomic.go │ │ │ ├── bool.go │ │ │ ├── buildtag.go │ │ │ ├── cgo.go │ │ │ ├── composite.go │ │ │ ├── copylock.go │ │ │ ├── deadcode.go │ │ │ ├── doc.go │ │ │ ├── internal │ │ │ ├── cfg │ │ │ │ ├── builder.go │ │ │ │ └── cfg.go │ │ │ └── whitelist │ │ │ │ └── whitelist.go │ │ │ ├── lostcancel.go │ │ │ ├── main.go │ │ │ ├── method.go │ │ │ ├── nilfunc.go │ │ │ ├── print.go │ │ │ ├── rangeloop.go │ │ │ ├── shadow.go │ │ │ ├── shift.go │ │ │ ├── structtag.go │ │ │ ├── tests.go │ │ │ ├── types.go │ │ │ ├── unsafeptr.go │ │ │ └── unused.go │ ├── golang │ │ └── lint │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── golint │ │ │ ├── golint.go │ │ │ └── import.go │ │ │ └── lint.go │ ├── google │ │ └── shlex │ │ │ ├── COPYING │ │ │ ├── README │ │ │ └── shlex.go │ ├── gordonklaus │ │ └── ineffassign │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── bugs │ │ │ ├── ineffassign.go │ │ │ ├── list │ │ │ └── liststd │ ├── jgautheron │ │ └── goconst │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── cmd │ │ │ └── goconst │ │ │ │ └── main.go │ │ │ ├── parser.go │ │ │ └── visitor.go │ ├── kardianos │ │ └── govendor │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── appveyor.yml │ │ │ ├── cliprompt │ │ │ └── cliPrompt.go │ │ │ ├── context │ │ │ ├── context.go │ │ │ ├── copy.go │ │ │ ├── err.go │ │ │ ├── fetch.go │ │ │ ├── get.go │ │ │ ├── label.go │ │ │ ├── license.go │ │ │ ├── modify.go │ │ │ ├── path.go │ │ │ ├── resolve.go │ │ │ ├── rewrite.go │ │ │ ├── status.go │ │ │ ├── sync.go │ │ │ ├── syslist.go │ │ │ ├── tags.go │ │ │ ├── vendorFile.go │ │ │ └── version.go │ │ │ ├── help │ │ │ ├── gen-license.template │ │ │ ├── licenses.go │ │ │ ├── msg.go │ │ │ ├── text.go │ │ │ └── version.go │ │ │ ├── internal │ │ │ ├── pathos │ │ │ │ └── path.go │ │ │ ├── vfilepath │ │ │ │ ├── prefix.go │ │ │ │ ├── stub.go │ │ │ │ ├── switch.go │ │ │ │ └── walk.go │ │ │ └── vos │ │ │ │ ├── stub.go │ │ │ │ └── switch.go │ │ │ ├── main.go │ │ │ ├── migrate │ │ │ ├── gb.go │ │ │ ├── gdm.go │ │ │ ├── glock.go │ │ │ ├── godep.go │ │ │ ├── migrate.go │ │ │ └── old.go │ │ │ ├── pkgspec │ │ │ ├── pkg.go │ │ │ └── pkgspec.go │ │ │ ├── prompt │ │ │ └── prompt.go │ │ │ ├── run │ │ │ ├── command.go │ │ │ ├── filter.go │ │ │ ├── license.go │ │ │ ├── list.go │ │ │ ├── modify.go │ │ │ ├── run.go │ │ │ ├── shell.go │ │ │ └── sync.go │ │ │ ├── vcs │ │ │ ├── bzr.go │ │ │ ├── git.go │ │ │ ├── hg.go │ │ │ ├── svn.go │ │ │ └── vcs.go │ │ │ └── vendorfile │ │ │ └── file.go │ ├── kisielk │ │ ├── errcheck │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── internal │ │ │ │ └── errcheck │ │ │ │ │ └── errcheck.go │ │ │ └── main.go │ │ └── gotool │ │ │ ├── LEGAL │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── go13.go │ │ │ ├── go14-15.go │ │ │ ├── go16.go │ │ │ ├── match.go │ │ │ └── tool.go │ ├── mattn │ │ └── goveralls │ │ │ ├── README.md │ │ │ ├── gitinfo.go │ │ │ ├── gocover.go │ │ │ └── goveralls.go │ ├── mdempsky │ │ ├── maligned │ │ │ ├── LICENSE │ │ │ ├── README │ │ │ └── maligned.go │ │ └── unconvert │ │ │ ├── LICENSE │ │ │ ├── README │ │ │ └── unconvert.go │ ├── mibk │ │ └── dupl │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── job │ │ │ ├── buildtree.go │ │ │ └── parse.go │ │ │ ├── main.go │ │ │ ├── output │ │ │ ├── html.go │ │ │ ├── plumbing.go │ │ │ └── text.go │ │ │ ├── printer │ │ │ ├── html.go │ │ │ ├── plumbing.go │ │ │ ├── printer.go │ │ │ └── text.go │ │ │ ├── suffixtree │ │ │ ├── dupl.go │ │ │ └── suffixtree.go │ │ │ └── syntax │ │ │ ├── golang │ │ │ └── golang.go │ │ │ └── syntax.go │ ├── mvdan │ │ ├── interfacer │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── cache.go │ │ │ ├── check.go │ │ │ ├── cmd │ │ │ │ └── interfacer │ │ │ │ │ └── main.go │ │ │ └── types.go │ │ ├── lint │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── lint.go │ │ └── unparam │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── check │ │ │ └── check.go │ │ │ └── main.go │ ├── nbutton23 │ │ └── zxcvbn-go │ │ │ ├── LICENSE.txt │ │ │ ├── README.md │ │ │ ├── adjacency │ │ │ └── adjcmartix.go │ │ │ ├── data │ │ │ └── bindata.go │ │ │ ├── entropy │ │ │ └── entropyCalculator.go │ │ │ ├── frequency │ │ │ └── frequency.go │ │ │ ├── match │ │ │ └── match.go │ │ │ ├── matching │ │ │ ├── dateMatchers.go │ │ │ ├── dictionaryMatch.go │ │ │ ├── leet.go │ │ │ ├── matching.go │ │ │ ├── repeatMatch.go │ │ │ ├── sequenceMatch.go │ │ │ └── spatialMatch.go │ │ │ ├── scoring │ │ │ └── scoring.go │ │ │ ├── utils │ │ │ └── math │ │ │ │ └── mathutils.go │ │ │ └── zxcvbn.go │ ├── nicksnyder │ │ └── go-i18n │ │ │ ├── LICENSE │ │ │ └── i18n │ │ │ ├── bundle │ │ │ └── bundle.go │ │ │ ├── i18n.go │ │ │ ├── language │ │ │ ├── language.go │ │ │ ├── operands.go │ │ │ ├── plural.go │ │ │ ├── pluralspec.go │ │ │ └── pluralspec_gen.go │ │ │ └── translation │ │ │ ├── plural_translation.go │ │ │ ├── single_translation.go │ │ │ ├── template.go │ │ │ └── translation.go │ ├── opennota │ │ └── check │ │ │ ├── LICENSE │ │ │ └── cmd │ │ │ ├── aligncheck │ │ │ └── aligncheck.go │ │ │ ├── structcheck │ │ │ └── structcheck.go │ │ │ └── varcheck │ │ │ └── varcheck.go │ ├── pelletier │ │ ├── go-buffruneio │ │ │ ├── README.md │ │ │ └── buffruneio.go │ │ └── go-toml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── benchmark.sh │ │ │ ├── doc.go │ │ │ ├── example-crlf.toml │ │ │ ├── example.toml │ │ │ ├── keysparsing.go │ │ │ ├── lexer.go │ │ │ ├── marshal.go │ │ │ ├── marshal_test.toml │ │ │ ├── parser.go │ │ │ ├── position.go │ │ │ ├── test.sh │ │ │ ├── token.go │ │ │ ├── toml.go │ │ │ ├── tomltree_create.go │ │ │ └── tomltree_write.go │ ├── pkg │ │ └── errors │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── appveyor.yml │ │ │ ├── errors.go │ │ │ └── stack.go │ ├── ryanuber │ │ └── go-glob │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── glob.go │ ├── stripe │ │ └── safesql │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── package15.go │ │ │ ├── package16.go │ │ │ └── safesql.go │ ├── tsenart │ │ └── deadcode │ │ │ ├── LICENSE │ │ │ └── deadcode.go │ ├── wadey │ │ └── gocovmerge │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── gocovmerge.go │ └── walle │ │ └── lll │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── cmd │ │ └── lll │ │ │ └── main.go │ │ └── lll.go │ ├── golang.org │ └── x │ │ ├── sys │ │ ├── LICENSE │ │ ├── PATENTS │ │ └── unix │ │ │ ├── README.md │ │ │ ├── asm_darwin_386.s │ │ │ ├── asm_darwin_amd64.s │ │ │ ├── asm_darwin_arm.s │ │ │ ├── asm_darwin_arm64.s │ │ │ ├── asm_dragonfly_amd64.s │ │ │ ├── asm_freebsd_386.s │ │ │ ├── asm_freebsd_amd64.s │ │ │ ├── asm_freebsd_arm.s │ │ │ ├── asm_linux_386.s │ │ │ ├── asm_linux_amd64.s │ │ │ ├── asm_linux_arm.s │ │ │ ├── asm_linux_arm64.s │ │ │ ├── asm_linux_mips64x.s │ │ │ ├── asm_linux_mipsx.s │ │ │ ├── asm_linux_ppc64x.s │ │ │ ├── asm_linux_s390x.s │ │ │ ├── asm_netbsd_386.s │ │ │ ├── asm_netbsd_amd64.s │ │ │ ├── asm_netbsd_arm.s │ │ │ ├── asm_openbsd_386.s │ │ │ ├── asm_openbsd_amd64.s │ │ │ ├── asm_solaris_amd64.s │ │ │ ├── bluetooth_linux.go │ │ │ ├── constants.go │ │ │ ├── dirent.go │ │ │ ├── endian_big.go │ │ │ ├── endian_little.go │ │ │ ├── env_unix.go │ │ │ ├── env_unset.go │ │ │ ├── flock.go │ │ │ ├── flock_linux_32bit.go │ │ │ ├── gccgo.go │ │ │ ├── gccgo_c.c │ │ │ ├── gccgo_linux_amd64.go │ │ │ ├── gccgo_linux_sparc64.go │ │ │ ├── mkall.sh │ │ │ ├── mkerrors.sh │ │ │ ├── mkpost.go │ │ │ ├── mksyscall.pl │ │ │ ├── mksyscall_solaris.pl │ │ │ ├── mksysctl_openbsd.pl │ │ │ ├── mksysnum_darwin.pl │ │ │ ├── mksysnum_dragonfly.pl │ │ │ ├── mksysnum_freebsd.pl │ │ │ ├── mksysnum_netbsd.pl │ │ │ ├── mksysnum_openbsd.pl │ │ │ ├── openbsd_pledge.go │ │ │ ├── race.go │ │ │ ├── race0.go │ │ │ ├── sockcmsg_linux.go │ │ │ ├── sockcmsg_unix.go │ │ │ ├── str.go │ │ │ ├── syscall.go │ │ │ ├── syscall_bsd.go │ │ │ ├── syscall_darwin.go │ │ │ ├── syscall_darwin_386.go │ │ │ ├── syscall_darwin_amd64.go │ │ │ ├── syscall_darwin_arm.go │ │ │ ├── syscall_darwin_arm64.go │ │ │ ├── syscall_dragonfly.go │ │ │ ├── syscall_dragonfly_amd64.go │ │ │ ├── syscall_freebsd.go │ │ │ ├── syscall_freebsd_386.go │ │ │ ├── syscall_freebsd_amd64.go │ │ │ ├── syscall_freebsd_arm.go │ │ │ ├── syscall_linux.go │ │ │ ├── syscall_linux_386.go │ │ │ ├── syscall_linux_amd64.go │ │ │ ├── syscall_linux_amd64_gc.go │ │ │ ├── syscall_linux_arm.go │ │ │ ├── syscall_linux_arm64.go │ │ │ ├── syscall_linux_mips64x.go │ │ │ ├── syscall_linux_mipsx.go │ │ │ ├── syscall_linux_ppc64x.go │ │ │ ├── syscall_linux_s390x.go │ │ │ ├── syscall_linux_sparc64.go │ │ │ ├── syscall_netbsd.go │ │ │ ├── syscall_netbsd_386.go │ │ │ ├── syscall_netbsd_amd64.go │ │ │ ├── syscall_netbsd_arm.go │ │ │ ├── syscall_no_getwd.go │ │ │ ├── syscall_openbsd.go │ │ │ ├── syscall_openbsd_386.go │ │ │ ├── syscall_openbsd_amd64.go │ │ │ ├── syscall_solaris.go │ │ │ ├── syscall_solaris_amd64.go │ │ │ ├── syscall_unix.go │ │ │ ├── syscall_unix_gc.go │ │ │ ├── types_darwin.go │ │ │ ├── types_dragonfly.go │ │ │ ├── types_freebsd.go │ │ │ ├── types_netbsd.go │ │ │ ├── types_openbsd.go │ │ │ ├── types_solaris.go │ │ │ ├── zerrors_darwin_386.go │ │ │ ├── zerrors_darwin_amd64.go │ │ │ ├── zerrors_darwin_arm.go │ │ │ ├── zerrors_darwin_arm64.go │ │ │ ├── zerrors_dragonfly_amd64.go │ │ │ ├── zerrors_freebsd_386.go │ │ │ ├── zerrors_freebsd_amd64.go │ │ │ ├── zerrors_freebsd_arm.go │ │ │ ├── zerrors_linux_386.go │ │ │ ├── zerrors_linux_amd64.go │ │ │ ├── zerrors_linux_arm.go │ │ │ ├── zerrors_linux_arm64.go │ │ │ ├── zerrors_linux_mips.go │ │ │ ├── zerrors_linux_mips64.go │ │ │ ├── zerrors_linux_mips64le.go │ │ │ ├── zerrors_linux_mipsle.go │ │ │ ├── zerrors_linux_ppc64.go │ │ │ ├── zerrors_linux_ppc64le.go │ │ │ ├── zerrors_linux_s390x.go │ │ │ ├── zerrors_linux_sparc64.go │ │ │ ├── zerrors_netbsd_386.go │ │ │ ├── zerrors_netbsd_amd64.go │ │ │ ├── zerrors_netbsd_arm.go │ │ │ ├── zerrors_openbsd_386.go │ │ │ ├── zerrors_openbsd_amd64.go │ │ │ ├── zerrors_solaris_amd64.go │ │ │ ├── zsyscall_darwin_386.go │ │ │ ├── zsyscall_darwin_amd64.go │ │ │ ├── zsyscall_darwin_arm.go │ │ │ ├── zsyscall_darwin_arm64.go │ │ │ ├── zsyscall_dragonfly_amd64.go │ │ │ ├── zsyscall_freebsd_386.go │ │ │ ├── zsyscall_freebsd_amd64.go │ │ │ ├── zsyscall_freebsd_arm.go │ │ │ ├── zsyscall_linux_386.go │ │ │ ├── zsyscall_linux_amd64.go │ │ │ ├── zsyscall_linux_arm.go │ │ │ ├── zsyscall_linux_arm64.go │ │ │ ├── zsyscall_linux_mips.go │ │ │ ├── zsyscall_linux_mips64.go │ │ │ ├── zsyscall_linux_mips64le.go │ │ │ ├── zsyscall_linux_mipsle.go │ │ │ ├── zsyscall_linux_ppc64.go │ │ │ ├── zsyscall_linux_ppc64le.go │ │ │ ├── zsyscall_linux_s390x.go │ │ │ ├── zsyscall_linux_sparc64.go │ │ │ ├── zsyscall_netbsd_386.go │ │ │ ├── zsyscall_netbsd_amd64.go │ │ │ ├── zsyscall_netbsd_arm.go │ │ │ ├── zsyscall_openbsd_386.go │ │ │ ├── zsyscall_openbsd_amd64.go │ │ │ ├── zsyscall_solaris_amd64.go │ │ │ ├── zsysctl_openbsd.go │ │ │ ├── zsysnum_darwin_386.go │ │ │ ├── zsysnum_darwin_amd64.go │ │ │ ├── zsysnum_darwin_arm.go │ │ │ ├── zsysnum_darwin_arm64.go │ │ │ ├── zsysnum_dragonfly_amd64.go │ │ │ ├── zsysnum_freebsd_386.go │ │ │ ├── zsysnum_freebsd_amd64.go │ │ │ ├── zsysnum_freebsd_arm.go │ │ │ ├── zsysnum_linux_386.go │ │ │ ├── zsysnum_linux_amd64.go │ │ │ ├── zsysnum_linux_arm.go │ │ │ ├── zsysnum_linux_arm64.go │ │ │ ├── zsysnum_linux_mips.go │ │ │ ├── zsysnum_linux_mips64.go │ │ │ ├── zsysnum_linux_mips64le.go │ │ │ ├── zsysnum_linux_mipsle.go │ │ │ ├── zsysnum_linux_ppc64.go │ │ │ ├── zsysnum_linux_ppc64le.go │ │ │ ├── zsysnum_linux_s390x.go │ │ │ ├── zsysnum_linux_sparc64.go │ │ │ ├── zsysnum_netbsd_386.go │ │ │ ├── zsysnum_netbsd_amd64.go │ │ │ ├── zsysnum_netbsd_arm.go │ │ │ ├── zsysnum_openbsd_386.go │ │ │ ├── zsysnum_openbsd_amd64.go │ │ │ ├── zsysnum_solaris_amd64.go │ │ │ ├── ztypes_darwin_386.go │ │ │ ├── ztypes_darwin_amd64.go │ │ │ ├── ztypes_darwin_arm.go │ │ │ ├── ztypes_darwin_arm64.go │ │ │ ├── ztypes_dragonfly_amd64.go │ │ │ ├── ztypes_freebsd_386.go │ │ │ ├── ztypes_freebsd_amd64.go │ │ │ ├── ztypes_freebsd_arm.go │ │ │ ├── ztypes_linux_386.go │ │ │ ├── ztypes_linux_amd64.go │ │ │ ├── ztypes_linux_arm.go │ │ │ ├── ztypes_linux_arm64.go │ │ │ ├── ztypes_linux_mips.go │ │ │ ├── ztypes_linux_mips64.go │ │ │ ├── ztypes_linux_mips64le.go │ │ │ ├── ztypes_linux_mipsle.go │ │ │ ├── ztypes_linux_ppc64.go │ │ │ ├── ztypes_linux_ppc64le.go │ │ │ ├── ztypes_linux_s390x.go │ │ │ ├── ztypes_linux_sparc64.go │ │ │ ├── ztypes_netbsd_386.go │ │ │ ├── ztypes_netbsd_amd64.go │ │ │ ├── ztypes_netbsd_arm.go │ │ │ ├── ztypes_openbsd_386.go │ │ │ ├── ztypes_openbsd_amd64.go │ │ │ └── ztypes_solaris_amd64.go │ │ ├── text │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── transform │ │ │ └── transform.go │ │ └── width │ │ │ ├── kind_string.go │ │ │ ├── tables.go │ │ │ ├── transform.go │ │ │ ├── trieval.go │ │ │ └── width.go │ │ └── tools │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── cmd │ │ ├── goimports │ │ │ ├── doc.go │ │ │ ├── goimports.go │ │ │ ├── goimports_gc.go │ │ │ └── goimports_not_gc.go │ │ └── gotype │ │ │ ├── gotype.go │ │ │ ├── sizesFor18.go │ │ │ └── sizesFor19.go │ │ ├── container │ │ └── intsets │ │ │ ├── popcnt_amd64.go │ │ │ ├── popcnt_amd64.s │ │ │ ├── popcnt_gccgo.go │ │ │ ├── popcnt_gccgo_c.c │ │ │ ├── popcnt_generic.go │ │ │ ├── sparse.go │ │ │ └── util.go │ │ ├── cover │ │ └── profile.go │ │ ├── go │ │ ├── ast │ │ │ └── astutil │ │ │ │ ├── enclosing.go │ │ │ │ ├── imports.go │ │ │ │ └── util.go │ │ ├── buildutil │ │ │ ├── allpackages.go │ │ │ ├── fakecontext.go │ │ │ ├── overlay.go │ │ │ ├── tags.go │ │ │ └── util.go │ │ ├── callgraph │ │ │ ├── callgraph.go │ │ │ ├── cha │ │ │ │ └── cha.go │ │ │ └── util.go │ │ ├── gcexportdata │ │ │ ├── gcexportdata.go │ │ │ └── importer.go │ │ ├── gcimporter15 │ │ │ ├── bexport.go │ │ │ ├── bimport.go │ │ │ ├── exportdata.go │ │ │ ├── gcimporter.go │ │ │ ├── isAlias18.go │ │ │ └── isAlias19.go │ │ ├── loader │ │ │ ├── cgo.go │ │ │ ├── cgo_pkgconfig.go │ │ │ ├── doc.go │ │ │ ├── loader.go │ │ │ └── util.go │ │ ├── pointer │ │ │ ├── TODO │ │ │ ├── analysis.go │ │ │ ├── api.go │ │ │ ├── callgraph.go │ │ │ ├── constraint.go │ │ │ ├── doc.go │ │ │ ├── gen.go │ │ │ ├── hvn.go │ │ │ ├── intrinsics.go │ │ │ ├── labels.go │ │ │ ├── opt.go │ │ │ ├── print.go │ │ │ ├── query.go │ │ │ ├── reflect.go │ │ │ ├── solve.go │ │ │ └── util.go │ │ ├── ssa │ │ │ ├── blockopt.go │ │ │ ├── builder.go │ │ │ ├── const.go │ │ │ ├── create.go │ │ │ ├── doc.go │ │ │ ├── dom.go │ │ │ ├── emit.go │ │ │ ├── func.go │ │ │ ├── identical.go │ │ │ ├── identical_17.go │ │ │ ├── lift.go │ │ │ ├── lvalue.go │ │ │ ├── methods.go │ │ │ ├── mode.go │ │ │ ├── print.go │ │ │ ├── sanity.go │ │ │ ├── source.go │ │ │ ├── ssa.go │ │ │ ├── ssautil │ │ │ │ ├── load.go │ │ │ │ ├── switch.go │ │ │ │ └── visit.go │ │ │ ├── testmain.go │ │ │ ├── util.go │ │ │ └── wrappers.go │ │ ├── types │ │ │ └── typeutil │ │ │ │ ├── imports.go │ │ │ │ ├── map.go │ │ │ │ ├── methodsetcache.go │ │ │ │ └── ui.go │ │ └── vcs │ │ │ ├── discovery.go │ │ │ ├── env.go │ │ │ ├── http.go │ │ │ └── vcs.go │ │ └── imports │ │ ├── fastwalk.go │ │ ├── fastwalk_dirent_fileno.go │ │ ├── fastwalk_dirent_ino.go │ │ ├── fastwalk_portable.go │ │ ├── fastwalk_unix.go │ │ ├── fix.go │ │ ├── imports.go │ │ ├── sortimports.go │ │ └── zstdlib.go │ ├── gopkg.in │ ├── alecthomas │ │ └── kingpin.v3-unstable │ │ │ ├── COPYING │ │ │ ├── README.md │ │ │ ├── actions.go │ │ │ ├── app.go │ │ │ ├── args.go │ │ │ ├── camelcase.go │ │ │ ├── clause.go │ │ │ ├── cmd.go │ │ │ ├── completions.go │ │ │ ├── doc.go │ │ │ ├── flags.go │ │ │ ├── global.go │ │ │ ├── guesswidth.go │ │ │ ├── guesswidth_unix.go │ │ │ ├── i18n_en_AU.go │ │ │ ├── i18n_fr.go │ │ │ ├── i18n_init.go │ │ │ ├── model.go │ │ │ ├── parser.go │ │ │ ├── struct.go │ │ │ ├── templates.go │ │ │ ├── usage.go │ │ │ ├── values.go │ │ │ ├── values.json │ │ │ └── values_generated.go │ └── yaml.v2 │ │ ├── LICENSE │ │ ├── LICENSE.libyaml │ │ ├── README.md │ │ ├── apic.go │ │ ├── decode.go │ │ ├── emitterc.go │ │ ├── encode.go │ │ ├── parserc.go │ │ ├── readerc.go │ │ ├── resolve.go │ │ ├── scannerc.go │ │ ├── sorter.go │ │ ├── writerc.go │ │ ├── yaml.go │ │ ├── yamlh.go │ │ └── yamlprivateh.go │ ├── honnef.co │ └── go │ │ └── tools │ │ ├── LICENSE │ │ ├── callgraph │ │ ├── callgraph.go │ │ ├── static │ │ │ └── static.go │ │ └── util.go │ │ ├── cmd │ │ ├── gosimple │ │ │ ├── README.md │ │ │ └── gosimple.go │ │ ├── megacheck │ │ │ ├── README.md │ │ │ └── megacheck.go │ │ ├── staticcheck │ │ │ ├── README.md │ │ │ └── staticcheck.go │ │ └── unused │ │ │ ├── README.md │ │ │ └── main.go │ │ ├── deprecated │ │ └── stdlib.go │ │ ├── functions │ │ ├── concrete.go │ │ ├── functions.go │ │ ├── loops.go │ │ ├── pure.go │ │ └── terminates.go │ │ ├── internal │ │ └── sharedcheck │ │ │ └── lint.go │ │ ├── lint │ │ ├── LICENSE │ │ ├── lint.go │ │ └── lintutil │ │ │ └── util.go │ │ ├── simple │ │ ├── CONTRIBUTING.md │ │ ├── lint.go │ │ ├── lint17.go │ │ └── lint18.go │ │ ├── ssa │ │ ├── LICENSE │ │ ├── blockopt.go │ │ ├── builder.go │ │ ├── const.go │ │ ├── const15.go │ │ ├── create.go │ │ ├── doc.go │ │ ├── dom.go │ │ ├── emit.go │ │ ├── func.go │ │ ├── identical.go │ │ ├── identical_17.go │ │ ├── lift.go │ │ ├── lvalue.go │ │ ├── methods.go │ │ ├── mode.go │ │ ├── print.go │ │ ├── sanity.go │ │ ├── source.go │ │ ├── ssa.go │ │ ├── ssautil │ │ │ ├── load.go │ │ │ ├── switch.go │ │ │ └── visit.go │ │ ├── testmain.go │ │ ├── util.go │ │ ├── wrappers.go │ │ └── write.go │ │ ├── staticcheck │ │ ├── CONTRIBUTING.md │ │ ├── buildtag.go │ │ ├── lint.go │ │ ├── rules.go │ │ └── vrp │ │ │ ├── channel.go │ │ │ ├── int.go │ │ │ ├── slice.go │ │ │ ├── string.go │ │ │ └── vrp.go │ │ ├── unused │ │ └── unused.go │ │ └── version │ │ └── version.go │ ├── mvdan.cc │ ├── interfacer │ │ ├── LICENSE │ │ ├── README.md │ │ ├── check │ │ │ ├── cache.go │ │ │ ├── check.go │ │ │ └── types.go │ │ └── main.go │ ├── lint │ │ ├── LICENSE │ │ ├── README.md │ │ └── lint.go │ └── unparam │ │ ├── LICENSE │ │ ├── README.md │ │ ├── check │ │ └── check.go │ │ └── main.go │ └── vendor.json └── vendor ├── github.com ├── miekg │ └── dns │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── COPYRIGHT │ │ ├── LICENSE │ │ ├── README.md │ │ ├── client.go │ │ ├── clientconfig.go │ │ ├── defaults.go │ │ ├── dns.go │ │ ├── dnssec.go │ │ ├── dnssec_keygen.go │ │ ├── dnssec_keyscan.go │ │ ├── dnssec_privkey.go │ │ ├── doc.go │ │ ├── edns.go │ │ ├── format.go │ │ ├── labels.go │ │ ├── msg.go │ │ ├── nsecx.go │ │ ├── privaterr.go │ │ ├── rawmsg.go │ │ ├── sanitize.go │ │ ├── scanner.go │ │ ├── server.go │ │ ├── sig0.go │ │ ├── singleinflight.go │ │ ├── tlsa.go │ │ ├── tsig.go │ │ ├── types.go │ │ ├── types_generate.go │ │ ├── udp.go │ │ ├── udp_linux.go │ │ ├── udp_other.go │ │ ├── udp_windows.go │ │ ├── update.go │ │ ├── xfr.go │ │ ├── zgenerate.go │ │ ├── zscan.go │ │ ├── zscan_rr.go │ │ └── ztypes.go ├── sirupsen │ └── logrus │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── alt_exit.go │ │ ├── appveyor.yml │ │ ├── doc.go │ │ ├── entry.go │ │ ├── exported.go │ │ ├── formatter.go │ │ ├── hooks.go │ │ ├── json_formatter.go │ │ ├── logger.go │ │ ├── logrus.go │ │ ├── terminal_bsd.go │ │ ├── terminal_check_appengine.go │ │ ├── terminal_check_notappengine.go │ │ ├── terminal_linux.go │ │ ├── text_formatter.go │ │ └── writer.go └── wrouesnel │ └── go.log │ ├── LICENSE.md │ ├── log.go │ └── logwriter.go ├── golang.org └── x │ ├── crypto │ ├── LICENSE │ ├── PATENTS │ └── ssh │ │ └── terminal │ │ ├── terminal.go │ │ ├── util.go │ │ ├── util_bsd.go │ │ ├── util_linux.go │ │ ├── util_plan9.go │ │ ├── util_solaris.go │ │ └── util_windows.go │ └── sys │ ├── LICENSE │ ├── PATENTS │ ├── unix │ ├── README.md │ ├── asm_darwin_386.s │ ├── asm_darwin_amd64.s │ ├── asm_darwin_arm.s │ ├── asm_darwin_arm64.s │ ├── asm_dragonfly_amd64.s │ ├── asm_freebsd_386.s │ ├── asm_freebsd_amd64.s │ ├── asm_freebsd_arm.s │ ├── asm_linux_386.s │ ├── asm_linux_amd64.s │ ├── asm_linux_arm.s │ ├── asm_linux_arm64.s │ ├── asm_linux_mips64x.s │ ├── asm_linux_mipsx.s │ ├── asm_linux_ppc64x.s │ ├── asm_linux_s390x.s │ ├── asm_netbsd_386.s │ ├── asm_netbsd_amd64.s │ ├── asm_netbsd_arm.s │ ├── asm_openbsd_386.s │ ├── asm_openbsd_amd64.s │ ├── asm_openbsd_arm.s │ ├── asm_solaris_amd64.s │ ├── bluetooth_linux.go │ ├── cap_freebsd.go │ ├── constants.go │ ├── dev_darwin.go │ ├── dev_dragonfly.go │ ├── dev_freebsd.go │ ├── dev_linux.go │ ├── dev_netbsd.go │ ├── dev_openbsd.go │ ├── dirent.go │ ├── endian_big.go │ ├── endian_little.go │ ├── env_unix.go │ ├── env_unset.go │ ├── errors_freebsd_386.go │ ├── errors_freebsd_amd64.go │ ├── errors_freebsd_arm.go │ ├── flock.go │ ├── flock_linux_32bit.go │ ├── gccgo.go │ ├── gccgo_c.c │ ├── gccgo_linux_amd64.go │ ├── mkall.sh │ ├── mkerrors.sh │ ├── mkpost.go │ ├── mksyscall.pl │ ├── mksyscall_solaris.pl │ ├── mksysctl_openbsd.pl │ ├── mksysnum_darwin.pl │ ├── mksysnum_dragonfly.pl │ ├── mksysnum_freebsd.pl │ ├── mksysnum_netbsd.pl │ ├── mksysnum_openbsd.pl │ ├── openbsd_pledge.go │ ├── pagesize_unix.go │ ├── race.go │ ├── race0.go │ ├── sockcmsg_linux.go │ ├── sockcmsg_unix.go │ ├── str.go │ ├── syscall.go │ ├── syscall_bsd.go │ ├── syscall_darwin.go │ ├── syscall_darwin_386.go │ ├── syscall_darwin_amd64.go │ ├── syscall_darwin_arm.go │ ├── syscall_darwin_arm64.go │ ├── syscall_dragonfly.go │ ├── syscall_dragonfly_amd64.go │ ├── syscall_freebsd.go │ ├── syscall_freebsd_386.go │ ├── syscall_freebsd_amd64.go │ ├── syscall_freebsd_arm.go │ ├── syscall_linux.go │ ├── syscall_linux_386.go │ ├── syscall_linux_amd64.go │ ├── syscall_linux_amd64_gc.go │ ├── syscall_linux_arm.go │ ├── syscall_linux_arm64.go │ ├── syscall_linux_mips64x.go │ ├── syscall_linux_mipsx.go │ ├── syscall_linux_ppc64x.go │ ├── syscall_linux_s390x.go │ ├── syscall_linux_sparc64.go │ ├── syscall_netbsd.go │ ├── syscall_netbsd_386.go │ ├── syscall_netbsd_amd64.go │ ├── syscall_netbsd_arm.go │ ├── syscall_openbsd.go │ ├── syscall_openbsd_386.go │ ├── syscall_openbsd_amd64.go │ ├── syscall_openbsd_arm.go │ ├── syscall_solaris.go │ ├── syscall_solaris_amd64.go │ ├── syscall_unix.go │ ├── syscall_unix_gc.go │ ├── timestruct.go │ ├── types_darwin.go │ ├── types_dragonfly.go │ ├── types_freebsd.go │ ├── types_netbsd.go │ ├── types_openbsd.go │ ├── types_solaris.go │ ├── zerrors_darwin_386.go │ ├── zerrors_darwin_amd64.go │ ├── zerrors_darwin_arm.go │ ├── zerrors_darwin_arm64.go │ ├── zerrors_dragonfly_amd64.go │ ├── zerrors_freebsd_386.go │ ├── zerrors_freebsd_amd64.go │ ├── zerrors_freebsd_arm.go │ ├── zerrors_linux_386.go │ ├── zerrors_linux_amd64.go │ ├── zerrors_linux_arm.go │ ├── zerrors_linux_arm64.go │ ├── zerrors_linux_mips.go │ ├── zerrors_linux_mips64.go │ ├── zerrors_linux_mips64le.go │ ├── zerrors_linux_mipsle.go │ ├── zerrors_linux_ppc64.go │ ├── zerrors_linux_ppc64le.go │ ├── zerrors_linux_s390x.go │ ├── zerrors_linux_sparc64.go │ ├── zerrors_netbsd_386.go │ ├── zerrors_netbsd_amd64.go │ ├── zerrors_netbsd_arm.go │ ├── zerrors_openbsd_386.go │ ├── zerrors_openbsd_amd64.go │ ├── zerrors_openbsd_arm.go │ ├── zerrors_solaris_amd64.go │ ├── zptrace386_linux.go │ ├── zptracearm_linux.go │ ├── zptracemips_linux.go │ ├── zptracemipsle_linux.go │ ├── zsyscall_darwin_386.go │ ├── zsyscall_darwin_amd64.go │ ├── zsyscall_darwin_arm.go │ ├── zsyscall_darwin_arm64.go │ ├── zsyscall_dragonfly_amd64.go │ ├── zsyscall_freebsd_386.go │ ├── zsyscall_freebsd_amd64.go │ ├── zsyscall_freebsd_arm.go │ ├── zsyscall_linux_386.go │ ├── zsyscall_linux_amd64.go │ ├── zsyscall_linux_arm.go │ ├── zsyscall_linux_arm64.go │ ├── zsyscall_linux_mips.go │ ├── zsyscall_linux_mips64.go │ ├── zsyscall_linux_mips64le.go │ ├── zsyscall_linux_mipsle.go │ ├── zsyscall_linux_ppc64.go │ ├── zsyscall_linux_ppc64le.go │ ├── zsyscall_linux_s390x.go │ ├── zsyscall_linux_sparc64.go │ ├── zsyscall_netbsd_386.go │ ├── zsyscall_netbsd_amd64.go │ ├── zsyscall_netbsd_arm.go │ ├── zsyscall_openbsd_386.go │ ├── zsyscall_openbsd_amd64.go │ ├── zsyscall_openbsd_arm.go │ ├── zsyscall_solaris_amd64.go │ ├── zsysctl_openbsd_386.go │ ├── zsysctl_openbsd_amd64.go │ ├── zsysctl_openbsd_arm.go │ ├── zsysnum_darwin_386.go │ ├── zsysnum_darwin_amd64.go │ ├── zsysnum_darwin_arm.go │ ├── zsysnum_darwin_arm64.go │ ├── zsysnum_dragonfly_amd64.go │ ├── zsysnum_freebsd_386.go │ ├── zsysnum_freebsd_amd64.go │ ├── zsysnum_freebsd_arm.go │ ├── zsysnum_linux_386.go │ ├── zsysnum_linux_amd64.go │ ├── zsysnum_linux_arm.go │ ├── zsysnum_linux_arm64.go │ ├── zsysnum_linux_mips.go │ ├── zsysnum_linux_mips64.go │ ├── zsysnum_linux_mips64le.go │ ├── zsysnum_linux_mipsle.go │ ├── zsysnum_linux_ppc64.go │ ├── zsysnum_linux_ppc64le.go │ ├── zsysnum_linux_s390x.go │ ├── zsysnum_linux_sparc64.go │ ├── zsysnum_netbsd_386.go │ ├── zsysnum_netbsd_amd64.go │ ├── zsysnum_netbsd_arm.go │ ├── zsysnum_openbsd_386.go │ ├── zsysnum_openbsd_amd64.go │ ├── zsysnum_openbsd_arm.go │ ├── ztypes_darwin_386.go │ ├── ztypes_darwin_amd64.go │ ├── ztypes_darwin_arm.go │ ├── ztypes_darwin_arm64.go │ ├── ztypes_dragonfly_amd64.go │ ├── ztypes_freebsd_386.go │ ├── ztypes_freebsd_amd64.go │ ├── ztypes_freebsd_arm.go │ ├── ztypes_linux_386.go │ ├── ztypes_linux_amd64.go │ ├── ztypes_linux_arm.go │ ├── ztypes_linux_arm64.go │ ├── ztypes_linux_mips.go │ ├── ztypes_linux_mips64.go │ ├── ztypes_linux_mips64le.go │ ├── ztypes_linux_mipsle.go │ ├── ztypes_linux_ppc64.go │ ├── ztypes_linux_ppc64le.go │ ├── ztypes_linux_s390x.go │ ├── ztypes_linux_sparc64.go │ ├── ztypes_netbsd_386.go │ ├── ztypes_netbsd_amd64.go │ ├── ztypes_netbsd_arm.go │ ├── ztypes_openbsd_386.go │ ├── ztypes_openbsd_amd64.go │ ├── ztypes_openbsd_arm.go │ └── ztypes_solaris_amd64.go │ └── windows │ ├── asm_windows_386.s │ ├── asm_windows_amd64.s │ ├── dll_windows.go │ ├── env_unset.go │ ├── env_windows.go │ ├── eventlog.go │ ├── exec_windows.go │ ├── memory_windows.go │ ├── mksyscall.go │ ├── race.go │ ├── race0.go │ ├── security_windows.go │ ├── service.go │ ├── str.go │ ├── syscall.go │ ├── syscall_windows.go │ ├── types_windows.go │ ├── types_windows_386.go │ ├── types_windows_amd64.go │ └── zsyscall_windows.go └── vendor.json /.gitignore: -------------------------------------------------------------------------------- 1 | cover.out 2 | .coverage 3 | .idea 4 | bin 5 | release 6 | self-contained-go-project 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - '1.9' 4 | cache: 5 | directories: 6 | - tools/bin 7 | script: 8 | - CONCURRENT_LINTERS=1 LINTER_DEADLINE=180s make all 9 | - tools/bin/goveralls -coverprofile=cover.out -service=travis-ci 10 | - make release 11 | deploy: 12 | provider: releases 13 | api_key: 14 | secure: SDfSox6BnnoZELv1eQxz07K32r3BevyHEQOPkmsYbANRpZvtv0nfN7Y/fADvfvvY4dRqoKJfS4oY518jbhz5zH+h+1INFAhVNMwh6TRsY2aQKkhWGZPRhqFeL6/pLIkyKFoQU/Jcfv5N1DFaXidaearudFN+VoYD/knAXPaATLmhdfUewi1gg1lNGyKtJlc1zN7ffo/o+u2NGnwo7+/+lvss0pC/KdQUI4YmrLoyDgZR5ADpZ8Kkuc5EGZOfubKl5eOxX408AfaVar4WIei61ZqkgkxOYeza1Ps0y1brBHR5DsHwWvefA76TtNzoQz4bsVPdMwV23SqPgCllH7cFlflGgle33Db6DWx+wJ274V6tcyqa1HpKwILzqsPuOD77LNQ+6eiqxUOMF2AYw8rFal/5UqeV82gMBhJAhyL8aWL5AFldJtqeZIFetxwC/eecoseaqpyrvgNPppIYQlNELKA26zKy4tDa/Pdu2GBBKDGIl3zbeijK3FH2hVLZZzFY/815QmvvsjZXcR7CIIcHxYf7nHPPWx6O+DPnPgVwGVMi03m4AXgJYIF/fOrScgmd8paFX8feMswNZRqppDzuzgKUPLT4O9TsFeAFgwrSYkUEyrcu2PkcnV0/uz1SRSwF3jKg0nNhHojXylULwwR7o/9wwZNFaOHRWHKVLtyCEE0= 15 | skip_cleanup: true 16 | file_glob: true 17 | file: release/* 18 | on: 19 | tags: true 20 | branch: master 21 | repo: wrouesnel/dns-over-https-proxy 22 | -------------------------------------------------------------------------------- /tools/.gitignore: -------------------------------------------------------------------------------- 1 | /pkg 2 | /bin 3 | /tools.deps 4 | /metatools.deps 5 | -------------------------------------------------------------------------------- /tools/README.md: -------------------------------------------------------------------------------- 1 | 2 | Vendored versions of the build tooling. 3 | 4 | gocovmerge is used to merge coverage reports for uploading to a service like 5 | coveralls, and gometalinter conveniently incorporates multiple Go linters. 6 | 7 | By vendoring both, we gain a self-contained build system. 8 | 9 | Run `make all` to build, and `make update` to update. 10 | -------------------------------------------------------------------------------- /tools/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Standard pre-commit hook for my Golang projects. 3 | 4 | # Execute style check from the make file. 5 | make fmt 6 | exit $? 7 | -------------------------------------------------------------------------------- /tools/src: -------------------------------------------------------------------------------- 1 | vendor -------------------------------------------------------------------------------- /tools/vendor/github.com/Bowery/prompt/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | - [Larz Conwell](https://github.com/larzconwell) 2 | - [Steve Kaliski](https://github.com/sjkaliski) 3 | - [NHOrus](https://github.com/NHOrus) 4 | - [Attila Fülöp](https://github.com/AttilaFueloep) 5 | - [Gereon Frey](https://github.com/gfrey) 6 | - [Aaron Bieber](https://github.com/qbit) 7 | - [Ricky Medina](https://github.com/r-medina) 8 | -------------------------------------------------------------------------------- /tools/vendor/github.com/Bowery/prompt/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-2015 Bowery, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /tools/vendor/github.com/Bowery/prompt/ansi_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin freebsd openbsd netbsd dragonfly solaris 2 | 3 | // Copyright 2013-2015 Bowery, Inc. 4 | 5 | package prompt 6 | 7 | import ( 8 | "os" 9 | ) 10 | 11 | // AnsiReader is an io.Reader that wraps an *os.File. 12 | type AnsiReader struct { 13 | file *os.File 14 | } 15 | 16 | // NewAnsiReader creates a AnsiReader from the given input file. 17 | func NewAnsiReader(in *os.File) *AnsiReader { 18 | return &AnsiReader{file: in} 19 | } 20 | 21 | // Read reads data from the input file into b. 22 | func (ar *AnsiReader) Read(b []byte) (int, error) { 23 | return ar.file.Read(b) 24 | } 25 | 26 | // AnsiWriter is an io.Writer that wraps an *os.File. 27 | type AnsiWriter struct { 28 | file *os.File 29 | } 30 | 31 | // NewAnsiWriter creates a AnsiWriter from the given output file. 32 | func NewAnsiWriter(out *os.File) *AnsiWriter { 33 | return &AnsiWriter{file: out} 34 | } 35 | 36 | // Write writes data from b into the input file. 37 | func (aw *AnsiWriter) Write(b []byte) (int, error) { 38 | return aw.file.Write(b) 39 | } 40 | -------------------------------------------------------------------------------- /tools/vendor/github.com/Bowery/prompt/ioctl_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | 3 | // Copyright 2013-2015 Bowery, Inc. 4 | 5 | package prompt 6 | 7 | import ( 8 | "golang.org/x/sys/unix" 9 | ) 10 | 11 | const ( 12 | tcgets = unix.TIOCGETA 13 | tcsets = unix.TIOCSETA 14 | tcsetsf = unix.TIOCSETAF 15 | ) 16 | -------------------------------------------------------------------------------- /tools/vendor/github.com/Bowery/prompt/ioctl_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2015 Bowery, Inc. 2 | 3 | package prompt 4 | 5 | import ( 6 | "golang.org/x/sys/unix" 7 | ) 8 | 9 | const ( 10 | tcgets = unix.TCGETS 11 | tcsets = unix.TCSETS 12 | tcsetsf = unix.TCSETSF 13 | ) 14 | -------------------------------------------------------------------------------- /tools/vendor/github.com/Bowery/prompt/ioctl_solaris.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2015 Bowery, Inc. 2 | 3 | package prompt 4 | 5 | import ( 6 | "os" 7 | 8 | "golang.org/x/sys/unix" 9 | ) 10 | 11 | const ( 12 | tcgets = unix.TCGETS 13 | tcsetsf = unix.TCSETSF 14 | tcsets = unix.TCSETS 15 | ) 16 | 17 | // terminalSize retrieves the cols/rows for the terminal connected to out. 18 | func terminalSize(out *os.File) (int, int, error) { 19 | ws, err := unix.IoctlGetWinsize(int(out.Fd()), unix.TIOCGWINSZ) 20 | if err != nil { 21 | return 0, 0, err 22 | } 23 | 24 | return int(ws.Col), int(ws.Row), nil 25 | } 26 | 27 | // getTermios retrieves the termios settings for the terminal descriptor. 28 | func getTermios(fd uintptr) (*unix.Termios, error) { 29 | return unix.IoctlGetTermios(int(fd), tcgets) 30 | } 31 | 32 | // setTermios sets the termios settings for the terminal descriptor, 33 | // optionally flushing the buffer before setting. 34 | func setTermios(fd uintptr, flush bool, mode *unix.Termios) error { 35 | req := tcsets 36 | if flush { 37 | req = tcsetsf 38 | } 39 | 40 | return unix.IoctlSetTermios(int(fd), req, mode) 41 | } 42 | -------------------------------------------------------------------------------- /tools/vendor/github.com/Bowery/prompt/keys.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2015 Bowery, Inc. 2 | 3 | package prompt 4 | 5 | // Line ending in raw mode. 6 | var crlf = []byte("\r\n") 7 | 8 | const ( 9 | backKey = '\u007f' 10 | escKey = '\u001B' 11 | spaceKey = '\u0020' 12 | ) 13 | 14 | const ( 15 | ctrlA = iota + 1 16 | ctrlB 17 | ctrlC 18 | ctrlD 19 | ctrlE 20 | ctrlF 21 | ctrlG 22 | ctrlH 23 | tabKey 24 | ctrlJ 25 | ctrlK 26 | ctrlL 27 | returnKey 28 | ctrlN 29 | ctrlO 30 | ctrlP 31 | ctrlQ 32 | ctrlR 33 | ctrlS 34 | ctrlT 35 | ctrlU 36 | ctrlV 37 | ctrlW 38 | ctrlX 39 | ctrlY 40 | ctrlZ 41 | ) 42 | -------------------------------------------------------------------------------- /tools/vendor/github.com/Bowery/prompt/keys_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin freebsd openbsd netbsd dragonfly solaris 2 | 3 | // Copyright 2013-2015 Bowery, Inc. 4 | 5 | package prompt 6 | 7 | const mvToCol = "\u001b[0G\u001b[%dC" 8 | 9 | var ( 10 | mvLeftEdge = []byte("\u001b[0G") 11 | clsScreen = []byte("\u001b[H\u001b[2J") 12 | delRight = []byte("\u001b[0K") 13 | ) 14 | -------------------------------------------------------------------------------- /tools/vendor/github.com/Bowery/prompt/keys_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2015 Bowery, Inc. 2 | 3 | package prompt 4 | 5 | const ( 6 | f1Key = 0x70 + iota 7 | f2Key 8 | f3Key 9 | f4Key 10 | f5Key 11 | f6Key 12 | f7Key 13 | f8Key 14 | f9Key 15 | f10Key 16 | f11Key 17 | f12Key 18 | 19 | homeKey = 0x24 20 | endKey = 0x23 21 | upKey = 0x26 22 | downKey = 0x28 23 | rightKey = 0x27 24 | leftKey = 0x25 25 | insertKey = 0x2d 26 | pgupKey = 0x21 27 | pgdownKey = 0x22 28 | deleteKey = 0x2e 29 | leftAltKey = 0x2 30 | rightAltKey = 0x1 31 | leftCtrlKey = 0x8 32 | rightCtrlKey = 0x4 33 | shiftKey = 0x10 34 | ) 35 | -------------------------------------------------------------------------------- /tools/vendor/github.com/GoASTScanner/gas/Dockerfile: -------------------------------------------------------------------------------- 1 | # Docker version must be 17.05 or higher to allow multistage build 2 | # See build and run instructions in README.md 3 | 4 | # Builds Gas for utilization 5 | FROM golang:1.8.1-alpine as builder 6 | ENV workspace /go/src/github.com/GoASTScanner/gas 7 | ENV GOPATH /go 8 | COPY . $workspace 9 | WORKDIR $workspace 10 | 11 | RUN go vet $(go list ./... | grep -v /vendor/) 12 | RUN CGO_ENABLED=0 go build -o gas . 13 | 14 | ######################################################## 15 | 16 | # Runs Gas on all Go files in the current directory when 17 | # 'docker run' command in README is given 18 | FROM alpine:3.6 19 | 20 | COPY --from=builder /go/src/github.com/GoASTScanner/gas/gas / 21 | 22 | # Mounted directory should be placed into the workdir 23 | CMD /gas $(find . -path ./vendor -prune -o -type f -name "*.go") 24 | -------------------------------------------------------------------------------- /tools/vendor/github.com/GoASTScanner/gas/vendor.conf: -------------------------------------------------------------------------------- 1 | # package 2 | github.com/GoAstScanner/gas 3 | 4 | # import 5 | github.com/GoASTScanner/gas cc52ef5 6 | github.com/nbutton23/zxcvbn-go a22cb81 7 | github.com/ryanuber/go-glob v0.1 8 | -------------------------------------------------------------------------------- /tools/vendor/github.com/alecthomas/gocyclo/README.md: -------------------------------------------------------------------------------- 1 | Gocyclo calculates cyclomatic complexities of functions in Go source code. 2 | 3 | The cyclomatic complexity of a function is calculated according to the 4 | following rules: 5 | 6 | 1 is the base complexity of a function 7 | +1 for each 'if', 'for', 'case', '&&' or '||' 8 | 9 | To install, run 10 | 11 | $ go get github.com/fzipp/gocyclo 12 | 13 | and put the resulting binary in one of your PATH directories if 14 | `$GOPATH/bin` isn't already in your PATH. 15 | 16 | Usage: 17 | 18 | $ gocyclo [ ...] ... 19 | 20 | Examples: 21 | 22 | $ gocyclo . 23 | $ gocyclo main.go 24 | $ gocyclo -top 10 src/ 25 | $ gocyclo -over 25 docker 26 | $ gocyclo -avg . 27 | 28 | The output fields for each line are: 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /tools/vendor/github.com/alecthomas/gometalinter/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (C) 2012 Alec Thomas 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /tools/vendor/github.com/alecthomas/gometalinter/stringset.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | type stringSet struct { 4 | items map[string]struct{} 5 | } 6 | 7 | func newStringSet(items ...string) *stringSet { 8 | setItems := make(map[string]struct{}, len(items)) 9 | for _, item := range items { 10 | setItems[item] = struct{}{} 11 | } 12 | return &stringSet{items: setItems} 13 | } 14 | 15 | func (s *stringSet) add(item string) { 16 | s.items[item] = struct{}{} 17 | } 18 | 19 | func (s *stringSet) asSlice() []string { 20 | items := []string{} 21 | for item := range s.items { 22 | items = append(items, item) 23 | } 24 | return items 25 | } 26 | 27 | func (s *stringSet) size() int { 28 | return len(s.items) 29 | } 30 | -------------------------------------------------------------------------------- /tools/vendor/github.com/alecthomas/units/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014 Alec Thomas 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /tools/vendor/github.com/alecthomas/units/README.md: -------------------------------------------------------------------------------- 1 | # Units - Helpful unit multipliers and functions for Go 2 | 3 | The goal of this package is to have functionality similar to the [time](http://golang.org/pkg/time/) package. 4 | 5 | It allows for code like this: 6 | 7 | ```go 8 | n, err := ParseBase2Bytes("1KB") 9 | // n == 1024 10 | n = units.Mebibyte * 512 11 | ``` 12 | -------------------------------------------------------------------------------- /tools/vendor/github.com/alecthomas/units/doc.go: -------------------------------------------------------------------------------- 1 | // Package units provides helpful unit multipliers and functions for Go. 2 | // 3 | // The goal of this package is to have functionality similar to the time [1] package. 4 | // 5 | // 6 | // [1] http://golang.org/pkg/time/ 7 | // 8 | // It allows for code like this: 9 | // 10 | // n, err := ParseBase2Bytes("1KB") 11 | // // n == 1024 12 | // n = units.Mebibyte * 512 13 | package units 14 | -------------------------------------------------------------------------------- /tools/vendor/github.com/alecthomas/units/si.go: -------------------------------------------------------------------------------- 1 | package units 2 | 3 | // SI units. 4 | type SI int64 5 | 6 | // SI unit multiples. 7 | const ( 8 | Kilo SI = 1000 9 | Mega = Kilo * 1000 10 | Giga = Mega * 1000 11 | Tera = Giga * 1000 12 | Peta = Tera * 1000 13 | Exa = Peta * 1000 14 | ) 15 | 16 | func MakeUnitMap(suffix, shortSuffix string, scale int64) map[string]float64 { 17 | return map[string]float64{ 18 | shortSuffix: 1, 19 | "K" + suffix: float64(scale), 20 | "M" + suffix: float64(scale * scale), 21 | "G" + suffix: float64(scale * scale * scale), 22 | "T" + suffix: float64(scale * scale * scale * scale), 23 | "P" + suffix: float64(scale * scale * scale * scale * scale), 24 | "E" + suffix: float64(scale * scale * scale * scale * scale * scale), 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tools/vendor/github.com/alexflint/go-scalar/README.md: -------------------------------------------------------------------------------- 1 | [![GoDoc](https://godoc.org/github.com/alexflint/go-scalar?status.svg)](https://godoc.org/github.com/alexflint/go-scalar) 2 | [![Build Status](https://travis-ci.org/alexflint/go-scalar.svg?branch=master)](https://travis-ci.org/alexflint/go-scalar) 3 | [![Coverage Status](https://coveralls.io/repos/alexflint/go-scalar/badge.svg?branch=master&service=github)](https://coveralls.io/github/alexflint/go-scalar?branch=master) 4 | [![Report Card](https://goreportcard.com/badge/github.com/alexflint/go-scalar)](https://goreportcard.com/badge/github.com/alexflint/go-scalar) 5 | 6 | ## Scalar parsing library 7 | 8 | Scalar is a library for parsing strings into arbitrary scalars (integers, 9 | floats, strings, booleans, etc). It is helpful for tasks such as parsing 10 | strings passed as environment variables or command line arguments. 11 | 12 | ```shell 13 | go get github.com/alexflint/go-scalar 14 | ``` 15 | 16 | The main API works as follows: 17 | 18 | ```go 19 | var value int 20 | err := scalar.Parse(&value, "123") 21 | ``` 22 | 23 | There is also a variant that takes a `reflect.Value`: 24 | 25 | ```go 26 | var value int 27 | err := scalar.ParseValue(reflect.ValueOf(&value), "123") 28 | ``` 29 | -------------------------------------------------------------------------------- /tools/vendor/github.com/alexkohler/nakedret/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Alex Kohler 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /tools/vendor/github.com/client9/misspell/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-2017 Nick Galbreath 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /tools/vendor/github.com/client9/misspell/goreleaser.yml: -------------------------------------------------------------------------------- 1 | # goreleaser.yml 2 | # https://github.com/goreleaser/goreleaser 3 | build: 4 | main: cmd/misspell/main.go 5 | binary: misspell 6 | ldflags: -s -w -X main.version={{.Version}} 7 | goos: 8 | - darwin 9 | - linux 10 | goarch: 11 | - amd64 12 | env: 13 | - CGO_ENABLED=0 14 | ignore: 15 | - goos: darwin 16 | goarch: 386 17 | 18 | archive: 19 | name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" 20 | replacements: 21 | amd64: 64bit 22 | 386: 32bit 23 | darwin: mac 24 | 25 | snapshot: 26 | name_template: SNAPSHOT-{{.Commit}} 27 | -------------------------------------------------------------------------------- /tools/vendor/github.com/client9/misspell/url.go: -------------------------------------------------------------------------------- 1 | package misspell 2 | 3 | import ( 4 | "regexp" 5 | ) 6 | 7 | // Regexp for URL https://mathiasbynens.be/demo/url-regex 8 | // 9 | // original @imme_emosol (54 chars) has trouble with dashes in hostname 10 | // @(https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?$@iS 11 | var reURL = regexp.MustCompile(`(?i)(https?|ftp)://(-\.)?([^\s/?\.#]+\.?)+(/[^\s]*)?`) 12 | 13 | // StripURL attemps to replace URLs with blank spaces, e.g. 14 | // "xxx http://foo.com/ yyy -> "xxx yyyy" 15 | func StripURL(s string) string { 16 | return reURL.ReplaceAllStringFunc(s, replaceWithBlanks) 17 | } 18 | -------------------------------------------------------------------------------- /tools/vendor/github.com/dchest/safefile/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | 3 | os: Windows Server 2012 R2 4 | 5 | clone_folder: c:\projects\src\github.com\dchest\safefile 6 | 7 | environment: 8 | PATH: c:\projects\bin;%PATH% 9 | GOPATH: c:\projects 10 | NOTIFY_TIMEOUT: 5s 11 | 12 | install: 13 | - go version 14 | - go get golang.org/x/tools/cmd/vet 15 | - go get -v -t ./... 16 | 17 | build_script: 18 | - go tool vet -all . 19 | - go build ./... 20 | - go test -v -race ./... 21 | 22 | test: off 23 | 24 | deploy: off 25 | -------------------------------------------------------------------------------- /tools/vendor/github.com/dchest/safefile/rename.go: -------------------------------------------------------------------------------- 1 | // +build !plan9,!windows windows,go1.5 2 | 3 | package safefile 4 | 5 | import "os" 6 | 7 | func rename(oldname, newname string) error { 8 | return os.Rename(oldname, newname) 9 | } 10 | -------------------------------------------------------------------------------- /tools/vendor/github.com/dnephin/govet/internal/whitelist/whitelist.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package whitelist defines exceptions for the vet tool. 6 | package whitelist 7 | 8 | // UnkeyedLiteral is a white list of types in the standard packages 9 | // that are used with unkeyed literals we deem to be acceptable. 10 | var UnkeyedLiteral = map[string]bool{ 11 | // These image and image/color struct types are frozen. We will never add fields to them. 12 | "image/color.Alpha16": true, 13 | "image/color.Alpha": true, 14 | "image/color.CMYK": true, 15 | "image/color.Gray16": true, 16 | "image/color.Gray": true, 17 | "image/color.NRGBA64": true, 18 | "image/color.NRGBA": true, 19 | "image/color.NYCbCrA": true, 20 | "image/color.RGBA64": true, 21 | "image/color.RGBA": true, 22 | "image/color.YCbCr": true, 23 | "image.Point": true, 24 | "image.Rectangle": true, 25 | "image.Uniform": true, 26 | 27 | "unicode.Range16": true, 28 | } 29 | -------------------------------------------------------------------------------- /tools/vendor/github.com/golang/lint/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Golint 2 | 3 | ## Before filing an issue: 4 | 5 | ### Are you having trouble building golint? 6 | 7 | Check you have the latest version of its dependencies. Run 8 | ``` 9 | go get -u github.com/golang/lint 10 | ``` 11 | If you still have problems, consider searching for existing issues before filing a new issue. 12 | 13 | ## Before sending a pull request: 14 | 15 | Have you understood the purpose of golint? Make sure to carefully read `README`. 16 | -------------------------------------------------------------------------------- /tools/vendor/github.com/google/shlex/README: -------------------------------------------------------------------------------- 1 | go-shlex is a simple lexer for go that supports shell-style quoting, 2 | commenting, and escaping. 3 | -------------------------------------------------------------------------------- /tools/vendor/github.com/gordonklaus/ineffassign/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Gordon Klaus and contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /tools/vendor/github.com/gordonklaus/ineffassign/README.md: -------------------------------------------------------------------------------- 1 | # ineffassign 2 | Detect ineffectual assignments in Go code. 3 | 4 | This tool misses some cases because does not consider any type information in its analysis. (For example, assignments to struct fields are never marked as ineffectual.) It should, however, never give any false positives. 5 | -------------------------------------------------------------------------------- /tools/vendor/github.com/gordonklaus/ineffassign/bugs: -------------------------------------------------------------------------------- 1 | cmd/compile/internal/big/floatconv.go:367:2 m 2 | cmd/cover/cover_test.go:62:2 err 3 | cmd/pprof/internal/profile/profile.go:131:10 err 4 | math/big/ftoa.go:285:2 m 5 | net/file_unix.go:66:7 err 6 | golang.org/x/mobile/app/android.go:175:2 queue 7 | golang.org/x/net/icmp/listen_posix.go:83:6 err 8 | -------------------------------------------------------------------------------- /tools/vendor/github.com/jgautheron/goconst/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Jonathan Gautheron 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /tools/vendor/github.com/kardianos/govendor/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | 3 | os: Windows Server 2012 R2 4 | 5 | environment: 6 | GOPATH: c:\gopath 7 | GOVERSION: 1.7 8 | 9 | clone_folder: c:\gopath\src\github.com\kardianos\govendor 10 | 11 | install: 12 | - mkdir c:\tmp 13 | - set TMP=C:\tmp 14 | - go version 15 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 16 | - rmdir c:\go /s /q 17 | - appveyor DownloadFile https://storage.googleapis.com/golang/go%GOVERSION%.windows-amd64.zip 18 | - 7z x go%GOVERSION%.windows-amd64.zip -y -oC:\ > NUL 19 | - go version 20 | - go env 21 | 22 | build_script: 23 | - go test -i ./... 24 | - go test ./... 25 | -------------------------------------------------------------------------------- /tools/vendor/github.com/kardianos/govendor/context/syslist.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package context 6 | 7 | const goosList = "android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows " 8 | const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc s390 s390x sparc sparc64 " 9 | -------------------------------------------------------------------------------- /tools/vendor/github.com/kardianos/govendor/context/version.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package context 6 | 7 | import ( 8 | "strconv" 9 | "unicode" 10 | ) 11 | 12 | // IsVersion returns true if the string is a version. 13 | func isVersion(s string) bool { 14 | hasPunct := false 15 | onlyNumber := true 16 | onlyHexLetter := true 17 | for _, r := range s { 18 | isNumber := unicode.IsNumber(r) 19 | isLetter := unicode.IsLetter(r) 20 | 21 | hasPunct = hasPunct || unicode.IsPunct(r) 22 | onlyNumber = onlyNumber && isNumber 23 | 24 | if isLetter { 25 | low := unicode.ToLower(r) 26 | onlyHexLetter = onlyHexLetter && low <= 'f' 27 | } 28 | } 29 | if hasPunct { 30 | return true 31 | } 32 | if onlyHexLetter == false { 33 | return true 34 | } 35 | 36 | num, err := strconv.ParseInt(s, 10, 64) 37 | if err == nil { 38 | if num > 100 { 39 | return false // numeric revision. 40 | } 41 | } 42 | 43 | if len(s) > 5 && onlyHexLetter { 44 | return false // hex revision 45 | } 46 | return true 47 | } 48 | -------------------------------------------------------------------------------- /tools/vendor/github.com/kardianos/govendor/help/gen-license.template: -------------------------------------------------------------------------------- 1 | // Machine generated; DO NOT EDIT. 2 | 3 | package help 4 | 5 | var msgGovendorLicenses = `{{range $index, $t := .}}{{if ne $index 0}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 | {{end}}{{.Filename}} - {{.Path}} 7 | {{.Text}}{{end}} 8 | ` 9 | -------------------------------------------------------------------------------- /tools/vendor/github.com/kardianos/govendor/help/version.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package help 6 | 7 | var version = "v1.0.8" 8 | -------------------------------------------------------------------------------- /tools/vendor/github.com/kardianos/govendor/internal/vfilepath/prefix.go: -------------------------------------------------------------------------------- 1 | package vfilepath 2 | 3 | import "strings" 4 | 5 | func HasPrefixDir(path string, prefix string) bool { 6 | return strings.HasPrefix(makeDirPath(path), makeDirPath(prefix)) 7 | } 8 | 9 | func makeDirPath(path string) string { 10 | if path != "/" { 11 | path += "/" 12 | } 13 | return path 14 | } 15 | -------------------------------------------------------------------------------- /tools/vendor/github.com/kardianos/govendor/internal/vfilepath/stub.go: -------------------------------------------------------------------------------- 1 | package vfilepath 2 | 3 | import ( 4 | "path/filepath" 5 | ) 6 | 7 | func Split(path string) (string, string) { 8 | return filepath.Split(path) 9 | } 10 | 11 | func Join(parts ...string) string { 12 | return filepath.Join(parts...) 13 | } 14 | 15 | func EvalSymlinks(path string) (string, error) { 16 | return filepath.EvalSymlinks(path) 17 | } 18 | -------------------------------------------------------------------------------- /tools/vendor/github.com/kardianos/govendor/internal/vfilepath/switch.go: -------------------------------------------------------------------------------- 1 | package vfilepath 2 | -------------------------------------------------------------------------------- /tools/vendor/github.com/kardianos/govendor/internal/vos/switch.go: -------------------------------------------------------------------------------- 1 | package vos 2 | 3 | import ( 4 | "log" 5 | ) 6 | 7 | const debugLog = false 8 | 9 | func l(fname, path string) { 10 | if debugLog { 11 | log.Println(fname, path) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tools/vendor/github.com/kardianos/govendor/migrate/gb.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package migrate 6 | 7 | import ( 8 | "errors" 9 | "path/filepath" 10 | ) 11 | 12 | func init() { 13 | register("gb", sysGb{}) 14 | } 15 | 16 | type sysGb struct{} 17 | 18 | func (sys sysGb) Check(root string) (system, error) { 19 | if hasDirs(root, "src", filepath.Join("vendor", "src")) { 20 | return sys, nil 21 | } 22 | return nil, nil 23 | } 24 | func (sysGb) Migrate(root string) error { 25 | // Move files from "src" to first GOPATH. 26 | // Move vendor files from "vendor/src" to "vendor". 27 | // Translate "vendor/manifest" to vendor.json file. 28 | return errors.New("Migrate gb not implemented") 29 | } 30 | -------------------------------------------------------------------------------- /tools/vendor/github.com/kardianos/govendor/run/sync.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package run 6 | 7 | import ( 8 | "flag" 9 | "io" 10 | 11 | "github.com/kardianos/govendor/context" 12 | "github.com/kardianos/govendor/help" 13 | ) 14 | 15 | func (r *runner) Sync(w io.Writer, subCmdArgs []string) (help.HelpMessage, error) { 16 | flags := flag.NewFlagSet("sync", flag.ContinueOnError) 17 | insecure := flags.Bool("insecure", false, "allow insecure network updates") 18 | dryrun := flags.Bool("n", false, "dry run, print what would be done") 19 | verbose := flags.Bool("v", false, "verbose output") 20 | flags.SetOutput(nullWriter{}) 21 | err := flags.Parse(subCmdArgs) 22 | if err != nil { 23 | return help.MsgSync, err 24 | } 25 | ctx, err := r.NewContextWD(context.RootVendor) 26 | if err != nil { 27 | return help.MsgSync, err 28 | } 29 | ctx.Insecure = *insecure 30 | if *dryrun || *verbose { 31 | ctx.Logger = w 32 | } 33 | return help.MsgNone, ctx.Sync(*dryrun) 34 | } 35 | -------------------------------------------------------------------------------- /tools/vendor/github.com/kisielk/errcheck/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Kamil Kisiel 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /tools/vendor/github.com/kisielk/gotool/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Kamil Kisiel 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /tools/vendor/github.com/kisielk/gotool/README.md: -------------------------------------------------------------------------------- 1 | gotool 2 | ====== 3 | [![GoDoc](https://godoc.org/github.com/kisielk/gotool?status.svg)](https://godoc.org/github.com/kisielk/gotool) 4 | [![Build Status](https://travis-ci.org/kisielk/gotool.svg?branch=master)](https://travis-ci.org/kisielk/gotool) 5 | 6 | Package gotool contains utility functions used to implement the standard "cmd/go" tool, provided as a convenience to developers who want to write tools with similar semantics. 7 | -------------------------------------------------------------------------------- /tools/vendor/github.com/kisielk/gotool/go13.go: -------------------------------------------------------------------------------- 1 | // +build !go1.4 2 | 3 | package gotool 4 | 5 | import ( 6 | "go/build" 7 | "path/filepath" 8 | "runtime" 9 | ) 10 | 11 | var gorootSrc = filepath.Join(runtime.GOROOT(), "src", "pkg") 12 | 13 | func shouldIgnoreImport(p *build.Package) bool { 14 | return true 15 | } 16 | -------------------------------------------------------------------------------- /tools/vendor/github.com/kisielk/gotool/go14-15.go: -------------------------------------------------------------------------------- 1 | // +build go1.4,!go1.6 2 | 3 | package gotool 4 | 5 | import ( 6 | "go/build" 7 | "path/filepath" 8 | "runtime" 9 | ) 10 | 11 | var gorootSrc = filepath.Join(runtime.GOROOT(), "src") 12 | 13 | func shouldIgnoreImport(p *build.Package) bool { 14 | return true 15 | } 16 | -------------------------------------------------------------------------------- /tools/vendor/github.com/kisielk/gotool/go16.go: -------------------------------------------------------------------------------- 1 | // +build go1.6 2 | 3 | package gotool 4 | 5 | import ( 6 | "go/build" 7 | "path/filepath" 8 | "runtime" 9 | ) 10 | 11 | var gorootSrc = filepath.Join(runtime.GOROOT(), "src") 12 | 13 | func shouldIgnoreImport(p *build.Package) bool { 14 | return p == nil || len(p.InvalidGoFiles) == 0 15 | } 16 | -------------------------------------------------------------------------------- /tools/vendor/github.com/mdempsky/maligned/README: -------------------------------------------------------------------------------- 1 | Install: 2 | 3 | go get github.com/mdempsky/maligned 4 | 5 | Usage: 6 | 7 | maligned cmd/compile/internal/gc cmd/link/internal/ld 8 | -------------------------------------------------------------------------------- /tools/vendor/github.com/mibk/dupl/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Michal Bohuslávek 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /tools/vendor/github.com/mibk/dupl/job/buildtree.go: -------------------------------------------------------------------------------- 1 | package job 2 | 3 | import ( 4 | "github.com/mibk/dupl/suffixtree" 5 | "github.com/mibk/dupl/syntax" 6 | ) 7 | 8 | func BuildTree(schan chan []*syntax.Node) (t *suffixtree.STree, d *[]*syntax.Node, done chan bool) { 9 | t = suffixtree.New() 10 | data := make([]*syntax.Node, 0, 100) 11 | done = make(chan bool) 12 | go func() { 13 | for seq := range schan { 14 | data = append(data, seq...) 15 | for _, node := range seq { 16 | t.Update(node) 17 | } 18 | } 19 | done <- true 20 | }() 21 | return t, &data, done 22 | } 23 | -------------------------------------------------------------------------------- /tools/vendor/github.com/mibk/dupl/job/parse.go: -------------------------------------------------------------------------------- 1 | package job 2 | 3 | import ( 4 | "log" 5 | 6 | "github.com/mibk/dupl/syntax" 7 | "github.com/mibk/dupl/syntax/golang" 8 | ) 9 | 10 | func Parse(fchan chan string) chan []*syntax.Node { 11 | 12 | // parse AST 13 | achan := make(chan *syntax.Node) 14 | go func() { 15 | for file := range fchan { 16 | ast, err := golang.Parse(file) 17 | if err != nil { 18 | log.Println(err) 19 | continue 20 | } 21 | achan <- ast 22 | } 23 | close(achan) 24 | }() 25 | 26 | // serialize 27 | schan := make(chan []*syntax.Node) 28 | go func() { 29 | for ast := range achan { 30 | seq := syntax.Serialize(ast) 31 | schan <- seq 32 | } 33 | close(schan) 34 | }() 35 | return schan 36 | } 37 | -------------------------------------------------------------------------------- /tools/vendor/github.com/mibk/dupl/output/plumbing.go: -------------------------------------------------------------------------------- 1 | package output 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "sort" 7 | 8 | "github.com/mibk/dupl/syntax" 9 | ) 10 | 11 | type PlumbingPrinter struct { 12 | *TextPrinter 13 | } 14 | 15 | func NewPlumbingPrinter(w io.Writer, fr FileReader) *PlumbingPrinter { 16 | return &PlumbingPrinter{NewTextPrinter(w, fr)} 17 | } 18 | 19 | func (p *PlumbingPrinter) Print(dups [][]*syntax.Node) error { 20 | clones, err := p.prepareClonesInfo(dups) 21 | if err != nil { 22 | return err 23 | } 24 | sort.Sort(byNameAndLine(clones)) 25 | for i, cl := range clones { 26 | nextCl := clones[(i+1)%len(clones)] 27 | fmt.Fprintf(p.writer, "%s:%d-%d: duplicate of %s:%d-%d\n", cl.filename, cl.lineStart, cl.lineEnd, 28 | nextCl.filename, nextCl.lineStart, nextCl.lineEnd) 29 | } 30 | return nil 31 | } 32 | 33 | func (p *PlumbingPrinter) Finish() {} 34 | -------------------------------------------------------------------------------- /tools/vendor/github.com/mibk/dupl/printer/plumbing.go: -------------------------------------------------------------------------------- 1 | package printer 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "sort" 7 | 8 | "github.com/mibk/dupl/syntax" 9 | ) 10 | 11 | type plumbing struct { 12 | w io.Writer 13 | ReadFile 14 | } 15 | 16 | func NewPlumbing(w io.Writer, fread ReadFile) Printer { 17 | return &plumbing{w, fread} 18 | } 19 | 20 | func (p *plumbing) PrintHeader() error { return nil } 21 | 22 | func (p *plumbing) PrintClones(dups [][]*syntax.Node) error { 23 | clones, err := prepareClonesInfo(p.ReadFile, dups) 24 | if err != nil { 25 | return err 26 | } 27 | sort.Sort(byNameAndLine(clones)) 28 | for i, cl := range clones { 29 | nextCl := clones[(i+1)%len(clones)] 30 | fmt.Fprintf(p.w, "%s:%d-%d: duplicate of %s:%d-%d\n", cl.filename, cl.lineStart, cl.lineEnd, 31 | nextCl.filename, nextCl.lineStart, nextCl.lineEnd) 32 | } 33 | return nil 34 | } 35 | 36 | func (p *plumbing) PrintFooter() error { return nil } 37 | -------------------------------------------------------------------------------- /tools/vendor/github.com/mibk/dupl/printer/printer.go: -------------------------------------------------------------------------------- 1 | package printer 2 | 3 | import "github.com/mibk/dupl/syntax" 4 | 5 | type ReadFile func(filename string) ([]byte, error) 6 | 7 | type Printer interface { 8 | PrintHeader() error 9 | PrintClones(dups [][]*syntax.Node) error 10 | PrintFooter() error 11 | } 12 | -------------------------------------------------------------------------------- /tools/vendor/github.com/mvdan/interfacer/cmd/interfacer/main.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Daniel Martí 2 | // See LICENSE for licensing information 3 | 4 | package main 5 | 6 | import ( 7 | "flag" 8 | "fmt" 9 | "os" 10 | 11 | "github.com/mvdan/interfacer" 12 | ) 13 | 14 | var _ = flag.Bool("v", false, "print the names of packages as they are checked") 15 | 16 | func main() { 17 | flag.Parse() 18 | lines, err := interfacer.CheckArgs(flag.Args()) 19 | if err != nil { 20 | fmt.Fprintln(os.Stderr, err) 21 | os.Exit(1) 22 | } 23 | for _, line := range lines { 24 | fmt.Println(line) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tools/vendor/github.com/mvdan/lint/README.md: -------------------------------------------------------------------------------- 1 | # lint 2 | 3 | [![GoDoc](https://godoc.org/github.com/mvdan/lint?status.svg)](https://godoc.org/github.com/mvdan/lint) 4 | [![Build Status](https://travis-ci.org/mvdan/lint.svg?branch=master)](https://travis-ci.org/mvdan/lint) 5 | 6 | Work in progress. Its API might change before the 1.0 release. 7 | 8 | This package intends to define simple interfaces that Go code checkers 9 | can implement. This would simplify calling them from Go code, as well as 10 | running multiple linters while sharing initial loading work. 11 | 12 | ### metalint 13 | 14 | go get -u github.com/mvdan/lint/cmd/metalint 15 | 16 | The start of a linter that runs many linters leveraging the common 17 | interface. Not stable yet. 18 | 19 | Linters included: 20 | 21 | * [unparam](https://github.com/mvdan/unparam) 22 | * [interfacer](https://github.com/mvdan/interfacer) 23 | 24 | ### Related projects 25 | 26 | * [golinters](https://github.com/thomasheller/golinters) - Report on 27 | linter support 28 | -------------------------------------------------------------------------------- /tools/vendor/github.com/mvdan/lint/lint.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017, Daniel Martí 2 | // See LICENSE for licensing information 3 | 4 | // Package lint defines common interfaces for Go code checkers. 5 | package lint 6 | 7 | import ( 8 | "go/token" 9 | 10 | "golang.org/x/tools/go/loader" 11 | "golang.org/x/tools/go/ssa" 12 | ) 13 | 14 | // A Checker points out issues in a program. 15 | type Checker interface { 16 | Program(*loader.Program) 17 | Check() ([]Issue, error) 18 | } 19 | 20 | type WithSSA interface { 21 | ProgramSSA(*ssa.Program) 22 | } 23 | 24 | // Issue represents an issue somewhere in a source code file. 25 | type Issue interface { 26 | Pos() token.Pos 27 | Message() string 28 | } 29 | -------------------------------------------------------------------------------- /tools/vendor/github.com/mvdan/unparam/README.md: -------------------------------------------------------------------------------- 1 | # unparam 2 | 3 | [![Build Status](https://travis-ci.org/mvdan/unparam.svg?branch=master)](https://travis-ci.org/mvdan/unparam) 4 | 5 | go get -u github.com/mvdan/unparam 6 | 7 | Reports unused function parameters in your code. 8 | 9 | To minimise false positives, it ignores: 10 | 11 | * Unnamed and underscore parameters 12 | * Funcs whose signature matches a reachable func type 13 | * Funcs whose signature matches a reachable interface method 14 | * Funcs that have empty bodies 15 | * Funcs that will almost immediately panic or return constants 16 | 17 | False positives can still occur by design. The aim of the tool is to be 18 | as precise as possible - if you find any, file a bug. 19 | 20 | Note that "reachable" means func signatures found in top-level 21 | declarations in each package and all of its direct dependencies. The 22 | tool ignores transitive dependencies and local signatures. 23 | -------------------------------------------------------------------------------- /tools/vendor/github.com/mvdan/unparam/main.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017, Daniel Martí 2 | // See LICENSE for licensing information 3 | 4 | package main 5 | 6 | import ( 7 | "flag" 8 | "fmt" 9 | "os" 10 | 11 | "github.com/mvdan/unparam/check" 12 | ) 13 | 14 | var tests = flag.Bool("tests", true, "include tests") 15 | 16 | func main() { 17 | flag.Parse() 18 | warns, err := check.UnusedParams(*tests, flag.Args()...) 19 | if err != nil { 20 | fmt.Fprintln(os.Stderr, err) 21 | os.Exit(1) 22 | } 23 | for _, warn := range warns { 24 | fmt.Println(warn) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tools/vendor/github.com/nbutton23/zxcvbn-go/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) Nathan Button 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /tools/vendor/github.com/nbutton23/zxcvbn-go/match/match.go: -------------------------------------------------------------------------------- 1 | package match 2 | 3 | type Matches []Match 4 | 5 | func (s Matches) Len() int { 6 | return len(s) 7 | } 8 | func (s Matches) Swap(i, j int) { 9 | s[i], s[j] = s[j], s[i] 10 | } 11 | func (s Matches) Less(i, j int) bool { 12 | if s[i].I < s[j].I { 13 | return true 14 | } else if s[i].I == s[j].I { 15 | return s[i].J < s[j].J 16 | } else { 17 | return false 18 | } 19 | } 20 | 21 | type Match struct { 22 | Pattern string 23 | I, J int 24 | Token string 25 | DictionaryName string 26 | Entropy float64 27 | } 28 | 29 | type DateMatch struct { 30 | Pattern string 31 | I, J int 32 | Token string 33 | Separator string 34 | Day, Month, Year int64 35 | } 36 | -------------------------------------------------------------------------------- /tools/vendor/github.com/nbutton23/zxcvbn-go/utils/math/mathutils.go: -------------------------------------------------------------------------------- 1 | package zxcvbn_math 2 | 3 | import "math" 4 | 5 | /** 6 | I am surprised that I have to define these. . . Maybe i just didn't look hard enough for a lib. 7 | */ 8 | 9 | //http://blog.plover.com/math/choose.html 10 | func NChoseK(n, k float64) float64 { 11 | if k > n { 12 | return 0 13 | } else if k == 0 { 14 | return 1 15 | } 16 | 17 | var r float64 = 1 18 | 19 | for d := float64(1); d <= k; d++ { 20 | r *= n 21 | r /= d 22 | n-- 23 | } 24 | 25 | return r 26 | } 27 | 28 | func Round(val float64, roundOn float64, places int) (newVal float64) { 29 | var round float64 30 | pow := math.Pow(10, float64(places)) 31 | digit := pow * val 32 | _, div := math.Modf(digit) 33 | if div >= roundOn { 34 | round = math.Ceil(digit) 35 | } else { 36 | round = math.Floor(digit) 37 | } 38 | newVal = round / pow 39 | return 40 | } 41 | -------------------------------------------------------------------------------- /tools/vendor/github.com/nbutton23/zxcvbn-go/zxcvbn.go: -------------------------------------------------------------------------------- 1 | package zxcvbn 2 | 3 | import ( 4 | "github.com/nbutton23/zxcvbn-go/matching" 5 | "github.com/nbutton23/zxcvbn-go/scoring" 6 | "github.com/nbutton23/zxcvbn-go/utils/math" 7 | "time" 8 | ) 9 | 10 | func PasswordStrength(password string, userInputs []string) scoring.MinEntropyMatch { 11 | start := time.Now() 12 | matches := matching.Omnimatch(password, userInputs) 13 | result := scoring.MinimumEntropyMatchSequence(password, matches) 14 | end := time.Now() 15 | 16 | calcTime := end.Nanosecond() - start.Nanosecond() 17 | result.CalcTime = zxcvbn_math.Round(float64(calcTime)*time.Nanosecond.Seconds(), .5, 3) 18 | return result 19 | } 20 | -------------------------------------------------------------------------------- /tools/vendor/github.com/nicksnyder/go-i18n/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Nick Snyder https://github.com/nicksnyder 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /tools/vendor/github.com/nicksnyder/go-i18n/i18n/language/plural.go: -------------------------------------------------------------------------------- 1 | package language 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | // Plural represents a language pluralization form as defined here: 8 | // http://cldr.unicode.org/index/cldr-spec/plural-rules 9 | type Plural string 10 | 11 | // All defined plural categories. 12 | const ( 13 | Invalid Plural = "invalid" 14 | Zero = "zero" 15 | One = "one" 16 | Two = "two" 17 | Few = "few" 18 | Many = "many" 19 | Other = "other" 20 | ) 21 | 22 | // NewPlural returns src as a Plural 23 | // or Invalid and a non-nil error if src is not a valid Plural. 24 | func NewPlural(src string) (Plural, error) { 25 | switch src { 26 | case "zero": 27 | return Zero, nil 28 | case "one": 29 | return One, nil 30 | case "two": 31 | return Two, nil 32 | case "few": 33 | return Few, nil 34 | case "many": 35 | return Many, nil 36 | case "other": 37 | return Other, nil 38 | } 39 | return Invalid, fmt.Errorf("invalid plural category %s", src) 40 | } 41 | -------------------------------------------------------------------------------- /tools/vendor/github.com/pelletier/go-toml/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 - 2017 Thomas Pelletier, Eric Anderton 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /tools/vendor/github.com/pelletier/go-toml/benchmark.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | reference_ref=${1:-master} 6 | reference_git=${2:-.} 7 | 8 | if ! `hash benchstat 2>/dev/null`; then 9 | echo "Installing benchstat" 10 | go get golang.org/x/perf/cmd/benchstat 11 | go install golang.org/x/perf/cmd/benchstat 12 | fi 13 | 14 | tempdir=`mktemp -d /tmp/go-toml-benchmark-XXXXXX` 15 | ref_tempdir="${tempdir}/ref" 16 | ref_benchmark="${ref_tempdir}/benchmark-${reference_ref}.txt" 17 | local_benchmark="`pwd`/benchmark-local.txt" 18 | 19 | echo "=== ${reference_ref} (${ref_tempdir})" 20 | git clone ${reference_git} ${ref_tempdir} >/dev/null 2>/dev/null 21 | pushd ${ref_tempdir} >/dev/null 22 | git checkout ${reference_ref} >/dev/null 2>/dev/null 23 | go test -bench=. -benchmem | tee ${ref_benchmark} 24 | popd >/dev/null 25 | 26 | echo "" 27 | echo "=== local" 28 | go test -bench=. -benchmem | tee ${local_benchmark} 29 | 30 | echo "" 31 | echo "=== diff" 32 | benchstat -delta-test=none ${ref_benchmark} ${local_benchmark} -------------------------------------------------------------------------------- /tools/vendor/github.com/pelletier/go-toml/doc.go: -------------------------------------------------------------------------------- 1 | // Package toml is a TOML parser and manipulation library. 2 | // 3 | // This version supports the specification as described in 4 | // https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md 5 | // 6 | // Marshaling 7 | // 8 | // Go-toml can marshal and unmarshal TOML documents from and to data 9 | // structures. 10 | // 11 | // TOML document as a tree 12 | // 13 | // Go-toml can operate on a TOML document as a tree. Use one of the Load* 14 | // functions to parse TOML data and obtain a Tree instance, then one of its 15 | // methods to manipulate the tree. 16 | // 17 | // JSONPath-like queries 18 | // 19 | // The package github.com/pelletier/go-toml/query implements a system 20 | // similar to JSONPath to quickly retrive elements of a TOML document using a 21 | // single expression. See the package documentation for more information. 22 | // 23 | package toml 24 | -------------------------------------------------------------------------------- /tools/vendor/github.com/pelletier/go-toml/example-crlf.toml: -------------------------------------------------------------------------------- 1 | # This is a TOML document. Boom. 2 | 3 | title = "TOML Example" 4 | 5 | [owner] 6 | name = "Tom Preston-Werner" 7 | organization = "GitHub" 8 | bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." 9 | dob = 1979-05-27T07:32:00Z # First class dates? Why not? 10 | 11 | [database] 12 | server = "192.168.1.1" 13 | ports = [ 8001, 8001, 8002 ] 14 | connection_max = 5000 15 | enabled = true 16 | 17 | [servers] 18 | 19 | # You can indent as you please. Tabs or spaces. TOML don't care. 20 | [servers.alpha] 21 | ip = "10.0.0.1" 22 | dc = "eqdc10" 23 | 24 | [servers.beta] 25 | ip = "10.0.0.2" 26 | dc = "eqdc10" 27 | 28 | [clients] 29 | data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it 30 | -------------------------------------------------------------------------------- /tools/vendor/github.com/pelletier/go-toml/example.toml: -------------------------------------------------------------------------------- 1 | # This is a TOML document. Boom. 2 | 3 | title = "TOML Example" 4 | 5 | [owner] 6 | name = "Tom Preston-Werner" 7 | organization = "GitHub" 8 | bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." 9 | dob = 1979-05-27T07:32:00Z # First class dates? Why not? 10 | 11 | [database] 12 | server = "192.168.1.1" 13 | ports = [ 8001, 8001, 8002 ] 14 | connection_max = 5000 15 | enabled = true 16 | 17 | [servers] 18 | 19 | # You can indent as you please. Tabs or spaces. TOML don't care. 20 | [servers.alpha] 21 | ip = "10.0.0.1" 22 | dc = "eqdc10" 23 | 24 | [servers.beta] 25 | ip = "10.0.0.2" 26 | dc = "eqdc10" 27 | 28 | [clients] 29 | data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it 30 | -------------------------------------------------------------------------------- /tools/vendor/github.com/pelletier/go-toml/marshal_test.toml: -------------------------------------------------------------------------------- 1 | title = "TOML Marshal Testing" 2 | 3 | [basic] 4 | bool = true 5 | date = 1979-05-27T07:32:00Z 6 | float = 123.4 7 | int = 5000 8 | string = "Bite me" 9 | uint = 5001 10 | 11 | [basic_lists] 12 | bools = [true,false,true] 13 | dates = [1979-05-27T07:32:00Z,1980-05-27T07:32:00Z] 14 | floats = [12.3,45.6,78.9] 15 | ints = [8001,8001,8002] 16 | strings = ["One","Two","Three"] 17 | uints = [5002,5003] 18 | 19 | [basic_map] 20 | one = "one" 21 | two = "two" 22 | 23 | [subdoc] 24 | 25 | [subdoc.first] 26 | name = "First" 27 | 28 | [subdoc.second] 29 | name = "Second" 30 | 31 | [[subdoclist]] 32 | name = "List.First" 33 | 34 | [[subdoclist]] 35 | name = "List.Second" 36 | 37 | [[subdocptrs]] 38 | name = "Second" 39 | -------------------------------------------------------------------------------- /tools/vendor/github.com/pelletier/go-toml/position.go: -------------------------------------------------------------------------------- 1 | // Position support for go-toml 2 | 3 | package toml 4 | 5 | import ( 6 | "fmt" 7 | ) 8 | 9 | // Position of a document element within a TOML document. 10 | // 11 | // Line and Col are both 1-indexed positions for the element's line number and 12 | // column number, respectively. Values of zero or less will cause Invalid(), 13 | // to return true. 14 | type Position struct { 15 | Line int // line within the document 16 | Col int // column within the line 17 | } 18 | 19 | // String representation of the position. 20 | // Displays 1-indexed line and column numbers. 21 | func (p Position) String() string { 22 | return fmt.Sprintf("(%d, %d)", p.Line, p.Col) 23 | } 24 | 25 | // Invalid returns whether or not the position is valid (i.e. with negative or 26 | // null values) 27 | func (p Position) Invalid() bool { 28 | return p.Line <= 0 || p.Col <= 0 29 | } 30 | -------------------------------------------------------------------------------- /tools/vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /tools/vendor/github.com/ryanuber/go-glob/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Ryan Uber 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /tools/vendor/github.com/stripe/safesql/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015- Stripe, Inc. (https://stripe.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /tools/vendor/github.com/stripe/safesql/package15.go: -------------------------------------------------------------------------------- 1 | // +build !go1.6 2 | 3 | package main 4 | 5 | import "os" 6 | 7 | var useVendor = os.Getenv("GO15VENDOREXPERIMENT") == "1" 8 | -------------------------------------------------------------------------------- /tools/vendor/github.com/stripe/safesql/package16.go: -------------------------------------------------------------------------------- 1 | // +build go1.6 2 | 3 | package main 4 | 5 | import "os" 6 | 7 | var useVendor = os.Getenv("GO15VENDOREXPERIMENT") == "0" || os.Getenv("GO15VENDOREXPERIMENT") == "" 8 | -------------------------------------------------------------------------------- /tools/vendor/github.com/wadey/gocovmerge/README.md: -------------------------------------------------------------------------------- 1 | gocovmerge 2 | ========== 3 | 4 | gocovmerge takes the results from multiple `go test -coverprofile` runs and 5 | merges them into one profile. 6 | 7 | usage 8 | ----- 9 | 10 | gocovmerge [coverprofiles...] 11 | 12 | gocovmerge takes the source coverprofiles as the arguments (output from 13 | `go test -coverprofile coverage.out`) and outputs a merged version of the 14 | files to standard out. You can only merge profiles that were generated from the 15 | same source code. If there are source lines that overlap or do not merge, the 16 | process will exit with an error code. 17 | -------------------------------------------------------------------------------- /tools/vendor/github.com/walle/lll/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Fredrik Wallgren 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | 21 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_darwin_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_darwin_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm64,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for AMD64, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-64 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-112 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-64 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_freebsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_linux_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for 386, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 23 | JMP syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 26 | JMP syscall·RawSyscall6(SB) 27 | 28 | TEXT ·socketcall(SB),NOSPLIT,$0-36 29 | JMP syscall·socketcall(SB) 30 | 31 | TEXT ·rawsocketcall(SB),NOSPLIT,$0-36 32 | JMP syscall·rawsocketcall(SB) 33 | 34 | TEXT ·seek(SB),NOSPLIT,$0-28 35 | JMP syscall·seek(SB) 36 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_linux_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for AMD64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 23 | JMP syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 26 | JMP syscall·RawSyscall6(SB) 27 | 28 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16 29 | JMP syscall·gettimeofday(SB) 30 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_linux_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for arm, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 23 | B syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 26 | B syscall·RawSyscall6(SB) 27 | 28 | TEXT ·seek(SB),NOSPLIT,$0-32 29 | B syscall·seek(SB) 30 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_linux_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build arm64 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 21 | B syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | B syscall·RawSyscall6(SB) 25 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build mips64 mips64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for mips64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | JMP syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | JMP syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | JMP syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | JMP syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build mips mipsle 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for mips, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-28 19 | JMP syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 22 | JMP syscall·Syscall6(SB) 23 | 24 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 25 | JMP syscall·Syscall9(SB) 26 | 27 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 28 | JMP syscall·RawSyscall(SB) 29 | 30 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 31 | JMP syscall·RawSyscall6(SB) 32 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64 ppc64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for ppc64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_linux_s390x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build s390x 6 | // +build linux 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for s390x, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_netbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_openbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | ) 27 | 28 | // Socketoption Level 29 | const ( 30 | SOL_BLUETOOTH = 0x112 31 | SOL_HCI = 0x0 32 | SOL_L2CAP = 0x6 33 | SOL_RFCOMM = 0x12 34 | SOL_SCO = 0x11 35 | ) 36 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build ppc64 s390x mips mips64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/env_unset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.4 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Unsetenv(key string) error { 12 | // This was added in Go 1.4. 13 | return syscall.Unsetenv(key) 14 | } 15 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/flock.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin freebsd openbsd netbsd dragonfly 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build darwin dragonfly freebsd linux netbsd openbsd 8 | 9 | package unix 10 | 11 | import "unsafe" 12 | 13 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 14 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. 15 | var fcntl64Syscall uintptr = SYS_FCNTL 16 | 17 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 18 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 19 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 20 | if errno == 0 { 21 | return nil 22 | } 23 | return errno 24 | } 25 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/flock_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm linux,mips linux,mipsle 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/gccgo_c.c: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #define _STRINGIFY2_(x) #x 12 | #define _STRINGIFY_(x) _STRINGIFY2_(x) 13 | #define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__) 14 | 15 | // Call syscall from C code because the gccgo support for calling from 16 | // Go to C does not support varargs functions. 17 | 18 | struct ret { 19 | uintptr_t r; 20 | uintptr_t err; 21 | }; 22 | 23 | struct ret 24 | 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) 25 | { 26 | struct ret r; 27 | 28 | errno = 0; 29 | r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); 30 | r.err = errno; 31 | return r; 32 | } 33 | 34 | // Define the use function in C so that it is not inlined. 35 | 36 | extern void use(void *) __asm__ (GOSYM_PREFIX GOPKGPATH ".use") __attribute__((noinline)); 37 | 38 | void 39 | use(void *p __attribute__ ((unused))) 40 | { 41 | } 42 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo,linux,amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo,linux,sparc64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern sysconf 12 | func realSysconf(name int) int64 13 | 14 | func sysconf(name int) (n int64, err syscall.Errno) { 15 | r := realSysconf(name) 16 | if r < 0 { 17 | return 0, syscall.GetErrno() 18 | } 19 | return r, 0 20 | } 21 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | # 6 | # Generate system call table for Darwin from sys/syscall.h 7 | 8 | use strict; 9 | 10 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { 11 | print STDERR "GOARCH or GOOS not defined in environment\n"; 12 | exit 1; 13 | } 14 | 15 | my $command = "mksysnum_darwin.pl " . join(' ', @ARGV); 16 | 17 | print <){ 29 | if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){ 30 | my $name = $1; 31 | my $num = $2; 32 | $name =~ y/a-z/A-Z/; 33 | print " SYS_$name = $num;" 34 | } 35 | } 36 | 37 | print <= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,linux 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,netbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int32(nsec % 1e9) 16 | return 17 | } 18 | 19 | func NsecToTimeval(nsec int64) (tv Timeval) { 20 | nsec += 999 // round up to microsecond 21 | tv.Usec = int32(nsec % 1e9 / 1e3) 22 | tv.Sec = int64(nsec / 1e9) 23 | return 24 | } 25 | 26 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 27 | k.Ident = uint32(fd) 28 | k.Filter = uint32(mode) 29 | k.Flags = uint32(flags) 30 | } 31 | 32 | func (iov *Iovec) SetLen(length int) { 33 | iov.Len = uint32(length) 34 | } 35 | 36 | func (msghdr *Msghdr) SetControllen(length int) { 37 | msghdr.Controllen = uint32(length) 38 | } 39 | 40 | func (cmsg *Cmsghdr) SetLen(length int) { 41 | cmsg.Len = uint32(length) 42 | } 43 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,netbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int64(nsec % 1e9) 16 | return 17 | } 18 | 19 | func NsecToTimeval(nsec int64) (tv Timeval) { 20 | nsec += 999 // round up to microsecond 21 | tv.Usec = int32(nsec % 1e9 / 1e3) 22 | tv.Sec = int64(nsec / 1e9) 23 | return 24 | } 25 | 26 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 27 | k.Ident = uint64(fd) 28 | k.Filter = uint32(mode) 29 | k.Flags = uint32(flags) 30 | } 31 | 32 | func (iov *Iovec) SetLen(length int) { 33 | iov.Len = uint64(length) 34 | } 35 | 36 | func (msghdr *Msghdr) SetControllen(length int) { 37 | msghdr.Controllen = uint32(length) 38 | } 39 | 40 | func (cmsg *Cmsghdr) SetLen(length int) { 41 | cmsg.Len = uint32(length) 42 | } 43 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,netbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int32(nsec % 1e9) 16 | return 17 | } 18 | 19 | func NsecToTimeval(nsec int64) (tv Timeval) { 20 | nsec += 999 // round up to microsecond 21 | tv.Usec = int32(nsec % 1e9 / 1e3) 22 | tv.Sec = int64(nsec / 1e9) 23 | return 24 | } 25 | 26 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 27 | k.Ident = uint32(fd) 28 | k.Filter = uint32(mode) 29 | k.Flags = uint32(flags) 30 | } 31 | 32 | func (iov *Iovec) SetLen(length int) { 33 | iov.Len = uint32(length) 34 | } 35 | 36 | func (msghdr *Msghdr) SetControllen(length int) { 37 | msghdr.Controllen = uint32(length) 38 | } 39 | 40 | func (cmsg *Cmsghdr) SetLen(length int) { 41 | cmsg.Len = uint32(length) 42 | } 43 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/syscall_no_getwd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build dragonfly freebsd netbsd openbsd 6 | 7 | package unix 8 | 9 | const ImplementsGetwd = false 10 | 11 | func Getwd() (string, error) { return "", ENOTSUP } 12 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,openbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int32(nsec % 1e9) 16 | return 17 | } 18 | 19 | func NsecToTimeval(nsec int64) (tv Timeval) { 20 | nsec += 999 // round up to microsecond 21 | tv.Usec = int32(nsec % 1e9 / 1e3) 22 | tv.Sec = int64(nsec / 1e9) 23 | return 24 | } 25 | 26 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 27 | k.Ident = uint32(fd) 28 | k.Filter = int16(mode) 29 | k.Flags = uint16(flags) 30 | } 31 | 32 | func (iov *Iovec) SetLen(length int) { 33 | iov.Len = uint32(length) 34 | } 35 | 36 | func (msghdr *Msghdr) SetControllen(length int) { 37 | msghdr.Controllen = uint32(length) 38 | } 39 | 40 | func (cmsg *Cmsghdr) SetLen(length int) { 41 | cmsg.Len = uint32(length) 42 | } 43 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,openbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = nsec / 1e9 15 | ts.Nsec = nsec % 1e9 16 | return 17 | } 18 | 19 | func NsecToTimeval(nsec int64) (tv Timeval) { 20 | nsec += 999 // round up to microsecond 21 | tv.Usec = nsec % 1e9 / 1e3 22 | tv.Sec = nsec / 1e9 23 | return 24 | } 25 | 26 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 27 | k.Ident = uint64(fd) 28 | k.Filter = int16(mode) 29 | k.Flags = uint16(flags) 30 | } 31 | 32 | func (iov *Iovec) SetLen(length int) { 33 | iov.Len = uint64(length) 34 | } 35 | 36 | func (msghdr *Msghdr) SetControllen(length int) { 37 | msghdr.Controllen = uint32(length) 38 | } 39 | 40 | func (cmsg *Cmsghdr) SetLen(length int) { 41 | cmsg.Len = uint32(length) 42 | } 43 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 10 | 11 | func NsecToTimespec(nsec int64) (ts Timespec) { 12 | ts.Sec = nsec / 1e9 13 | ts.Nsec = nsec % 1e9 14 | return 15 | } 16 | 17 | func NsecToTimeval(nsec int64) (tv Timeval) { 18 | nsec += 999 // round up to microsecond 19 | tv.Usec = nsec % 1e9 / 1e3 20 | tv.Sec = int64(nsec / 1e9) 21 | return 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (cmsg *Cmsghdr) SetLen(length int) { 29 | cmsg.Len = uint32(length) 30 | } 31 | 32 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 33 | // TODO(aram): implement this, see issue 5847. 34 | panic("unimplemented") 35 | } 36 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | // TODO(aram): remove these before Go 1.3. 10 | const ( 11 | SYS_EXECVE = 59 12 | SYS_FCNTL = 62 13 | ) 14 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/text/width/kind_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=Kind"; DO NOT EDIT 2 | 3 | package width 4 | 5 | import "fmt" 6 | 7 | const _Kind_name = "NeutralEastAsianAmbiguousEastAsianWideEastAsianNarrowEastAsianFullwidthEastAsianHalfwidth" 8 | 9 | var _Kind_index = [...]uint8{0, 7, 25, 38, 53, 71, 89} 10 | 11 | func (i Kind) String() string { 12 | if i < 0 || i >= Kind(len(_Kind_index)-1) { 13 | return fmt.Sprintf("Kind(%d)", i) 14 | } 15 | return _Kind_name[_Kind_index[i]:_Kind_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/text/width/trieval.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | package width 4 | 5 | // elem is an entry of the width trie. The high byte is used to encode the type 6 | // of the rune. The low byte is used to store the index to a mapping entry in 7 | // the inverseData array. 8 | type elem uint16 9 | 10 | const ( 11 | tagNeutral elem = iota << typeShift 12 | tagAmbiguous 13 | tagWide 14 | tagNarrow 15 | tagFullwidth 16 | tagHalfwidth 17 | ) 18 | 19 | const ( 20 | numTypeBits = 3 21 | typeShift = 16 - numTypeBits 22 | 23 | // tagNeedsFold is true for all fullwidth and halfwidth runes except for 24 | // the Won sign U+20A9. 25 | tagNeedsFold = 0x1000 26 | 27 | // The Korean Won sign is halfwidth, but SHOULD NOT be mapped to a wide 28 | // variant. 29 | wonSign rune = 0x20A9 30 | ) 31 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/cmd/goimports/goimports_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gc 6 | 7 | package main 8 | 9 | import ( 10 | "flag" 11 | "runtime/trace" 12 | ) 13 | 14 | var traceProfile = flag.String("trace", "", "trace profile output") 15 | 16 | func doTrace() func() { 17 | if *traceProfile != "" { 18 | bw, flush := bufferedFileWriter(*traceProfile) 19 | trace.Start(bw) 20 | return func() { 21 | flush() 22 | trace.Stop() 23 | } 24 | } 25 | return func() {} 26 | } 27 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/cmd/goimports/goimports_not_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gc 6 | 7 | package main 8 | 9 | func doTrace() func() { 10 | return func() {} 11 | } 12 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/cmd/gotype/sizesFor18.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.9 6 | 7 | // This file contains a copy of the implementation of types.SizesFor 8 | // since this function is not available in go/types before Go 1.9. 9 | 10 | package main 11 | 12 | import "go/types" 13 | 14 | const defaultCompiler = "gc" 15 | 16 | var gcArchSizes = map[string]*types.StdSizes{ 17 | "386": {4, 4}, 18 | "arm": {4, 4}, 19 | "arm64": {8, 8}, 20 | "amd64": {8, 8}, 21 | "amd64p32": {4, 8}, 22 | "mips": {4, 4}, 23 | "mipsle": {4, 4}, 24 | "mips64": {8, 8}, 25 | "mips64le": {8, 8}, 26 | "ppc64": {8, 8}, 27 | "ppc64le": {8, 8}, 28 | "s390x": {8, 8}, 29 | } 30 | 31 | func SizesFor(compiler, arch string) types.Sizes { 32 | if compiler != "gc" { 33 | return nil 34 | } 35 | s, ok := gcArchSizes[arch] 36 | if !ok { 37 | return nil 38 | } 39 | return s 40 | } 41 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/cmd/gotype/sizesFor19.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.9 6 | 7 | package main 8 | 9 | import "go/types" 10 | 11 | const defaultCompiler = "source" 12 | 13 | func SizesFor(compiler, arch string) types.Sizes { 14 | return types.SizesFor(compiler, arch) 15 | } 16 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/container/intsets/popcnt_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,!appengine,!gccgo 6 | 7 | package intsets 8 | 9 | func popcnt(x word) int 10 | func havePOPCNT() bool 11 | 12 | var hasPOPCNT = havePOPCNT() 13 | 14 | // popcount returns the population count (number of set bits) of x. 15 | func popcount(x word) int { 16 | if hasPOPCNT { 17 | return popcnt(x) 18 | } 19 | return popcountTable(x) // faster than Hacker's Delight 20 | } 21 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/container/intsets/popcnt_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,!appengine,!gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // func havePOPCNT() bool 10 | TEXT ·havePOPCNT(SB),4,$0 11 | MOVQ $1, AX 12 | CPUID 13 | SHRQ $23, CX 14 | ANDQ $1, CX 15 | MOVB CX, ret+0(FP) 16 | RET 17 | 18 | // func popcnt(word) int 19 | TEXT ·popcnt(SB),NOSPLIT,$0-8 20 | XORQ AX, AX 21 | MOVQ x+0(FP), SI 22 | // POPCNT (SI), AX is not recognized by Go assembler, 23 | // so we assemble it ourselves. 24 | BYTE $0xf3 25 | BYTE $0x48 26 | BYTE $0x0f 27 | BYTE $0xb8 28 | BYTE $0xc6 29 | MOVQ AX, ret+8(FP) 30 | RET 31 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/container/intsets/popcnt_gccgo.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo 6 | 7 | package intsets 8 | 9 | func popcount(x word) int 10 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/container/intsets/popcnt_gccgo_c.c: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #define _STRINGIFY2_(x) #x 12 | #define _STRINGIFY_(x) _STRINGIFY2_(x) 13 | #define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__) 14 | 15 | extern intptr_t popcount(uintptr_t x) __asm__(GOSYM_PREFIX GOPKGPATH ".popcount"); 16 | 17 | intptr_t popcount(uintptr_t x) { 18 | return __builtin_popcountl((unsigned long)(x)); 19 | } 20 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/container/intsets/popcnt_generic.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !amd64 appengine 6 | // +build !gccgo 7 | 8 | package intsets 9 | 10 | import "runtime" 11 | 12 | // We compared three algorithms---Hacker's Delight, table lookup, 13 | // and AMD64's SSE4.1 hardware POPCNT---on a 2.67GHz Xeon X5550. 14 | // 15 | // % GOARCH=amd64 go test -run=NONE -bench=Popcount 16 | // POPCNT 5.12 ns/op 17 | // Table 8.53 ns/op 18 | // HackersDelight 9.96 ns/op 19 | // 20 | // % GOARCH=386 go test -run=NONE -bench=Popcount 21 | // Table 10.4 ns/op 22 | // HackersDelight 5.23 ns/op 23 | // 24 | // (AMD64's ABM1 hardware supports ntz and nlz too, 25 | // but they aren't critical.) 26 | 27 | // popcount returns the population count (number of set bits) of x. 28 | func popcount(x word) int { 29 | if runtime.GOARCH == "386" { 30 | return popcountHD(uint32(x)) 31 | } 32 | return popcountTable(x) 33 | } 34 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/go/ast/astutil/util.go: -------------------------------------------------------------------------------- 1 | package astutil 2 | 3 | import "go/ast" 4 | 5 | // Unparen returns e with any enclosing parentheses stripped. 6 | func Unparen(e ast.Expr) ast.Expr { 7 | for { 8 | p, ok := e.(*ast.ParenExpr) 9 | if !ok { 10 | return e 11 | } 12 | e = p.X 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/go/gcimporter15/isAlias18.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.9 6 | 7 | package gcimporter 8 | 9 | import "go/types" 10 | 11 | func isAlias(obj *types.TypeName) bool { 12 | return false // there are no type aliases before Go 1.9 13 | } 14 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/go/gcimporter15/isAlias19.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.9 6 | 7 | package gcimporter 8 | 9 | import "go/types" 10 | 11 | func isAlias(obj *types.TypeName) bool { 12 | return obj.IsAlias() 13 | } 14 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/go/loader/cgo_pkgconfig.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package loader 6 | 7 | import ( 8 | "errors" 9 | "fmt" 10 | "go/build" 11 | "os/exec" 12 | "strings" 13 | ) 14 | 15 | // pkgConfig runs pkg-config with the specified arguments and returns the flags it prints. 16 | func pkgConfig(mode string, pkgs []string) (flags []string, err error) { 17 | cmd := exec.Command("pkg-config", append([]string{mode}, pkgs...)...) 18 | out, err := cmd.CombinedOutput() 19 | if err != nil { 20 | s := fmt.Sprintf("%s failed: %v", strings.Join(cmd.Args, " "), err) 21 | if len(out) > 0 { 22 | s = fmt.Sprintf("%s: %s", s, out) 23 | } 24 | return nil, errors.New(s) 25 | } 26 | if len(out) > 0 { 27 | flags = strings.Fields(string(out)) 28 | } 29 | return 30 | } 31 | 32 | // pkgConfigFlags calls pkg-config if needed and returns the cflags 33 | // needed to build the package. 34 | func pkgConfigFlags(p *build.Package) (cflags []string, err error) { 35 | if len(p.CgoPkgConfig) == 0 { 36 | return nil, nil 37 | } 38 | return pkgConfig("--cflags", p.CgoPkgConfig) 39 | } 40 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/go/pointer/TODO: -------------------------------------------------------------------------------- 1 | -*- text -*- 2 | 3 | Pointer analysis to-do list 4 | =========================== 5 | 6 | CONSTRAINT GENERATION: 7 | - support reflection: 8 | - a couple of operators are missing 9 | - reflect.Values may contain lvalues (CanAddr) 10 | - implement native intrinsics. These vary by platform. 11 | - add to pts(a.panic) a label representing all runtime panics, e.g. 12 | runtime.{TypeAssertionError,errorString,errorCString}. 13 | 14 | OPTIMISATIONS 15 | - pre-solver: 16 | pointer equivalence: extend HVN to HRU 17 | location equivalence 18 | - solver: HCD, LCD. 19 | - experiment with map+slice worklist in lieu of bitset. 20 | It may have faster insert. 21 | 22 | MISC: 23 | - Test on all platforms. 24 | Currently we assume these go/build tags: linux, amd64, !cgo. 25 | 26 | MAINTAINABILITY 27 | - Think about ways to make debugging this code easier. PTA logs 28 | routinely exceed a million lines and require training to read. 29 | 30 | BUGS: 31 | - There's a crash bug in stdlib_test + reflection, rVCallConstraint. 32 | 33 | 34 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/go/ssa/identical.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package ssa 4 | 5 | import "go/types" 6 | 7 | var structTypesIdentical = types.IdenticalIgnoreTags 8 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/go/ssa/identical_17.go: -------------------------------------------------------------------------------- 1 | // +build !go1.8 2 | 3 | package ssa 4 | 5 | import "go/types" 6 | 7 | var structTypesIdentical = types.Identical 8 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/go/types/typeutil/imports.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package typeutil 6 | 7 | import "go/types" 8 | 9 | // Dependencies returns all dependencies of the specified packages. 10 | // 11 | // Dependent packages appear in topological order: if package P imports 12 | // package Q, Q appears earlier than P in the result. 13 | // The algorithm follows import statements in the order they 14 | // appear in the source code, so the result is a total order. 15 | // 16 | func Dependencies(pkgs ...*types.Package) []*types.Package { 17 | var result []*types.Package 18 | seen := make(map[*types.Package]bool) 19 | var visit func(pkgs []*types.Package) 20 | visit = func(pkgs []*types.Package) { 21 | for _, p := range pkgs { 22 | if !seen[p] { 23 | seen[p] = true 24 | visit(p.Imports()) 25 | result = append(result, p) 26 | } 27 | } 28 | } 29 | visit(pkgs) 30 | return result 31 | } 32 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/go/vcs/env.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package vcs 6 | 7 | import ( 8 | "os" 9 | "strings" 10 | ) 11 | 12 | // envForDir returns a copy of the environment 13 | // suitable for running in the given directory. 14 | // The environment is the current process's environment 15 | // but with an updated $PWD, so that an os.Getwd in the 16 | // child will be faster. 17 | func envForDir(dir string) []string { 18 | env := os.Environ() 19 | // Internally we only use rooted paths, so dir is rooted. 20 | // Even if dir is not rooted, no harm done. 21 | return mergeEnvLists([]string{"PWD=" + dir}, env) 22 | } 23 | 24 | // mergeEnvLists merges the two environment lists such that 25 | // variables with the same name in "in" replace those in "out". 26 | func mergeEnvLists(in, out []string) []string { 27 | NextVar: 28 | for _, inkv := range in { 29 | k := strings.SplitAfterN(inkv, "=", 2)[0] 30 | for i, outkv := range out { 31 | if strings.HasPrefix(outkv, k) { 32 | out[i] = inkv 33 | continue NextVar 34 | } 35 | } 36 | out = append(out, inkv) 37 | } 38 | return out 39 | } 40 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/imports/fastwalk_dirent_fileno.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build freebsd openbsd netbsd 6 | 7 | package imports 8 | 9 | import "syscall" 10 | 11 | func direntInode(dirent *syscall.Dirent) uint64 { 12 | return uint64(dirent.Fileno) 13 | } 14 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/imports/fastwalk_dirent_ino.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,!appengine darwin 6 | 7 | package imports 8 | 9 | import "syscall" 10 | 11 | func direntInode(dirent *syscall.Dirent) uint64 { 12 | return uint64(dirent.Ino) 13 | } 14 | -------------------------------------------------------------------------------- /tools/vendor/golang.org/x/tools/imports/fastwalk_portable.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build appengine !linux,!darwin,!freebsd,!openbsd,!netbsd 6 | 7 | package imports 8 | 9 | import ( 10 | "io/ioutil" 11 | "os" 12 | ) 13 | 14 | // readDir calls fn for each directory entry in dirName. 15 | // It does not descend into directories or follow symlinks. 16 | // If fn returns a non-nil error, readDir returns with that error 17 | // immediately. 18 | func readDir(dirName string, fn func(dirName, entName string, typ os.FileMode) error) error { 19 | fis, err := ioutil.ReadDir(dirName) 20 | if err != nil { 21 | return err 22 | } 23 | for _, fi := range fis { 24 | if err := fn(dirName, fi.Name(), fi.Mode()&os.ModeType); err != nil { 25 | return err 26 | } 27 | } 28 | return nil 29 | } 30 | -------------------------------------------------------------------------------- /tools/vendor/gopkg.in/alecthomas/kingpin.v3-unstable/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014 Alec Thomas 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /tools/vendor/gopkg.in/alecthomas/kingpin.v3-unstable/completions.go: -------------------------------------------------------------------------------- 1 | package kingpin 2 | 3 | // HintAction is a function type who is expected to return a slice of possible 4 | // command line arguments. 5 | type HintAction func() []string 6 | 7 | type completionsMixin struct { 8 | hintActions []HintAction 9 | builtinHintActions []HintAction 10 | } 11 | 12 | func (a *completionsMixin) addHintAction(action HintAction) { 13 | a.hintActions = append(a.hintActions, action) 14 | } 15 | 16 | // Allow adding of HintActions which are added internally, ie, EnumVar 17 | func (a *completionsMixin) addHintActionBuiltin(action HintAction) { 18 | a.builtinHintActions = append(a.builtinHintActions, action) 19 | } 20 | 21 | func (a *completionsMixin) resolveCompletions() []string { 22 | var hints []string 23 | 24 | options := a.builtinHintActions 25 | if len(a.hintActions) > 0 { 26 | // User specified their own hintActions. Use those instead. 27 | options = a.hintActions 28 | } 29 | 30 | for _, hintAction := range options { 31 | hints = append(hints, hintAction()...) 32 | } 33 | return hints 34 | } 35 | -------------------------------------------------------------------------------- /tools/vendor/gopkg.in/alecthomas/kingpin.v3-unstable/guesswidth.go: -------------------------------------------------------------------------------- 1 | // +build appengine !linux,!freebsd,!darwin,!dragonfly,!netbsd,!openbsd 2 | 3 | package kingpin 4 | 5 | import "io" 6 | 7 | func guessWidth(w io.Writer) int { 8 | return 80 9 | } 10 | -------------------------------------------------------------------------------- /tools/vendor/gopkg.in/alecthomas/kingpin.v3-unstable/guesswidth_unix.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,linux freebsd darwin dragonfly netbsd openbsd 2 | 3 | package kingpin 4 | 5 | import ( 6 | "io" 7 | "os" 8 | "strconv" 9 | "syscall" 10 | "unsafe" 11 | ) 12 | 13 | func guessWidth(w io.Writer) int { 14 | // check if COLUMNS env is set to comply with 15 | // http://pubs.opengroup.org/onlinepubs/009604499/basedefs/xbd_chap08.html 16 | colsStr := os.Getenv("COLUMNS") 17 | if colsStr != "" { 18 | if cols, err := strconv.Atoi(colsStr); err == nil { 19 | return cols 20 | } 21 | } 22 | 23 | if t, ok := w.(*os.File); ok { 24 | fd := t.Fd() 25 | var dimensions [4]uint16 26 | 27 | if _, _, err := syscall.Syscall6( 28 | syscall.SYS_IOCTL, 29 | uintptr(fd), 30 | uintptr(syscall.TIOCGWINSZ), 31 | uintptr(unsafe.Pointer(&dimensions)), 32 | 0, 0, 0, 33 | ); err == 0 { 34 | return int(dimensions[1]) 35 | } 36 | } 37 | return 80 38 | } 39 | -------------------------------------------------------------------------------- /tools/vendor/gopkg.in/alecthomas/kingpin.v3-unstable/i18n_fr.go: -------------------------------------------------------------------------------- 1 | package kingpin 2 | 3 | var i18n_fr = []byte("\x1f\x8b\b\x00\x00\x00\x00\x00\x02\xff\x94\xd1A\xaa\x830\x10\x06\xe0}N1d\xf36\xea\x01\xdc\xc9{\xbc\v\xb8,]L㨁\x98H&i\x85һ\x17\xd1nJ\a\xe9\xfa\xcf\xf7\a\xe6?)\x80\xbb\x02\x00ж\xd35\xe8v\f70\xc1'ZR\xc9\xe4\xd9&{%\x18\xc9͕.\xb6\x97)\xa2g\x87\xc9\x06\xbf\x92\xa6\xef\xad\x19)\x82\xfbA\xdb\xd1Kgr\x8e*\xad\x00\x1e\xc5\xfb/\x99q\xa0Z\xe8\xdbÏ\xf0\xdf\xe1\xc0\x12\xfc\x8b8\x13\xe6E\xb0M\x94i\x13\x87<\x91O,\xd8\xdf0M\xe8;\xd1\xef9I\xbe\xcd\x17sPц̥9\xeaY\xe7\xf9b\x8c\xed\xfe\uab1e\x01\x00\x00\xff\xff\x1esa\xbf\xe9\x01\x00\x00") 4 | -------------------------------------------------------------------------------- /tools/vendor/gopkg.in/yaml.v2/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /tools/vendor/honnef.co/go/tools/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Dominik Honnef 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /tools/vendor/honnef.co/go/tools/callgraph/static/static.go: -------------------------------------------------------------------------------- 1 | // Package static computes the call graph of a Go program containing 2 | // only static call edges. 3 | package static // import "honnef.co/go/tools/callgraph/static" 4 | 5 | import ( 6 | "honnef.co/go/tools/callgraph" 7 | "honnef.co/go/tools/ssa" 8 | "honnef.co/go/tools/ssa/ssautil" 9 | ) 10 | 11 | // CallGraph computes the call graph of the specified program 12 | // considering only static calls. 13 | // 14 | func CallGraph(prog *ssa.Program) *callgraph.Graph { 15 | cg := callgraph.New(nil) // TODO(adonovan) eliminate concept of rooted callgraph 16 | 17 | // TODO(adonovan): opt: use only a single pass over the ssa.Program. 18 | // TODO(adonovan): opt: this is slower than RTA (perhaps because 19 | // the lower precision means so many edges are allocated)! 20 | for f := range ssautil.AllFunctions(prog) { 21 | fnode := cg.CreateNode(f) 22 | for _, b := range f.Blocks { 23 | for _, instr := range b.Instrs { 24 | if site, ok := instr.(ssa.CallInstruction); ok { 25 | if g := site.Common().StaticCallee(); g != nil { 26 | gnode := cg.CreateNode(g) 27 | callgraph.AddEdge(fnode, site, gnode) 28 | } 29 | } 30 | } 31 | } 32 | } 33 | 34 | return cg 35 | } 36 | -------------------------------------------------------------------------------- /tools/vendor/honnef.co/go/tools/cmd/gosimple/README.md: -------------------------------------------------------------------------------- 1 | # gosimple 2 | 3 | _gosimple_ is a linter for Go source code that specialises on 4 | simplifying code. 5 | 6 | ## Installation 7 | 8 | Gosimple requires Go 1.6 or later. 9 | 10 | go get honnef.co/go/tools/cmd/gosimple 11 | 12 | ## Documentation 13 | 14 | Detailed documentation can be found on 15 | [staticcheck.io](https://staticcheck.io/docs/gosimple). 16 | -------------------------------------------------------------------------------- /tools/vendor/honnef.co/go/tools/cmd/gosimple/gosimple.go: -------------------------------------------------------------------------------- 1 | // gosimple detects code that could be rewritten in a simpler way. 2 | package main // import "honnef.co/go/tools/cmd/gosimple" 3 | import ( 4 | "os" 5 | 6 | "honnef.co/go/tools/lint/lintutil" 7 | "honnef.co/go/tools/simple" 8 | ) 9 | 10 | func main() { 11 | fs := lintutil.FlagSet("gosimple") 12 | gen := fs.Bool("generated", false, "Check generated code") 13 | fs.Parse(os.Args[1:]) 14 | c := simple.NewChecker() 15 | c.CheckGenerated = *gen 16 | cfg := lintutil.CheckerConfig{ 17 | Checker: c, 18 | ExitNonZero: true, 19 | } 20 | lintutil.ProcessFlagSet([]lintutil.CheckerConfig{cfg}, fs) 21 | } 22 | -------------------------------------------------------------------------------- /tools/vendor/honnef.co/go/tools/cmd/megacheck/README.md: -------------------------------------------------------------------------------- 1 | # megacheck 2 | 3 | _megacheck_ runs staticcheck, gosimple and unused at once. Because it 4 | is able to reuse work, it will be faster than running each tool 5 | separately. 6 | 7 | ## Installation 8 | 9 | go get honnef.co/go/tools/cmd/megacheck 10 | 11 | ## Usage 12 | 13 | The basic operation of megacheck is just like that of the other tools. 14 | The flags of the individual tools are prefixed by the tools' names. 15 | Tools can be disabled by setting `-.enabled=false`. 16 | 17 | For explanations of the individual tools, see their respective 18 | readmes. 19 | -------------------------------------------------------------------------------- /tools/vendor/honnef.co/go/tools/cmd/staticcheck/README.md: -------------------------------------------------------------------------------- 1 | # staticcheck 2 | 3 | _staticcheck_ is `go vet` on steroids, applying a ton of static analysis 4 | checks you might be used to from tools like ReSharper for C#. 5 | 6 | ## Installation 7 | 8 | Staticcheck requires Go 1.6 or later. 9 | 10 | go get honnef.co/go/tools/cmd/staticcheck 11 | 12 | ## Documentation 13 | 14 | Detailed documentation can be found on 15 | [staticcheck.io](https://staticcheck.io/docs/staticcheck). 16 | 17 | -------------------------------------------------------------------------------- /tools/vendor/honnef.co/go/tools/cmd/staticcheck/staticcheck.go: -------------------------------------------------------------------------------- 1 | // staticcheck detects a myriad of bugs and inefficiencies in your 2 | // code. 3 | package main // import "honnef.co/go/tools/cmd/staticcheck" 4 | 5 | import ( 6 | "os" 7 | 8 | "honnef.co/go/tools/lint/lintutil" 9 | "honnef.co/go/tools/staticcheck" 10 | ) 11 | 12 | func main() { 13 | fs := lintutil.FlagSet("staticcheck") 14 | gen := fs.Bool("generated", false, "Check generated code") 15 | fs.Parse(os.Args[1:]) 16 | c := staticcheck.NewChecker() 17 | c.CheckGenerated = *gen 18 | cfg := lintutil.CheckerConfig{ 19 | Checker: c, 20 | ExitNonZero: true, 21 | } 22 | lintutil.ProcessFlagSet([]lintutil.CheckerConfig{cfg}, fs) 23 | } 24 | -------------------------------------------------------------------------------- /tools/vendor/honnef.co/go/tools/functions/loops.go: -------------------------------------------------------------------------------- 1 | package functions 2 | 3 | import "honnef.co/go/tools/ssa" 4 | 5 | type Loop map[*ssa.BasicBlock]bool 6 | 7 | func findLoops(fn *ssa.Function) []Loop { 8 | if fn.Blocks == nil { 9 | return nil 10 | } 11 | tree := fn.DomPreorder() 12 | var sets []Loop 13 | for _, h := range tree { 14 | for _, n := range h.Preds { 15 | if !h.Dominates(n) { 16 | continue 17 | } 18 | // n is a back-edge to h 19 | // h is the loop header 20 | if n == h { 21 | sets = append(sets, Loop{n: true}) 22 | continue 23 | } 24 | set := Loop{h: true, n: true} 25 | for _, b := range allPredsBut(n, h, nil) { 26 | set[b] = true 27 | } 28 | sets = append(sets, set) 29 | } 30 | } 31 | return sets 32 | } 33 | 34 | func allPredsBut(b, but *ssa.BasicBlock, list []*ssa.BasicBlock) []*ssa.BasicBlock { 35 | outer: 36 | for _, pred := range b.Preds { 37 | if pred == but { 38 | continue 39 | } 40 | for _, p := range list { 41 | // TODO improve big-o complexity of this function 42 | if pred == p { 43 | continue outer 44 | } 45 | } 46 | list = append(list, pred) 47 | list = allPredsBut(pred, but, list) 48 | } 49 | return list 50 | } 51 | -------------------------------------------------------------------------------- /tools/vendor/honnef.co/go/tools/functions/terminates.go: -------------------------------------------------------------------------------- 1 | package functions 2 | 3 | import "honnef.co/go/tools/ssa" 4 | 5 | // terminates reports whether fn is supposed to return, that is if it 6 | // has at least one theoretic path that returns from the function. 7 | // Explicit panics do not count as terminating. 8 | func terminates(fn *ssa.Function) bool { 9 | if fn.Blocks == nil { 10 | // assuming that a function terminates is the conservative 11 | // choice 12 | return true 13 | } 14 | 15 | for _, block := range fn.Blocks { 16 | if len(block.Instrs) == 0 { 17 | continue 18 | } 19 | if _, ok := block.Instrs[len(block.Instrs)-1].(*ssa.Return); ok { 20 | return true 21 | } 22 | } 23 | return false 24 | } 25 | -------------------------------------------------------------------------------- /tools/vendor/honnef.co/go/tools/simple/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to gosimple 2 | 3 | ## Before filing an issue: 4 | 5 | ### Are you having trouble building gosimple? 6 | 7 | Check you have the latest version of its dependencies. Run 8 | ``` 9 | go get -u honnef.co/go/tools/simple 10 | ``` 11 | If you still have problems, consider searching for existing issues before filing a new issue. 12 | 13 | ## Before sending a pull request: 14 | 15 | Have you understood the purpose of gosimple? Make sure to carefully read `README`. 16 | -------------------------------------------------------------------------------- /tools/vendor/honnef.co/go/tools/simple/lint17.go: -------------------------------------------------------------------------------- 1 | // +build !go1.8 2 | 3 | package simple 4 | 5 | import "go/types" 6 | 7 | var structsIdentical = types.Identical 8 | -------------------------------------------------------------------------------- /tools/vendor/honnef.co/go/tools/simple/lint18.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package simple 4 | 5 | import "go/types" 6 | 7 | var structsIdentical = types.IdenticalIgnoreTags 8 | -------------------------------------------------------------------------------- /tools/vendor/honnef.co/go/tools/ssa/identical.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package ssa 4 | 5 | import "go/types" 6 | 7 | var structTypesIdentical = types.IdenticalIgnoreTags 8 | -------------------------------------------------------------------------------- /tools/vendor/honnef.co/go/tools/ssa/identical_17.go: -------------------------------------------------------------------------------- 1 | // +build !go1.8 2 | 3 | package ssa 4 | 5 | import "go/types" 6 | 7 | var structTypesIdentical = types.Identical 8 | -------------------------------------------------------------------------------- /tools/vendor/honnef.co/go/tools/ssa/write.go: -------------------------------------------------------------------------------- 1 | package ssa 2 | 3 | func NewJump(parent *BasicBlock) *Jump { 4 | return &Jump{anInstruction{parent}} 5 | } 6 | -------------------------------------------------------------------------------- /tools/vendor/honnef.co/go/tools/staticcheck/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to staticcheck 2 | 3 | ## Before filing an issue: 4 | 5 | ### Are you having trouble building staticcheck? 6 | 7 | Check you have the latest version of its dependencies. Run 8 | ``` 9 | go get -u honnef.co/go/tools/staticcheck 10 | ``` 11 | If you still have problems, consider searching for existing issues before filing a new issue. 12 | 13 | ## Before sending a pull request: 14 | 15 | Have you understood the purpose of staticcheck? Make sure to carefully read `README`. 16 | -------------------------------------------------------------------------------- /tools/vendor/honnef.co/go/tools/staticcheck/buildtag.go: -------------------------------------------------------------------------------- 1 | package staticcheck 2 | 3 | import ( 4 | "go/ast" 5 | "strings" 6 | 7 | "honnef.co/go/tools/lint" 8 | ) 9 | 10 | func buildTags(f *ast.File) [][]string { 11 | var out [][]string 12 | for _, line := range strings.Split(lint.Preamble(f), "\n") { 13 | if !strings.HasPrefix(line, "+build ") { 14 | continue 15 | } 16 | line = strings.TrimSpace(strings.TrimPrefix(line, "+build ")) 17 | fields := strings.Fields(line) 18 | out = append(out, fields) 19 | } 20 | return out 21 | } 22 | -------------------------------------------------------------------------------- /tools/vendor/honnef.co/go/tools/version/version.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "path/filepath" 7 | ) 8 | 9 | const Version = "devel" 10 | 11 | func Print() { 12 | if Version == "devel" { 13 | fmt.Printf("%s (no version)\n", filepath.Base(os.Args[0])) 14 | } else { 15 | fmt.Printf("%s %s\n", filepath.Base(os.Args[0]), Version) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tools/vendor/mvdan.cc/interfacer/main.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Daniel Martí 2 | // See LICENSE for licensing information 3 | 4 | package main // import "mvdan.cc/interfacer" 5 | 6 | import ( 7 | "flag" 8 | "fmt" 9 | "os" 10 | 11 | "mvdan.cc/interfacer/check" 12 | ) 13 | 14 | var _ = flag.Bool("v", false, "print the names of packages as they are checked") 15 | 16 | func main() { 17 | flag.Parse() 18 | lines, err := check.CheckArgs(flag.Args()) 19 | if err != nil { 20 | fmt.Fprintln(os.Stderr, err) 21 | os.Exit(1) 22 | } 23 | for _, line := range lines { 24 | fmt.Println(line) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tools/vendor/mvdan.cc/lint/README.md: -------------------------------------------------------------------------------- 1 | # lint 2 | 3 | [![GoDoc](https://godoc.org/mvdan.cc/lint?status.svg)](https://godoc.org/mvdan.cc/lint) 4 | [![Build Status](https://travis-ci.org/mvdan/lint.svg?branch=master)](https://travis-ci.org/mvdan/lint) 5 | 6 | Work in progress. Its API might change before the 1.0 release. 7 | 8 | This package intends to define simple interfaces that Go code checkers 9 | can implement. This would simplify calling them from Go code, as well as 10 | running multiple linters while sharing initial loading work. 11 | 12 | ### metalint 13 | 14 | go get -u mvdan.cc/lint/cmd/metalint 15 | 16 | The start of a linter that runs many linters leveraging the common 17 | interface. Not stable yet. 18 | 19 | Linters included: 20 | 21 | * [unparam](https://mvdan.cc/unparam) 22 | * [interfacer](https://github.com/mvdan/interfacer) 23 | 24 | ### Related projects 25 | 26 | * [golinters](https://github.com/thomasheller/golinters) - Report on 27 | linter support 28 | -------------------------------------------------------------------------------- /tools/vendor/mvdan.cc/lint/lint.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017, Daniel Martí 2 | // See LICENSE for licensing information 3 | 4 | // Package lint defines common interfaces for Go code checkers. 5 | package lint // import "mvdan.cc/lint" 6 | 7 | import ( 8 | "go/token" 9 | 10 | "golang.org/x/tools/go/loader" 11 | "golang.org/x/tools/go/ssa" 12 | ) 13 | 14 | // A Checker points out issues in a program. 15 | type Checker interface { 16 | Program(*loader.Program) 17 | Check() ([]Issue, error) 18 | } 19 | 20 | type WithSSA interface { 21 | ProgramSSA(*ssa.Program) 22 | } 23 | 24 | // Issue represents an issue somewhere in a source code file. 25 | type Issue interface { 26 | Pos() token.Pos 27 | Message() string 28 | } 29 | -------------------------------------------------------------------------------- /tools/vendor/mvdan.cc/unparam/README.md: -------------------------------------------------------------------------------- 1 | # unparam 2 | 3 | [![Build Status](https://travis-ci.org/mvdan/unparam.svg?branch=master)](https://travis-ci.org/mvdan/unparam) 4 | 5 | go get -u mvdan.cc/unparam 6 | 7 | Reports unused function parameters and results in your code. 8 | 9 | To minimise false positives, it ignores certain cases such as: 10 | 11 | * Exported functions (by default, see `-exported`) 12 | * Unnamed and underscore parameters 13 | * Funcs that may satisfy an interface 14 | * Funcs that may satisfy a function signature 15 | * Funcs that are stubs (empty, only error, immediately return, etc) 16 | * Funcs that have multiple implementations via build tags 17 | 18 | It also reports results that always return the same value, parameters 19 | that always receive the same value, and results that are never used. In 20 | the last two cases, a minimum number of calls is required to ensure that 21 | the warnings are useful. 22 | 23 | False positives can still occur by design. The aim of the tool is to be 24 | as precise as possible - if you find any mistakes, file a bug. 25 | -------------------------------------------------------------------------------- /tools/vendor/mvdan.cc/unparam/main.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017, Daniel Martí 2 | // See LICENSE for licensing information 3 | 4 | package main // import "mvdan.cc/unparam" 5 | 6 | import ( 7 | "flag" 8 | "fmt" 9 | "os" 10 | 11 | "mvdan.cc/unparam/check" 12 | ) 13 | 14 | var ( 15 | tests = flag.Bool("tests", true, "include tests") 16 | exported = flag.Bool("exported", false, "inspect exported functions") 17 | debug = flag.Bool("debug", false, "debug prints") 18 | ) 19 | 20 | func main() { 21 | flag.Usage = func() { 22 | fmt.Fprintln(os.Stderr, "usage: unparam [flags] [package ...]") 23 | flag.PrintDefaults() 24 | } 25 | flag.Parse() 26 | warns, err := check.UnusedParams(*tests, *exported, *debug, flag.Args()...) 27 | if err != nil { 28 | fmt.Fprintln(os.Stderr, err) 29 | os.Exit(1) 30 | } 31 | for _, warn := range warns { 32 | fmt.Println(warn) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/AUTHORS: -------------------------------------------------------------------------------- 1 | Miek Gieben 2 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Alex A. Skinner 2 | Andrew Tunnell-Jones 3 | Ask Bjørn Hansen 4 | Dave Cheney 5 | Dusty Wilson 6 | Marek Majkowski 7 | Peter van Dijk 8 | Omri Bahumi 9 | Alex Sergeyev 10 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright 2009 The Go Authors. All rights reserved. Use of this source code 2 | is governed by a BSD-style license that can be found in the LICENSE file. 3 | Extensions of the original work are copyright (c) 2011 Miek Gieben 4 | 5 | Copyright 2011 Miek Gieben. All rights reserved. Use of this source code is 6 | governed by a BSD-style license that can be found in the LICENSE file. 7 | 8 | Copyright 2014 CloudFlare. All rights reserved. Use of this source code is 9 | governed by a BSD-style license that can be found in the LICENSE file. 10 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/scanner.go: -------------------------------------------------------------------------------- 1 | package dns 2 | 3 | // Implement a simple scanner, return a byte stream from an io reader. 4 | 5 | import ( 6 | "bufio" 7 | "io" 8 | "text/scanner" 9 | ) 10 | 11 | type scan struct { 12 | src *bufio.Reader 13 | position scanner.Position 14 | eof bool // Have we just seen a eof 15 | } 16 | 17 | func scanInit(r io.Reader) *scan { 18 | s := new(scan) 19 | s.src = bufio.NewReader(r) 20 | s.position.Line = 1 21 | return s 22 | } 23 | 24 | // tokenText returns the next byte from the input 25 | func (s *scan) tokenText() (byte, error) { 26 | c, err := s.src.ReadByte() 27 | if err != nil { 28 | return c, err 29 | } 30 | // delay the newline handling until the next token is delivered, 31 | // fixes off-by-one errors when reporting a parse error. 32 | if s.eof == true { 33 | s.position.Line++ 34 | s.position.Column = 0 35 | s.eof = false 36 | } 37 | if c == '\n' { 38 | s.eof = true 39 | return c, nil 40 | } 41 | s.position.Column++ 42 | return c, nil 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/udp_other.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package dns 4 | 5 | import ( 6 | "net" 7 | "syscall" 8 | ) 9 | 10 | // These do nothing. See udp_linux.go for an example of how to implement this. 11 | 12 | // We tried to adhire to some kind of naming scheme. 13 | 14 | func setUDPSocketOptions4(conn *net.UDPConn) error { return nil } 15 | func setUDPSocketOptions6(conn *net.UDPConn) error { return nil } 16 | func getUDPSocketOptions6Only(conn *net.UDPConn) (bool, error) { return false, nil } 17 | func getUDPSocketName(conn *net.UDPConn) (syscall.Sockaddr, error) { return nil, nil } 18 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/udp_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package dns 4 | 5 | import "net" 6 | 7 | type SessionUDP struct { 8 | raddr *net.UDPAddr 9 | } 10 | 11 | // ReadFromSessionUDP acts just like net.UDPConn.ReadFrom(), but returns a session object instead of a 12 | // net.UDPAddr. 13 | func ReadFromSessionUDP(conn *net.UDPConn, b []byte) (int, *SessionUDP, error) { 14 | n, raddr, err := conn.ReadFrom(b) 15 | if err != nil { 16 | return n, nil, err 17 | } 18 | session := &SessionUDP{raddr.(*net.UDPAddr)} 19 | return n, session, err 20 | } 21 | 22 | // WriteToSessionUDP acts just like net.UDPConn.WritetTo(), but uses a *SessionUDP instead of a net.Addr. 23 | func WriteToSessionUDP(conn *net.UDPConn, b []byte, session *SessionUDP) (int, error) { 24 | n, err := conn.WriteTo(b, session.raddr) 25 | return n, err 26 | } 27 | 28 | func (s *SessionUDP) RemoteAddr() net.Addr { return s.raddr } 29 | 30 | // setUDPSocketOptions sets the UDP socket options. 31 | // This function is implemented on a per platform basis. See udp_*.go for more details 32 | func setUDPSocketOptions(conn *net.UDPConn) error { 33 | return nil 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Simon Eskildsen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | platform: x64 3 | clone_folder: c:\gopath\src\github.com\sirupsen\logrus 4 | environment: 5 | GOPATH: c:\gopath 6 | branches: 7 | only: 8 | - master 9 | install: 10 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 11 | - go version 12 | build_script: 13 | - go get -t 14 | - go test 15 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger. 3 | 4 | 5 | The simplest way to use Logrus is simply the package-level exported logger: 6 | 7 | package main 8 | 9 | import ( 10 | log "github.com/sirupsen/logrus" 11 | ) 12 | 13 | func main() { 14 | log.WithFields(log.Fields{ 15 | "animal": "walrus", 16 | "number": 1, 17 | "size": 10, 18 | }).Info("A walrus appears") 19 | } 20 | 21 | Output: 22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 23 | 24 | For a full guide visit https://github.com/sirupsen/logrus 25 | */ 26 | package logrus 27 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/hooks.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | // A hook to be fired when logging on the logging levels returned from 4 | // `Levels()` on your implementation of the interface. Note that this is not 5 | // fired in a goroutine or a channel with workers, you should handle such 6 | // functionality yourself if your call is non-blocking and you don't wish for 7 | // the logging calls for levels returned from `Levels()` to block. 8 | type Hook interface { 9 | Levels() []Level 10 | Fire(*Entry) error 11 | } 12 | 13 | // Internal type for storing the hooks on a logger instance. 14 | type LevelHooks map[Level][]Hook 15 | 16 | // Add a hook to an instance of logger. This is called with 17 | // `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface. 18 | func (hooks LevelHooks) Add(hook Hook) { 19 | for _, level := range hook.Levels() { 20 | hooks[level] = append(hooks[level], hook) 21 | } 22 | } 23 | 24 | // Fire all the hooks for the passed level. Used by `entry.log` to fire 25 | // appropriate hooks for a log entry. 26 | func (hooks LevelHooks) Fire(level Level, entry *Entry) error { 27 | for _, hook := range hooks[level] { 28 | if err := hook.Fire(entry); err != nil { 29 | return err 30 | } 31 | } 32 | 33 | return nil 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | // +build !appengine 3 | 4 | package logrus 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ioctlReadTermios = unix.TIOCGETA 9 | 10 | type Termios unix.Termios 11 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | 9 | "golang.org/x/crypto/ssh/terminal" 10 | ) 11 | 12 | func checkIfTerminal(w io.Writer) bool { 13 | switch v := w.(type) { 14 | case *os.File: 15 | return terminal.IsTerminal(int(v.Fd())) 16 | default: 17 | return false 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_linux.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2013 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build !appengine 7 | 8 | package logrus 9 | 10 | import "golang.org/x/sys/unix" 11 | 12 | const ioctlReadTermios = unix.TCGETS 13 | 14 | type Termios unix.Termios 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd netbsd openbsd 6 | 7 | package terminal 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TIOCGETA 12 | const ioctlWriteTermios = unix.TIOCSETA 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package terminal 6 | 7 | import "golang.org/x/sys/unix" 8 | 9 | const ioctlReadTermios = unix.TCGETS 10 | const ioctlWriteTermios = unix.TCSETS 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm64,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for AMD64, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-64 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-112 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-64 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for 386, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 23 | JMP syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 26 | JMP syscall·RawSyscall6(SB) 27 | 28 | TEXT ·socketcall(SB),NOSPLIT,$0-36 29 | JMP syscall·socketcall(SB) 30 | 31 | TEXT ·rawsocketcall(SB),NOSPLIT,$0-36 32 | JMP syscall·rawsocketcall(SB) 33 | 34 | TEXT ·seek(SB),NOSPLIT,$0-28 35 | JMP syscall·seek(SB) 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for AMD64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 23 | JMP syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 26 | JMP syscall·RawSyscall6(SB) 27 | 28 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16 29 | JMP syscall·gettimeofday(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for arm, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 23 | B syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 26 | B syscall·RawSyscall6(SB) 27 | 28 | TEXT ·seek(SB),NOSPLIT,$0-32 29 | B syscall·seek(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build arm64 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 21 | B syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | B syscall·RawSyscall6(SB) 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_mips64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build mips64 mips64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for mips64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | JMP syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | JMP syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | JMP syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | JMP syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_mipsx.s: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build mips mipsle 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for mips, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-28 19 | JMP syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 22 | JMP syscall·Syscall6(SB) 23 | 24 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 25 | JMP syscall·Syscall9(SB) 26 | 27 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 28 | JMP syscall·RawSyscall(SB) 29 | 30 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 31 | JMP syscall·RawSyscall6(SB) 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64 ppc64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for ppc64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_s390x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build s390x 6 | // +build linux 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for s390x, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | ) 27 | 28 | // Socketoption Level 29 | const ( 30 | SOL_BLUETOOTH = 0x112 31 | SOL_HCI = 0x0 32 | SOL_L2CAP = 0x6 33 | SOL_RFCOMM = 0x12 34 | SOL_SCO = 0x11 35 | ) 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Dragonfly's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a DragonFlyBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a DragonFlyBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_freebsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in FreeBSD's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a FreeBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a FreeBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a FreeBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build ppc64 s390x mips mips64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.4 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Unsetenv(key string) error { 12 | // This was added in Go 1.4. 13 | return syscall.Unsetenv(key) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 12 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. 13 | var fcntl64Syscall uintptr = SYS_FCNTL 14 | 15 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 16 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 17 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 18 | if errno == 0 { 19 | return nil 20 | } 21 | return errno 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm linux,mips linux,mipsle 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_c.c: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #define _STRINGIFY2_(x) #x 12 | #define _STRINGIFY_(x) _STRINGIFY2_(x) 13 | #define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__) 14 | 15 | // Call syscall from C code because the gccgo support for calling from 16 | // Go to C does not support varargs functions. 17 | 18 | struct ret { 19 | uintptr_t r; 20 | uintptr_t err; 21 | }; 22 | 23 | struct ret 24 | 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) 25 | { 26 | struct ret r; 27 | 28 | errno = 0; 29 | r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); 30 | r.err = errno; 31 | return r; 32 | } 33 | 34 | // Define the use function in C so that it is not inlined. 35 | 36 | extern void use(void *) __asm__ (GOSYM_PREFIX GOPKGPATH ".use") __attribute__((noinline)); 37 | 38 | void 39 | use(void *p __attribute__ ((unused))) 40 | { 41 | } 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo,linux,amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mksysnum_darwin.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | # 6 | # Generate system call table for Darwin from sys/syscall.h 7 | 8 | use strict; 9 | 10 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { 11 | print STDERR "GOARCH or GOOS not defined in environment\n"; 12 | exit 1; 13 | } 14 | 15 | my $command = "mksysnum_darwin.pl " . join(' ', @ARGV); 16 | 17 | print <){ 29 | if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){ 30 | my $name = $1; 31 | my $num = $2; 32 | $name =~ y/a-z/A-Z/; 33 | print " SYS_$name = $num;" 34 | } 35 | } 36 | 37 | print <= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,linux 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (cmsg *Cmsghdr) SetLen(length int) { 22 | cmsg.Len = uint32(length) 23 | } 24 | 25 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 26 | // TODO(aram): implement this, see issue 5847. 27 | panic("unimplemented") 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // 6 | // System calls for 386, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-8 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-4 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // 6 | // System calls for amd64, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-32 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-8 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/env_unset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | // +build go1.4 7 | 8 | package windows 9 | 10 | import "syscall" 11 | 12 | func Unsetenv(key string) error { 13 | // This was added in Go 1.4. 14 | return syscall.Unsetenv(key) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/env_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Windows environment variables. 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | func Getenv(key string) (value string, found bool) { 12 | return syscall.Getenv(key) 13 | } 14 | 15 | func Setenv(key, value string) error { 16 | return syscall.Setenv(key, value) 17 | } 18 | 19 | func Clearenv() { 20 | syscall.Clearenv() 21 | } 22 | 23 | func Environ() []string { 24 | return syscall.Environ() 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/memory_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | const ( 8 | MEM_COMMIT = 0x00001000 9 | MEM_RESERVE = 0x00002000 10 | MEM_DECOMMIT = 0x00004000 11 | MEM_RELEASE = 0x00008000 12 | MEM_RESET = 0x00080000 13 | MEM_TOP_DOWN = 0x00100000 14 | MEM_WRITE_WATCH = 0x00200000 15 | MEM_PHYSICAL = 0x00400000 16 | MEM_RESET_UNDO = 0x01000000 17 | MEM_LARGE_PAGES = 0x20000000 18 | 19 | PAGE_NOACCESS = 0x01 20 | PAGE_READONLY = 0x02 21 | PAGE_READWRITE = 0x04 22 | PAGE_WRITECOPY = 0x08 23 | PAGE_EXECUTE_READ = 0x20 24 | PAGE_EXECUTE_READWRITE = 0x40 25 | PAGE_EXECUTE_WRITECOPY = 0x80 26 | ) 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,!race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | --------------------------------------------------------------------------------