├── LICENSE
├── README.md
├── core
├── common
│ ├── big.go
│ ├── bytes.go
│ ├── path.go
│ ├── size.go
│ └── test_utils.go
├── hexutil
│ ├── hexutil.go
│ ├── hexutil_test.go
│ ├── json.go
│ ├── json_example_test.go
│ └── json_test.go
├── jigsaw.go
├── round.go
├── types.go
└── types
│ ├── log.go
│ └── log_test.go
├── crypto
├── crypto.go
├── sha3
│ ├── LICENSE
│ ├── PATENTS
│ ├── doc.go
│ ├── hashes.go
│ ├── keccakf.go
│ ├── keccakf_amd64.go
│ ├── keccakf_amd64.s
│ ├── sha3.go
│ ├── sha3_test.go
│ ├── shake.go
│ ├── testdata
│ │ └── keccakKats.json.deflate
│ ├── xor.go
│ ├── xor_generic.go
│ └── xor_unaligned.go
├── signature_cgo.go
└── signature_nocgo.go
├── hgrid
├── config.json
└── main.go
├── log
├── CONTRIBUTORS
├── LICENSE
├── README.md
├── README_ETHEREUM.md
├── doc.go
├── format.go
├── handler.go
├── handler_glog.go
├── handler_go13.go
├── handler_go14.go
├── logger.go
├── root.go
├── syslog.go
└── term
│ ├── LICENSE
│ ├── terminal_appengine.go
│ ├── terminal_darwin.go
│ ├── terminal_freebsd.go
│ ├── terminal_linux.go
│ ├── terminal_netbsd.go
│ ├── terminal_notwindows.go
│ ├── terminal_openbsd.go
│ ├── terminal_solaris.go
│ └── terminal_windows.go
├── node
└── node.go
├── p2p
├── message.go
├── message_test.go
├── peer.go
├── server.go
└── server_test.go
├── rlp
├── decode.go
├── encode.go
├── raw.go
└── typecache.go
├── test
├── config.json
└── test.bat
└── vendor
├── github.com
├── deckarep
│ └── golang-set
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── iterator.go
│ │ ├── set.go
│ │ ├── threadsafe.go
│ │ └── threadunsafe.go
├── go-stack
│ └── stack
│ │ ├── LICENSE.md
│ │ ├── README.md
│ │ └── stack.go
├── golang
│ ├── protobuf
│ │ ├── LICENSE
│ │ ├── proto
│ │ │ ├── Makefile
│ │ │ ├── clone.go
│ │ │ ├── decode.go
│ │ │ ├── encode.go
│ │ │ ├── equal.go
│ │ │ ├── extensions.go
│ │ │ ├── lib.go
│ │ │ ├── message_set.go
│ │ │ ├── pointer_reflect.go
│ │ │ ├── pointer_unsafe.go
│ │ │ ├── properties.go
│ │ │ ├── text.go
│ │ │ └── text_parser.go
│ │ └── protoc-gen-go
│ │ │ └── descriptor
│ │ │ ├── Makefile
│ │ │ └── descriptor.pb.go
│ └── snappy
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ ├── README
│ │ ├── decode.go
│ │ ├── decode_amd64.go
│ │ ├── decode_amd64.s
│ │ ├── decode_other.go
│ │ ├── encode.go
│ │ ├── encode_amd64.go
│ │ ├── encode_amd64.s
│ │ ├── encode_other.go
│ │ └── snappy.go
├── hashicorp
│ └── golang-lru
│ │ ├── 2q.go
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── arc.go
│ │ ├── lru.go
│ │ └── simplelru
│ │ └── lru.go
├── pborman
│ └── uuid
│ │ ├── CONTRIBUTING.md
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── dce.go
│ │ ├── doc.go
│ │ ├── hash.go
│ │ ├── marshal.go
│ │ ├── node.go
│ │ ├── sql.go
│ │ ├── time.go
│ │ ├── util.go
│ │ ├── uuid.go
│ │ ├── version1.go
│ │ └── version4.go
└── syndtr
│ └── goleveldb
│ ├── LICENSE
│ ├── README.md
│ └── leveldb
│ ├── batch.go
│ ├── cache
│ ├── cache.go
│ └── lru.go
│ ├── comparer.go
│ ├── comparer
│ ├── bytes_comparer.go
│ └── comparer.go
│ ├── db.go
│ ├── db_compaction.go
│ ├── db_iter.go
│ ├── db_snapshot.go
│ ├── db_state.go
│ ├── db_transaction.go
│ ├── db_util.go
│ ├── db_write.go
│ ├── doc.go
│ ├── errors.go
│ ├── errors
│ └── errors.go
│ ├── filter.go
│ ├── filter
│ ├── bloom.go
│ └── filter.go
│ ├── iterator
│ ├── array_iter.go
│ ├── indexed_iter.go
│ ├── iter.go
│ └── merged_iter.go
│ ├── journal
│ └── journal.go
│ ├── key.go
│ ├── memdb
│ └── memdb.go
│ ├── opt
│ └── options.go
│ ├── options.go
│ ├── session.go
│ ├── session_compaction.go
│ ├── session_record.go
│ ├── session_util.go
│ ├── storage.go
│ ├── storage
│ ├── file_storage.go
│ ├── file_storage_nacl.go
│ ├── file_storage_plan9.go
│ ├── file_storage_solaris.go
│ ├── file_storage_unix.go
│ ├── file_storage_windows.go
│ ├── mem_storage.go
│ └── storage.go
│ ├── table.go
│ ├── table
│ ├── reader.go
│ ├── table.go
│ └── writer.go
│ ├── util.go
│ ├── util
│ ├── buffer.go
│ ├── buffer_pool.go
│ ├── crc32.go
│ ├── hash.go
│ ├── range.go
│ └── util.go
│ └── version.go
├── golang.org
└── x
│ ├── crypto
│ ├── AUTHORS
│ ├── CONTRIBUTING.md
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── README
│ ├── cast5
│ │ └── cast5.go
│ ├── codereview.cfg
│ ├── curve25519
│ │ ├── const_amd64.h
│ │ ├── const_amd64.s
│ │ ├── cswap_amd64.s
│ │ ├── curve25519.go
│ │ ├── doc.go
│ │ ├── freeze_amd64.s
│ │ ├── ladderstep_amd64.s
│ │ ├── mont25519_amd64.go
│ │ ├── mul_amd64.s
│ │ └── square_amd64.s
│ ├── ed25519
│ │ ├── ed25519.go
│ │ └── internal
│ │ │ └── edwards25519
│ │ │ ├── const.go
│ │ │ └── edwards25519.go
│ ├── openpgp
│ │ ├── armor
│ │ │ ├── armor.go
│ │ │ └── encode.go
│ │ ├── canonical_text.go
│ │ ├── elgamal
│ │ │ └── elgamal.go
│ │ ├── errors
│ │ │ └── errors.go
│ │ ├── keys.go
│ │ ├── packet
│ │ │ ├── compressed.go
│ │ │ ├── config.go
│ │ │ ├── encrypted_key.go
│ │ │ ├── literal.go
│ │ │ ├── ocfb.go
│ │ │ ├── one_pass_signature.go
│ │ │ ├── opaque.go
│ │ │ ├── packet.go
│ │ │ ├── private_key.go
│ │ │ ├── public_key.go
│ │ │ ├── public_key_v3.go
│ │ │ ├── reader.go
│ │ │ ├── signature.go
│ │ │ ├── signature_v3.go
│ │ │ ├── symmetric_key_encrypted.go
│ │ │ ├── symmetrically_encrypted.go
│ │ │ ├── userattribute.go
│ │ │ └── userid.go
│ │ ├── read.go
│ │ ├── s2k
│ │ │ └── s2k.go
│ │ └── write.go
│ ├── pbkdf2
│ │ └── pbkdf2.go
│ ├── ripemd160
│ │ ├── ripemd160.go
│ │ └── ripemd160block.go
│ ├── scrypt
│ │ └── scrypt.go
│ └── ssh
│ │ ├── buffer.go
│ │ ├── certs.go
│ │ ├── channel.go
│ │ ├── cipher.go
│ │ ├── client.go
│ │ ├── client_auth.go
│ │ ├── common.go
│ │ ├── connection.go
│ │ ├── doc.go
│ │ ├── handshake.go
│ │ ├── kex.go
│ │ ├── keys.go
│ │ ├── mac.go
│ │ ├── messages.go
│ │ ├── mux.go
│ │ ├── server.go
│ │ ├── session.go
│ │ ├── streamlocal.go
│ │ ├── tcpip.go
│ │ ├── terminal
│ │ ├── terminal.go
│ │ ├── util.go
│ │ ├── util_bsd.go
│ │ ├── util_linux.go
│ │ ├── util_plan9.go
│ │ ├── util_solaris.go
│ │ └── util_windows.go
│ │ └── transport.go
│ ├── net
│ ├── AUTHORS
│ ├── CONTRIBUTING.md
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── README
│ ├── codereview.cfg
│ ├── context
│ │ ├── context.go
│ │ ├── go17.go
│ │ └── pre_go17.go
│ ├── html
│ │ ├── atom
│ │ │ ├── atom.go
│ │ │ ├── gen.go
│ │ │ └── table.go
│ │ ├── charset
│ │ │ └── charset.go
│ │ ├── const.go
│ │ ├── doc.go
│ │ ├── doctype.go
│ │ ├── entity.go
│ │ ├── escape.go
│ │ ├── foreign.go
│ │ ├── node.go
│ │ ├── parse.go
│ │ ├── render.go
│ │ └── token.go
│ ├── idna
│ │ ├── idna.go
│ │ ├── punycode.go
│ │ ├── tables.go
│ │ ├── trie.go
│ │ └── trieval.go
│ └── websocket
│ │ ├── client.go
│ │ ├── dial.go
│ │ ├── hybi.go
│ │ ├── server.go
│ │ └── websocket.go
│ ├── sync
│ ├── LICENSE
│ ├── PATENTS
│ └── syncmap
│ │ └── map.go
│ ├── sys
│ ├── AUTHORS
│ ├── CONTRIBUTING.md
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── README
│ ├── codereview.cfg
│ ├── 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
│ │ ├── 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_no_getwd.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
│ │ ├── 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
│ │ ├── 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_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
│ ├── text
│ ├── AUTHORS
│ ├── CONTRIBUTING.md
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── README
│ ├── codereview.cfg
│ ├── encoding
│ │ ├── charmap
│ │ │ ├── charmap.go
│ │ │ ├── maketables.go
│ │ │ └── tables.go
│ │ ├── encoding.go
│ │ ├── htmlindex
│ │ │ ├── gen.go
│ │ │ ├── htmlindex.go
│ │ │ ├── map.go
│ │ │ └── tables.go
│ │ ├── internal
│ │ │ ├── identifier
│ │ │ │ ├── gen.go
│ │ │ │ ├── identifier.go
│ │ │ │ └── mib.go
│ │ │ └── internal.go
│ │ ├── japanese
│ │ │ ├── all.go
│ │ │ ├── eucjp.go
│ │ │ ├── iso2022jp.go
│ │ │ ├── maketables.go
│ │ │ ├── shiftjis.go
│ │ │ └── tables.go
│ │ ├── korean
│ │ │ ├── euckr.go
│ │ │ ├── maketables.go
│ │ │ └── tables.go
│ │ ├── simplifiedchinese
│ │ │ ├── all.go
│ │ │ ├── gbk.go
│ │ │ ├── hzgb2312.go
│ │ │ ├── maketables.go
│ │ │ └── tables.go
│ │ ├── traditionalchinese
│ │ │ ├── big5.go
│ │ │ ├── maketables.go
│ │ │ └── tables.go
│ │ └── unicode
│ │ │ ├── override.go
│ │ │ └── unicode.go
│ ├── internal
│ │ ├── tag
│ │ │ └── tag.go
│ │ └── utf8internal
│ │ │ └── utf8internal.go
│ ├── language
│ │ ├── Makefile
│ │ ├── common.go
│ │ ├── coverage.go
│ │ ├── gen_common.go
│ │ ├── gen_index.go
│ │ ├── go1_1.go
│ │ ├── go1_2.go
│ │ ├── index.go
│ │ ├── language.go
│ │ ├── lookup.go
│ │ ├── maketables.go
│ │ ├── match.go
│ │ ├── parse.go
│ │ ├── tables.go
│ │ └── tags.go
│ ├── runes
│ │ ├── cond.go
│ │ └── runes.go
│ ├── secure
│ │ └── bidirule
│ │ │ ├── bidirule.go
│ │ │ ├── bidirule10.0.0.go
│ │ │ └── bidirule9.0.0.go
│ ├── transform
│ │ └── transform.go
│ └── unicode
│ │ ├── bidi
│ │ ├── bidi.go
│ │ ├── bracket.go
│ │ ├── core.go
│ │ ├── prop.go
│ │ ├── tables10.0.0.go
│ │ ├── tables9.0.0.go
│ │ └── trieval.go
│ │ └── norm
│ │ ├── composition.go
│ │ ├── forminfo.go
│ │ ├── input.go
│ │ ├── iter.go
│ │ ├── normalize.go
│ │ ├── readwriter.go
│ │ ├── tables10.0.0.go
│ │ ├── tables9.0.0.go
│ │ ├── transform.go
│ │ └── trie.go
│ └── tools
│ ├── AUTHORS
│ ├── CONTRIBUTING.md
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── README
│ ├── codereview.cfg
│ ├── go
│ └── ast
│ │ └── astutil
│ │ ├── enclosing.go
│ │ ├── imports.go
│ │ └── util.go
│ └── imports
│ ├── fastwalk.go
│ ├── fastwalk_dirent_fileno.go
│ ├── fastwalk_dirent_ino.go
│ ├── fastwalk_portable.go
│ ├── fastwalk_unix.go
│ ├── fix.go
│ ├── imports.go
│ ├── mkindex.go
│ ├── mkstdlib.go
│ ├── sortimports.go
│ └── zstdlib.go
└── gopkg.in
└── karalabe
└── cookiejar.v2
├── LICENSE
├── README.md
└── collections
└── prque
├── prque.go
└── sstack.go
/README.md:
--------------------------------------------------------------------------------
1 | # go-hashgrid
2 |
3 | Go implementation of the Extrēmus.
4 |
5 | Extrēmus is the first public blockchain platform based on the combination of Jigsaw-puzzle DAG and Sharding, with extremely high scalability, perfect consistency and excellent security property. The Jigsaw-puzzle DAG model proposed by Extrēmus is a perfect solution for the global consistency problem in DAG. http://www.emseco.io.
6 |
7 | ## Building And Run go-hashgrid Node
8 |
9 | install golang
10 |
11 | set %GOPATH% environment variable
12 |
13 | download go-hashgrid code to GOPATH/src
14 |
15 | cd %GOPATH%/src
16 | git clone https://github.com/emseco/go-hashgrid.git
17 |
18 | run test/test.bat
19 |
20 | cd test
21 | test.bat
22 |
23 | run main.exe
24 |
25 | main.exe
26 |
27 | config file
28 |
29 | example:
30 | {
31 | "addr":"127.0.0.1:33201", //local node address
32 | "coinbase":[10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,33],//local node public key
33 | "peers":["127.0.0.1:33201","127.0.0.1:33202","127.0.0.1:33203"],//seed nodes
34 | "interMilli":500//max time(millisecond) of generate block
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/core/common/big.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The go-ethereum Authors
2 | // This file is part of the go-ethereum library.
3 | //
4 | // The go-ethereum library is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // The go-ethereum library is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with the go-ethereum library. If not, see .
16 |
17 | package common
18 |
19 | import "math/big"
20 |
21 | // Common big integers often used
22 | var (
23 | Big1 = big.NewInt(1)
24 | Big2 = big.NewInt(2)
25 | Big3 = big.NewInt(3)
26 | Big0 = big.NewInt(0)
27 | Big32 = big.NewInt(32)
28 | Big256 = big.NewInt(256)
29 | Big257 = big.NewInt(257)
30 | )
31 |
--------------------------------------------------------------------------------
/core/common/path.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The go-ethereum Authors
2 | // This file is part of the go-ethereum library.
3 | //
4 | // The go-ethereum library is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // The go-ethereum library is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with the go-ethereum library. If not, see .
16 |
17 | package common
18 |
19 | import (
20 | "fmt"
21 | "os"
22 | "path/filepath"
23 | "runtime"
24 | )
25 |
26 | // MakeName creates a node name that follows the ethereum convention
27 | // for such names. It adds the operation system name and Go runtime version
28 | // the name.
29 | func MakeName(name, version string) string {
30 | return fmt.Sprintf("%s/v%s/%s/%s", name, version, runtime.GOOS, runtime.Version())
31 | }
32 |
33 | // FileExist checks if a file exists at filePath.
34 | func FileExist(filePath string) bool {
35 | _, err := os.Stat(filePath)
36 | if err != nil && os.IsNotExist(err) {
37 | return false
38 | }
39 |
40 | return true
41 | }
42 |
43 | // AbsolutePath returns datadir + filename, or filename if it is absolute.
44 | func AbsolutePath(datadir string, filename string) string {
45 | if filepath.IsAbs(filename) {
46 | return filename
47 | }
48 | return filepath.Join(datadir, filename)
49 | }
50 |
--------------------------------------------------------------------------------
/core/common/size.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The go-ethereum Authors
2 | // This file is part of the go-ethereum library.
3 | //
4 | // The go-ethereum library is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // The go-ethereum library is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with the go-ethereum library. If not, see .
16 |
17 | package common
18 |
19 | import (
20 | "fmt"
21 | )
22 |
23 | // StorageSize is a wrapper around a float value that supports user friendly
24 | // formatting.
25 | type StorageSize float64
26 |
27 | // String implements the stringer interface.
28 | func (s StorageSize) String() string {
29 | if s > 1000000 {
30 | return fmt.Sprintf("%.2f mB", s/1000000)
31 | } else if s > 1000 {
32 | return fmt.Sprintf("%.2f kB", s/1000)
33 | } else {
34 | return fmt.Sprintf("%.2f B", s)
35 | }
36 | }
37 |
38 | // TerminalString implements log.TerminalStringer, formatting a string for console
39 | // output during logging.
40 | func (s StorageSize) TerminalString() string {
41 | if s > 1000000 {
42 | return fmt.Sprintf("%.2fmB", s/1000000)
43 | } else if s > 1000 {
44 | return fmt.Sprintf("%.2fkB", s/1000)
45 | } else {
46 | return fmt.Sprintf("%.2fB", s)
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/core/common/test_utils.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The go-ethereum Authors
2 | // This file is part of the go-ethereum library.
3 | //
4 | // The go-ethereum library is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // The go-ethereum library is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with the go-ethereum library. If not, see .
16 |
17 | package common
18 |
19 | import (
20 | "encoding/json"
21 | "fmt"
22 | "io/ioutil"
23 | )
24 |
25 | // LoadJSON reads the given file and unmarshals its content.
26 | func LoadJSON(file string, val interface{}) error {
27 | content, err := ioutil.ReadFile(file)
28 | if err != nil {
29 | return err
30 | }
31 | if err := json.Unmarshal(content, val); err != nil {
32 | if syntaxerr, ok := err.(*json.SyntaxError); ok {
33 | line := findLine(content, syntaxerr.Offset)
34 | return fmt.Errorf("JSON syntax error at %v:%v: %v", file, line, err)
35 | }
36 | return fmt.Errorf("JSON unmarshal error in %v: %v", file, err)
37 | }
38 | return nil
39 | }
40 |
41 | // findLine returns the line number for the given offset into data.
42 | func findLine(data []byte, offset int64) (line int) {
43 | line = 1
44 | for i, r := range string(data) {
45 | if int64(i) >= offset {
46 | return
47 | }
48 | if r == '\n' {
49 | line++
50 | }
51 | }
52 | return
53 | }
54 |
--------------------------------------------------------------------------------
/core/hexutil/json_example_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The go-ethereum Authors
2 | // This file is part of the go-ethereum library.
3 | //
4 | // The go-ethereum library is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // The go-ethereum library is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with the go-ethereum library. If not, see .
16 |
17 | package hexutil_test
18 |
19 | import (
20 | "encoding/json"
21 | "fmt"
22 |
23 | "github.com/ethereum/go-ethereum/common/hexutil"
24 | )
25 |
26 | type MyType [5]byte
27 |
28 | func (v *MyType) UnmarshalText(input []byte) error {
29 | return hexutil.UnmarshalFixedText("MyType", input, v[:])
30 | }
31 |
32 | func (v MyType) String() string {
33 | return hexutil.Bytes(v[:]).String()
34 | }
35 |
36 | func ExampleUnmarshalFixedText() {
37 | var v1, v2 MyType
38 | fmt.Println("v1 error:", json.Unmarshal([]byte(`"0x01"`), &v1))
39 | fmt.Println("v2 error:", json.Unmarshal([]byte(`"0x0101010101"`), &v2))
40 | fmt.Println("v2:", v2)
41 | // Output:
42 | // v1 error: hex string has length 2, want 10 for MyType
43 | // v2 error:
44 | // v2: 0x0101010101
45 | }
46 |
--------------------------------------------------------------------------------
/crypto/sha3/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009 The Go Authors. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/crypto/sha3/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/crypto/sha3/keccakf_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,!appengine,!gccgo
6 |
7 | package sha3
8 |
9 | // This function is implemented in keccakf_amd64.s.
10 |
11 | //go:noescape
12 |
13 | func keccakF1600(state *[25]uint64)
14 |
--------------------------------------------------------------------------------
/crypto/sha3/shake.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 sha3
6 |
7 | // This file defines the ShakeHash interface, and provides
8 | // functions for creating SHAKE instances, as well as utility
9 | // functions for hashing bytes to arbitrary-length output.
10 |
11 | import (
12 | "io"
13 | )
14 |
15 | // ShakeHash defines the interface to hash functions that
16 | // support arbitrary-length output.
17 | type ShakeHash interface {
18 | // Write absorbs more data into the hash's state. It panics if input is
19 | // written to it after output has been read from it.
20 | io.Writer
21 |
22 | // Read reads more output from the hash; reading affects the hash's
23 | // state. (ShakeHash.Read is thus very different from Hash.Sum)
24 | // It never returns an error.
25 | io.Reader
26 |
27 | // Clone returns a copy of the ShakeHash in its current state.
28 | Clone() ShakeHash
29 |
30 | // Reset resets the ShakeHash to its initial state.
31 | Reset()
32 | }
33 |
34 | func (d *state) Clone() ShakeHash {
35 | return d.clone()
36 | }
37 |
38 | // NewShake128 creates a new SHAKE128 variable-output-length ShakeHash.
39 | // Its generic security strength is 128 bits against all attacks if at
40 | // least 32 bytes of its output are used.
41 | func NewShake128() ShakeHash { return &state{rate: 168, dsbyte: 0x1f} }
42 |
43 | // NewShake256 creates a new SHAKE128 variable-output-length ShakeHash.
44 | // Its generic security strength is 256 bits against all attacks if
45 | // at least 64 bytes of its output are used.
46 | func NewShake256() ShakeHash { return &state{rate: 136, dsbyte: 0x1f} }
47 |
48 | // ShakeSum128 writes an arbitrary-length digest of data into hash.
49 | func ShakeSum128(hash, data []byte) {
50 | h := NewShake128()
51 | h.Write(data)
52 | h.Read(hash)
53 | }
54 |
55 | // ShakeSum256 writes an arbitrary-length digest of data into hash.
56 | func ShakeSum256(hash, data []byte) {
57 | h := NewShake256()
58 | h.Write(data)
59 | h.Read(hash)
60 | }
61 |
--------------------------------------------------------------------------------
/crypto/sha3/testdata/keccakKats.json.deflate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emseco/go-hashgrid/cc391c2613e9824cee9949291458c665738bb8f1/crypto/sha3/testdata/keccakKats.json.deflate
--------------------------------------------------------------------------------
/crypto/sha3/xor.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !amd64,!386,!ppc64le appengine
6 |
7 | package sha3
8 |
9 | var (
10 | xorIn = xorInGeneric
11 | copyOut = copyOutGeneric
12 | xorInUnaligned = xorInGeneric
13 | copyOutUnaligned = copyOutGeneric
14 | )
15 |
16 | const xorImplementationUnaligned = "generic"
17 |
--------------------------------------------------------------------------------
/crypto/sha3/xor_generic.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package sha3
6 |
7 | import "encoding/binary"
8 |
9 | // xorInGeneric xors the bytes in buf into the state; it
10 | // makes no non-portable assumptions about memory layout
11 | // or alignment.
12 | func xorInGeneric(d *state, buf []byte) {
13 | n := len(buf) / 8
14 |
15 | for i := 0; i < n; i++ {
16 | a := binary.LittleEndian.Uint64(buf)
17 | d.a[i] ^= a
18 | buf = buf[8:]
19 | }
20 | }
21 |
22 | // copyOutGeneric copies ulint64s to a byte buffer.
23 | func copyOutGeneric(d *state, b []byte) {
24 | for i := 0; len(b) >= 8; i++ {
25 | binary.LittleEndian.PutUint64(b, d.a[i])
26 | b = b[8:]
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/crypto/sha3/xor_unaligned.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64 386 ppc64le
6 | // +build !appengine
7 |
8 | package sha3
9 |
10 | import "unsafe"
11 |
12 | func xorInUnaligned(d *state, buf []byte) {
13 | bw := (*[maxRate / 8]uint64)(unsafe.Pointer(&buf[0]))
14 | n := len(buf)
15 | if n >= 72 {
16 | d.a[0] ^= bw[0]
17 | d.a[1] ^= bw[1]
18 | d.a[2] ^= bw[2]
19 | d.a[3] ^= bw[3]
20 | d.a[4] ^= bw[4]
21 | d.a[5] ^= bw[5]
22 | d.a[6] ^= bw[6]
23 | d.a[7] ^= bw[7]
24 | d.a[8] ^= bw[8]
25 | }
26 | if n >= 104 {
27 | d.a[9] ^= bw[9]
28 | d.a[10] ^= bw[10]
29 | d.a[11] ^= bw[11]
30 | d.a[12] ^= bw[12]
31 | }
32 | if n >= 136 {
33 | d.a[13] ^= bw[13]
34 | d.a[14] ^= bw[14]
35 | d.a[15] ^= bw[15]
36 | d.a[16] ^= bw[16]
37 | }
38 | if n >= 144 {
39 | d.a[17] ^= bw[17]
40 | }
41 | if n >= 168 {
42 | d.a[18] ^= bw[18]
43 | d.a[19] ^= bw[19]
44 | d.a[20] ^= bw[20]
45 | }
46 | }
47 |
48 | func copyOutUnaligned(d *state, buf []byte) {
49 | ab := (*[maxRate]uint8)(unsafe.Pointer(&d.a[0]))
50 | copy(buf, ab[:])
51 | }
52 |
53 | var (
54 | xorIn = xorInUnaligned
55 | copyOut = copyOutUnaligned
56 | )
57 |
58 | const xorImplementationUnaligned = "unaligned"
59 |
--------------------------------------------------------------------------------
/hgrid/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "addr":"127.0.0.1:33201",
3 | "coinbase":[10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,33],
4 | "peers":["127.0.0.1:33201","127.0.0.1:33202","127.0.0.1:33203"],
5 | "interMilli":500
6 | }
7 |
--------------------------------------------------------------------------------
/log/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | Contributors to log15:
2 |
3 | - Aaron L
4 | - Alan Shreve
5 | - Chris Hines
6 | - Ciaran Downey
7 | - Dmitry Chestnykh
8 | - Evan Shaw
9 | - Péter Szilágyi
10 | - Trevor Gattis
11 | - Vincent Vanackere
12 |
--------------------------------------------------------------------------------
/log/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2014 Alan Shreve
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/log/README_ETHEREUM.md:
--------------------------------------------------------------------------------
1 | This package is a fork of https://github.com/inconshreveable/log15, with some
2 | minor modifications required by the go-ethereum codebase:
3 |
4 | * Support for log level `trace`
5 | * Modified behavior to exit on `critical` failure
6 |
--------------------------------------------------------------------------------
/log/handler_go13.go:
--------------------------------------------------------------------------------
1 | // +build !go1.4
2 |
3 | package log
4 |
5 | import (
6 | "sync/atomic"
7 | "unsafe"
8 | )
9 |
10 | // swapHandler wraps another handler that may be swapped out
11 | // dynamically at runtime in a thread-safe fashion.
12 | type swapHandler struct {
13 | handler unsafe.Pointer
14 | }
15 |
16 | func (h *swapHandler) Log(r *Record) error {
17 | return h.Get().Log(r)
18 | }
19 |
20 | func (h *swapHandler) Get() Handler {
21 | return *(*Handler)(atomic.LoadPointer(&h.handler))
22 | }
23 |
24 | func (h *swapHandler) Swap(newHandler Handler) {
25 | atomic.StorePointer(&h.handler, unsafe.Pointer(&newHandler))
26 | }
27 |
--------------------------------------------------------------------------------
/log/handler_go14.go:
--------------------------------------------------------------------------------
1 | // +build go1.4
2 |
3 | package log
4 |
5 | import "sync/atomic"
6 |
7 | // swapHandler wraps another handler that may be swapped out
8 | // dynamically at runtime in a thread-safe fashion.
9 | type swapHandler struct {
10 | handler atomic.Value
11 | }
12 |
13 | func (h *swapHandler) Log(r *Record) error {
14 | return (*h.handler.Load().(*Handler)).Log(r)
15 | }
16 |
17 | func (h *swapHandler) Swap(newHandler Handler) {
18 | h.handler.Store(&newHandler)
19 | }
20 |
21 | func (h *swapHandler) Get() Handler {
22 | return *h.handler.Load().(*Handler)
23 | }
24 |
--------------------------------------------------------------------------------
/log/root.go:
--------------------------------------------------------------------------------
1 | package log
2 |
3 | import (
4 | "os"
5 | )
6 |
7 | var (
8 | root = &logger{[]interface{}{}, new(swapHandler)}
9 | StdoutHandler = StreamHandler(os.Stdout, LogfmtFormat())
10 | StderrHandler = StreamHandler(os.Stderr, LogfmtFormat())
11 | )
12 |
13 | func init() {
14 | root.SetHandler(DiscardHandler())
15 | }
16 |
17 | // New returns a new logger with the given context.
18 | // New is a convenient alias for Root().New
19 | func New(ctx ...interface{}) Logger {
20 | return root.New(ctx...)
21 | }
22 |
23 | // Root returns the root logger
24 | func Root() Logger {
25 | return root
26 | }
27 |
28 | // The following functions bypass the exported logger methods (logger.Debug,
29 | // etc.) to keep the call depth the same for all paths to logger.write so
30 | // runtime.Caller(2) always refers to the call site in client code.
31 |
32 | // Trace is a convenient alias for Root().Trace
33 | func Trace(msg string, ctx ...interface{}) {
34 | root.write(msg, LvlTrace, ctx)
35 | }
36 |
37 | // Debug is a convenient alias for Root().Debug
38 | func Debug(msg string, ctx ...interface{}) {
39 | root.write(msg, LvlDebug, ctx)
40 | }
41 |
42 | // Info is a convenient alias for Root().Info
43 | func Info(msg string, ctx ...interface{}) {
44 | root.write(msg, LvlInfo, ctx)
45 | }
46 |
47 | // Warn is a convenient alias for Root().Warn
48 | func Warn(msg string, ctx ...interface{}) {
49 | root.write(msg, LvlWarn, ctx)
50 | }
51 |
52 | // Error is a convenient alias for Root().Error
53 | func Error(msg string, ctx ...interface{}) {
54 | root.write(msg, LvlError, ctx)
55 | }
56 |
57 | // Crit is a convenient alias for Root().Crit
58 | func Crit(msg string, ctx ...interface{}) {
59 | root.write(msg, LvlCrit, ctx)
60 | os.Exit(1)
61 | }
62 |
--------------------------------------------------------------------------------
/log/syslog.go:
--------------------------------------------------------------------------------
1 | // +build !windows,!plan9
2 |
3 | package log
4 |
5 | import (
6 | "log/syslog"
7 | "strings"
8 | )
9 |
10 | // SyslogHandler opens a connection to the system syslog daemon by calling
11 | // syslog.New and writes all records to it.
12 | func SyslogHandler(priority syslog.Priority, tag string, fmtr Format) (Handler, error) {
13 | wr, err := syslog.New(priority, tag)
14 | return sharedSyslog(fmtr, wr, err)
15 | }
16 |
17 | // SyslogNetHandler opens a connection to a log daemon over the network and writes
18 | // all log records to it.
19 | func SyslogNetHandler(net, addr string, priority syslog.Priority, tag string, fmtr Format) (Handler, error) {
20 | wr, err := syslog.Dial(net, addr, priority, tag)
21 | return sharedSyslog(fmtr, wr, err)
22 | }
23 |
24 | func sharedSyslog(fmtr Format, sysWr *syslog.Writer, err error) (Handler, error) {
25 | if err != nil {
26 | return nil, err
27 | }
28 | h := FuncHandler(func(r *Record) error {
29 | var syslogFn = sysWr.Info
30 | switch r.Lvl {
31 | case LvlCrit:
32 | syslogFn = sysWr.Crit
33 | case LvlError:
34 | syslogFn = sysWr.Err
35 | case LvlWarn:
36 | syslogFn = sysWr.Warning
37 | case LvlInfo:
38 | syslogFn = sysWr.Info
39 | case LvlDebug:
40 | syslogFn = sysWr.Debug
41 | case LvlTrace:
42 | syslogFn = func(m string) error { return nil } // There's no syslog level for trace
43 | }
44 |
45 | s := strings.TrimSpace(string(fmtr.Format(r)))
46 | return syslogFn(s)
47 | })
48 | return LazyHandler(&closingHandler{sysWr, h}), nil
49 | }
50 |
51 | func (m muster) SyslogHandler(priority syslog.Priority, tag string, fmtr Format) Handler {
52 | return must(SyslogHandler(priority, tag, fmtr))
53 | }
54 |
55 | func (m muster) SyslogNetHandler(net, addr string, priority syslog.Priority, tag string, fmtr Format) Handler {
56 | return must(SyslogNetHandler(net, addr, priority, tag, fmtr))
57 | }
58 |
--------------------------------------------------------------------------------
/log/term/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 |
--------------------------------------------------------------------------------
/log/term/terminal_appengine.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 term
9 |
10 | // IsTty always returns false on AppEngine.
11 | func IsTty(fd uintptr) bool {
12 | return false
13 | }
14 |
--------------------------------------------------------------------------------
/log/term/terminal_darwin.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 | // +build !appengine
6 |
7 | package term
8 |
9 | import "syscall"
10 |
11 | const ioctlReadTermios = syscall.TIOCGETA
12 |
13 | type Termios syscall.Termios
14 |
--------------------------------------------------------------------------------
/log/term/terminal_freebsd.go:
--------------------------------------------------------------------------------
1 | package term
2 |
3 | import (
4 | "syscall"
5 | )
6 |
7 | const ioctlReadTermios = syscall.TIOCGETA
8 |
9 | // Go 1.2 doesn't include Termios for FreeBSD. This should be added in 1.3 and this could be merged with terminal_darwin.
10 | type Termios struct {
11 | Iflag uint32
12 | Oflag uint32
13 | Cflag uint32
14 | Lflag uint32
15 | Cc [20]uint8
16 | Ispeed uint32
17 | Ospeed uint32
18 | }
19 |
--------------------------------------------------------------------------------
/log/term/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 term
9 |
10 | import "syscall"
11 |
12 | const ioctlReadTermios = syscall.TCGETS
13 |
14 | type Termios syscall.Termios
15 |
--------------------------------------------------------------------------------
/log/term/terminal_netbsd.go:
--------------------------------------------------------------------------------
1 | package term
2 |
3 | import "syscall"
4 |
5 | const ioctlReadTermios = syscall.TIOCGETA
6 |
7 | type Termios syscall.Termios
8 |
--------------------------------------------------------------------------------
/log/term/terminal_notwindows.go:
--------------------------------------------------------------------------------
1 | // Based on ssh/terminal:
2 | // Copyright 2011 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 linux,!appengine darwin freebsd openbsd netbsd
7 |
8 | package term
9 |
10 | import (
11 | "syscall"
12 | "unsafe"
13 | )
14 |
15 | // IsTty returns true if the given file descriptor is a terminal.
16 | func IsTty(fd uintptr) bool {
17 | var termios Termios
18 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
19 | return err == 0
20 | }
21 |
--------------------------------------------------------------------------------
/log/term/terminal_openbsd.go:
--------------------------------------------------------------------------------
1 | package term
2 |
3 | import "syscall"
4 |
5 | const ioctlReadTermios = syscall.TIOCGETA
6 |
7 | type Termios syscall.Termios
8 |
--------------------------------------------------------------------------------
/log/term/terminal_solaris.go:
--------------------------------------------------------------------------------
1 | package term
2 |
3 | import "golang.org/x/sys/unix"
4 |
5 | // IsTty returns true if the given file descriptor is a terminal.
6 | func IsTty(fd uintptr) bool {
7 | _, err := unix.IoctlGetTermios(int(fd), unix.TCGETA)
8 | return err == nil
9 | }
10 |
--------------------------------------------------------------------------------
/log/term/terminal_windows.go:
--------------------------------------------------------------------------------
1 | // Based on ssh/terminal:
2 | // Copyright 2011 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 windows
7 |
8 | package term
9 |
10 | import (
11 | "syscall"
12 | "unsafe"
13 | )
14 |
15 | var kernel32 = syscall.NewLazyDLL("kernel32.dll")
16 |
17 | var (
18 | procGetConsoleMode = kernel32.NewProc("GetConsoleMode")
19 | )
20 |
21 | // IsTty returns true if the given file descriptor is a terminal.
22 | func IsTty(fd uintptr) bool {
23 | var st uint32
24 | r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, fd, uintptr(unsafe.Pointer(&st)), 0)
25 | return r != 0 && e == 0
26 | }
27 |
--------------------------------------------------------------------------------
/p2p/message_test.go:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2018 EMSECO
3 | * This source code is being disclosed to you solely for the purpose of your participation in
4 | * testing EMSECO. You may view, compile and run the code for that purpose and pursuant to
5 | * the protocols and algorithms that are programmed into, and intended by, the code. You may
6 | * not do anything else with the code without express permission from EMSECO Foundation Ltd.,
7 | * including modifying or publishing the code (or any part of it), and developing or forming
8 | * another public or private blockchain network. This source code is provided ‘as is’ and no
9 | * warranties are given as to title or non-infringement, merchantability or fitness for purpose
10 | * and, to the extent permitted by law, all liability for your use of the code is disclaimed.
11 | * Some programs in this code are governed by the GNU General Public License v3.0 (available at
12 | * https://www.gnu.org/licenses/gpl-3.0.en.html) (‘GPLv3’). The programs that are governed by
13 | * GPLv3.0 are those programs that are located in the folders src/depends and tests/depends
14 | * and which include a reference to GPLv3 in their program files.
15 | **/
16 |
17 | package p2p
18 |
19 | import "testing"
20 |
21 | func TestDecode(t *testing.T) {
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/p2p/server_test.go:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2018 EMSECO
3 | * This source code is being disclosed to you solely for the purpose of your participation in
4 | * testing EMSECO. You may view, compile and run the code for that purpose and pursuant to
5 | * the protocols and algorithms that are programmed into, and intended by, the code. You may
6 | * not do anything else with the code without express permission from EMSECO Foundation Ltd.,
7 | * including modifying or publishing the code (or any part of it), and developing or forming
8 | * another public or private blockchain network. This source code is provided ‘as is’ and no
9 | * warranties are given as to title or non-infringement, merchantability or fitness for purpose
10 | * and, to the extent permitted by law, all liability for your use of the code is disclaimed.
11 | * Some programs in this code are governed by the GNU General Public License v3.0 (available at
12 | * https://www.gnu.org/licenses/gpl-3.0.en.html) (‘GPLv3’). The programs that are governed by
13 | * GPLv3.0 are those programs that are located in the folders src/depends and tests/depends
14 | * and which include a reference to GPLv3 in their program files.
15 | **/
16 |
17 | package p2p_test
18 |
--------------------------------------------------------------------------------
/test/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "addr":"127.0.0.1:33201",
3 | "coinbase":[10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29],
4 | "peers":["127.0.0.1:33201","127.0.0.1:33202","127.0.0.1:33203"],
5 | "interMilli":500
6 | }
7 |
--------------------------------------------------------------------------------
/test/test.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | setlocal enabledelayedexpansion
3 | set SLEEP=ping 127.0.0.1 -n
4 | echo go build ...
5 | go build -race ..\hgrid\main.go
6 | set count=%1
7 | for /L %%i in (1,1,%count%) do rmdir /S/Q node%%i
8 | for /L %%i in (1,1,%count%) do md node%%i
9 | for /L %%i in (1,1,%count%) do copy .\main.exe .\node%%i\ > %temp%\null
10 | for /L %%i in (1,1,%count%) do echo { >> .\node%%i\config.json
11 | for /L %%i in (1,1,%count%) do set /a port=33200+%%i & echo "addr":"127.0.0.1:!port!", >> .\node%%i\config.json
12 | for /L %%i in (1,1,%count%) do echo "coinbase":[%%i,%%i,%%i,%%i,%%i,%%i,%%i,%%i,%%i,%%i,%%i,%%i,%%i,%%i,%%i,%%i,%%i,%%i,%%i,%%i], >> .\node%%i\config.json
13 | set peers="peers":[
14 | for /L %%i in (1,1,%count%) do set /a port=33200+%%i & set peers=!peers!"127.0.0.1:!port!",
15 | set peers=%peers:~0,-1%
16 | set peers=%peers%],
17 | for /L %%i in (1,1,%count%) do echo %peers% >> .\node%%i\config.json
18 | for /L %%i in (1,1,%count%) do echo "interMilli":500 >> .\node%%i\config.json
19 | for /L %%i in (1,1,%count%) do echo } >> .\node%%i\config.json
20 | echo Start
21 | for /L %%i in (1,1,%count%) do echo node_%%i ... & start cmd /c "cd node%%i&main.exe&pause" & %SLEEP% 0 > %temp%\null
22 | echo done
23 |
--------------------------------------------------------------------------------
/vendor/github.com/deckarep/golang-set/LICENSE:
--------------------------------------------------------------------------------
1 | Open Source Initiative OSI - The MIT License (MIT):Licensing
2 |
3 | The MIT License (MIT)
4 | Copyright (c) 2013 Ralph Caraveo (deckarep@gmail.com)
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | this software and associated documentation files (the "Software"), to deal in
8 | the Software without restriction, including without limitation the rights to
9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | of the Software, and to permit persons to whom the Software is furnished to do
11 | so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
--------------------------------------------------------------------------------
/vendor/github.com/go-stack/stack/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Chris Hines
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/go-stack/stack/README.md:
--------------------------------------------------------------------------------
1 | [](https://godoc.org/github.com/go-stack/stack)
2 | [](https://goreportcard.com/report/go-stack/stack)
3 | [](https://travis-ci.org/go-stack/stack)
4 | [](https://coveralls.io/github/go-stack/stack?branch=master)
5 |
6 | # stack
7 |
8 | Package stack implements utilities to capture, manipulate, and format call
9 | stacks. It provides a simpler API than package runtime.
10 |
11 | The implementation takes care of the minutia and special cases of interpreting
12 | the program counter (pc) values returned by runtime.Callers.
13 |
14 | ## Versioning
15 |
16 | Package stack publishes releases via [semver](http://semver.org/) compatible Git
17 | tags prefixed with a single 'v'. The master branch always contains the latest
18 | release. The develop branch contains unreleased commits.
19 |
20 | ## Formatting
21 |
22 | Package stack's types implement fmt.Formatter, which provides a simple and
23 | flexible way to declaratively configure formatting when used with logging or
24 | error tracking packages.
25 |
26 | ```go
27 | func DoTheThing() {
28 | c := stack.Caller(0)
29 | log.Print(c) // "source.go:10"
30 | log.Printf("%+v", c) // "pkg/path/source.go:10"
31 | log.Printf("%n", c) // "DoTheThing"
32 |
33 | s := stack.Trace().TrimRuntime()
34 | log.Print(s) // "[source.go:15 caller.go:42 main.go:14]"
35 | }
36 | ```
37 |
38 | See the docs for all of the supported formatting options.
39 |
--------------------------------------------------------------------------------
/vendor/github.com/golang/protobuf/LICENSE:
--------------------------------------------------------------------------------
1 | Go support for Protocol Buffers - Google's data interchange format
2 |
3 | Copyright 2010 The Go Authors. All rights reserved.
4 | https://github.com/golang/protobuf
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are
8 | met:
9 |
10 | * Redistributions of source code must retain the above copyright
11 | notice, this list of conditions and the following disclaimer.
12 | * Redistributions in binary form must reproduce the above
13 | copyright notice, this list of conditions and the following disclaimer
14 | in the documentation and/or other materials provided with the
15 | distribution.
16 | * Neither the name of Google Inc. nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 |
--------------------------------------------------------------------------------
/vendor/github.com/golang/snappy/AUTHORS:
--------------------------------------------------------------------------------
1 | # This is the official list of Snappy-Go authors for copyright purposes.
2 | # This file is distinct from the CONTRIBUTORS files.
3 | # See the latter for an explanation.
4 |
5 | # Names should be added to this file as
6 | # Name or Organization
7 | # The email address is not required for organizations.
8 |
9 | # Please keep the list sorted.
10 |
11 | Damian Gryski
12 | Google Inc.
13 | Jan Mercl <0xjnml@gmail.com>
14 | Rodolfo Carvalho
15 | Sebastien Binet
16 |
--------------------------------------------------------------------------------
/vendor/github.com/golang/snappy/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This is the official list of people who can contribute
2 | # (and typically have contributed) code to the Snappy-Go repository.
3 | # The AUTHORS file lists the copyright holders; this file
4 | # lists people. For example, Google employees are listed here
5 | # but not in AUTHORS, because Google holds the copyright.
6 | #
7 | # The submission process automatically checks to make sure
8 | # that people submitting code are listed in this file (by email address).
9 | #
10 | # Names should be added to this file only after verifying that
11 | # the individual or the individual's organization has agreed to
12 | # the appropriate Contributor License Agreement, found here:
13 | #
14 | # http://code.google.com/legal/individual-cla-v1.0.html
15 | # http://code.google.com/legal/corporate-cla-v1.0.html
16 | #
17 | # The agreement for individuals can be filled out on the web.
18 | #
19 | # When adding J Random Contributor's name to this file,
20 | # either J's name or J's organization's name should be
21 | # added to the AUTHORS file, depending on whether the
22 | # individual or corporate CLA was used.
23 |
24 | # Names should be added to this file like so:
25 | # Name
26 |
27 | # Please keep the list sorted.
28 |
29 | Damian Gryski
30 | Jan Mercl <0xjnml@gmail.com>
31 | Kai Backman
32 | Marc-Antoine Ruel
33 | Nigel Tao
34 | Rob Pike
35 | Rodolfo Carvalho
36 | Russ Cox
37 | Sebastien Binet
38 |
--------------------------------------------------------------------------------
/vendor/github.com/golang/snappy/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011 The Snappy-Go Authors. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/vendor/github.com/golang/snappy/decode_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Snappy-Go Authors. All rights reserved.
2 | // 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
6 | // +build gc
7 | // +build !noasm
8 |
9 | package snappy
10 |
11 | // decode has the same semantics as in decode_other.go.
12 | //
13 | //go:noescape
14 | func decode(dst, src []byte) int
15 |
--------------------------------------------------------------------------------
/vendor/github.com/golang/snappy/encode_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Snappy-Go Authors. All rights reserved.
2 | // 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
6 | // +build gc
7 | // +build !noasm
8 |
9 | package snappy
10 |
11 | // emitLiteral has the same semantics as in encode_other.go.
12 | //
13 | //go:noescape
14 | func emitLiteral(dst, lit []byte) int
15 |
16 | // emitCopy has the same semantics as in encode_other.go.
17 | //
18 | //go:noescape
19 | func emitCopy(dst []byte, offset, length int) int
20 |
21 | // extendMatch has the same semantics as in encode_other.go.
22 | //
23 | //go:noescape
24 | func extendMatch(src []byte, i, j int) int
25 |
26 | // encodeBlock has the same semantics as in encode_other.go.
27 | //
28 | //go:noescape
29 | func encodeBlock(dst, src []byte) (d int)
30 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/golang-lru/README.md:
--------------------------------------------------------------------------------
1 | golang-lru
2 | ==========
3 |
4 | This provides the `lru` package which implements a fixed-size
5 | thread safe LRU cache. It is based on the cache in Groupcache.
6 |
7 | Documentation
8 | =============
9 |
10 | Full docs are available on [Godoc](http://godoc.org/github.com/hashicorp/golang-lru)
11 |
12 | Example
13 | =======
14 |
15 | Using the LRU is very simple:
16 |
17 | ```go
18 | l, _ := New(128)
19 | for i := 0; i < 256; i++ {
20 | l.Add(i, nil)
21 | }
22 | if l.Len() != 128 {
23 | panic(fmt.Sprintf("bad len: %v", l.Len()))
24 | }
25 | ```
26 |
--------------------------------------------------------------------------------
/vendor/github.com/pborman/uuid/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # How to contribute
2 |
3 | We definitely welcome patches and contribution to this project!
4 |
5 | ### Legal requirements
6 |
7 | In order to protect both you and ourselves, you will need to sign the
8 | [Contributor License Agreement](https://cla.developers.google.com/clas).
9 |
10 | You may have already signed it for other Google projects.
11 |
--------------------------------------------------------------------------------
/vendor/github.com/pborman/uuid/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | Paul Borman
2 |
--------------------------------------------------------------------------------
/vendor/github.com/pborman/uuid/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009,2014 Google Inc. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/vendor/github.com/pborman/uuid/README.md:
--------------------------------------------------------------------------------
1 | This project was automatically exported from code.google.com/p/go-uuid
2 |
3 | # uuid 
4 | The uuid package generates and inspects UUIDs based on [RFC 4122](http://tools.ietf.org/html/rfc4122) and DCE 1.1: Authentication and Security Services.
5 |
6 | ###### Install
7 | `go get github.com/pborman/uuid`
8 |
9 | ###### Documentation
10 | [](http://godoc.org/github.com/pborman/uuid)
11 |
12 | Full `go doc` style documentation for the package can be viewed online without installing this package by using the GoDoc site here:
13 | http://godoc.org/github.com/pborman/uuid
14 |
--------------------------------------------------------------------------------
/vendor/github.com/pborman/uuid/doc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 Google Inc. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // The uuid package generates and inspects UUIDs.
6 | //
7 | // UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security Services.
8 | package uuid
9 |
--------------------------------------------------------------------------------
/vendor/github.com/pborman/uuid/hash.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 Google Inc. All rights reserved.
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 uuid
6 |
7 | import (
8 | "crypto/md5"
9 | "crypto/sha1"
10 | "hash"
11 | )
12 |
13 | // Well known Name Space IDs and UUIDs
14 | var (
15 | NameSpace_DNS = Parse("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
16 | NameSpace_URL = Parse("6ba7b811-9dad-11d1-80b4-00c04fd430c8")
17 | NameSpace_OID = Parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8")
18 | NameSpace_X500 = Parse("6ba7b814-9dad-11d1-80b4-00c04fd430c8")
19 | NIL = Parse("00000000-0000-0000-0000-000000000000")
20 | )
21 |
22 | // NewHash returns a new UUID derived from the hash of space concatenated with
23 | // data generated by h. The hash should be at least 16 byte in length. The
24 | // first 16 bytes of the hash are used to form the UUID. The version of the
25 | // UUID will be the lower 4 bits of version. NewHash is used to implement
26 | // NewMD5 and NewSHA1.
27 | func NewHash(h hash.Hash, space UUID, data []byte, version int) UUID {
28 | h.Reset()
29 | h.Write(space)
30 | h.Write([]byte(data))
31 | s := h.Sum(nil)
32 | uuid := make([]byte, 16)
33 | copy(uuid, s)
34 | uuid[6] = (uuid[6] & 0x0f) | uint8((version&0xf)<<4)
35 | uuid[8] = (uuid[8] & 0x3f) | 0x80 // RFC 4122 variant
36 | return uuid
37 | }
38 |
39 | // NewMD5 returns a new MD5 (Version 3) UUID based on the
40 | // supplied name space and data.
41 | //
42 | // NewHash(md5.New(), space, data, 3)
43 | func NewMD5(space UUID, data []byte) UUID {
44 | return NewHash(md5.New(), space, data, 3)
45 | }
46 |
47 | // NewSHA1 returns a new SHA1 (Version 5) UUID based on the
48 | // supplied name space and data.
49 | //
50 | // NewHash(sha1.New(), space, data, 5)
51 | func NewSHA1(space UUID, data []byte) UUID {
52 | return NewHash(sha1.New(), space, data, 5)
53 | }
54 |
--------------------------------------------------------------------------------
/vendor/github.com/pborman/uuid/sql.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 Google Inc. All rights reserved.
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 uuid
6 |
7 | import (
8 | "database/sql/driver"
9 | "errors"
10 | "fmt"
11 | )
12 |
13 | // Scan implements sql.Scanner so UUIDs can be read from databases transparently
14 | // Currently, database types that map to string and []byte are supported. Please
15 | // consult database-specific driver documentation for matching types.
16 | func (uuid *UUID) Scan(src interface{}) error {
17 | switch src.(type) {
18 | case string:
19 | // if an empty UUID comes from a table, we return a null UUID
20 | if src.(string) == "" {
21 | return nil
22 | }
23 |
24 | // see uuid.Parse for required string format
25 | parsed := Parse(src.(string))
26 |
27 | if parsed == nil {
28 | return errors.New("Scan: invalid UUID format")
29 | }
30 |
31 | *uuid = parsed
32 | case []byte:
33 | b := src.([]byte)
34 |
35 | // if an empty UUID comes from a table, we return a null UUID
36 | if len(b) == 0 {
37 | return nil
38 | }
39 |
40 | // assumes a simple slice of bytes if 16 bytes
41 | // otherwise attempts to parse
42 | if len(b) == 16 {
43 | *uuid = UUID(b)
44 | } else {
45 | u := Parse(string(b))
46 |
47 | if u == nil {
48 | return errors.New("Scan: invalid UUID format")
49 | }
50 |
51 | *uuid = u
52 | }
53 |
54 | default:
55 | return fmt.Errorf("Scan: unable to scan type %T into UUID", src)
56 | }
57 |
58 | return nil
59 | }
60 |
61 | // Value implements sql.Valuer so that UUIDs can be written to databases
62 | // transparently. Currently, UUIDs map to strings. Please consult
63 | // database-specific driver documentation for matching types.
64 | func (uuid UUID) Value() (driver.Value, error) {
65 | return uuid.String(), nil
66 | }
67 |
--------------------------------------------------------------------------------
/vendor/github.com/pborman/uuid/version1.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 Google Inc. All rights reserved.
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 uuid
6 |
7 | import (
8 | "encoding/binary"
9 | )
10 |
11 | // NewUUID returns a Version 1 UUID based on the current NodeID and clock
12 | // sequence, and the current time. If the NodeID has not been set by SetNodeID
13 | // or SetNodeInterface then it will be set automatically. If the NodeID cannot
14 | // be set NewUUID returns nil. If clock sequence has not been set by
15 | // SetClockSequence then it will be set automatically. If GetTime fails to
16 | // return the current NewUUID returns nil.
17 | func NewUUID() UUID {
18 | if nodeID == nil {
19 | SetNodeInterface("")
20 | }
21 |
22 | now, seq, err := GetTime()
23 | if err != nil {
24 | return nil
25 | }
26 |
27 | uuid := make([]byte, 16)
28 |
29 | time_low := uint32(now & 0xffffffff)
30 | time_mid := uint16((now >> 32) & 0xffff)
31 | time_hi := uint16((now >> 48) & 0x0fff)
32 | time_hi |= 0x1000 // Version 1
33 |
34 | binary.BigEndian.PutUint32(uuid[0:], time_low)
35 | binary.BigEndian.PutUint16(uuid[4:], time_mid)
36 | binary.BigEndian.PutUint16(uuid[6:], time_hi)
37 | binary.BigEndian.PutUint16(uuid[8:], seq)
38 | copy(uuid[10:], nodeID)
39 |
40 | return uuid
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/github.com/pborman/uuid/version4.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 Google Inc. All rights reserved.
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 uuid
6 |
7 | // Random returns a Random (Version 4) UUID or panics.
8 | //
9 | // The strength of the UUIDs is based on the strength of the crypto/rand
10 | // package.
11 | //
12 | // A note about uniqueness derived from from the UUID Wikipedia entry:
13 | //
14 | // Randomly generated UUIDs have 122 random bits. One's annual risk of being
15 | // hit by a meteorite is estimated to be one chance in 17 billion, that
16 | // means the probability is about 0.00000000006 (6 × 10−11),
17 | // equivalent to the odds of creating a few tens of trillions of UUIDs in a
18 | // year and having one duplicate.
19 | func NewRandom() UUID {
20 | uuid := make([]byte, 16)
21 | randomBits([]byte(uuid))
22 | uuid[6] = (uuid[6] & 0x0f) | 0x40 // Version 4
23 | uuid[8] = (uuid[8] & 0x3f) | 0x80 // Variant is 10
24 | return uuid
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/syndtr/goleveldb/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2012 Suryandaru Triandana
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are
6 | met:
7 |
8 | * Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above copyright
11 | notice, this list of conditions and the following disclaimer in the
12 | documentation and/or other materials provided with the distribution.
13 |
14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 |
--------------------------------------------------------------------------------
/vendor/github.com/syndtr/goleveldb/leveldb/comparer.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Suryandaru Triandana
2 | // All rights reserved.
3 | //
4 | // Use of this source code is governed by a BSD-style license that can be
5 | // found in the LICENSE file.
6 |
7 | package leveldb
8 |
9 | import (
10 | "github.com/syndtr/goleveldb/leveldb/comparer"
11 | )
12 |
13 | type iComparer struct {
14 | ucmp comparer.Comparer
15 | }
16 |
17 | func (icmp *iComparer) uName() string {
18 | return icmp.ucmp.Name()
19 | }
20 |
21 | func (icmp *iComparer) uCompare(a, b []byte) int {
22 | return icmp.ucmp.Compare(a, b)
23 | }
24 |
25 | func (icmp *iComparer) uSeparator(dst, a, b []byte) []byte {
26 | return icmp.ucmp.Separator(dst, a, b)
27 | }
28 |
29 | func (icmp *iComparer) uSuccessor(dst, b []byte) []byte {
30 | return icmp.ucmp.Successor(dst, b)
31 | }
32 |
33 | func (icmp *iComparer) Name() string {
34 | return icmp.uName()
35 | }
36 |
37 | func (icmp *iComparer) Compare(a, b []byte) int {
38 | x := icmp.uCompare(internalKey(a).ukey(), internalKey(b).ukey())
39 | if x == 0 {
40 | if m, n := internalKey(a).num(), internalKey(b).num(); m > n {
41 | return -1
42 | } else if m < n {
43 | return 1
44 | }
45 | }
46 | return x
47 | }
48 |
49 | func (icmp *iComparer) Separator(dst, a, b []byte) []byte {
50 | ua, ub := internalKey(a).ukey(), internalKey(b).ukey()
51 | dst = icmp.uSeparator(dst, ua, ub)
52 | if dst != nil && len(dst) < len(ua) && icmp.uCompare(ua, dst) < 0 {
53 | // Append earliest possible number.
54 | return append(dst, keyMaxNumBytes...)
55 | }
56 | return nil
57 | }
58 |
59 | func (icmp *iComparer) Successor(dst, b []byte) []byte {
60 | ub := internalKey(b).ukey()
61 | dst = icmp.uSuccessor(dst, ub)
62 | if dst != nil && len(dst) < len(ub) && icmp.uCompare(ub, dst) < 0 {
63 | // Append earliest possible number.
64 | return append(dst, keyMaxNumBytes...)
65 | }
66 | return nil
67 | }
68 |
--------------------------------------------------------------------------------
/vendor/github.com/syndtr/goleveldb/leveldb/comparer/bytes_comparer.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Suryandaru Triandana
2 | // All rights reserved.
3 | //
4 | // Use of this source code is governed by a BSD-style license that can be
5 | // found in the LICENSE file.
6 |
7 | package comparer
8 |
9 | import "bytes"
10 |
11 | type bytesComparer struct{}
12 |
13 | func (bytesComparer) Compare(a, b []byte) int {
14 | return bytes.Compare(a, b)
15 | }
16 |
17 | func (bytesComparer) Name() string {
18 | return "leveldb.BytewiseComparator"
19 | }
20 |
21 | func (bytesComparer) Separator(dst, a, b []byte) []byte {
22 | i, n := 0, len(a)
23 | if n > len(b) {
24 | n = len(b)
25 | }
26 | for ; i < n && a[i] == b[i]; i++ {
27 | }
28 | if i >= n {
29 | // Do not shorten if one string is a prefix of the other
30 | } else if c := a[i]; c < 0xff && c+1 < b[i] {
31 | dst = append(dst, a[:i+1]...)
32 | dst[i]++
33 | return dst
34 | }
35 | return nil
36 | }
37 |
38 | func (bytesComparer) Successor(dst, b []byte) []byte {
39 | for i, c := range b {
40 | if c != 0xff {
41 | dst = append(dst, b[:i+1]...)
42 | dst[i]++
43 | return dst
44 | }
45 | }
46 | return nil
47 | }
48 |
49 | // DefaultComparer are default implementation of the Comparer interface.
50 | // It uses the natural ordering, consistent with bytes.Compare.
51 | var DefaultComparer = bytesComparer{}
52 |
--------------------------------------------------------------------------------
/vendor/github.com/syndtr/goleveldb/leveldb/errors.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014, Suryandaru Triandana
2 | // All rights reserved.
3 | //
4 | // Use of this source code is governed by a BSD-style license that can be
5 | // found in the LICENSE file.
6 |
7 | package leveldb
8 |
9 | import (
10 | "github.com/syndtr/goleveldb/leveldb/errors"
11 | )
12 |
13 | // Common errors.
14 | var (
15 | ErrNotFound = errors.ErrNotFound
16 | ErrReadOnly = errors.New("leveldb: read-only mode")
17 | ErrSnapshotReleased = errors.New("leveldb: snapshot released")
18 | ErrIterReleased = errors.New("leveldb: iterator released")
19 | ErrClosed = errors.New("leveldb: closed")
20 | )
21 |
--------------------------------------------------------------------------------
/vendor/github.com/syndtr/goleveldb/leveldb/filter.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Suryandaru Triandana
2 | // All rights reserved.
3 | //
4 | // Use of this source code is governed by a BSD-style license that can be
5 | // found in the LICENSE file.
6 |
7 | package leveldb
8 |
9 | import (
10 | "github.com/syndtr/goleveldb/leveldb/filter"
11 | )
12 |
13 | type iFilter struct {
14 | filter.Filter
15 | }
16 |
17 | func (f iFilter) Contains(filter, key []byte) bool {
18 | return f.Filter.Contains(filter, internalKey(key).ukey())
19 | }
20 |
21 | func (f iFilter) NewGenerator() filter.FilterGenerator {
22 | return iFilterGenerator{f.Filter.NewGenerator()}
23 | }
24 |
25 | type iFilterGenerator struct {
26 | filter.FilterGenerator
27 | }
28 |
29 | func (g iFilterGenerator) Add(key []byte) {
30 | g.FilterGenerator.Add(internalKey(key).ukey())
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/github.com/syndtr/goleveldb/leveldb/storage.go:
--------------------------------------------------------------------------------
1 | package leveldb
2 |
3 | import (
4 | "github.com/syndtr/goleveldb/leveldb/storage"
5 | "sync/atomic"
6 | )
7 |
8 | type iStorage struct {
9 | storage.Storage
10 | read uint64
11 | write uint64
12 | }
13 |
14 | func (c *iStorage) Open(fd storage.FileDesc) (storage.Reader, error) {
15 | r, err := c.Storage.Open(fd)
16 | return &iStorageReader{r, c}, err
17 | }
18 |
19 | func (c *iStorage) Create(fd storage.FileDesc) (storage.Writer, error) {
20 | w, err := c.Storage.Create(fd)
21 | return &iStorageWriter{w, c}, err
22 | }
23 |
24 | func (c *iStorage) reads() uint64 {
25 | return atomic.LoadUint64(&c.read)
26 | }
27 |
28 | func (c *iStorage) writes() uint64 {
29 | return atomic.LoadUint64(&c.write)
30 | }
31 |
32 | // newIStorage returns the given storage wrapped by iStorage.
33 | func newIStorage(s storage.Storage) *iStorage {
34 | return &iStorage{s, 0, 0}
35 | }
36 |
37 | type iStorageReader struct {
38 | storage.Reader
39 | c *iStorage
40 | }
41 |
42 | func (r *iStorageReader) Read(p []byte) (n int, err error) {
43 | n, err = r.Reader.Read(p)
44 | atomic.AddUint64(&r.c.read, uint64(n))
45 | return n, err
46 | }
47 |
48 | func (r *iStorageReader) ReadAt(p []byte, off int64) (n int, err error) {
49 | n, err = r.Reader.ReadAt(p, off)
50 | atomic.AddUint64(&r.c.read, uint64(n))
51 | return n, err
52 | }
53 |
54 | type iStorageWriter struct {
55 | storage.Writer
56 | c *iStorage
57 | }
58 |
59 | func (w *iStorageWriter) Write(p []byte) (n int, err error) {
60 | n, err = w.Writer.Write(p)
61 | atomic.AddUint64(&w.c.write, uint64(n))
62 | return n, err
63 | }
64 |
--------------------------------------------------------------------------------
/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_nacl.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Suryandaru Triandana
2 | // All rights reserved.
3 | //
4 | // Use of this source code is governed by a BSD-style license that can be
5 | // found in the LICENSE file.
6 |
7 | // +build nacl
8 |
9 | package storage
10 |
11 | import (
12 | "os"
13 | "syscall"
14 | )
15 |
16 | func newFileLock(path string, readOnly bool) (fl fileLock, err error) {
17 | return nil, syscall.ENOTSUP
18 | }
19 |
20 | func setFileLock(f *os.File, readOnly, lock bool) error {
21 | return syscall.ENOTSUP
22 | }
23 |
24 | func rename(oldpath, newpath string) error {
25 | return syscall.ENOTSUP
26 | }
27 |
28 | func isErrInvalid(err error) bool {
29 | return false
30 | }
31 |
32 | func syncDir(name string) error {
33 | return syscall.ENOTSUP
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_plan9.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Suryandaru Triandana
2 | // All rights reserved.
3 | //
4 | // Use of this source code is governed by a BSD-style license that can be
5 | // found in the LICENSE file.
6 |
7 | package storage
8 |
9 | import (
10 | "os"
11 | )
12 |
13 | type plan9FileLock struct {
14 | f *os.File
15 | }
16 |
17 | func (fl *plan9FileLock) release() error {
18 | return fl.f.Close()
19 | }
20 |
21 | func newFileLock(path string, readOnly bool) (fl fileLock, err error) {
22 | var (
23 | flag int
24 | perm os.FileMode
25 | )
26 | if readOnly {
27 | flag = os.O_RDONLY
28 | } else {
29 | flag = os.O_RDWR
30 | perm = os.ModeExclusive
31 | }
32 | f, err := os.OpenFile(path, flag, perm)
33 | if os.IsNotExist(err) {
34 | f, err = os.OpenFile(path, flag|os.O_CREATE, perm|0644)
35 | }
36 | if err != nil {
37 | return
38 | }
39 | fl = &plan9FileLock{f: f}
40 | return
41 | }
42 |
43 | func rename(oldpath, newpath string) error {
44 | if _, err := os.Stat(newpath); err == nil {
45 | if err := os.Remove(newpath); err != nil {
46 | return err
47 | }
48 | }
49 |
50 | return os.Rename(oldpath, newpath)
51 | }
52 |
53 | func syncDir(name string) error {
54 | f, err := os.Open(name)
55 | if err != nil {
56 | return err
57 | }
58 | defer f.Close()
59 | if err := f.Sync(); err != nil {
60 | return err
61 | }
62 | return nil
63 | }
64 |
--------------------------------------------------------------------------------
/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_solaris.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Suryandaru Triandana
2 | // All rights reserved.
3 | //
4 | // Use of this source code is governed by a BSD-style license that can be
5 | // found in the LICENSE file.
6 |
7 | // +build solaris
8 |
9 | package storage
10 |
11 | import (
12 | "os"
13 | "syscall"
14 | )
15 |
16 | type unixFileLock struct {
17 | f *os.File
18 | }
19 |
20 | func (fl *unixFileLock) release() error {
21 | if err := setFileLock(fl.f, false, false); err != nil {
22 | return err
23 | }
24 | return fl.f.Close()
25 | }
26 |
27 | func newFileLock(path string, readOnly bool) (fl fileLock, err error) {
28 | var flag int
29 | if readOnly {
30 | flag = os.O_RDONLY
31 | } else {
32 | flag = os.O_RDWR
33 | }
34 | f, err := os.OpenFile(path, flag, 0)
35 | if os.IsNotExist(err) {
36 | f, err = os.OpenFile(path, flag|os.O_CREATE, 0644)
37 | }
38 | if err != nil {
39 | return
40 | }
41 | err = setFileLock(f, readOnly, true)
42 | if err != nil {
43 | f.Close()
44 | return
45 | }
46 | fl = &unixFileLock{f: f}
47 | return
48 | }
49 |
50 | func setFileLock(f *os.File, readOnly, lock bool) error {
51 | flock := syscall.Flock_t{
52 | Type: syscall.F_UNLCK,
53 | Start: 0,
54 | Len: 0,
55 | Whence: 1,
56 | }
57 | if lock {
58 | if readOnly {
59 | flock.Type = syscall.F_RDLCK
60 | } else {
61 | flock.Type = syscall.F_WRLCK
62 | }
63 | }
64 | return syscall.FcntlFlock(f.Fd(), syscall.F_SETLK, &flock)
65 | }
66 |
67 | func rename(oldpath, newpath string) error {
68 | return os.Rename(oldpath, newpath)
69 | }
70 |
71 | func syncDir(name string) error {
72 | f, err := os.Open(name)
73 | if err != nil {
74 | return err
75 | }
76 | defer f.Close()
77 | if err := f.Sync(); err != nil {
78 | return err
79 | }
80 | return nil
81 | }
82 |
--------------------------------------------------------------------------------
/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Suryandaru Triandana
2 | // All rights reserved.
3 | //
4 | // Use of this source code is governed by a BSD-style license that can be
5 | // found in the LICENSE file.
6 |
7 | // +build darwin dragonfly freebsd linux netbsd openbsd
8 |
9 | package storage
10 |
11 | import (
12 | "os"
13 | "syscall"
14 | )
15 |
16 | type unixFileLock struct {
17 | f *os.File
18 | }
19 |
20 | func (fl *unixFileLock) release() error {
21 | if err := setFileLock(fl.f, false, false); err != nil {
22 | return err
23 | }
24 | return fl.f.Close()
25 | }
26 |
27 | func newFileLock(path string, readOnly bool) (fl fileLock, err error) {
28 | var flag int
29 | if readOnly {
30 | flag = os.O_RDONLY
31 | } else {
32 | flag = os.O_RDWR
33 | }
34 | f, err := os.OpenFile(path, flag, 0)
35 | if os.IsNotExist(err) {
36 | f, err = os.OpenFile(path, flag|os.O_CREATE, 0644)
37 | }
38 | if err != nil {
39 | return
40 | }
41 | err = setFileLock(f, readOnly, true)
42 | if err != nil {
43 | f.Close()
44 | return
45 | }
46 | fl = &unixFileLock{f: f}
47 | return
48 | }
49 |
50 | func setFileLock(f *os.File, readOnly, lock bool) error {
51 | how := syscall.LOCK_UN
52 | if lock {
53 | if readOnly {
54 | how = syscall.LOCK_SH
55 | } else {
56 | how = syscall.LOCK_EX
57 | }
58 | }
59 | return syscall.Flock(int(f.Fd()), how|syscall.LOCK_NB)
60 | }
61 |
62 | func rename(oldpath, newpath string) error {
63 | return os.Rename(oldpath, newpath)
64 | }
65 |
66 | func isErrInvalid(err error) bool {
67 | if err == os.ErrInvalid {
68 | return true
69 | }
70 | if syserr, ok := err.(*os.SyscallError); ok && syserr.Err == syscall.EINVAL {
71 | return true
72 | }
73 | return false
74 | }
75 |
76 | func syncDir(name string) error {
77 | f, err := os.Open(name)
78 | if err != nil {
79 | return err
80 | }
81 | defer f.Close()
82 | if err := f.Sync(); err != nil && !isErrInvalid(err) {
83 | return err
84 | }
85 | return nil
86 | }
87 |
--------------------------------------------------------------------------------
/vendor/github.com/syndtr/goleveldb/leveldb/util.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Suryandaru Triandana
2 | // All rights reserved.
3 | //
4 | // Use of this source code is governed by a BSD-style license that can be
5 | // found in the LICENSE file.
6 |
7 | package leveldb
8 |
9 | import (
10 | "fmt"
11 | "sort"
12 |
13 | "github.com/syndtr/goleveldb/leveldb/storage"
14 | )
15 |
16 | func shorten(str string) string {
17 | if len(str) <= 8 {
18 | return str
19 | }
20 | return str[:3] + ".." + str[len(str)-3:]
21 | }
22 |
23 | var bunits = [...]string{"", "Ki", "Mi", "Gi", "Ti"}
24 |
25 | func shortenb(bytes int) string {
26 | i := 0
27 | for ; bytes > 1024 && i < 4; i++ {
28 | bytes /= 1024
29 | }
30 | return fmt.Sprintf("%d%sB", bytes, bunits[i])
31 | }
32 |
33 | func sshortenb(bytes int) string {
34 | if bytes == 0 {
35 | return "~"
36 | }
37 | sign := "+"
38 | if bytes < 0 {
39 | sign = "-"
40 | bytes *= -1
41 | }
42 | i := 0
43 | for ; bytes > 1024 && i < 4; i++ {
44 | bytes /= 1024
45 | }
46 | return fmt.Sprintf("%s%d%sB", sign, bytes, bunits[i])
47 | }
48 |
49 | func sint(x int) string {
50 | if x == 0 {
51 | return "~"
52 | }
53 | sign := "+"
54 | if x < 0 {
55 | sign = "-"
56 | x *= -1
57 | }
58 | return fmt.Sprintf("%s%d", sign, x)
59 | }
60 |
61 | func minInt(a, b int) int {
62 | if a < b {
63 | return a
64 | }
65 | return b
66 | }
67 |
68 | func maxInt(a, b int) int {
69 | if a > b {
70 | return a
71 | }
72 | return b
73 | }
74 |
75 | type fdSorter []storage.FileDesc
76 |
77 | func (p fdSorter) Len() int {
78 | return len(p)
79 | }
80 |
81 | func (p fdSorter) Less(i, j int) bool {
82 | return p[i].Num < p[j].Num
83 | }
84 |
85 | func (p fdSorter) Swap(i, j int) {
86 | p[i], p[j] = p[j], p[i]
87 | }
88 |
89 | func sortFds(fds []storage.FileDesc) {
90 | sort.Sort(fdSorter(fds))
91 | }
92 |
93 | func ensureBuffer(b []byte, n int) []byte {
94 | if cap(b) < n {
95 | return make([]byte, n)
96 | }
97 | return b[:n]
98 | }
99 |
--------------------------------------------------------------------------------
/vendor/github.com/syndtr/goleveldb/leveldb/util/crc32.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The LevelDB-Go Authors. All rights reserved.
2 | //
3 | // Use of this source code is governed by a BSD-style license that can be
4 | // found in the LICENSE file.
5 |
6 | package util
7 |
8 | import (
9 | "hash/crc32"
10 | )
11 |
12 | var table = crc32.MakeTable(crc32.Castagnoli)
13 |
14 | // CRC is a CRC-32 checksum computed using Castagnoli's polynomial.
15 | type CRC uint32
16 |
17 | // NewCRC creates a new crc based on the given bytes.
18 | func NewCRC(b []byte) CRC {
19 | return CRC(0).Update(b)
20 | }
21 |
22 | // Update updates the crc with the given bytes.
23 | func (c CRC) Update(b []byte) CRC {
24 | return CRC(crc32.Update(uint32(c), table, b))
25 | }
26 |
27 | // Value returns a masked crc.
28 | func (c CRC) Value() uint32 {
29 | return uint32(c>>15|c<<17) + 0xa282ead8
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/github.com/syndtr/goleveldb/leveldb/util/hash.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Suryandaru Triandana
2 | // All rights reserved.
3 | //
4 | // Use of this source code is governed by a BSD-style license that can be
5 | // found in the LICENSE file.
6 |
7 | package util
8 |
9 | import (
10 | "encoding/binary"
11 | )
12 |
13 | // Hash return hash of the given data.
14 | func Hash(data []byte, seed uint32) uint32 {
15 | // Similar to murmur hash
16 | const (
17 | m = uint32(0xc6a4a793)
18 | r = uint32(24)
19 | )
20 | var (
21 | h = seed ^ (uint32(len(data)) * m)
22 | i int
23 | )
24 |
25 | for n := len(data) - len(data)%4; i < n; i += 4 {
26 | h += binary.LittleEndian.Uint32(data[i:])
27 | h *= m
28 | h ^= (h >> 16)
29 | }
30 |
31 | switch len(data) - i {
32 | default:
33 | panic("not reached")
34 | case 3:
35 | h += uint32(data[i+2]) << 16
36 | fallthrough
37 | case 2:
38 | h += uint32(data[i+1]) << 8
39 | fallthrough
40 | case 1:
41 | h += uint32(data[i])
42 | h *= m
43 | h ^= (h >> r)
44 | case 0:
45 | }
46 |
47 | return h
48 | }
49 |
--------------------------------------------------------------------------------
/vendor/github.com/syndtr/goleveldb/leveldb/util/range.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014, Suryandaru Triandana
2 | // All rights reserved.
3 | //
4 | // Use of this source code is governed by a BSD-style license that can be
5 | // found in the LICENSE file.
6 |
7 | package util
8 |
9 | // Range is a key range.
10 | type Range struct {
11 | // Start of the key range, include in the range.
12 | Start []byte
13 |
14 | // Limit of the key range, not include in the range.
15 | Limit []byte
16 | }
17 |
18 | // BytesPrefix returns key range that satisfy the given prefix.
19 | // This only applicable for the standard 'bytes comparer'.
20 | func BytesPrefix(prefix []byte) *Range {
21 | var limit []byte
22 | for i := len(prefix) - 1; i >= 0; i-- {
23 | c := prefix[i]
24 | if c < 0xff {
25 | limit = make([]byte, i+1)
26 | copy(limit, prefix)
27 | limit[i] = c + 1
28 | break
29 | }
30 | }
31 | return &Range{prefix, limit}
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Go
2 |
3 | Go is an open source project.
4 |
5 | It is the work of hundreds of contributors. We appreciate your help!
6 |
7 |
8 | ## Filing issues
9 |
10 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:
11 |
12 | 1. What version of Go are you using (`go version`)?
13 | 2. What operating system and processor architecture are you using?
14 | 3. What did you do?
15 | 4. What did you expect to see?
16 | 5. What did you see instead?
17 |
18 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
19 | The gophers there will answer or ask you to file an issue if you've tripped over a bug.
20 |
21 | ## Contributing code
22 |
23 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
24 | before sending patches.
25 |
26 | **We do not accept GitHub pull requests**
27 | (we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review).
28 |
29 | Unless otherwise noted, the Go source files are distributed under
30 | the BSD-style license found in the LICENSE file.
31 |
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009 The Go Authors. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/README:
--------------------------------------------------------------------------------
1 | This repository holds supplementary Go cryptography libraries.
2 |
3 | To submit changes to this repository, see http://golang.org/doc/contribute.html.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/codereview.cfg:
--------------------------------------------------------------------------------
1 | issuerepo: golang/go
2 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/const_amd64.h:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // This code was translated into a form compatible with 6a from the public
6 | // domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
7 |
8 | #define REDMASK51 0x0007FFFFFFFFFFFF
9 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/const_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // This code was translated into a form compatible with 6a from the public
6 | // domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
7 |
8 | // +build amd64,!gccgo,!appengine
9 |
10 | // These constants cannot be encoded in non-MOVQ immediates.
11 | // We access them directly from memory instead.
12 |
13 | DATA ·_121666_213(SB)/8, $996687872
14 | GLOBL ·_121666_213(SB), 8, $8
15 |
16 | DATA ·_2P0(SB)/8, $0xFFFFFFFFFFFDA
17 | GLOBL ·_2P0(SB), 8, $8
18 |
19 | DATA ·_2P1234(SB)/8, $0xFFFFFFFFFFFFE
20 | GLOBL ·_2P1234(SB), 8, $8
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/cswap_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,!gccgo,!appengine
6 |
7 | // func cswap(inout *[4][5]uint64, v uint64)
8 | TEXT ·cswap(SB),7,$0
9 | MOVQ inout+0(FP),DI
10 | MOVQ v+8(FP),SI
11 |
12 | SUBQ $1, SI
13 | NOTQ SI
14 | MOVQ SI, X15
15 | PSHUFD $0x44, X15, X15
16 |
17 | MOVOU 0(DI), X0
18 | MOVOU 16(DI), X2
19 | MOVOU 32(DI), X4
20 | MOVOU 48(DI), X6
21 | MOVOU 64(DI), X8
22 | MOVOU 80(DI), X1
23 | MOVOU 96(DI), X3
24 | MOVOU 112(DI), X5
25 | MOVOU 128(DI), X7
26 | MOVOU 144(DI), X9
27 |
28 | MOVO X1, X10
29 | MOVO X3, X11
30 | MOVO X5, X12
31 | MOVO X7, X13
32 | MOVO X9, X14
33 |
34 | PXOR X0, X10
35 | PXOR X2, X11
36 | PXOR X4, X12
37 | PXOR X6, X13
38 | PXOR X8, X14
39 | PAND X15, X10
40 | PAND X15, X11
41 | PAND X15, X12
42 | PAND X15, X13
43 | PAND X15, X14
44 | PXOR X10, X0
45 | PXOR X10, X1
46 | PXOR X11, X2
47 | PXOR X11, X3
48 | PXOR X12, X4
49 | PXOR X12, X5
50 | PXOR X13, X6
51 | PXOR X13, X7
52 | PXOR X14, X8
53 | PXOR X14, X9
54 |
55 | MOVOU X0, 0(DI)
56 | MOVOU X2, 16(DI)
57 | MOVOU X4, 32(DI)
58 | MOVOU X6, 48(DI)
59 | MOVOU X8, 64(DI)
60 | MOVOU X1, 80(DI)
61 | MOVOU X3, 96(DI)
62 | MOVOU X5, 112(DI)
63 | MOVOU X7, 128(DI)
64 | MOVOU X9, 144(DI)
65 | RET
66 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/doc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Package curve25519 provides an implementation of scalar multiplication on
6 | // the elliptic curve known as curve25519. See https://cr.yp.to/ecdh.html
7 | package curve25519 // import "golang.org/x/crypto/curve25519"
8 |
9 | // basePoint is the x coordinate of the generator of the curve.
10 | var basePoint = [32]byte{9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
11 |
12 | // ScalarMult sets dst to the product in*base where dst and base are the x
13 | // coordinates of group points and all values are in little-endian form.
14 | func ScalarMult(dst, in, base *[32]byte) {
15 | scalarMult(dst, in, base)
16 | }
17 |
18 | // ScalarBaseMult sets dst to the product in*base where dst and base are the x
19 | // coordinates of group points, base is the standard generator and all values
20 | // are in little-endian form.
21 | func ScalarBaseMult(dst, in *[32]byte) {
22 | ScalarMult(dst, in, &basePoint)
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/freeze_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // This code was translated into a form compatible with 6a from the public
6 | // domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
7 |
8 | // +build amd64,!gccgo,!appengine
9 |
10 | #include "const_amd64.h"
11 |
12 | // func freeze(inout *[5]uint64)
13 | TEXT ·freeze(SB),7,$0-8
14 | MOVQ inout+0(FP), DI
15 |
16 | MOVQ 0(DI),SI
17 | MOVQ 8(DI),DX
18 | MOVQ 16(DI),CX
19 | MOVQ 24(DI),R8
20 | MOVQ 32(DI),R9
21 | MOVQ $REDMASK51,AX
22 | MOVQ AX,R10
23 | SUBQ $18,R10
24 | MOVQ $3,R11
25 | REDUCELOOP:
26 | MOVQ SI,R12
27 | SHRQ $51,R12
28 | ANDQ AX,SI
29 | ADDQ R12,DX
30 | MOVQ DX,R12
31 | SHRQ $51,R12
32 | ANDQ AX,DX
33 | ADDQ R12,CX
34 | MOVQ CX,R12
35 | SHRQ $51,R12
36 | ANDQ AX,CX
37 | ADDQ R12,R8
38 | MOVQ R8,R12
39 | SHRQ $51,R12
40 | ANDQ AX,R8
41 | ADDQ R12,R9
42 | MOVQ R9,R12
43 | SHRQ $51,R12
44 | ANDQ AX,R9
45 | IMUL3Q $19,R12,R12
46 | ADDQ R12,SI
47 | SUBQ $1,R11
48 | JA REDUCELOOP
49 | MOVQ $1,R12
50 | CMPQ R10,SI
51 | CMOVQLT R11,R12
52 | CMPQ AX,DX
53 | CMOVQNE R11,R12
54 | CMPQ AX,CX
55 | CMOVQNE R11,R12
56 | CMPQ AX,R8
57 | CMOVQNE R11,R12
58 | CMPQ AX,R9
59 | CMOVQNE R11,R12
60 | NEGQ R12
61 | ANDQ R12,AX
62 | ANDQ R12,R10
63 | SUBQ R10,SI
64 | SUBQ AX,DX
65 | SUBQ AX,CX
66 | SUBQ AX,R8
67 | SUBQ AX,R9
68 | MOVQ SI,0(DI)
69 | MOVQ DX,8(DI)
70 | MOVQ CX,16(DI)
71 | MOVQ R8,24(DI)
72 | MOVQ R9,32(DI)
73 | RET
74 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/openpgp/canonical_text.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 openpgp
6 |
7 | import "hash"
8 |
9 | // NewCanonicalTextHash reformats text written to it into the canonical
10 | // form and then applies the hash h. See RFC 4880, section 5.2.1.
11 | func NewCanonicalTextHash(h hash.Hash) hash.Hash {
12 | return &canonicalTextHash{h, 0}
13 | }
14 |
15 | type canonicalTextHash struct {
16 | h hash.Hash
17 | s int
18 | }
19 |
20 | var newline = []byte{'\r', '\n'}
21 |
22 | func (cth *canonicalTextHash) Write(buf []byte) (int, error) {
23 | start := 0
24 |
25 | for i, c := range buf {
26 | switch cth.s {
27 | case 0:
28 | if c == '\r' {
29 | cth.s = 1
30 | } else if c == '\n' {
31 | cth.h.Write(buf[start:i])
32 | cth.h.Write(newline)
33 | start = i + 1
34 | }
35 | case 1:
36 | cth.s = 0
37 | }
38 | }
39 |
40 | cth.h.Write(buf[start:])
41 | return len(buf), nil
42 | }
43 |
44 | func (cth *canonicalTextHash) Sum(in []byte) []byte {
45 | return cth.h.Sum(in)
46 | }
47 |
48 | func (cth *canonicalTextHash) Reset() {
49 | cth.h.Reset()
50 | cth.s = 0
51 | }
52 |
53 | func (cth *canonicalTextHash) Size() int {
54 | return cth.h.Size()
55 | }
56 |
57 | func (cth *canonicalTextHash) BlockSize() int {
58 | return cth.h.BlockSize()
59 | }
60 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/ssh/doc.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 | /*
6 | Package ssh implements an SSH client and server.
7 |
8 | SSH is a transport security protocol, an authentication protocol and a
9 | family of application protocols. The most typical application level
10 | protocol is a remote shell and this is specifically implemented. However,
11 | the multiplexed nature of SSH is exposed to users that wish to support
12 | others.
13 |
14 | References:
15 | [PROTOCOL.certkeys]: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.certkeys?rev=HEAD
16 | [SSH-PARAMETERS]: http://www.iana.org/assignments/ssh-parameters/ssh-parameters.xml#ssh-parameters-1
17 |
18 | This package does not fall under the stability promise of the Go language itself,
19 | so its API may be changed when pressing needs arise.
20 | */
21 | package ssh // import "golang.org/x/crypto/ssh"
22 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/ssh/mac.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package ssh
6 |
7 | // Message authentication support
8 |
9 | import (
10 | "crypto/hmac"
11 | "crypto/sha1"
12 | "crypto/sha256"
13 | "hash"
14 | )
15 |
16 | type macMode struct {
17 | keySize int
18 | etm bool
19 | new func(key []byte) hash.Hash
20 | }
21 |
22 | // truncatingMAC wraps around a hash.Hash and truncates the output digest to
23 | // a given size.
24 | type truncatingMAC struct {
25 | length int
26 | hmac hash.Hash
27 | }
28 |
29 | func (t truncatingMAC) Write(data []byte) (int, error) {
30 | return t.hmac.Write(data)
31 | }
32 |
33 | func (t truncatingMAC) Sum(in []byte) []byte {
34 | out := t.hmac.Sum(in)
35 | return out[:len(in)+t.length]
36 | }
37 |
38 | func (t truncatingMAC) Reset() {
39 | t.hmac.Reset()
40 | }
41 |
42 | func (t truncatingMAC) Size() int {
43 | return t.length
44 | }
45 |
46 | func (t truncatingMAC) BlockSize() int { return t.hmac.BlockSize() }
47 |
48 | var macModes = map[string]*macMode{
49 | "hmac-sha2-256-etm@openssh.com": {32, true, func(key []byte) hash.Hash {
50 | return hmac.New(sha256.New, key)
51 | }},
52 | "hmac-sha2-256": {32, false, func(key []byte) hash.Hash {
53 | return hmac.New(sha256.New, key)
54 | }},
55 | "hmac-sha1": {20, false, func(key []byte) hash.Hash {
56 | return hmac.New(sha1.New, key)
57 | }},
58 | "hmac-sha1-96": {20, false, func(key []byte) hash.Hash {
59 | return truncatingMAC{12, hmac.New(sha1.New, key)}
60 | }},
61 | }
62 |
--------------------------------------------------------------------------------
/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/net/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Go
2 |
3 | Go is an open source project.
4 |
5 | It is the work of hundreds of contributors. We appreciate your help!
6 |
7 |
8 | ## Filing issues
9 |
10 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:
11 |
12 | 1. What version of Go are you using (`go version`)?
13 | 2. What operating system and processor architecture are you using?
14 | 3. What did you do?
15 | 4. What did you expect to see?
16 | 5. What did you see instead?
17 |
18 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
19 | The gophers there will answer or ask you to file an issue if you've tripped over a bug.
20 |
21 | ## Contributing code
22 |
23 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
24 | before sending patches.
25 |
26 | **We do not accept GitHub pull requests**
27 | (we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review).
28 |
29 | Unless otherwise noted, the Go source files are distributed under
30 | the BSD-style license found in the LICENSE file.
31 |
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009 The Go Authors. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/README:
--------------------------------------------------------------------------------
1 | This repository holds supplementary Go networking libraries.
2 |
3 | To submit changes to this repository, see http://golang.org/doc/contribute.html.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/codereview.cfg:
--------------------------------------------------------------------------------
1 | issuerepo: golang/go
2 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/websocket/dial.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 websocket
6 |
7 | import (
8 | "crypto/tls"
9 | "net"
10 | )
11 |
12 | func dialWithDialer(dialer *net.Dialer, config *Config) (conn net.Conn, err error) {
13 | switch config.Location.Scheme {
14 | case "ws":
15 | conn, err = dialer.Dial("tcp", parseAuthority(config.Location))
16 |
17 | case "wss":
18 | conn, err = tls.DialWithDialer(dialer, "tcp", parseAuthority(config.Location), config.TlsConfig)
19 |
20 | default:
21 | err = ErrBadScheme
22 | }
23 | return
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sync/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009 The Go Authors. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sync/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Go
2 |
3 | Go is an open source project.
4 |
5 | It is the work of hundreds of contributors. We appreciate your help!
6 |
7 |
8 | ## Filing issues
9 |
10 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:
11 |
12 | 1. What version of Go are you using (`go version`)?
13 | 2. What operating system and processor architecture are you using?
14 | 3. What did you do?
15 | 4. What did you expect to see?
16 | 5. What did you see instead?
17 |
18 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
19 | The gophers there will answer or ask you to file an issue if you've tripped over a bug.
20 |
21 | ## Contributing code
22 |
23 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
24 | before sending patches.
25 |
26 | **We do not accept GitHub pull requests**
27 | (we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review).
28 |
29 | Unless otherwise noted, the Go source files are distributed under
30 | the BSD-style license found in the LICENSE file.
31 |
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009 The Go Authors. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/README:
--------------------------------------------------------------------------------
1 | This repository holds supplemental Go packages for low-level interactions with the operating system.
2 |
3 | To submit changes to this repository, see http://golang.org/doc/contribute.html.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/codereview.cfg:
--------------------------------------------------------------------------------
1 | issuerepo: golang/go
2 |
--------------------------------------------------------------------------------
/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_linux.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 by the Linux kernel and glibc.
7 | //
8 | // The information below is extracted and adapted from bits/sysmacros.h in the
9 | // glibc sources:
10 | //
11 | // dev_t in glibc is 64-bit, with 32-bit major and minor numbers. glibc's
12 | // default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of the major
13 | // number and m is a hex digit of the minor number. This is backward compatible
14 | // with legacy systems where dev_t is 16 bits wide, encoded as MMmm. It is also
15 | // backward compatible with the Linux kernel, which for some architectures uses
16 | // 32-bit dev_t, encoded as mmmM MMmm.
17 |
18 | package unix
19 |
20 | // Major returns the major component of a Linux device number.
21 | func Major(dev uint64) uint32 {
22 | major := uint32((dev & 0x00000000000fff00) >> 8)
23 | major |= uint32((dev & 0xfffff00000000000) >> 32)
24 | return major
25 | }
26 |
27 | // Minor returns the minor component of a Linux device number.
28 | func Minor(dev uint64) uint32 {
29 | minor := uint32((dev & 0x00000000000000ff) >> 0)
30 | minor |= uint32((dev & 0x00000ffffff00000) >> 12)
31 | return minor
32 | }
33 |
34 | // Mkdev returns a Linux device number generated from the given major and minor
35 | // components.
36 | func Mkdev(major, minor uint32) uint64 {
37 | dev := (uint64(major) & 0x00000fff) << 8
38 | dev |= (uint64(major) & 0xfffff000) << 32
39 | dev |= (uint64(minor) & 0x000000ff) << 0
40 | dev |= (uint64(minor) & 0xffffff00) << 12
41 | return dev
42 | }
43 |
--------------------------------------------------------------------------------
/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.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 unix
8 |
9 | import "syscall"
10 |
11 | // We can't use the gc-syntax .s files for gccgo. On the plus side
12 | // much of the functionality can be written directly in Go.
13 |
14 | //extern gccgoRealSyscall
15 | func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr)
16 |
17 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
18 | syscall.Entersyscall()
19 | r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
20 | syscall.Exitsyscall()
21 | return r, 0, syscall.Errno(errno)
22 | }
23 |
24 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
25 | syscall.Entersyscall()
26 | r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0)
27 | syscall.Exitsyscall()
28 | return r, 0, syscall.Errno(errno)
29 | }
30 |
31 | func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) {
32 | syscall.Entersyscall()
33 | r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9)
34 | syscall.Exitsyscall()
35 | return r, 0, syscall.Errno(errno)
36 | }
37 |
38 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
39 | r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
40 | return r, 0, syscall.Errno(errno)
41 | }
42 |
43 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
44 | r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0)
45 | return r, 0, syscall.Errno(errno)
46 | }
47 |
--------------------------------------------------------------------------------
/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 <){
30 | if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){
31 | my $num = $1;
32 | my $proto = $2;
33 | my $name = "SYS_$3";
34 | $name =~ y/a-z/A-Z/;
35 |
36 | # There are multiple entries for enosys and nosys, so comment them out.
37 | if($name =~ /^SYS_E?NOSYS$/){
38 | $name = "// $name";
39 | }
40 | if($name eq 'SYS_SYS_EXIT'){
41 | $name = 'SYS_EXIT';
42 | }
43 |
44 | print " $name = $num; // $proto\n";
45 | }
46 | }
47 |
48 | print <){
30 | if(/^([0-9]+)\s+\S+\s+STD\s+({ \S+\s+(\w+).*)$/){
31 | my $num = $1;
32 | my $proto = $2;
33 | my $name = "SYS_$3";
34 | $name =~ y/a-z/A-Z/;
35 |
36 | # There are multiple entries for enosys and nosys, so comment them out.
37 | if($name =~ /^SYS_E?NOSYS$/){
38 | $name = "// $name";
39 | }
40 | if($name eq 'SYS_SYS_EXIT'){
41 | $name = 'SYS_EXIT';
42 | }
43 |
44 | print " $name = $num; // $proto\n";
45 | }
46 | }
47 |
48 | print <){
31 | if($line =~ /^(.*)\\$/) {
32 | # Handle continuation
33 | $line = $1;
34 | $_ =~ s/^\s+//;
35 | $line .= $_;
36 | } else {
37 | # New line
38 | $line = $_;
39 | }
40 | next if $line =~ /\\$/;
41 | if($line =~ /^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$/) {
42 | my $num = $1;
43 | my $proto = $6;
44 | my $compat = $8;
45 | my $name = "$7_$9";
46 |
47 | $name = "$7_$11" if $11 ne '';
48 | $name =~ y/a-z/A-Z/;
49 |
50 | if($compat eq '' || $compat eq '13' || $compat eq '30' || $compat eq '50') {
51 | print " $name = $num; // $proto\n";
52 | }
53 | }
54 | }
55 |
56 | print <){
30 | if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){
31 | my $num = $1;
32 | my $proto = $3;
33 | my $name = $4;
34 | $name =~ y/a-z/A-Z/;
35 |
36 | # There are multiple entries for enosys and nosys, so comment them out.
37 | if($name =~ /^SYS_E?NOSYS$/){
38 | $name = "// $name";
39 | }
40 | if($name eq 'SYS_SYS_EXIT'){
41 | $name = 'SYS_EXIT';
42 | }
43 |
44 | print " $name = $num; // $proto\n";
45 | }
46 | }
47 |
48 | 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_darwin_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,darwin
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: int32(sec), Usec: int32(usec)}
20 | }
21 |
22 | //sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
23 | func Gettimeofday(tv *Timeval) (err error) {
24 | // The tv passed to gettimeofday must be non-nil
25 | // but is otherwise unused. The answers come back
26 | // in the two registers.
27 | sec, usec, err := gettimeofday(tv)
28 | tv.Sec = int32(sec)
29 | tv.Usec = int32(usec)
30 | return err
31 | }
32 |
33 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
34 | k.Ident = uint32(fd)
35 | k.Filter = int16(mode)
36 | k.Flags = uint16(flags)
37 | }
38 |
39 | func (iov *Iovec) SetLen(length int) {
40 | iov.Len = uint32(length)
41 | }
42 |
43 | func (msghdr *Msghdr) SetControllen(length int) {
44 | msghdr.Controllen = uint32(length)
45 | }
46 |
47 | func (cmsg *Cmsghdr) SetLen(length int) {
48 | cmsg.Len = uint32(length)
49 | }
50 |
51 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
52 | var length = uint64(count)
53 |
54 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0)
55 |
56 | written = int(length)
57 |
58 | if e1 != 0 {
59 | err = e1
60 | }
61 | return
62 | }
63 |
64 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
65 |
66 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
67 | // of darwin/386 the syscall is called sysctl instead of __sysctl.
68 | const SYS___SYSCTL = SYS_SYSCTL
69 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_darwin_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,darwin
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: nsec}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: int32(usec)}
20 | }
21 |
22 | //sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
23 | func Gettimeofday(tv *Timeval) (err error) {
24 | // The tv passed to gettimeofday must be non-nil
25 | // but is otherwise unused. The answers come back
26 | // in the two registers.
27 | sec, usec, err := gettimeofday(tv)
28 | tv.Sec = sec
29 | tv.Usec = usec
30 | return err
31 | }
32 |
33 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
34 | k.Ident = uint64(fd)
35 | k.Filter = int16(mode)
36 | k.Flags = uint16(flags)
37 | }
38 |
39 | func (iov *Iovec) SetLen(length int) {
40 | iov.Len = uint64(length)
41 | }
42 |
43 | func (msghdr *Msghdr) SetControllen(length int) {
44 | msghdr.Controllen = uint32(length)
45 | }
46 |
47 | func (cmsg *Cmsghdr) SetLen(length int) {
48 | cmsg.Len = uint32(length)
49 | }
50 |
51 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
52 | var length = uint64(count)
53 |
54 | _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0)
55 |
56 | written = int(length)
57 |
58 | if e1 != 0 {
59 | err = e1
60 | }
61 | return
62 | }
63 |
64 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
65 |
66 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
67 | // of darwin/amd64 the syscall is called sysctl instead of __sysctl.
68 | const SYS___SYSCTL = SYS_SYSCTL
69 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_darwin_arm.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 unix
6 |
7 | import (
8 | "syscall"
9 | "unsafe"
10 | )
11 |
12 | func setTimespec(sec, nsec int64) Timespec {
13 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
14 | }
15 |
16 | func setTimeval(sec, usec int64) Timeval {
17 | return Timeval{Sec: int32(sec), Usec: int32(usec)}
18 | }
19 |
20 | //sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
21 | func Gettimeofday(tv *Timeval) (err error) {
22 | // The tv passed to gettimeofday must be non-nil
23 | // but is otherwise unused. The answers come back
24 | // in the two registers.
25 | sec, usec, err := gettimeofday(tv)
26 | tv.Sec = int32(sec)
27 | tv.Usec = int32(usec)
28 | return err
29 | }
30 |
31 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
32 | k.Ident = uint32(fd)
33 | k.Filter = int16(mode)
34 | k.Flags = uint16(flags)
35 | }
36 |
37 | func (iov *Iovec) SetLen(length int) {
38 | iov.Len = uint32(length)
39 | }
40 |
41 | func (msghdr *Msghdr) SetControllen(length int) {
42 | msghdr.Controllen = uint32(length)
43 | }
44 |
45 | func (cmsg *Cmsghdr) SetLen(length int) {
46 | cmsg.Len = uint32(length)
47 | }
48 |
49 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
50 | var length = uint64(count)
51 |
52 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0)
53 |
54 | written = int(length)
55 |
56 | if e1 != 0 {
57 | err = e1
58 | }
59 | return
60 | }
61 |
62 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
63 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.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 arm64,darwin
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: nsec}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: int32(usec)}
20 | }
21 |
22 | //sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
23 | func Gettimeofday(tv *Timeval) (err error) {
24 | // The tv passed to gettimeofday must be non-nil
25 | // but is otherwise unused. The answers come back
26 | // in the two registers.
27 | sec, usec, err := gettimeofday(tv)
28 | tv.Sec = sec
29 | tv.Usec = usec
30 | return err
31 | }
32 |
33 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
34 | k.Ident = uint64(fd)
35 | k.Filter = int16(mode)
36 | k.Flags = uint16(flags)
37 | }
38 |
39 | func (iov *Iovec) SetLen(length int) {
40 | iov.Len = uint64(length)
41 | }
42 |
43 | func (msghdr *Msghdr) SetControllen(length int) {
44 | msghdr.Controllen = uint32(length)
45 | }
46 |
47 | func (cmsg *Cmsghdr) SetLen(length int) {
48 | cmsg.Len = uint32(length)
49 | }
50 |
51 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
52 | var length = uint64(count)
53 |
54 | _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0)
55 |
56 | written = int(length)
57 |
58 | if e1 != 0 {
59 | err = e1
60 | }
61 | return
62 | }
63 |
64 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
65 |
66 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
67 | // of darwin/arm64 the syscall is called sysctl instead of __sysctl.
68 | const SYS___SYSCTL = SYS_SYSCTL
69 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,dragonfly
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: nsec}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: usec}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint64(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint64(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_freebsd_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,freebsd
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: int32(sec), Usec: int32(usec)}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint32(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint32(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,freebsd
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: nsec}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: usec}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint64(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint64(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.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 arm,freebsd
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: int32(nsec)}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: int32(usec)}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint32(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint32(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,linux
6 | // +build !gccgo
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | //go:noescape
13 | func gettimeofday(tv *Timeval) (err syscall.Errno)
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_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_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 |
--------------------------------------------------------------------------------
/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/unix/zptracearm_linux.go:
--------------------------------------------------------------------------------
1 | // Code generated by linux/mkall.go generatePtracePair(arm, arm64). DO NOT EDIT.
2 |
3 | // +build linux
4 | // +build arm arm64
5 |
6 | package unix
7 |
8 | import "unsafe"
9 |
10 | // PtraceRegsArm is the registers used by arm binaries.
11 | type PtraceRegsArm struct {
12 | Uregs [18]uint32
13 | }
14 |
15 | // PtraceGetRegsArm fetches the registers used by arm binaries.
16 | func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error {
17 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
18 | }
19 |
20 | // PtraceSetRegsArm sets the registers used by arm binaries.
21 | func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error {
22 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
23 | }
24 |
25 | // PtraceRegsArm64 is the registers used by arm64 binaries.
26 | type PtraceRegsArm64 struct {
27 | Regs [31]uint64
28 | Sp uint64
29 | Pc uint64
30 | Pstate uint64
31 | }
32 |
33 | // PtraceGetRegsArm64 fetches the registers used by arm64 binaries.
34 | func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {
35 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
36 | }
37 |
38 | // PtraceSetRegsArm64 sets the registers used by arm64 binaries.
39 | func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
40 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zptracemips_linux.go:
--------------------------------------------------------------------------------
1 | // Code generated by linux/mkall.go generatePtracePair(mips, mips64). DO NOT EDIT.
2 |
3 | // +build linux
4 | // +build mips mips64
5 |
6 | package unix
7 |
8 | import "unsafe"
9 |
10 | // PtraceRegsMips is the registers used by mips binaries.
11 | type PtraceRegsMips struct {
12 | Regs [32]uint64
13 | Lo uint64
14 | Hi uint64
15 | Epc uint64
16 | Badvaddr uint64
17 | Status uint64
18 | Cause uint64
19 | }
20 |
21 | // PtraceGetRegsMips fetches the registers used by mips binaries.
22 | func PtraceGetRegsMips(pid int, regsout *PtraceRegsMips) error {
23 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
24 | }
25 |
26 | // PtraceSetRegsMips sets the registers used by mips binaries.
27 | func PtraceSetRegsMips(pid int, regs *PtraceRegsMips) error {
28 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
29 | }
30 |
31 | // PtraceRegsMips64 is the registers used by mips64 binaries.
32 | type PtraceRegsMips64 struct {
33 | Regs [32]uint64
34 | Lo uint64
35 | Hi uint64
36 | Epc uint64
37 | Badvaddr uint64
38 | Status uint64
39 | Cause uint64
40 | }
41 |
42 | // PtraceGetRegsMips64 fetches the registers used by mips64 binaries.
43 | func PtraceGetRegsMips64(pid int, regsout *PtraceRegsMips64) error {
44 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
45 | }
46 |
47 | // PtraceSetRegsMips64 sets the registers used by mips64 binaries.
48 | func PtraceSetRegsMips64(pid int, regs *PtraceRegsMips64) error {
49 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
50 | }
51 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zptracemipsle_linux.go:
--------------------------------------------------------------------------------
1 | // Code generated by linux/mkall.go generatePtracePair(mipsle, mips64le). DO NOT EDIT.
2 |
3 | // +build linux
4 | // +build mipsle mips64le
5 |
6 | package unix
7 |
8 | import "unsafe"
9 |
10 | // PtraceRegsMipsle is the registers used by mipsle binaries.
11 | type PtraceRegsMipsle struct {
12 | Regs [32]uint64
13 | Lo uint64
14 | Hi uint64
15 | Epc uint64
16 | Badvaddr uint64
17 | Status uint64
18 | Cause uint64
19 | }
20 |
21 | // PtraceGetRegsMipsle fetches the registers used by mipsle binaries.
22 | func PtraceGetRegsMipsle(pid int, regsout *PtraceRegsMipsle) error {
23 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
24 | }
25 |
26 | // PtraceSetRegsMipsle sets the registers used by mipsle binaries.
27 | func PtraceSetRegsMipsle(pid int, regs *PtraceRegsMipsle) error {
28 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
29 | }
30 |
31 | // PtraceRegsMips64le is the registers used by mips64le binaries.
32 | type PtraceRegsMips64le struct {
33 | Regs [32]uint64
34 | Lo uint64
35 | Hi uint64
36 | Epc uint64
37 | Badvaddr uint64
38 | Status uint64
39 | Cause uint64
40 | }
41 |
42 | // PtraceGetRegsMips64le fetches the registers used by mips64le binaries.
43 | func PtraceGetRegsMips64le(pid int, regsout *PtraceRegsMips64le) error {
44 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
45 | }
46 |
47 | // PtraceSetRegsMips64le sets the registers used by mips64le binaries.
48 | func PtraceSetRegsMips64le(pid int, regs *PtraceRegsMips64le) error {
49 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
50 | }
51 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Go
2 |
3 | Go is an open source project.
4 |
5 | It is the work of hundreds of contributors. We appreciate your help!
6 |
7 |
8 | ## Filing issues
9 |
10 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:
11 |
12 | 1. What version of Go are you using (`go version`)?
13 | 2. What operating system and processor architecture are you using?
14 | 3. What did you do?
15 | 4. What did you expect to see?
16 | 5. What did you see instead?
17 |
18 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
19 | The gophers there will answer or ask you to file an issue if you've tripped over a bug.
20 |
21 | ## Contributing code
22 |
23 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
24 | before sending patches.
25 |
26 | **We do not accept GitHub pull requests**
27 | (we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review).
28 |
29 | Unless otherwise noted, the Go source files are distributed under
30 | the BSD-style license found in the LICENSE file.
31 |
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009 The Go Authors. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/README:
--------------------------------------------------------------------------------
1 | This repository holds supplementary Go libraries for text processing, many involving Unicode.
2 |
3 | To submit changes to this repository, see http://golang.org/doc/contribute.html.
4 |
5 | To generate the tables in this repository (except for the encoding tables),
6 | run go generate from this directory. By default tables are generated for the
7 | Unicode version in core and the CLDR version defined in
8 | golang.org/x/text/unicode/cldr.
9 |
10 | Running go generate will as a side effect create a DATA subdirectory in this
11 | directory which holds all files that are used as a source for generating the
12 | tables. This directory will also serve as a cache.
13 |
14 | Run
15 |
16 | go test ./...
17 |
18 | from this directory to run all tests. Add the "-tags icu" flag to also run
19 | ICU conformance tests (if available). This requires that you have the correct
20 | ICU version installed on your system.
21 |
22 | TODO:
23 | - updating unversioned source files.
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/codereview.cfg:
--------------------------------------------------------------------------------
1 | issuerepo: golang/go
2 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/encoding/japanese/all.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 japanese
6 |
7 | import (
8 | "golang.org/x/text/encoding"
9 | )
10 |
11 | // All is a list of all defined encodings in this package.
12 | var All = []encoding.Encoding{EUCJP, ISO2022JP, ShiftJIS}
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/encoding/simplifiedchinese/all.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 simplifiedchinese
6 |
7 | import (
8 | "golang.org/x/text/encoding"
9 | )
10 |
11 | // All is a list of all defined encodings in this package.
12 | var All = []encoding.Encoding{GB18030, GBK, HZGB2312}
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/language/Makefile:
--------------------------------------------------------------------------------
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 | CLEANFILES+=maketables
6 |
7 | maketables: maketables.go
8 | go build $^
9 |
10 | tables: maketables
11 | ./maketables > tables.go
12 | gofmt -w -s tables.go
13 |
14 | # Build (but do not run) maketables during testing,
15 | # just to make sure it still compiles.
16 | testshort: maketables
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/language/common.go:
--------------------------------------------------------------------------------
1 | // This file was generated by go generate; DO NOT EDIT
2 |
3 | package language
4 |
5 | // This file contains code common to the maketables.go and the package code.
6 |
7 | // langAliasType is the type of an alias in langAliasMap.
8 | type langAliasType int8
9 |
10 | const (
11 | langDeprecated langAliasType = iota
12 | langMacro
13 | langLegacy
14 |
15 | langAliasTypeUnknown langAliasType = -1
16 | )
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/language/gen_common.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 ignore
6 |
7 | package main
8 |
9 | // This file contains code common to the maketables.go and the package code.
10 |
11 | // langAliasType is the type of an alias in langAliasMap.
12 | type langAliasType int8
13 |
14 | const (
15 | langDeprecated langAliasType = iota
16 | langMacro
17 | langLegacy
18 |
19 | langAliasTypeUnknown langAliasType = -1
20 | )
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/language/go1_1.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 !go1.2
6 |
7 | package language
8 |
9 | import "sort"
10 |
11 | func sortStable(s sort.Interface) {
12 | ss := stableSort{
13 | s: s,
14 | pos: make([]int, s.Len()),
15 | }
16 | for i := range ss.pos {
17 | ss.pos[i] = i
18 | }
19 | sort.Sort(&ss)
20 | }
21 |
22 | type stableSort struct {
23 | s sort.Interface
24 | pos []int
25 | }
26 |
27 | func (s *stableSort) Len() int {
28 | return len(s.pos)
29 | }
30 |
31 | func (s *stableSort) Less(i, j int) bool {
32 | return s.s.Less(i, j) || !s.s.Less(j, i) && s.pos[i] < s.pos[j]
33 | }
34 |
35 | func (s *stableSort) Swap(i, j int) {
36 | s.s.Swap(i, j)
37 | s.pos[i], s.pos[j] = s.pos[j], s.pos[i]
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/language/go1_2.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 go1.2
6 |
7 | package language
8 |
9 | import "sort"
10 |
11 | var sortStable = sort.Stable
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.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 go1.10
6 |
7 | package bidirule
8 |
9 | func (t *Transformer) isFinal() bool {
10 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.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 !go1.10
6 |
7 | package bidirule
8 |
9 | func (t *Transformer) isFinal() bool {
10 | if !t.isRTL() {
11 | return true
12 | }
13 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/unicode/bidi/trieval.go:
--------------------------------------------------------------------------------
1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
2 |
3 | package bidi
4 |
5 | // Class is the Unicode BiDi class. Each rune has a single class.
6 | type Class uint
7 |
8 | const (
9 | L Class = iota // LeftToRight
10 | R // RightToLeft
11 | EN // EuropeanNumber
12 | ES // EuropeanSeparator
13 | ET // EuropeanTerminator
14 | AN // ArabicNumber
15 | CS // CommonSeparator
16 | B // ParagraphSeparator
17 | S // SegmentSeparator
18 | WS // WhiteSpace
19 | ON // OtherNeutral
20 | BN // BoundaryNeutral
21 | NSM // NonspacingMark
22 | AL // ArabicLetter
23 | Control // Control LRO - PDI
24 |
25 | numClass
26 |
27 | LRO // LeftToRightOverride
28 | RLO // RightToLeftOverride
29 | LRE // LeftToRightEmbedding
30 | RLE // RightToLeftEmbedding
31 | PDF // PopDirectionalFormat
32 | LRI // LeftToRightIsolate
33 | RLI // RightToLeftIsolate
34 | FSI // FirstStrongIsolate
35 | PDI // PopDirectionalIsolate
36 |
37 | unknownClass = ^Class(0)
38 | )
39 |
40 | var controlToClass = map[rune]Class{
41 | 0x202D: LRO, // LeftToRightOverride,
42 | 0x202E: RLO, // RightToLeftOverride,
43 | 0x202A: LRE, // LeftToRightEmbedding,
44 | 0x202B: RLE, // RightToLeftEmbedding,
45 | 0x202C: PDF, // PopDirectionalFormat,
46 | 0x2066: LRI, // LeftToRightIsolate,
47 | 0x2067: RLI, // RightToLeftIsolate,
48 | 0x2068: FSI, // FirstStrongIsolate,
49 | 0x2069: PDI, // PopDirectionalIsolate,
50 | }
51 |
52 | // A trie entry has the following bits:
53 | // 7..5 XOR mask for brackets
54 | // 4 1: Bracket open, 0: Bracket close
55 | // 3..0 Class type
56 |
57 | const (
58 | openMask = 0x10
59 | xorMaskShift = 5
60 | )
61 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/unicode/norm/trie.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 norm
6 |
7 | type valueRange struct {
8 | value uint16 // header: value:stride
9 | lo, hi byte // header: lo:n
10 | }
11 |
12 | type sparseBlocks struct {
13 | values []valueRange
14 | offset []uint16
15 | }
16 |
17 | var nfcSparse = sparseBlocks{
18 | values: nfcSparseValues[:],
19 | offset: nfcSparseOffset[:],
20 | }
21 |
22 | var nfkcSparse = sparseBlocks{
23 | values: nfkcSparseValues[:],
24 | offset: nfkcSparseOffset[:],
25 | }
26 |
27 | var (
28 | nfcData = newNfcTrie(0)
29 | nfkcData = newNfkcTrie(0)
30 | )
31 |
32 | // lookupValue determines the type of block n and looks up the value for b.
33 | // For n < t.cutoff, the block is a simple lookup table. Otherwise, the block
34 | // is a list of ranges with an accompanying value. Given a matching range r,
35 | // the value for b is by r.value + (b - r.lo) * stride.
36 | func (t *sparseBlocks) lookup(n uint32, b byte) uint16 {
37 | offset := t.offset[n]
38 | header := t.values[offset]
39 | lo := offset + 1
40 | hi := lo + uint16(header.lo)
41 | for lo < hi {
42 | m := lo + (hi-lo)/2
43 | r := t.values[m]
44 | if r.lo <= b && b <= r.hi {
45 | return r.value + uint16(b-r.lo)*header.value
46 | }
47 | if b < r.lo {
48 | hi = m
49 | } else {
50 | lo = m + 1
51 | }
52 | }
53 | return 0
54 | }
55 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Go
2 |
3 | Go is an open source project.
4 |
5 | It is the work of hundreds of contributors. We appreciate your help!
6 |
7 |
8 | ## Filing issues
9 |
10 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:
11 |
12 | 1. What version of Go are you using (`go version`)?
13 | 2. What operating system and processor architecture are you using?
14 | 3. What did you do?
15 | 4. What did you expect to see?
16 | 5. What did you see instead?
17 |
18 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
19 | The gophers there will answer or ask you to file an issue if you've tripped over a bug.
20 |
21 | ## Contributing code
22 |
23 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
24 | before sending patches.
25 |
26 | **We do not accept GitHub pull requests**
27 | (we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review).
28 |
29 | Unless otherwise noted, the Go source files are distributed under
30 | the BSD-style license found in the LICENSE file.
31 |
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009 The Go Authors. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/README:
--------------------------------------------------------------------------------
1 | This subrepository holds the source for various packages and tools that support
2 | the Go programming language.
3 |
4 | Some of the tools, godoc and vet for example, are included in binary Go distributions.
5 | Others, including the Go guru and the test coverage tool, can be fetched with "go get".
6 |
7 | Packages include a type-checker for Go and an implementation of the
8 | Static Single Assignment form (SSA) representation for Go programs.
9 |
10 | To submit changes to this repository, see http://golang.org/doc/contribute.html.
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/codereview.cfg:
--------------------------------------------------------------------------------
1 | issuerepo: golang/go
2 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/go/ast/astutil/util.go:
--------------------------------------------------------------------------------
1 | package astutil
2 |
3 | import "go/ast"
4 |
5 | // Unparen returns e with any enclosing parentheses stripped.
6 | func Unparen(e ast.Expr) ast.Expr {
7 | for {
8 | p, ok := e.(*ast.ParenExpr)
9 | if !ok {
10 | return e
11 | }
12 | e = p.X
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/karalabe/cookiejar.v2/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014 Péter Szilágyi. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without modification,
4 | are permitted provided that the following conditions are met:
5 |
6 | * Redistributions of source code must retain the above copyright notice,
7 | this list of conditions and the following disclaimer.
8 | * Redistributions in binary form must reproduce the above copyright notice,
9 | this list of conditions and the following disclaimer in the documentation
10 | and/or other materials provided with the distribution.
11 |
12 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
13 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
14 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
15 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
16 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
17 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
21 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 |
23 | Alternatively, the CookieJar toolbox may be used in accordance with the terms
24 | and conditions contained in a signed written agreement between you and the
25 | author(s).
26 |
--------------------------------------------------------------------------------