├── .gitignore ├── CHANGELOG.md ├── CONTRIB.md ├── ISSUES.md ├── LICENSE ├── Makefile ├── README.md ├── befw ├── api.go ├── config.go ├── const.go ├── disaster.go ├── fw.go ├── fwiptables.go ├── fwiptables_test.go ├── fwnft.go ├── fwnft_test.go ├── fwnftc7.go ├── fwnftc7_test.go ├── legacy.go ├── legacy_test.go ├── nf.go ├── nids.go ├── nids_test.go ├── recovery.go ├── run.go ├── service.go ├── service_test.go ├── state.go ├── state_test.go ├── static.go ├── static_test.go ├── util.go ├── util_test.go └── watcher.go ├── cmd ├── befw-cli │ └── befw-cli.go ├── befw-deny │ └── befw-deny.go ├── befw-firewalld │ └── befw-firewalld.go └── befw-sync │ └── befw-sync.go ├── demo ├── README.md ├── befw.conf ├── befw.sync.conf ├── iptables.rules ├── puppetdb.sh ├── register.sh └── rules.json ├── denyapi ├── config.go ├── git.go ├── pgp.go └── run.go ├── go.mod ├── go.sum ├── logging └── logger.go ├── puppetdbsync ├── cleaner.go ├── puppetdb.go ├── puppetdbs_test.go ├── run.go ├── struct.go └── sync.go ├── samples ├── anonymous.acl ├── befw-firewalld.service ├── befw-sync.service ├── befw.conf ├── befw.rules.accept.json ├── befw.rules.reject.json ├── befw.sync.conf ├── iptables.rules ├── master.acl ├── node.acl ├── post.sh └── pusher.py └── vendor ├── github.com ├── armon │ └── go-metrics │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── const_unix.go │ │ ├── const_windows.go │ │ ├── inmem.go │ │ ├── inmem_endpoint.go │ │ ├── inmem_signal.go │ │ ├── metrics.go │ │ ├── sink.go │ │ ├── start.go │ │ ├── statsd.go │ │ └── statsite.go ├── chifflier │ └── nflog-go │ │ ├── COPYING │ │ └── nflog │ │ ├── nfl_cb.go │ │ └── nflog.go ├── emirpasic │ └── gods │ │ ├── LICENSE │ │ ├── containers │ │ ├── containers.go │ │ ├── enumerable.go │ │ ├── iterator.go │ │ └── serialization.go │ │ ├── lists │ │ ├── arraylist │ │ │ ├── arraylist.go │ │ │ ├── enumerable.go │ │ │ ├── iterator.go │ │ │ └── serialization.go │ │ └── lists.go │ │ ├── trees │ │ ├── binaryheap │ │ │ ├── binaryheap.go │ │ │ ├── iterator.go │ │ │ └── serialization.go │ │ └── trees.go │ │ └── utils │ │ ├── comparator.go │ │ ├── sort.go │ │ └── utils.go ├── google │ └── gopacket │ │ ├── .gitignore │ │ ├── .travis.gofmt.sh │ │ ├── .travis.golint.sh │ │ ├── .travis.govet.sh │ │ ├── .travis.install.sh │ │ ├── .travis.script.sh │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── base.go │ │ ├── decode.go │ │ ├── doc.go │ │ ├── flows.go │ │ ├── gc │ │ ├── go.mod │ │ ├── go.sum │ │ ├── layerclass.go │ │ ├── layers │ │ ├── .lint_blacklist │ │ ├── arp.go │ │ ├── base.go │ │ ├── bfd.go │ │ ├── cdp.go │ │ ├── ctp.go │ │ ├── dhcpv4.go │ │ ├── dhcpv6.go │ │ ├── dhcpv6_options.go │ │ ├── dns.go │ │ ├── doc.go │ │ ├── dot11.go │ │ ├── dot1q.go │ │ ├── eap.go │ │ ├── eapol.go │ │ ├── endpoints.go │ │ ├── enums.go │ │ ├── enums_generated.go │ │ ├── etherip.go │ │ ├── ethernet.go │ │ ├── fddi.go │ │ ├── gen_linted.sh │ │ ├── geneve.go │ │ ├── gre.go │ │ ├── gtp.go │ │ ├── iana_ports.go │ │ ├── icmp4.go │ │ ├── icmp6.go │ │ ├── icmp6msg.go │ │ ├── igmp.go │ │ ├── ip4.go │ │ ├── ip6.go │ │ ├── ipsec.go │ │ ├── layertypes.go │ │ ├── lcm.go │ │ ├── linux_sll.go │ │ ├── llc.go │ │ ├── lldp.go │ │ ├── loopback.go │ │ ├── mldv1.go │ │ ├── mldv2.go │ │ ├── modbustcp.go │ │ ├── mpls.go │ │ ├── ndp.go │ │ ├── ntp.go │ │ ├── ospf.go │ │ ├── pflog.go │ │ ├── ports.go │ │ ├── ppp.go │ │ ├── pppoe.go │ │ ├── prism.go │ │ ├── radiotap.go │ │ ├── rudp.go │ │ ├── sctp.go │ │ ├── sflow.go │ │ ├── sip.go │ │ ├── stp.go │ │ ├── tcp.go │ │ ├── tcpip.go │ │ ├── test_creator.py │ │ ├── tls.go │ │ ├── tls_alert.go │ │ ├── tls_appdata.go │ │ ├── tls_cipherspec.go │ │ ├── tls_handshake.go │ │ ├── udp.go │ │ ├── udplite.go │ │ ├── usb.go │ │ ├── vrrp.go │ │ └── vxlan.go │ │ ├── layertype.go │ │ ├── packet.go │ │ ├── parser.go │ │ ├── time.go │ │ └── writer.go ├── hashicorp │ ├── consul │ │ └── api │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── acl.go │ │ │ ├── agent.go │ │ │ ├── api.go │ │ │ ├── catalog.go │ │ │ ├── config_entry.go │ │ │ ├── config_entry_discoverychain.go │ │ │ ├── connect.go │ │ │ ├── connect_ca.go │ │ │ ├── connect_intention.go │ │ │ ├── coordinate.go │ │ │ ├── debug.go │ │ │ ├── discovery_chain.go │ │ │ ├── event.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── health.go │ │ │ ├── kv.go │ │ │ ├── lock.go │ │ │ ├── operator.go │ │ │ ├── operator_area.go │ │ │ ├── operator_autopilot.go │ │ │ ├── operator_keyring.go │ │ │ ├── operator_license.go │ │ │ ├── operator_raft.go │ │ │ ├── operator_segment.go │ │ │ ├── prepared_query.go │ │ │ ├── raw.go │ │ │ ├── semaphore.go │ │ │ ├── session.go │ │ │ ├── snapshot.go │ │ │ ├── status.go │ │ │ └── txn.go │ ├── go-cleanhttp │ │ ├── LICENSE │ │ ├── README.md │ │ ├── cleanhttp.go │ │ ├── doc.go │ │ ├── go.mod │ │ └── handlers.go │ ├── go-immutable-radix │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── edges.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── iradix.go │ │ ├── iter.go │ │ ├── node.go │ │ └── raw_iter.go │ ├── go-rootcerts │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── doc.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── rootcerts.go │ │ ├── rootcerts_base.go │ │ └── rootcerts_darwin.go │ ├── golang-lru │ │ ├── LICENSE │ │ └── simplelru │ │ │ ├── lru.go │ │ │ └── lru_interface.go │ └── serf │ │ ├── LICENSE │ │ └── coordinate │ │ ├── client.go │ │ ├── config.go │ │ ├── coordinate.go │ │ └── phantom.go ├── jbenet │ └── go-context │ │ ├── LICENSE │ │ └── io │ │ └── ctxio.go ├── kevinburke │ └── ssh_config │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── .mailmap │ │ ├── .travis.yml │ │ ├── AUTHORS.txt │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── config.go │ │ ├── lexer.go │ │ ├── parser.go │ │ ├── position.go │ │ ├── token.go │ │ └── validators.go ├── mitchellh │ ├── go-homedir │ │ ├── LICENSE │ │ ├── README.md │ │ ├── go.mod │ │ └── homedir.go │ └── mapstructure │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── decode_hooks.go │ │ ├── error.go │ │ ├── go.mod │ │ └── mapstructure.go ├── rjeczalik │ └── notify │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── debug.go │ │ ├── debug_debug.go │ │ ├── debug_nodebug.go │ │ ├── doc.go │ │ ├── event.go │ │ ├── event_fen.go │ │ ├── event_fsevents.go │ │ ├── event_inotify.go │ │ ├── event_kqueue.go │ │ ├── event_readdcw.go │ │ ├── event_stub.go │ │ ├── event_trigger.go │ │ ├── go.mod │ │ ├── node.go │ │ ├── notify.go │ │ ├── tree.go │ │ ├── tree_nonrecursive.go │ │ ├── tree_recursive.go │ │ ├── util.go │ │ ├── watcher.go │ │ ├── watcher_fen.go │ │ ├── watcher_fen_cgo.go │ │ ├── watcher_fsevents.go │ │ ├── watcher_fsevents_cgo.go │ │ ├── watcher_inotify.go │ │ ├── watcher_kqueue.go │ │ ├── watcher_notimplemented.go │ │ ├── watcher_readdcw.go │ │ ├── watcher_stub.go │ │ ├── watcher_trigger.go │ │ ├── watchpoint.go │ │ ├── watchpoint_other.go │ │ └── watchpoint_readdcw.go ├── sergi │ └── go-diff │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ └── diffmatchpatch │ │ ├── diff.go │ │ ├── diffmatchpatch.go │ │ ├── match.go │ │ ├── mathutil.go │ │ ├── patch.go │ │ └── stringutil.go ├── src-d │ └── gcfg │ │ ├── LICENSE │ │ ├── README │ │ ├── doc.go │ │ ├── errors.go │ │ ├── go1_0.go │ │ ├── go1_2.go │ │ ├── read.go │ │ ├── scanner │ │ ├── errors.go │ │ └── scanner.go │ │ ├── set.go │ │ ├── token │ │ ├── position.go │ │ ├── serialize.go │ │ └── token.go │ │ └── types │ │ ├── bool.go │ │ ├── doc.go │ │ ├── enum.go │ │ ├── int.go │ │ └── scan.go └── xanzy │ └── ssh-agent │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── go.mod │ ├── go.sum │ ├── pageant_windows.go │ ├── sshagent.go │ └── sshagent_windows.go ├── golang.org └── x │ ├── crypto │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── cast5 │ │ └── cast5.go │ ├── 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 │ │ ├── ed25519_go113.go │ │ └── internal │ │ │ └── edwards25519 │ │ │ ├── const.go │ │ │ └── edwards25519.go │ ├── internal │ │ ├── chacha20 │ │ │ ├── asm_arm64.s │ │ │ ├── asm_ppc64le.s │ │ │ ├── chacha_arm64.go │ │ │ ├── chacha_generic.go │ │ │ ├── chacha_noasm.go │ │ │ ├── chacha_ppc64le.go │ │ │ ├── chacha_s390x.go │ │ │ ├── chacha_s390x.s │ │ │ └── xor.go │ │ └── subtle │ │ │ ├── aliasing.go │ │ │ └── aliasing_appengine.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 │ ├── poly1305 │ │ ├── mac_noasm.go │ │ ├── poly1305.go │ │ ├── sum_amd64.go │ │ ├── sum_amd64.s │ │ ├── sum_arm.go │ │ ├── sum_arm.s │ │ ├── sum_generic.go │ │ ├── sum_noasm.go │ │ ├── sum_ppc64le.go │ │ ├── sum_ppc64le.s │ │ ├── sum_s390x.go │ │ ├── sum_s390x.s │ │ └── sum_vmsl_s390x.s │ └── ssh │ │ ├── agent │ │ ├── client.go │ │ ├── forward.go │ │ ├── keyring.go │ │ └── server.go │ │ ├── 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 │ │ ├── knownhosts │ │ └── knownhosts.go │ │ ├── mac.go │ │ ├── messages.go │ │ ├── mux.go │ │ ├── server.go │ │ ├── session.go │ │ ├── ssh_gss.go │ │ ├── streamlocal.go │ │ ├── tcpip.go │ │ └── transport.go │ ├── net │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── context │ │ ├── context.go │ │ ├── go17.go │ │ ├── go19.go │ │ ├── pre_go17.go │ │ └── pre_go19.go │ ├── html │ │ ├── atom │ │ │ ├── atom.go │ │ │ └── table.go │ │ ├── const.go │ │ ├── doc.go │ │ ├── doctype.go │ │ ├── entity.go │ │ ├── escape.go │ │ ├── foreign.go │ │ ├── node.go │ │ ├── parse.go │ │ ├── render.go │ │ └── token.go │ ├── internal │ │ └── socks │ │ │ ├── client.go │ │ │ └── socks.go │ └── proxy │ │ ├── dial.go │ │ ├── direct.go │ │ ├── per_host.go │ │ ├── proxy.go │ │ └── socks5.go │ └── sys │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── cpu │ ├── asm_aix_ppc64.s │ ├── byteorder.go │ ├── cpu.go │ ├── cpu_aix_ppc64.go │ ├── cpu_arm.go │ ├── cpu_gc_s390x.go │ ├── cpu_gc_x86.go │ ├── cpu_gccgo.c │ ├── cpu_gccgo.go │ ├── cpu_gccgo_s390x.go │ ├── cpu_linux.go │ ├── cpu_linux_arm64.go │ ├── cpu_linux_ppc64x.go │ ├── cpu_linux_s390x.go │ ├── cpu_mips64x.go │ ├── cpu_mipsx.go │ ├── cpu_other_arm64.go │ ├── cpu_s390x.s │ ├── cpu_wasm.go │ ├── cpu_x86.go │ ├── cpu_x86.s │ └── syscall_aix_ppc64_gc.go │ ├── unix │ ├── .gitignore │ ├── README.md │ ├── affinity_linux.go │ ├── aliases.go │ ├── asm_aix_ppc64.s │ ├── asm_darwin_386.s │ ├── asm_darwin_amd64.s │ ├── asm_darwin_arm.s │ ├── asm_darwin_arm64.s │ ├── asm_dragonfly_amd64.s │ ├── asm_freebsd_386.s │ ├── asm_freebsd_amd64.s │ ├── asm_freebsd_arm.s │ ├── asm_freebsd_arm64.s │ ├── asm_linux_386.s │ ├── asm_linux_amd64.s │ ├── asm_linux_arm.s │ ├── asm_linux_arm64.s │ ├── asm_linux_mips64x.s │ ├── asm_linux_mipsx.s │ ├── asm_linux_ppc64x.s │ ├── asm_linux_riscv64.s │ ├── asm_linux_s390x.s │ ├── asm_netbsd_386.s │ ├── asm_netbsd_amd64.s │ ├── asm_netbsd_arm.s │ ├── asm_netbsd_arm64.s │ ├── asm_openbsd_386.s │ ├── asm_openbsd_amd64.s │ ├── asm_openbsd_arm.s │ ├── asm_openbsd_arm64.s │ ├── asm_solaris_amd64.s │ ├── bluetooth_linux.go │ ├── cap_freebsd.go │ ├── constants.go │ ├── dev_aix_ppc.go │ ├── dev_aix_ppc64.go │ ├── dev_darwin.go │ ├── dev_dragonfly.go │ ├── dev_freebsd.go │ ├── dev_linux.go │ ├── dev_netbsd.go │ ├── dev_openbsd.go │ ├── dirent.go │ ├── endian_big.go │ ├── endian_little.go │ ├── env_unix.go │ ├── errors_freebsd_386.go │ ├── errors_freebsd_amd64.go │ ├── errors_freebsd_arm.go │ ├── fcntl.go │ ├── fcntl_darwin.go │ ├── fcntl_linux_32bit.go │ ├── gccgo.go │ ├── gccgo_c.c │ ├── gccgo_linux_amd64.go │ ├── ioctl.go │ ├── mkall.sh │ ├── mkerrors.sh │ ├── pagesize_unix.go │ ├── pledge_openbsd.go │ ├── race.go │ ├── race0.go │ ├── readdirent_getdents.go │ ├── readdirent_getdirentries.go │ ├── sockcmsg_linux.go │ ├── sockcmsg_unix.go │ ├── str.go │ ├── syscall.go │ ├── syscall_aix.go │ ├── syscall_aix_ppc.go │ ├── syscall_aix_ppc64.go │ ├── syscall_bsd.go │ ├── syscall_darwin.go │ ├── syscall_darwin_386.go │ ├── syscall_darwin_amd64.go │ ├── syscall_darwin_arm.go │ ├── syscall_darwin_arm64.go │ ├── syscall_darwin_libSystem.go │ ├── syscall_dragonfly.go │ ├── syscall_dragonfly_amd64.go │ ├── syscall_freebsd.go │ ├── syscall_freebsd_386.go │ ├── syscall_freebsd_amd64.go │ ├── syscall_freebsd_arm.go │ ├── syscall_freebsd_arm64.go │ ├── syscall_linux.go │ ├── syscall_linux_386.go │ ├── syscall_linux_amd64.go │ ├── syscall_linux_amd64_gc.go │ ├── syscall_linux_arm.go │ ├── syscall_linux_arm64.go │ ├── syscall_linux_gc.go │ ├── syscall_linux_gc_386.go │ ├── syscall_linux_gccgo_386.go │ ├── syscall_linux_gccgo_arm.go │ ├── syscall_linux_mips64x.go │ ├── syscall_linux_mipsx.go │ ├── syscall_linux_ppc64x.go │ ├── syscall_linux_riscv64.go │ ├── syscall_linux_s390x.go │ ├── syscall_linux_sparc64.go │ ├── syscall_netbsd.go │ ├── syscall_netbsd_386.go │ ├── syscall_netbsd_amd64.go │ ├── syscall_netbsd_arm.go │ ├── syscall_netbsd_arm64.go │ ├── syscall_openbsd.go │ ├── syscall_openbsd_386.go │ ├── syscall_openbsd_amd64.go │ ├── syscall_openbsd_arm.go │ ├── syscall_openbsd_arm64.go │ ├── syscall_solaris.go │ ├── syscall_solaris_amd64.go │ ├── syscall_unix.go │ ├── syscall_unix_gc.go │ ├── syscall_unix_gc_ppc64x.go │ ├── timestruct.go │ ├── unveil_openbsd.go │ ├── xattr_bsd.go │ ├── zerrors_aix_ppc.go │ ├── zerrors_aix_ppc64.go │ ├── zerrors_darwin_386.go │ ├── zerrors_darwin_amd64.go │ ├── zerrors_darwin_arm.go │ ├── zerrors_darwin_arm64.go │ ├── zerrors_dragonfly_amd64.go │ ├── zerrors_freebsd_386.go │ ├── zerrors_freebsd_amd64.go │ ├── zerrors_freebsd_arm.go │ ├── zerrors_freebsd_arm64.go │ ├── zerrors_linux_386.go │ ├── zerrors_linux_amd64.go │ ├── zerrors_linux_arm.go │ ├── zerrors_linux_arm64.go │ ├── zerrors_linux_mips.go │ ├── zerrors_linux_mips64.go │ ├── zerrors_linux_mips64le.go │ ├── zerrors_linux_mipsle.go │ ├── zerrors_linux_ppc64.go │ ├── zerrors_linux_ppc64le.go │ ├── zerrors_linux_riscv64.go │ ├── zerrors_linux_s390x.go │ ├── zerrors_linux_sparc64.go │ ├── zerrors_netbsd_386.go │ ├── zerrors_netbsd_amd64.go │ ├── zerrors_netbsd_arm.go │ ├── zerrors_netbsd_arm64.go │ ├── zerrors_openbsd_386.go │ ├── zerrors_openbsd_amd64.go │ ├── zerrors_openbsd_arm.go │ ├── zerrors_openbsd_arm64.go │ ├── zerrors_solaris_amd64.go │ ├── zptrace386_linux.go │ ├── zptracearm_linux.go │ ├── zptracemips_linux.go │ ├── zptracemipsle_linux.go │ ├── zsyscall_aix_ppc.go │ ├── zsyscall_aix_ppc64.go │ ├── zsyscall_aix_ppc64_gc.go │ ├── zsyscall_aix_ppc64_gccgo.go │ ├── zsyscall_darwin_386.1_11.go │ ├── zsyscall_darwin_386.go │ ├── zsyscall_darwin_386.s │ ├── zsyscall_darwin_amd64.1_11.go │ ├── zsyscall_darwin_amd64.go │ ├── zsyscall_darwin_amd64.s │ ├── zsyscall_darwin_arm.1_11.go │ ├── zsyscall_darwin_arm.go │ ├── zsyscall_darwin_arm.s │ ├── zsyscall_darwin_arm64.1_11.go │ ├── zsyscall_darwin_arm64.go │ ├── zsyscall_darwin_arm64.s │ ├── zsyscall_dragonfly_amd64.go │ ├── zsyscall_freebsd_386.go │ ├── zsyscall_freebsd_amd64.go │ ├── zsyscall_freebsd_arm.go │ ├── zsyscall_freebsd_arm64.go │ ├── zsyscall_linux_386.go │ ├── zsyscall_linux_amd64.go │ ├── zsyscall_linux_arm.go │ ├── zsyscall_linux_arm64.go │ ├── zsyscall_linux_mips.go │ ├── zsyscall_linux_mips64.go │ ├── zsyscall_linux_mips64le.go │ ├── zsyscall_linux_mipsle.go │ ├── zsyscall_linux_ppc64.go │ ├── zsyscall_linux_ppc64le.go │ ├── zsyscall_linux_riscv64.go │ ├── zsyscall_linux_s390x.go │ ├── zsyscall_linux_sparc64.go │ ├── zsyscall_netbsd_386.go │ ├── zsyscall_netbsd_amd64.go │ ├── zsyscall_netbsd_arm.go │ ├── zsyscall_netbsd_arm64.go │ ├── zsyscall_openbsd_386.go │ ├── zsyscall_openbsd_amd64.go │ ├── zsyscall_openbsd_arm.go │ ├── zsyscall_openbsd_arm64.go │ ├── zsyscall_solaris_amd64.go │ ├── zsysctl_openbsd_386.go │ ├── zsysctl_openbsd_amd64.go │ ├── zsysctl_openbsd_arm.go │ ├── zsysctl_openbsd_arm64.go │ ├── zsysnum_darwin_386.go │ ├── zsysnum_darwin_amd64.go │ ├── zsysnum_darwin_arm.go │ ├── zsysnum_darwin_arm64.go │ ├── zsysnum_dragonfly_amd64.go │ ├── zsysnum_freebsd_386.go │ ├── zsysnum_freebsd_amd64.go │ ├── zsysnum_freebsd_arm.go │ ├── zsysnum_freebsd_arm64.go │ ├── zsysnum_linux_386.go │ ├── zsysnum_linux_amd64.go │ ├── zsysnum_linux_arm.go │ ├── zsysnum_linux_arm64.go │ ├── zsysnum_linux_mips.go │ ├── zsysnum_linux_mips64.go │ ├── zsysnum_linux_mips64le.go │ ├── zsysnum_linux_mipsle.go │ ├── zsysnum_linux_ppc64.go │ ├── zsysnum_linux_ppc64le.go │ ├── zsysnum_linux_riscv64.go │ ├── zsysnum_linux_s390x.go │ ├── zsysnum_linux_sparc64.go │ ├── zsysnum_netbsd_386.go │ ├── zsysnum_netbsd_amd64.go │ ├── zsysnum_netbsd_arm.go │ ├── zsysnum_netbsd_arm64.go │ ├── zsysnum_openbsd_386.go │ ├── zsysnum_openbsd_amd64.go │ ├── zsysnum_openbsd_arm.go │ ├── zsysnum_openbsd_arm64.go │ ├── ztypes_aix_ppc.go │ ├── ztypes_aix_ppc64.go │ ├── ztypes_darwin_386.go │ ├── ztypes_darwin_amd64.go │ ├── ztypes_darwin_arm.go │ ├── ztypes_darwin_arm64.go │ ├── ztypes_dragonfly_amd64.go │ ├── ztypes_freebsd_386.go │ ├── ztypes_freebsd_amd64.go │ ├── ztypes_freebsd_arm.go │ ├── ztypes_freebsd_arm64.go │ ├── ztypes_linux_386.go │ ├── ztypes_linux_amd64.go │ ├── ztypes_linux_arm.go │ ├── ztypes_linux_arm64.go │ ├── ztypes_linux_mips.go │ ├── ztypes_linux_mips64.go │ ├── ztypes_linux_mips64le.go │ ├── ztypes_linux_mipsle.go │ ├── ztypes_linux_ppc64.go │ ├── ztypes_linux_ppc64le.go │ ├── ztypes_linux_riscv64.go │ ├── ztypes_linux_s390x.go │ ├── ztypes_linux_sparc64.go │ ├── ztypes_netbsd_386.go │ ├── ztypes_netbsd_amd64.go │ ├── ztypes_netbsd_arm.go │ ├── ztypes_netbsd_arm64.go │ ├── ztypes_openbsd_386.go │ ├── ztypes_openbsd_amd64.go │ ├── ztypes_openbsd_arm.go │ ├── ztypes_openbsd_arm64.go │ └── ztypes_solaris_amd64.go │ └── windows │ ├── aliases.go │ ├── asm_windows_386.s │ ├── asm_windows_amd64.s │ ├── asm_windows_arm.s │ ├── dll_windows.go │ ├── env_windows.go │ ├── eventlog.go │ ├── exec_windows.go │ ├── memory_windows.go │ ├── mkerrors.bash │ ├── mkknownfolderids.bash │ ├── 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 │ ├── types_windows_arm.go │ ├── zerrors_windows.go │ ├── zknownfolderids_windows.go │ └── zsyscall_windows.go ├── gopkg.in ├── src-d │ ├── go-billy.v4 │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── DCO │ │ ├── LICENSE │ │ ├── MAINTAINERS │ │ ├── Makefile │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── fs.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── helper │ │ │ ├── chroot │ │ │ │ └── chroot.go │ │ │ └── polyfill │ │ │ │ └── polyfill.go │ │ ├── osfs │ │ │ ├── os.go │ │ │ ├── os_posix.go │ │ │ └── os_windows.go │ │ └── util │ │ │ ├── glob.go │ │ │ └── util.go │ └── go-git.v4 │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CODE_OF_CONDUCT.md │ │ ├── COMPATIBILITY.md │ │ ├── CONTRIBUTING.md │ │ ├── DCO │ │ ├── LICENSE │ │ ├── MAINTAINERS │ │ ├── Makefile │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── blame.go │ │ ├── common.go │ │ ├── config │ │ ├── branch.go │ │ ├── config.go │ │ ├── modules.go │ │ └── refspec.go │ │ ├── doc.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── internal │ │ ├── revision │ │ │ ├── parser.go │ │ │ ├── scanner.go │ │ │ └── token.go │ │ └── url │ │ │ └── url.go │ │ ├── object_walker.go │ │ ├── options.go │ │ ├── plumbing │ │ ├── cache │ │ │ ├── buffer_lru.go │ │ │ ├── common.go │ │ │ └── object_lru.go │ │ ├── error.go │ │ ├── filemode │ │ │ └── filemode.go │ │ ├── format │ │ │ ├── config │ │ │ │ ├── common.go │ │ │ │ ├── decoder.go │ │ │ │ ├── doc.go │ │ │ │ ├── encoder.go │ │ │ │ ├── option.go │ │ │ │ └── section.go │ │ │ ├── diff │ │ │ │ ├── patch.go │ │ │ │ └── unified_encoder.go │ │ │ ├── gitignore │ │ │ │ ├── dir.go │ │ │ │ ├── doc.go │ │ │ │ ├── matcher.go │ │ │ │ └── pattern.go │ │ │ ├── idxfile │ │ │ │ ├── decoder.go │ │ │ │ ├── doc.go │ │ │ │ ├── encoder.go │ │ │ │ ├── idxfile.go │ │ │ │ └── writer.go │ │ │ ├── index │ │ │ │ ├── decoder.go │ │ │ │ ├── doc.go │ │ │ │ ├── encoder.go │ │ │ │ ├── index.go │ │ │ │ └── match.go │ │ │ ├── objfile │ │ │ │ ├── doc.go │ │ │ │ ├── reader.go │ │ │ │ └── writer.go │ │ │ ├── packfile │ │ │ │ ├── common.go │ │ │ │ ├── delta_index.go │ │ │ │ ├── delta_selector.go │ │ │ │ ├── diff_delta.go │ │ │ │ ├── doc.go │ │ │ │ ├── encoder.go │ │ │ │ ├── error.go │ │ │ │ ├── fsobject.go │ │ │ │ ├── object_pack.go │ │ │ │ ├── packfile.go │ │ │ │ ├── parser.go │ │ │ │ ├── patch_delta.go │ │ │ │ └── scanner.go │ │ │ └── pktline │ │ │ │ ├── encoder.go │ │ │ │ └── scanner.go │ │ ├── hash.go │ │ ├── memory.go │ │ ├── object.go │ │ ├── object │ │ │ ├── blob.go │ │ │ ├── change.go │ │ │ ├── change_adaptor.go │ │ │ ├── commit.go │ │ │ ├── commit_walker.go │ │ │ ├── commit_walker_bfs.go │ │ │ ├── commit_walker_bfs_filtered.go │ │ │ ├── commit_walker_ctime.go │ │ │ ├── commit_walker_file.go │ │ │ ├── common.go │ │ │ ├── difftree.go │ │ │ ├── file.go │ │ │ ├── merge_base.go │ │ │ ├── object.go │ │ │ ├── patch.go │ │ │ ├── tag.go │ │ │ ├── tree.go │ │ │ └── treenoder.go │ │ ├── protocol │ │ │ └── packp │ │ │ │ ├── advrefs.go │ │ │ │ ├── advrefs_decode.go │ │ │ │ ├── advrefs_encode.go │ │ │ │ ├── capability │ │ │ │ ├── capability.go │ │ │ │ └── list.go │ │ │ │ ├── common.go │ │ │ │ ├── doc.go │ │ │ │ ├── report_status.go │ │ │ │ ├── shallowupd.go │ │ │ │ ├── sideband │ │ │ │ ├── common.go │ │ │ │ ├── demux.go │ │ │ │ ├── doc.go │ │ │ │ └── muxer.go │ │ │ │ ├── srvresp.go │ │ │ │ ├── ulreq.go │ │ │ │ ├── ulreq_decode.go │ │ │ │ ├── ulreq_encode.go │ │ │ │ ├── updreq.go │ │ │ │ ├── updreq_decode.go │ │ │ │ ├── updreq_encode.go │ │ │ │ ├── uppackreq.go │ │ │ │ └── uppackresp.go │ │ ├── reference.go │ │ ├── revision.go │ │ ├── revlist │ │ │ └── revlist.go │ │ ├── storer │ │ │ ├── doc.go │ │ │ ├── index.go │ │ │ ├── object.go │ │ │ ├── reference.go │ │ │ ├── shallow.go │ │ │ └── storer.go │ │ └── transport │ │ │ ├── client │ │ │ └── client.go │ │ │ ├── common.go │ │ │ ├── file │ │ │ ├── client.go │ │ │ └── server.go │ │ │ ├── git │ │ │ └── common.go │ │ │ ├── http │ │ │ ├── common.go │ │ │ ├── receive_pack.go │ │ │ └── upload_pack.go │ │ │ ├── internal │ │ │ └── common │ │ │ │ ├── common.go │ │ │ │ └── server.go │ │ │ ├── server │ │ │ ├── loader.go │ │ │ └── server.go │ │ │ └── ssh │ │ │ ├── auth_method.go │ │ │ └── common.go │ │ ├── prune.go │ │ ├── references.go │ │ ├── remote.go │ │ ├── repository.go │ │ ├── status.go │ │ ├── storage │ │ ├── filesystem │ │ │ ├── config.go │ │ │ ├── deltaobject.go │ │ │ ├── dotgit │ │ │ │ ├── dotgit.go │ │ │ │ ├── dotgit_rewrite_packed_refs.go │ │ │ │ ├── dotgit_setref.go │ │ │ │ └── writers.go │ │ │ ├── index.go │ │ │ ├── module.go │ │ │ ├── object.go │ │ │ ├── reference.go │ │ │ ├── shallow.go │ │ │ └── storage.go │ │ ├── memory │ │ │ └── storage.go │ │ └── storer.go │ │ ├── submodule.go │ │ ├── utils │ │ ├── binary │ │ │ ├── read.go │ │ │ └── write.go │ │ ├── diff │ │ │ └── diff.go │ │ ├── ioutil │ │ │ └── common.go │ │ └── merkletrie │ │ │ ├── change.go │ │ │ ├── difftree.go │ │ │ ├── doc.go │ │ │ ├── doubleiter.go │ │ │ ├── filesystem │ │ │ └── node.go │ │ │ ├── index │ │ │ └── node.go │ │ │ ├── internal │ │ │ └── frame │ │ │ │ └── frame.go │ │ │ ├── iter.go │ │ │ └── noder │ │ │ ├── noder.go │ │ │ └── path.go │ │ ├── worktree.go │ │ ├── worktree_bsd.go │ │ ├── worktree_commit.go │ │ ├── worktree_linux.go │ │ ├── worktree_status.go │ │ ├── worktree_unix_other.go │ │ └── worktree_windows.go └── warnings.v0 │ ├── LICENSE │ ├── README │ └── warnings.go └── modules.txt /.gitignore: -------------------------------------------------------------------------------- 1 | *.conf 2 | befw-* 3 | -------------------------------------------------------------------------------- /CONTRIB.md: -------------------------------------------------------------------------------- 1 | # Contribution guide 2 | ###### It's quite simple, though. 3 | ## Purporses of commit 4 | 1. Your commit should provide some improvement for widely-used systems. 5 | 2. Any bugfix is ok 6 | 3. Integrations with ( any public software with > 10k users ) is ok 7 | 4. Support of nftables, pf, ipfw & other firewalling systems is ok 8 | 5. Integration with your specific business systems is not ok 9 | ## Code of conduct 10 | 1. Be tolerant to other's failure. Nobody is perfect. Me too. 11 | 2. Don't blame anyone. Nor in commit message nor in comments or code itself. 12 | 3. No PoC - no merge. Prepare yourself for questions. 13 | 4. Don't hesitate ask those questions too. 14 | ## Coding style 15 | 1. Use camelCase naming style. 16 | 2. Don't make methods & variables visible unless it's highly necessary. 17 | 3. Avoid using 3pc libraries for generic functions (collections, string parsing, etc). 18 | We don't want to become a hostages of those libraries once. 19 | 4. Prepare test, examples and documentation updates along with your code. 20 | We probably refuse to merge a code without single line of documentation on it. 21 | 5. Test as much as possible - firewall management fault can grave all your infrastructure in a moment. 22 | ## Something I forgot? 23 | Send me PR :) -------------------------------------------------------------------------------- /ISSUES.md: -------------------------------------------------------------------------------- 1 | ### ipset add 0.0.0.0/0 2 | [buggy since 2016](https://bugzilla.redhat.com/show_bug.cgi?id=1297092) so we split any 0/0 to 0/1 & 128/1, it's ok 3 | 4 | ### ipset name limit 5 | ipset name length is limited to 31 characters. 6 | 7 | ### Effects 8 | We have to reduce any service name to 31 characters length. 9 | 10 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | export GO111MODULE=on 2 | 3 | install: 4 | go install -mod=vendor ./cmd/befw-cli 5 | go install -mod=vendor ./cmd/befw-firewalld 6 | go install -mod=vendor ./cmd/befw-sync 7 | go install -mod=vendor ./cmd/befw-deny 8 | -------------------------------------------------------------------------------- /befw/fw.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2018-2023 Wargaming Group Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | package befw 17 | 18 | // General interface for firewall management. 19 | type firewall interface { 20 | Apply(*state) error 21 | KeepConsistent() error 22 | } 23 | 24 | // TODO: nftables support 25 | // EXAMPLE: 26 | // 27 | // type fwNftables { } 28 | // 29 | // func (nft fwNftables) Apply(s *state) error { /* Implement nft calls * / } 30 | // func (nft fwNftables) KeepConsistent() error { /* Implement nft calls * / } 31 | // 32 | -------------------------------------------------------------------------------- /befw/recovery.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2018-2023 Wargaming Group Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | package befw 17 | 18 | import ( 19 | "fmt" 20 | "os" 21 | ) 22 | 23 | func PanicRecovery() { 24 | if e := recover(); e != nil { 25 | var r string 26 | switch e.(type) { 27 | case error: 28 | r = e.(error).Error() 29 | case string: 30 | r = e.(string) 31 | default: 32 | r = fmt.Sprint(e) 33 | 34 | } 35 | fmt.Fprintf(os.Stderr, "FATAL ERROR: %s\n", r) 36 | } 37 | os.Exit(1) 38 | } 39 | -------------------------------------------------------------------------------- /cmd/befw-deny/befw-deny.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2018-2021 Wargaming Group Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | package main 17 | 18 | import ( 19 | "flag" 20 | "github.com/wgnet/befw/befw" 21 | "github.com/wgnet/befw/denyapi" 22 | "os" 23 | ) 24 | 25 | func main() { 26 | debug := flag.Bool("debug", false, "Run with debugging") 27 | config := flag.String("config", "/etc/befw.deny.conf", "Path to config file") 28 | flag.Parse() 29 | if *debug { 30 | os.Setenv("BEFW_DEBUG", "DEBUG") 31 | } else { 32 | defer befw.PanicRecovery() 33 | } 34 | denyapi.MakeConfig(*config) 35 | denyapi.Run() 36 | } 37 | -------------------------------------------------------------------------------- /cmd/befw-sync/befw-sync.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2018-2021 Wargaming Group Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | package main 17 | 18 | import ( 19 | "flag" 20 | "os" 21 | "time" 22 | 23 | "github.com/wgnet/befw/befw" 24 | "github.com/wgnet/befw/puppetdbsync" 25 | ) 26 | 27 | func main() { 28 | config := flag.String("config", "/etc/befw.sync.conf", "BEFW-SYNC config file") 29 | debug := flag.Bool("debug", false, "StartService with debug configuration") 30 | timeout := flag.Duration("timeout", 10*time.Second, "Timeout between puppetdb re-query") 31 | flag.Parse() 32 | if *debug { 33 | os.Setenv("BEFW_DEBUG", "DEBUG") 34 | } else { 35 | defer befw.PanicRecovery() 36 | } 37 | 38 | go func() { 39 | time.Sleep(24 * time.Hour) 40 | os.Exit(0) 41 | }() 42 | 43 | puppetdbsync.Run(*config, *timeout) 44 | } 45 | -------------------------------------------------------------------------------- /demo/README.md: -------------------------------------------------------------------------------- 1 | # BEFW DEMO 2 | ## What is this for 3 | This demo explains how befw stack works with some *real* data. It may help you to start using befw or teach you how it works from your first hand experience. 4 | ## What you will get 5 | A built-from-scratch model with one service, 3 clients, puppet <-> befw integration and so on. 6 | ## How to procees 7 | To proceed just take eight easy steps: 8 | 1. Build befw-firewalld and befw-sync 9 | 2. Install [consul](http://consul.io) on your Linux PC 10 | 3. Run `sudo iptables-restore < iptables.rules` 11 | 4. Run `consul agent -dev -datacenter=eu` 12 | 5. Run `sudo befw-firewalld -debug -config befw.conf` in separate console 13 | 6. Run `sh register.sh` and see how befw will proceed with ssh service 14 | 7. Run `sh puppetdb.sh` to create a fake puppetdb http server 15 | 8. Run `befw-sync -debug -config befw.sync.conf` and see how befw-sync will put data from puppetdb to consul and how befw will fire a trigger and alter its rules 16 | 17 | ## How to check result is valid 18 | On step 5 you'll get rules from rules.json 19 | On step 6 you'll get a rule about ssh ( port 22/tcp ) service 20 | On step 8 you'll get a ssh_tcp_22 ipset fullfilled with 3 *client* networks 21 | 22 | -------------------------------------------------------------------------------- /demo/befw.conf: -------------------------------------------------------------------------------- 1 | address=127.0.0.1:8500 2 | dc=eu 3 | nodename=server 4 | rules=rules.json 5 | services=services 6 | ipsets=ipsets 7 | consul_timeout_sec=300 8 | consulwatch_timeout_sec=600 9 | -------------------------------------------------------------------------------- /demo/befw.sync.conf: -------------------------------------------------------------------------------- 1 | url=http://localhost:8080 2 | verify=true 3 | address=127.0.0.1:8500 4 | dc=eu 5 | -------------------------------------------------------------------------------- /demo/iptables.rules: -------------------------------------------------------------------------------- 1 | # Generated by iptables-save v1.6.1 on Mon Sep 25 23:17:15 2017 2 | *filter 3 | :INPUT DROP [2:380] 4 | :FORWARD ACCEPT [0:0] 5 | :OUTPUT ACCEPT [36:5327] 6 | :BEFW - [0:0] 7 | -A INPUT -j BEFW 8 | -A INPUT -i lo -j ACCEPT 9 | -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT 10 | -A INPUT -i tun* -j ACCEPT 11 | COMMIT 12 | # Completed on Mon Sep 25 23:17:15 2017 13 | -------------------------------------------------------------------------------- /demo/puppetdb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | while true; do 3 | echo "HTTP/1.1 200 OK 4 | Content-Type: application/json 5 | 6 | [ 7 | { 8 | \"parameters\": { 9 | \"message\": \"ssh_tcp_22@10.0.0.0/8\" 10 | } 11 | }, { 12 | \"parameters\": { 13 | \"message\": \"ssh_tcp_22@172.16.0.0/12\" 14 | } 15 | }, { 16 | \"parameters\": { 17 | \"message\": \"ssh_tcp_22@192.168.0.0/16\" 18 | } 19 | } 20 | ] 21 | 22 | " | nc -c -l -p 8080 23 | done 24 | 25 | 26 | -------------------------------------------------------------------------------- /demo/register.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | curl -s -X PUT localhost:8500/v1/agent/service/register -H "Content-Type: application/json" -d @-<&2 6 | exit 1 7 | fi 8 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/.travis.golint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(dirname $0)" 4 | 5 | go get golang.org/x/lint/golint 6 | DIRS=". tcpassembly tcpassembly/tcpreader ip4defrag reassembly macs pcapgo pcap afpacket pfring routing defrag/lcmdefrag" 7 | # Add subdirectories here as we clean up golint on each. 8 | for subdir in $DIRS; do 9 | pushd $subdir 10 | if golint | 11 | grep -v CannotSetRFMon | # pcap exported error name 12 | grep -v DataLost | # tcpassembly/tcpreader exported error name 13 | grep .; then 14 | exit 1 15 | fi 16 | popd 17 | done 18 | 19 | pushd layers 20 | for file in *.go; do 21 | if cat .lint_blacklist | grep -q $file; then 22 | echo "Skipping lint of $file due to .lint_blacklist" 23 | elif golint $file | grep .; then 24 | echo "Lint error in file $file" 25 | exit 1 26 | fi 27 | done 28 | popd 29 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/.travis.govet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(dirname $0)" 4 | DIRS=". layers pcap pcapgo tcpassembly tcpassembly/tcpreader routing ip4defrag bytediff macs defrag/lcmdefrag" 5 | set -e 6 | for subdir in $DIRS; do 7 | pushd $subdir 8 | go vet 9 | popd 10 | done 11 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/.travis.install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ev 4 | 5 | go get github.com/google/gopacket 6 | go get github.com/google/gopacket/layers 7 | go get github.com/google/gopacket/tcpassembly 8 | go get github.com/google/gopacket/reassembly 9 | go get github.com/google/gopacket/pcapgo 10 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/.travis.script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ev 4 | 5 | go test github.com/google/gopacket 6 | go test github.com/google/gopacket/layers 7 | go test github.com/google/gopacket/tcpassembly 8 | go test github.com/google/gopacket/reassembly 9 | go test github.com/google/gopacket/pcapgo 10 | go test github.com/google/gopacket/pcap 11 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.11.x 4 | - 1.12.x 5 | - master 6 | 7 | addons: 8 | apt: 9 | packages: 10 | libpcap-dev 11 | 12 | # use modules except for older versions (see below) 13 | install: true 14 | 15 | env: 16 | - GO111MODULE=on 17 | 18 | script: ./.travis.script.sh 19 | 20 | matrix: 21 | fast_finish: true 22 | allow_failures: 23 | - go: master 24 | 25 | jobs: 26 | include: 27 | - go: 1.5.x 28 | install: ./.travis.install.sh 29 | - go: 1.6.x 30 | install: ./.travis.install.sh 31 | - go: 1.7.x 32 | install: ./.travis.install.sh 33 | - go: 1.8.x 34 | install: ./.travis.install.sh 35 | - go: 1.9.x 36 | install: ./.travis.install.sh 37 | - go: 1.10.x 38 | install: ./.travis.install.sh 39 | - os: osx 40 | go: 1.x 41 | - os: windows 42 | go: 1.x 43 | # winpcap does not work on travis ci - so install nmap to get libpcap 44 | before_install: choco install nmap 45 | - stage: style 46 | name: "fmt/vet/lint" 47 | go: 1.x 48 | script: 49 | - ./.travis.gofmt.sh 50 | - ./.travis.govet.sh 51 | - ./.travis.golint.sh 52 | 53 | stages: 54 | - style 55 | - test 56 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/README.md: -------------------------------------------------------------------------------- 1 | # GoPacket 2 | 3 | This library provides packet decoding capabilities for Go. 4 | See [godoc](https://godoc.org/github.com/google/gopacket) for more details. 5 | 6 | [![Build Status](https://travis-ci.org/google/gopacket.svg?branch=master)](https://travis-ci.org/google/gopacket) 7 | [![GoDoc](https://godoc.org/github.com/google/gopacket?status.svg)](https://godoc.org/github.com/google/gopacket) 8 | 9 | Minimum Go version required is 1.5 except for pcapgo/EthernetHandle, afpacket, and bsdbpf which need at least 1.7 due to x/sys/unix dependencies. 10 | 11 | Originally forked from the gopcap project written by Andreas 12 | Krennmair (http://github.com/akrennmair/gopcap). 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/google/gopacket 2 | 3 | go 1.12 4 | 5 | require ( 6 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 7 | golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/go.sum: -------------------------------------------------------------------------------- 1 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 2 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= 3 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 4 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 5 | golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 h1:1Fzlr8kkDLQwqMP8GxrhptBLqZG/EDpiATneiZHY998= 6 | golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 7 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 8 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/layers/.lint_blacklist: -------------------------------------------------------------------------------- 1 | dot11.go 2 | eap.go 3 | endpoints.go 4 | enums_generated.go 5 | enums.go 6 | ethernet.go 7 | geneve.go 8 | icmp4.go 9 | icmp6.go 10 | igmp.go 11 | ip4.go 12 | ip6.go 13 | layertypes.go 14 | linux_sll.go 15 | llc.go 16 | lldp.go 17 | mpls.go 18 | ndp.go 19 | ntp.go 20 | ospf.go 21 | pflog.go 22 | pppoe.go 23 | prism.go 24 | radiotap.go 25 | rudp.go 26 | sctp.go 27 | sflow.go 28 | tcp.go 29 | tcpip.go 30 | tls.go 31 | tls_alert.go 32 | tls_appdata.go 33 | tls_cipherspec.go 34 | tls_hanshake.go 35 | tls_test.go 36 | udp.go 37 | udplite.go 38 | usb.go 39 | vrrp.go 40 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/layers/fddi.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 Google, Inc. All rights reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the LICENSE file in the root of the source 5 | // tree. 6 | 7 | package layers 8 | 9 | import ( 10 | "github.com/google/gopacket" 11 | "net" 12 | ) 13 | 14 | // FDDI contains the header for FDDI frames. 15 | type FDDI struct { 16 | BaseLayer 17 | FrameControl FDDIFrameControl 18 | Priority uint8 19 | SrcMAC, DstMAC net.HardwareAddr 20 | } 21 | 22 | // LayerType returns LayerTypeFDDI. 23 | func (f *FDDI) LayerType() gopacket.LayerType { return LayerTypeFDDI } 24 | 25 | // LinkFlow returns a new flow of type EndpointMAC. 26 | func (f *FDDI) LinkFlow() gopacket.Flow { 27 | return gopacket.NewFlow(EndpointMAC, f.SrcMAC, f.DstMAC) 28 | } 29 | 30 | func decodeFDDI(data []byte, p gopacket.PacketBuilder) error { 31 | f := &FDDI{ 32 | FrameControl: FDDIFrameControl(data[0] & 0xF8), 33 | Priority: data[0] & 0x07, 34 | SrcMAC: net.HardwareAddr(data[1:7]), 35 | DstMAC: net.HardwareAddr(data[7:13]), 36 | BaseLayer: BaseLayer{data[:13], data[13:]}, 37 | } 38 | p.SetLinkLayer(f) 39 | p.AddLayer(f) 40 | return p.NextDecoder(f.FrameControl) 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/layers/gen_linted.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for i in *.go; do golint $i | grep -q . || echo $i; done > .linted 4 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/layers/stp.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google, Inc. All rights reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the LICENSE file in the root of the source 5 | // tree. 6 | 7 | package layers 8 | 9 | import ( 10 | "github.com/google/gopacket" 11 | ) 12 | 13 | // STP decode spanning tree protocol packets to transport BPDU (bridge protocol data unit) message. 14 | type STP struct { 15 | BaseLayer 16 | } 17 | 18 | // LayerType returns gopacket.LayerTypeSTP. 19 | func (s *STP) LayerType() gopacket.LayerType { return LayerTypeSTP } 20 | 21 | func decodeSTP(data []byte, p gopacket.PacketBuilder) error { 22 | stp := &STP{} 23 | stp.Contents = data[:] 24 | // TODO: parse the STP protocol into actual subfields. 25 | p.AddLayer(stp) 26 | return nil 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/layers/tls_appdata.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The GoPacket Authors. All rights reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the LICENSE file in the root of the source 5 | // tree. 6 | 7 | package layers 8 | 9 | import ( 10 | "errors" 11 | 12 | "github.com/google/gopacket" 13 | ) 14 | 15 | // TLSAppDataRecord contains all the information that each AppData Record types should have 16 | type TLSAppDataRecord struct { 17 | TLSRecordHeader 18 | Payload []byte 19 | } 20 | 21 | // DecodeFromBytes decodes the slice into the TLS struct. 22 | func (t *TLSAppDataRecord) decodeFromBytes(h TLSRecordHeader, data []byte, df gopacket.DecodeFeedback) error { 23 | // TLS Record Header 24 | t.ContentType = h.ContentType 25 | t.Version = h.Version 26 | t.Length = h.Length 27 | 28 | if len(data) != int(t.Length) { 29 | return errors.New("TLS Application Data length mismatch") 30 | } 31 | 32 | t.Payload = data 33 | return nil 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/layers/tls_handshake.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The GoPacket Authors. All rights reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the LICENSE file in the root of the source 5 | // tree. 6 | 7 | package layers 8 | 9 | import ( 10 | "github.com/google/gopacket" 11 | ) 12 | 13 | // TLSHandshakeRecord defines the structure of a Handshare Record 14 | type TLSHandshakeRecord struct { 15 | TLSRecordHeader 16 | } 17 | 18 | // DecodeFromBytes decodes the slice into the TLS struct. 19 | func (t *TLSHandshakeRecord) decodeFromBytes(h TLSRecordHeader, data []byte, df gopacket.DecodeFeedback) error { 20 | // TLS Record Header 21 | t.ContentType = h.ContentType 22 | t.Version = h.Version 23 | t.Length = h.Length 24 | 25 | // TODO 26 | 27 | return nil 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/consul/api/connect.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | // Connect can be used to work with endpoints related to Connect, the 4 | // feature for securely connecting services within Consul. 5 | type Connect struct { 6 | c *Client 7 | } 8 | 9 | // Connect returns a handle to the connect-related endpoints 10 | func (c *Client) Connect() *Connect { 11 | return &Connect{c} 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/consul/api/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/hashicorp/consul/api 2 | 3 | go 1.12 4 | 5 | replace github.com/hashicorp/consul/sdk => ../sdk 6 | 7 | require ( 8 | github.com/hashicorp/consul/sdk v0.3.0 9 | github.com/hashicorp/go-cleanhttp v0.5.1 10 | github.com/hashicorp/go-rootcerts v1.0.0 11 | github.com/hashicorp/go-uuid v1.0.1 12 | github.com/hashicorp/serf v0.8.2 13 | github.com/mitchellh/mapstructure v1.1.2 14 | github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c 15 | github.com/stretchr/testify v1.3.0 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/consul/api/operator.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | // Operator can be used to perform low-level operator tasks for Consul. 4 | type Operator struct { 5 | c *Client 6 | } 7 | 8 | // Operator returns a handle to the operator endpoints. 9 | func (c *Client) Operator() *Operator { 10 | return &Operator{c} 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/consul/api/operator_segment.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | // SegmentList returns all the available LAN segments. 4 | func (op *Operator) SegmentList(q *QueryOptions) ([]string, *QueryMeta, error) { 5 | var out []string 6 | qm, err := op.c.query("/v1/operator/segment", &out, q) 7 | if err != nil { 8 | return nil, nil, err 9 | } 10 | return out, qm, nil 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/consul/api/raw.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | // Raw can be used to do raw queries against custom endpoints 4 | type Raw struct { 5 | c *Client 6 | } 7 | 8 | // Raw returns a handle to query endpoints 9 | func (c *Client) Raw() *Raw { 10 | return &Raw{c} 11 | } 12 | 13 | // Query is used to do a GET request against an endpoint 14 | // and deserialize the response into an interface using 15 | // standard Consul conventions. 16 | func (raw *Raw) Query(endpoint string, out interface{}, q *QueryOptions) (*QueryMeta, error) { 17 | return raw.c.query(endpoint, out, q) 18 | } 19 | 20 | // Write is used to do a PUT request against an endpoint 21 | // and serialize/deserialized using the standard Consul conventions. 22 | func (raw *Raw) Write(endpoint string, in, out interface{}, q *WriteOptions) (*WriteMeta, error) { 23 | return raw.c.write(endpoint, in, out, q) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/consul/api/status.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | // Status can be used to query the Status endpoints 4 | type Status struct { 5 | c *Client 6 | } 7 | 8 | // Status returns a handle to the status endpoints 9 | func (c *Client) Status() *Status { 10 | return &Status{c} 11 | } 12 | 13 | // Leader is used to query for a known leader 14 | func (s *Status) Leader() (string, error) { 15 | r := s.c.newRequest("GET", "/v1/status/leader") 16 | _, resp, err := requireOK(s.c.doRequest(r)) 17 | if err != nil { 18 | return "", err 19 | } 20 | defer resp.Body.Close() 21 | 22 | var leader string 23 | if err := decodeBody(resp, &leader); err != nil { 24 | return "", err 25 | } 26 | return leader, nil 27 | } 28 | 29 | // Peers is used to query for a known raft peers 30 | func (s *Status) Peers() ([]string, error) { 31 | r := s.c.newRequest("GET", "/v1/status/peers") 32 | _, resp, err := requireOK(s.c.doRequest(r)) 33 | if err != nil { 34 | return nil, err 35 | } 36 | defer resp.Body.Close() 37 | 38 | var peers []string 39 | if err := decodeBody(resp, &peers); err != nil { 40 | return nil, err 41 | } 42 | return peers, nil 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-cleanhttp/doc.go: -------------------------------------------------------------------------------- 1 | // Package cleanhttp offers convenience utilities for acquiring "clean" 2 | // http.Transport and http.Client structs. 3 | // 4 | // Values set on http.DefaultClient and http.DefaultTransport affect all 5 | // callers. This can have detrimental effects, esepcially in TLS contexts, 6 | // where client or root certificates set to talk to multiple endpoints can end 7 | // up displacing each other, leading to hard-to-debug issues. This package 8 | // provides non-shared http.Client and http.Transport structs to ensure that 9 | // the configuration will not be overwritten by other parts of the application 10 | // or dependencies. 11 | // 12 | // The DefaultClient and DefaultTransport functions disable idle connections 13 | // and keepalives. Without ensuring that idle connections are closed before 14 | // garbage collection, short-term clients/transports can leak file descriptors, 15 | // eventually leading to "too many open files" errors. If you will be 16 | // connecting to the same hosts repeatedly from the same client, you can use 17 | // DefaultPooledClient to receive a client that has connection pooling 18 | // semantics similar to http.DefaultClient. 19 | // 20 | package cleanhttp 21 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-cleanhttp/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/hashicorp/go-cleanhttp 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-cleanhttp/handlers.go: -------------------------------------------------------------------------------- 1 | package cleanhttp 2 | 3 | import ( 4 | "net/http" 5 | "strings" 6 | "unicode" 7 | ) 8 | 9 | // HandlerInput provides input options to cleanhttp's handlers 10 | type HandlerInput struct { 11 | ErrStatus int 12 | } 13 | 14 | // PrintablePathCheckHandler is a middleware that ensures the request path 15 | // contains only printable runes. 16 | func PrintablePathCheckHandler(next http.Handler, input *HandlerInput) http.Handler { 17 | // Nil-check on input to make it optional 18 | if input == nil { 19 | input = &HandlerInput{ 20 | ErrStatus: http.StatusBadRequest, 21 | } 22 | } 23 | 24 | // Default to http.StatusBadRequest on error 25 | if input.ErrStatus == 0 { 26 | input.ErrStatus = http.StatusBadRequest 27 | } 28 | 29 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 30 | if r != nil { 31 | // Check URL path for non-printable characters 32 | idx := strings.IndexFunc(r.URL.Path, func(c rune) bool { 33 | return !unicode.IsPrint(c) 34 | }) 35 | 36 | if idx != -1 { 37 | w.WriteHeader(input.ErrStatus) 38 | return 39 | } 40 | 41 | if next != nil { 42 | next.ServeHTTP(w, r) 43 | } 44 | } 45 | 46 | return 47 | }) 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-immutable-radix/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-immutable-radix/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-immutable-radix/edges.go: -------------------------------------------------------------------------------- 1 | package iradix 2 | 3 | import "sort" 4 | 5 | type edges []edge 6 | 7 | func (e edges) Len() int { 8 | return len(e) 9 | } 10 | 11 | func (e edges) Less(i, j int) bool { 12 | return e[i].label < e[j].label 13 | } 14 | 15 | func (e edges) Swap(i, j int) { 16 | e[i], e[j] = e[j], e[i] 17 | } 18 | 19 | func (e edges) Sort() { 20 | sort.Sort(e) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-immutable-radix/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/hashicorp/go-immutable-radix 2 | 3 | require ( 4 | github.com/hashicorp/go-uuid v1.0.0 5 | github.com/hashicorp/golang-lru v0.5.0 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-immutable-radix/go.sum: -------------------------------------------------------------------------------- 1 | github.com/hashicorp/go-uuid v1.0.0 h1:RS8zrF7PhGwyNPOtxSClXXj9HA8feRnJzgnI1RJCSnM= 2 | github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= 3 | github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= 4 | github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 5 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-rootcerts/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: go 4 | 5 | go: 6 | - 1.6 7 | 8 | branches: 9 | only: 10 | - master 11 | 12 | script: make test 13 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-rootcerts/Makefile: -------------------------------------------------------------------------------- 1 | TEST?=./... 2 | 3 | test: 4 | go test $(TEST) $(TESTARGS) -timeout=3s -parallel=4 5 | go vet $(TEST) 6 | go test $(TEST) -race 7 | 8 | .PHONY: test 9 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-rootcerts/doc.go: -------------------------------------------------------------------------------- 1 | // Package rootcerts contains functions to aid in loading CA certificates for 2 | // TLS connections. 3 | // 4 | // In addition, its default behavior on Darwin works around an open issue [1] 5 | // in Go's crypto/x509 that prevents certicates from being loaded from the 6 | // System or Login keychains. 7 | // 8 | // [1] https://github.com/golang/go/issues/14514 9 | package rootcerts 10 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-rootcerts/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/hashicorp/go-rootcerts 2 | 3 | require github.com/mitchellh/go-homedir v1.0.0 4 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-rootcerts/go.sum: -------------------------------------------------------------------------------- 1 | github.com/mitchellh/go-homedir v1.0.0 h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnGC8aR0= 2 | github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 3 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-rootcerts/rootcerts_base.go: -------------------------------------------------------------------------------- 1 | // +build !darwin 2 | 3 | package rootcerts 4 | 5 | import "crypto/x509" 6 | 7 | // LoadSystemCAs does nothing on non-Darwin systems. We return nil so that 8 | // default behavior of standard TLS config libraries is triggered, which is to 9 | // load system certs. 10 | func LoadSystemCAs() (*x509.CertPool, error) { 11 | return nil, nil 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-rootcerts/rootcerts_darwin.go: -------------------------------------------------------------------------------- 1 | package rootcerts 2 | 3 | import ( 4 | "crypto/x509" 5 | "os/exec" 6 | "path" 7 | 8 | "github.com/mitchellh/go-homedir" 9 | ) 10 | 11 | // LoadSystemCAs has special behavior on Darwin systems to work around 12 | func LoadSystemCAs() (*x509.CertPool, error) { 13 | pool := x509.NewCertPool() 14 | 15 | for _, keychain := range certKeychains() { 16 | err := addCertsFromKeychain(pool, keychain) 17 | if err != nil { 18 | return nil, err 19 | } 20 | } 21 | 22 | return pool, nil 23 | } 24 | 25 | func addCertsFromKeychain(pool *x509.CertPool, keychain string) error { 26 | cmd := exec.Command("/usr/bin/security", "find-certificate", "-a", "-p", keychain) 27 | data, err := cmd.Output() 28 | if err != nil { 29 | return err 30 | } 31 | 32 | pool.AppendCertsFromPEM(data) 33 | 34 | return nil 35 | } 36 | 37 | func certKeychains() []string { 38 | keychains := []string{ 39 | "/System/Library/Keychains/SystemRootCertificates.keychain", 40 | "/Library/Keychains/System.keychain", 41 | } 42 | home, err := homedir.Dir() 43 | if err == nil { 44 | loginKeychain := path.Join(home, "Library", "Keychains", "login.keychain") 45 | keychains = append(keychains, loginKeychain) 46 | } 47 | return keychains 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go: -------------------------------------------------------------------------------- 1 | package simplelru 2 | 3 | // LRUCache is the interface for simple LRU cache. 4 | type LRUCache interface { 5 | // Adds a value to the cache, returns true if an eviction occurred and 6 | // updates the "recently used"-ness of the key. 7 | Add(key, value interface{}) bool 8 | 9 | // Returns key's value from the cache and 10 | // updates the "recently used"-ness of the key. #value, isFound 11 | Get(key interface{}) (value interface{}, ok bool) 12 | 13 | // Check if a key exsists in cache without updating the recent-ness. 14 | Contains(key interface{}) (ok bool) 15 | 16 | // Returns key's value without updating the "recently used"-ness of the key. 17 | Peek(key interface{}) (value interface{}, ok bool) 18 | 19 | // Removes a key from the cache. 20 | Remove(key interface{}) bool 21 | 22 | // Removes the oldest entry from cache. 23 | RemoveOldest() (interface{}, interface{}, bool) 24 | 25 | // Returns the oldest entry from the cache. #key, value, isFound 26 | GetOldest() (interface{}, interface{}, bool) 27 | 28 | // Returns a slice of the keys in the cache, from oldest to newest. 29 | Keys() []interface{} 30 | 31 | // Returns the number of items in the cache. 32 | Len() int 33 | 34 | // Clear all cache entries 35 | Purge() 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/jbenet/go-context/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Juan Batiz-Benet 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/kevinburke/ssh_config/.gitattributes: -------------------------------------------------------------------------------- 1 | testdata/dos-lines eol=crlf 2 | -------------------------------------------------------------------------------- /vendor/github.com/kevinburke/ssh_config/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wgnet/befw/e7f59776499ce44f159b42c027d0bb66c91199f4/vendor/github.com/kevinburke/ssh_config/.gitignore -------------------------------------------------------------------------------- /vendor/github.com/kevinburke/ssh_config/.mailmap: -------------------------------------------------------------------------------- 1 | Kevin Burke Kevin Burke 2 | -------------------------------------------------------------------------------- /vendor/github.com/kevinburke/ssh_config/.travis.yml: -------------------------------------------------------------------------------- 1 | go_import_path: github.com/kevinburke/ssh_config 2 | 3 | language: go 4 | 5 | go: 6 | - 1.11.x 7 | - 1.12.x 8 | - master 9 | 10 | before_script: 11 | - go get -u ./... 12 | 13 | script: 14 | - make race-test 15 | -------------------------------------------------------------------------------- /vendor/github.com/kevinburke/ssh_config/AUTHORS.txt: -------------------------------------------------------------------------------- 1 | Eugene Terentev 2 | Kevin Burke 3 | Mark Nevill 4 | Sergey Lukjanov 5 | Wayne Ashley Berry 6 | -------------------------------------------------------------------------------- /vendor/github.com/kevinburke/ssh_config/Makefile: -------------------------------------------------------------------------------- 1 | BUMP_VERSION := $(GOPATH)/bin/bump_version 2 | STATICCHECK := $(GOPATH)/bin/staticcheck 3 | WRITE_MAILMAP := $(GOPATH)/bin/write_mailmap 4 | 5 | $(STATICCHECK): 6 | go get honnef.co/go/tools/cmd/staticcheck 7 | 8 | lint: $(STATICCHECK) 9 | go vet ./... 10 | $(STATICCHECK) 11 | 12 | test: lint 13 | @# the timeout helps guard against infinite recursion 14 | go test -timeout=250ms ./... 15 | 16 | race-test: lint 17 | go test -timeout=500ms -race ./... 18 | 19 | $(BUMP_VERSION): 20 | go get -u github.com/kevinburke/bump_version 21 | 22 | release: test | $(BUMP_VERSION) 23 | $(BUMP_VERSION) minor config.go 24 | 25 | force: ; 26 | 27 | AUTHORS.txt: force | $(WRITE_MAILMAP) 28 | $(WRITE_MAILMAP) > AUTHORS.txt 29 | 30 | authors: AUTHORS.txt 31 | -------------------------------------------------------------------------------- /vendor/github.com/kevinburke/ssh_config/position.go: -------------------------------------------------------------------------------- 1 | package ssh_config 2 | 3 | import "fmt" 4 | 5 | // Position of a document element within a SSH document. 6 | // 7 | // Line and Col are both 1-indexed positions for the element's line number and 8 | // column number, respectively. Values of zero or less will cause Invalid(), 9 | // to return true. 10 | type Position struct { 11 | Line int // line within the document 12 | Col int // column within the line 13 | } 14 | 15 | // String representation of the position. 16 | // Displays 1-indexed line and column numbers. 17 | func (p Position) String() string { 18 | return fmt.Sprintf("(%d, %d)", p.Line, p.Col) 19 | } 20 | 21 | // Invalid returns whether or not the position is valid (i.e. with negative or 22 | // null values) 23 | func (p Position) Invalid() bool { 24 | return p.Line <= 0 || p.Col <= 0 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/kevinburke/ssh_config/token.go: -------------------------------------------------------------------------------- 1 | package ssh_config 2 | 3 | import "fmt" 4 | 5 | type token struct { 6 | Position 7 | typ tokenType 8 | val string 9 | } 10 | 11 | func (t token) String() string { 12 | switch t.typ { 13 | case tokenEOF: 14 | return "EOF" 15 | } 16 | return fmt.Sprintf("%q", t.val) 17 | } 18 | 19 | type tokenType int 20 | 21 | const ( 22 | eof = -(iota + 1) 23 | ) 24 | 25 | const ( 26 | tokenError tokenType = iota 27 | tokenEOF 28 | tokenEmptyLine 29 | tokenComment 30 | tokenKey 31 | tokenEquals 32 | tokenString 33 | ) 34 | 35 | func isSpace(r rune) bool { 36 | return r == ' ' || r == '\t' 37 | } 38 | 39 | func isKeyStartChar(r rune) bool { 40 | return !(isSpace(r) || r == '\r' || r == '\n' || r == eof) 41 | } 42 | 43 | // I'm not sure that this is correct 44 | func isKeyChar(r rune) bool { 45 | // Keys start with the first character that isn't whitespace or [ and end 46 | // with the last non-whitespace character before the equals sign. Keys 47 | // cannot contain a # character." 48 | return !(r == '\r' || r == '\n' || r == eof || r == '=') 49 | } 50 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/go-homedir/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Mitchell Hashimoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/go-homedir/README.md: -------------------------------------------------------------------------------- 1 | # go-homedir 2 | 3 | This is a Go library for detecting the user's home directory without 4 | the use of cgo, so the library can be used in cross-compilation environments. 5 | 6 | Usage is incredibly simple, just call `homedir.Dir()` to get the home directory 7 | for a user, and `homedir.Expand()` to expand the `~` in a path to the home 8 | directory. 9 | 10 | **Why not just use `os/user`?** The built-in `os/user` package requires 11 | cgo on Darwin systems. This means that any Go code that uses that package 12 | cannot cross compile. But 99% of the time the use for `os/user` is just to 13 | retrieve the home directory, which we can do for the current user without 14 | cgo. This library does that, enabling cross-compilation. 15 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/go-homedir/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/mitchellh/go-homedir 2 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.11.x" 5 | - tip 6 | 7 | script: 8 | - go test 9 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.1.2 2 | 3 | * Fix error when decode hook decodes interface implementation into interface 4 | type. [GH-140] 5 | 6 | ## 1.1.1 7 | 8 | * Fix panic that can happen in `decodePtr` 9 | 10 | ## 1.1.0 11 | 12 | * Added `StringToIPHookFunc` to convert `string` to `net.IP` and `net.IPNet` [GH-133] 13 | * Support struct to struct decoding [GH-137] 14 | * If source map value is nil, then destination map value is nil (instead of empty) 15 | * If source slice value is nil, then destination slice value is nil (instead of empty) 16 | * If source pointer is nil, then destination pointer is set to nil (instead of 17 | allocated zero value of type) 18 | 19 | ## 1.0.0 20 | 21 | * Initial tagged stable release. 22 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Mitchell Hashimoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/error.go: -------------------------------------------------------------------------------- 1 | package mapstructure 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | "sort" 7 | "strings" 8 | ) 9 | 10 | // Error implements the error interface and can represents multiple 11 | // errors that occur in the course of a single decode. 12 | type Error struct { 13 | Errors []string 14 | } 15 | 16 | func (e *Error) Error() string { 17 | points := make([]string, len(e.Errors)) 18 | for i, err := range e.Errors { 19 | points[i] = fmt.Sprintf("* %s", err) 20 | } 21 | 22 | sort.Strings(points) 23 | return fmt.Sprintf( 24 | "%d error(s) decoding:\n\n%s", 25 | len(e.Errors), strings.Join(points, "\n")) 26 | } 27 | 28 | // WrappedErrors implements the errwrap.Wrapper interface to make this 29 | // return value more useful with the errwrap and go-multierror libraries. 30 | func (e *Error) WrappedErrors() []error { 31 | if e == nil { 32 | return nil 33 | } 34 | 35 | result := make([]error, len(e.Errors)) 36 | for i, e := range e.Errors { 37 | result[i] = errors.New(e) 38 | } 39 | 40 | return result 41 | } 42 | 43 | func appendErrors(errors []string, err error) []string { 44 | switch e := err.(type) { 45 | case *Error: 46 | return append(errors, e.Errors...) 47 | default: 48 | return append(errors, e.Error()) 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/mitchellh/mapstructure 2 | -------------------------------------------------------------------------------- /vendor/github.com/rjeczalik/notify/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.10.x 5 | - tip 6 | 7 | os: 8 | - linux 9 | - osx 10 | 11 | matrix: 12 | include: 13 | - os: osx 14 | go: 1.7.5 15 | env: 16 | - GOFLAGS="-tags kqueue" 17 | allow_failures: 18 | - go: tip 19 | 20 | env: 21 | global: 22 | - GOBIN=$HOME/bin 23 | - PATH=$HOME/bin:$PATH 24 | 25 | install: 26 | - go get -t -v ./... 27 | 28 | script: 29 | - "(go version | grep -q 1.4) || go tool vet -all ." 30 | - go install $GOFLAGS ./... 31 | - go test -v -timeout 60s -race $GOFLAGS ./... 32 | -------------------------------------------------------------------------------- /vendor/github.com/rjeczalik/notify/AUTHORS: -------------------------------------------------------------------------------- 1 | # List of individuals who contributed to the Notify package. 2 | # 3 | # The up-to-date list of the authors one may obtain with: 4 | # 5 | # ~ $ git shortlog -es | cut -f2 | rev | uniq -f1 | rev 6 | # 7 | 8 | Pawel Blaszczyk 9 | Pawel Knap 10 | Rafal Jeczalik 11 | -------------------------------------------------------------------------------- /vendor/github.com/rjeczalik/notify/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2015 The Notify Authors 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/rjeczalik/notify/README.md: -------------------------------------------------------------------------------- 1 | notify [![GoDoc](https://godoc.org/github.com/rjeczalik/notify?status.svg)](https://godoc.org/github.com/rjeczalik/notify) [![Build Status](https://img.shields.io/travis/rjeczalik/notify/master.svg)](https://travis-ci.org/rjeczalik/notify "inotify + FSEvents + kqueue") [![Build status](https://img.shields.io/appveyor/ci/rjeczalik/notify-246.svg)](https://ci.appveyor.com/project/rjeczalik/notify-246 "ReadDirectoryChangesW") [![Coverage Status](https://img.shields.io/coveralls/rjeczalik/notify/master.svg)](https://coveralls.io/r/rjeczalik/notify?branch=master) 2 | ====== 3 | 4 | Filesystem event notification library on steroids. (under active development) 5 | 6 | *Documentation* 7 | 8 | [godoc.org/github.com/rjeczalik/notify](https://godoc.org/github.com/rjeczalik/notify) 9 | 10 | *Installation* 11 | 12 | ``` 13 | ~ $ go get -u github.com/rjeczalik/notify 14 | ``` 15 | 16 | *Projects using notify* 17 | 18 | - [github.com/rjeczalik/cmd/notify](https://godoc.org/github.com/rjeczalik/cmd/notify) 19 | - [github.com/cortesi/devd](https://github.com/cortesi/devd) 20 | - [github.com/cortesi/modd](https://github.com/cortesi/modd) 21 | - [github.com/syncthing/syncthing-inotify](https://github.com/syncthing/syncthing-inotify) 22 | - [github.com/OrlovEvgeny/TinyJPG](https://github.com/OrlovEvgeny/TinyJPG) 23 | -------------------------------------------------------------------------------- /vendor/github.com/rjeczalik/notify/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | 3 | os: Windows Server 2012 R2 4 | 5 | clone_folder: c:\projects\src\github.com\rjeczalik\notify 6 | 7 | environment: 8 | PATH: c:\projects\bin;%PATH% 9 | GOPATH: c:\projects 10 | NOTIFY_TIMEOUT: 10s 11 | GOVERSION: 1.10.3 12 | 13 | install: 14 | - rmdir c:\go /s /q 15 | - appveyor DownloadFile https://storage.googleapis.com/golang/go%GOVERSION%.windows-amd64.zip 16 | - 7z x go%GOVERSION%.windows-amd64.zip -y -oC:\ > NUL 17 | 18 | - cd %APPVEYOR_BUILD_FOLDER% 19 | - go version 20 | 21 | build_script: 22 | - go build ./... 23 | - go test -v -timeout 120s -race ./... 24 | 25 | test: off 26 | 27 | deploy: off 28 | -------------------------------------------------------------------------------- /vendor/github.com/rjeczalik/notify/debug_debug.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 The Notify Authors. All rights reserved. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | // +build debug 6 | 7 | package notify 8 | 9 | var debugTag = true 10 | -------------------------------------------------------------------------------- /vendor/github.com/rjeczalik/notify/debug_nodebug.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 The Notify Authors. All rights reserved. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | // +build !debug 6 | 7 | package notify 8 | 9 | var debugTag = false 10 | -------------------------------------------------------------------------------- /vendor/github.com/rjeczalik/notify/event_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2015 The Notify Authors. All rights reserved. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | // +build !darwin,!linux,!freebsd,!dragonfly,!netbsd,!openbsd,!windows 6 | // +build !kqueue,!solaris 7 | 8 | package notify 9 | 10 | // Platform independent event values. 11 | const ( 12 | osSpecificCreate Event = 1 << iota 13 | osSpecificRemove 14 | osSpecificWrite 15 | osSpecificRename 16 | // internal 17 | // recursive is used to distinguish recursive eventsets from non-recursive ones 18 | recursive 19 | // omit is used for dispatching internal events; only those events are sent 20 | // for which both the event and the watchpoint has omit in theirs event sets. 21 | omit 22 | ) 23 | 24 | var osestr = map[Event]string{} 25 | 26 | type event struct{} 27 | 28 | func (e *event) Event() (_ Event) { return } 29 | func (e *event) Path() (_ string) { return } 30 | func (e *event) Sys() (_ interface{}) { return } 31 | func (e *event) isDir() (_ bool, _ error) { return } 32 | -------------------------------------------------------------------------------- /vendor/github.com/rjeczalik/notify/event_trigger.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2015 The Notify Authors. All rights reserved. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | // +build darwin,kqueue dragonfly freebsd netbsd openbsd solaris 6 | 7 | package notify 8 | 9 | type event struct { 10 | p string 11 | e Event 12 | d bool 13 | pe interface{} 14 | } 15 | 16 | func (e *event) Event() Event { return e.e } 17 | 18 | func (e *event) Path() string { return e.p } 19 | 20 | func (e *event) Sys() interface{} { return e.pe } 21 | 22 | func (e *event) isDir() (bool, error) { return e.d, nil } 23 | -------------------------------------------------------------------------------- /vendor/github.com/rjeczalik/notify/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/rjeczalik/notify 2 | 3 | require golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7 4 | -------------------------------------------------------------------------------- /vendor/github.com/rjeczalik/notify/tree.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2015 The Notify Authors. All rights reserved. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | package notify 6 | 7 | const buffer = 128 8 | 9 | type tree interface { 10 | Watch(string, chan<- EventInfo, ...Event) error 11 | Stop(chan<- EventInfo) 12 | Close() error 13 | } 14 | 15 | func newTree() tree { 16 | c := make(chan EventInfo, buffer) 17 | w := newWatcher(c) 18 | if rw, ok := w.(recursiveWatcher); ok { 19 | return newRecursiveTree(rw, c) 20 | } 21 | return newNonrecursiveTree(w, c, make(chan EventInfo, buffer)) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/rjeczalik/notify/watcher_notimplemented.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 The Notify Authors. All rights reserved. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | // +build !darwin,!linux,!freebsd,!dragonfly,!netbsd,!openbsd,!windows 6 | // +build !kqueue,!solaris 7 | 8 | package notify 9 | 10 | import "errors" 11 | 12 | // newWatcher stub. 13 | func newWatcher(chan<- EventInfo) watcher { 14 | return watcherStub{errors.New("notify: not implemented")} 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/rjeczalik/notify/watcher_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018 The Notify Authors. All rights reserved. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | package notify 6 | 7 | type watcherStub struct{ error } 8 | 9 | // Following methods implement notify.watcher interface. 10 | func (s watcherStub) Watch(string, Event) error { return s } 11 | func (s watcherStub) Rewatch(string, Event, Event) error { return s } 12 | func (s watcherStub) Unwatch(string) (err error) { return s } 13 | func (s watcherStub) Close() error { return s } 14 | -------------------------------------------------------------------------------- /vendor/github.com/rjeczalik/notify/watchpoint_other.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2015 The Notify Authors. All rights reserved. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | // +build !windows 6 | 7 | package notify 8 | 9 | // eventmask uses ei to create a new event which contains internal flags used by 10 | // notify package logic. 11 | func eventmask(ei EventInfo, extra Event) Event { 12 | return ei.Event() | extra 13 | } 14 | 15 | // matches reports a match only when: 16 | // 17 | // - for user events, when event is present in the given set 18 | // - for internal events, when additionally both event and set have omit bit set 19 | // 20 | // Internal events must not be sent to user channels and vice versa. 21 | func matches(set, event Event) bool { 22 | return (set&omit)^(event&omit) == 0 && set&event == event 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/sergi/go-diff/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of go-diff 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 | Danny Yoo 12 | James Kolb 13 | Jonathan Amsterdam 14 | Markus Zimmermann 15 | Matt Kovars 16 | Örjan Persson 17 | Osman Masood 18 | Robert Carlsen 19 | Rory Flynn 20 | Sergi Mansilla 21 | Shatrugna Sadhu 22 | Shawn Smith 23 | Stas Maksimov 24 | Tor Arvid Lund 25 | Zac Bergquist 26 | -------------------------------------------------------------------------------- /vendor/github.com/sergi/go-diff/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This is the official list of people who can contribute 2 | # (and typically have contributed) code to the go-diff 3 | # repository. 4 | # 5 | # The AUTHORS file lists the copyright holders; this file 6 | # lists people. For example, ACME Inc. employees would be listed here 7 | # but not in AUTHORS, because ACME Inc. would hold the copyright. 8 | # 9 | # When adding J Random Contributor's name to this file, 10 | # either J's name or J's organization's name should be 11 | # added to the AUTHORS file. 12 | # 13 | # Names should be added to this file like so: 14 | # Name 15 | # 16 | # Please keep the list sorted. 17 | 18 | Danny Yoo 19 | James Kolb 20 | Jonathan Amsterdam 21 | Markus Zimmermann 22 | Matt Kovars 23 | Örjan Persson 24 | Osman Masood 25 | Robert Carlsen 26 | Rory Flynn 27 | Sergi Mansilla 28 | Shatrugna Sadhu 29 | Shawn Smith 30 | Stas Maksimov 31 | Tor Arvid Lund 32 | Zac Bergquist 33 | -------------------------------------------------------------------------------- /vendor/github.com/sergi/go-diff/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2016 The go-diff Authors. All rights reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a 4 | copy of this software and associated documentation files (the "Software"), 5 | to deal in the Software without restriction, including without limitation 6 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the 8 | Software is furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included 11 | in all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | DEALINGS IN THE SOFTWARE. 20 | 21 | -------------------------------------------------------------------------------- /vendor/github.com/sergi/go-diff/diffmatchpatch/mathutil.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2016 The go-diff authors. All rights reserved. 2 | // https://github.com/sergi/go-diff 3 | // See the included LICENSE file for license details. 4 | // 5 | // go-diff is a Go implementation of Google's Diff, Match, and Patch library 6 | // Original library is Copyright (c) 2006 Google Inc. 7 | // http://code.google.com/p/google-diff-match-patch/ 8 | 9 | package diffmatchpatch 10 | 11 | func min(x, y int) int { 12 | if x < y { 13 | return x 14 | } 15 | return y 16 | } 17 | 18 | func max(x, y int) int { 19 | if x > y { 20 | return x 21 | } 22 | return y 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/src-d/gcfg/README: -------------------------------------------------------------------------------- 1 | Gcfg reads INI-style configuration files into Go structs; 2 | supports user-defined types and subsections. 3 | 4 | Package docs: https://godoc.org/gopkg.in/gcfg.v1 5 | -------------------------------------------------------------------------------- /vendor/github.com/src-d/gcfg/errors.go: -------------------------------------------------------------------------------- 1 | package gcfg 2 | 3 | import ( 4 | "gopkg.in/warnings.v0" 5 | ) 6 | 7 | // FatalOnly filters the results of a Read*Into invocation and returns only 8 | // fatal errors. That is, errors (warnings) indicating data for unknown 9 | // sections / variables is ignored. Example invocation: 10 | // 11 | // err := gcfg.FatalOnly(gcfg.ReadFileInto(&cfg, configFile)) 12 | // if err != nil { 13 | // ... 14 | // 15 | func FatalOnly(err error) error { 16 | return warnings.FatalOnly(err) 17 | } 18 | 19 | func isFatal(err error) bool { 20 | _, ok := err.(extraData) 21 | return !ok 22 | } 23 | 24 | type extraData struct { 25 | section string 26 | subsection *string 27 | variable *string 28 | } 29 | 30 | func (e extraData) Error() string { 31 | s := "can't store data at section \"" + e.section + "\"" 32 | if e.subsection != nil { 33 | s += ", subsection \"" + *e.subsection + "\"" 34 | } 35 | if e.variable != nil { 36 | s += ", variable \"" + *e.variable + "\"" 37 | } 38 | return s 39 | } 40 | 41 | var _ error = extraData{} 42 | -------------------------------------------------------------------------------- /vendor/github.com/src-d/gcfg/go1_0.go: -------------------------------------------------------------------------------- 1 | // +build !go1.2 2 | 3 | package gcfg 4 | 5 | type textUnmarshaler interface { 6 | UnmarshalText(text []byte) error 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/src-d/gcfg/go1_2.go: -------------------------------------------------------------------------------- 1 | // +build go1.2 2 | 3 | package gcfg 4 | 5 | import ( 6 | "encoding" 7 | ) 8 | 9 | type textUnmarshaler encoding.TextUnmarshaler 10 | -------------------------------------------------------------------------------- /vendor/github.com/src-d/gcfg/types/bool.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // BoolValues defines the name and value mappings for ParseBool. 4 | var BoolValues = map[string]interface{}{ 5 | "true": true, "yes": true, "on": true, "1": true, 6 | "false": false, "no": false, "off": false, "0": false, 7 | } 8 | 9 | var boolParser = func() *EnumParser { 10 | ep := &EnumParser{} 11 | ep.AddVals(BoolValues) 12 | return ep 13 | }() 14 | 15 | // ParseBool parses bool values according to the definitions in BoolValues. 16 | // Parsing is case-insensitive. 17 | func ParseBool(s string) (bool, error) { 18 | v, err := boolParser.Parse(s) 19 | if err != nil { 20 | return false, err 21 | } 22 | return v.(bool), nil 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/src-d/gcfg/types/doc.go: -------------------------------------------------------------------------------- 1 | // Package types defines helpers for type conversions. 2 | // 3 | // The API for this package is not finalized yet. 4 | package types 5 | -------------------------------------------------------------------------------- /vendor/github.com/src-d/gcfg/types/enum.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | "fmt" 5 | "reflect" 6 | "strings" 7 | ) 8 | 9 | // EnumParser parses "enum" values; i.e. a predefined set of strings to 10 | // predefined values. 11 | type EnumParser struct { 12 | Type string // type name; if not set, use type of first value added 13 | CaseMatch bool // if true, matching of strings is case-sensitive 14 | // PrefixMatch bool 15 | vals map[string]interface{} 16 | } 17 | 18 | // AddVals adds strings and values to an EnumParser. 19 | func (ep *EnumParser) AddVals(vals map[string]interface{}) { 20 | if ep.vals == nil { 21 | ep.vals = make(map[string]interface{}) 22 | } 23 | for k, v := range vals { 24 | if ep.Type == "" { 25 | ep.Type = reflect.TypeOf(v).Name() 26 | } 27 | if !ep.CaseMatch { 28 | k = strings.ToLower(k) 29 | } 30 | ep.vals[k] = v 31 | } 32 | } 33 | 34 | // Parse parses the string and returns the value or an error. 35 | func (ep EnumParser) Parse(s string) (interface{}, error) { 36 | if !ep.CaseMatch { 37 | s = strings.ToLower(s) 38 | } 39 | v, ok := ep.vals[s] 40 | if !ok { 41 | return false, fmt.Errorf("failed to parse %s %#q", ep.Type, s) 42 | } 43 | return v, nil 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/src-d/gcfg/types/scan.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "reflect" 7 | ) 8 | 9 | // ScanFully uses fmt.Sscanf with verb to fully scan val into ptr. 10 | func ScanFully(ptr interface{}, val string, verb byte) error { 11 | t := reflect.ValueOf(ptr).Elem().Type() 12 | // attempt to read extra bytes to make sure the value is consumed 13 | var b []byte 14 | n, err := fmt.Sscanf(val, "%"+string(verb)+"%s", ptr, &b) 15 | switch { 16 | case n < 1 || n == 1 && err != io.EOF: 17 | return fmt.Errorf("failed to parse %q as %v: %v", val, t, err) 18 | case n > 1: 19 | return fmt.Errorf("failed to parse %q as %v: extra characters %q", val, t, string(b)) 20 | } 21 | // n == 1 && err == io.EOF 22 | return nil 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/xanzy/ssh-agent/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/xanzy/ssh-agent/README.md: -------------------------------------------------------------------------------- 1 | # ssh-agent 2 | 3 | Create a new [agent.Agent](https://godoc.org/golang.org/x/crypto/ssh/agent#Agent) on any type of OS (so including Windows) from any [Go](https://golang.org) application. 4 | 5 | ## Limitations 6 | 7 | When compiled for Windows, it will only support [Pageant](http://the.earth.li/~sgtatham/putty/0.66/htmldoc/Chapter9.html#pageant) as the SSH authentication agent. 8 | 9 | ## Credits 10 | 11 | Big thanks to [Давид Мзареулян (David Mzareulyan)](https://github.com/davidmz) for creating the [go-pageant](https://github.com/davidmz/go-pageant) package! 12 | 13 | ## Issues 14 | 15 | If you have an issue: report it on the [issue tracker](https://github.com/xanzy/ssh-agent/issues) 16 | 17 | ## Author 18 | 19 | Sander van Harmelen () 20 | 21 | ## License 22 | 23 | The files `pageant_windows.go` and `sshagent_windows.go` have their own license (see file headers). The rest of this package is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 24 | -------------------------------------------------------------------------------- /vendor/github.com/xanzy/ssh-agent/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/xanzy/ssh-agent 2 | 3 | require ( 4 | golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2 5 | golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0 // indirect 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/github.com/xanzy/ssh-agent/go.sum: -------------------------------------------------------------------------------- 1 | golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2 h1:NwxKRvbkH5MsNkvOtPZi3/3kmI8CAzs3mtv+GLQMkNo= 2 | golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 3 | golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0 h1:bzeyCHgoAyjZjAhvTpks+qM7sdlh4cCSitmXeCEO3B4= 4 | golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 5 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at https://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at https://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/const_amd64.h: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // This code was translated into a form compatible with 6a from the public 6 | // domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html 7 | 8 | #define REDMASK51 0x0007FFFFFFFFFFFF 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/const_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // This code was translated into a form compatible with 6a from the public 6 | // domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html 7 | 8 | // +build amd64,!gccgo,!appengine 9 | 10 | // These constants cannot be encoded in non-MOVQ immediates. 11 | // We access them directly from memory instead. 12 | 13 | DATA ·_121666_213(SB)/8, $996687872 14 | GLOBL ·_121666_213(SB), 8, $8 15 | 16 | DATA ·_2P0(SB)/8, $0xFFFFFFFFFFFDA 17 | GLOBL ·_2P0(SB), 8, $8 18 | 19 | DATA ·_2P1234(SB)/8, $0xFFFFFFFFFFFFE 20 | GLOBL ·_2P1234(SB), 8, $8 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/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/internal/chacha20/chacha_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.11 6 | // +build !gccgo 7 | 8 | package chacha20 9 | 10 | const ( 11 | haveAsm = true 12 | bufSize = 256 13 | ) 14 | 15 | //go:noescape 16 | func xorKeyStreamVX(dst, src []byte, key *[8]uint32, nonce *[3]uint32, counter *uint32) 17 | 18 | func (c *Cipher) xorKeyStreamAsm(dst, src []byte) { 19 | 20 | if len(src) >= bufSize { 21 | xorKeyStreamVX(dst, src, &c.key, &c.nonce, &c.counter) 22 | } 23 | 24 | if len(src)%bufSize != 0 { 25 | i := len(src) - len(src)%bufSize 26 | c.buf = [bufSize]byte{} 27 | copy(c.buf[:], src[i:]) 28 | xorKeyStreamVX(c.buf[:], c.buf[:], &c.key, &c.nonce, &c.counter) 29 | c.len = bufSize - copy(dst[i:], c.buf[:len(src)%bufSize]) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/internal/chacha20/chacha_noasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !ppc64le,!arm64,!s390x arm64,!go1.11 gccgo appengine 6 | 7 | package chacha20 8 | 9 | const ( 10 | bufSize = 64 11 | haveAsm = false 12 | ) 13 | 14 | func (*Cipher) xorKeyStreamAsm(dst, src []byte) { 15 | panic("not implemented") 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/internal/chacha20/chacha_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build s390x,!gccgo,!appengine 6 | 7 | package chacha20 8 | 9 | import ( 10 | "golang.org/x/sys/cpu" 11 | ) 12 | 13 | var haveAsm = cpu.S390X.HasVX 14 | 15 | const bufSize = 256 16 | 17 | // xorKeyStreamVX is an assembly implementation of XORKeyStream. It must only 18 | // be called when the vector facility is available. 19 | // Implementation in asm_s390x.s. 20 | //go:noescape 21 | func xorKeyStreamVX(dst, src []byte, key *[8]uint32, nonce *[3]uint32, counter *uint32, buf *[256]byte, len *int) 22 | 23 | func (c *Cipher) xorKeyStreamAsm(dst, src []byte) { 24 | xorKeyStreamVX(dst, src, &c.key, &c.nonce, &c.counter, &c.buf, &c.len) 25 | } 26 | 27 | // EXRL targets, DO NOT CALL! 28 | func mvcSrcToBuf() 29 | func mvcBufToDst() 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/poly1305/mac_noasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !amd64,!ppc64le gccgo appengine 6 | 7 | package poly1305 8 | 9 | type mac struct{ macGeneric } 10 | 11 | func newMAC(key *[32]byte) mac { return mac{newMACGeneric(key)} } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/poly1305/sum_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 | // +build arm,!gccgo,!appengine,!nacl 6 | 7 | package poly1305 8 | 9 | // This function is implemented in sum_arm.s 10 | //go:noescape 11 | func poly1305_auth_armv6(out *[16]byte, m *byte, mlen uint32, key *[32]byte) 12 | 13 | // Sum generates an authenticator for m using a one-time key and puts the 14 | // 16-byte result into out. Authenticating two different messages with the same 15 | // key allows an attacker to forge messages at will. 16 | func Sum(out *[16]byte, m []byte, key *[32]byte) { 17 | var mPtr *byte 18 | if len(m) > 0 { 19 | mPtr = &m[0] 20 | } 21 | poly1305_auth_armv6(out, mPtr, uint32(len(m)), key) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/poly1305/sum_noasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build s390x,!go1.11 !arm,!amd64,!s390x,!ppc64le gccgo appengine nacl 6 | 7 | package poly1305 8 | 9 | // Sum generates an authenticator for msg using a one-time key and puts the 10 | // 16-byte result into out. Authenticating two different messages with the same 11 | // key allows an attacker to forge messages at will. 12 | func Sum(out *[TagSize]byte, msg []byte, key *[32]byte) { 13 | h := newMAC(key) 14 | h.Write(msg) 15 | h.Sum(out) 16 | } 17 | -------------------------------------------------------------------------------- /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/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/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/context/go19.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.9 6 | 7 | package context 8 | 9 | import "context" // standard library's context, as of Go 1.7 10 | 11 | // A Context carries a deadline, a cancelation signal, and other values across 12 | // API boundaries. 13 | // 14 | // Context's methods may be called by multiple goroutines simultaneously. 15 | type Context = context.Context 16 | 17 | // A CancelFunc tells an operation to abandon its work. 18 | // A CancelFunc does not wait for the work to stop. 19 | // After the first call, subsequent calls to a CancelFunc do nothing. 20 | type CancelFunc = context.CancelFunc 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/proxy/direct.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 proxy 6 | 7 | import ( 8 | "context" 9 | "net" 10 | ) 11 | 12 | type direct struct{} 13 | 14 | // Direct implements Dialer by making network connections directly using net.Dial or net.DialContext. 15 | var Direct = direct{} 16 | 17 | var ( 18 | _ Dialer = Direct 19 | _ ContextDialer = Direct 20 | ) 21 | 22 | // Dial directly invokes net.Dial with the supplied parameters. 23 | func (direct) Dial(network, addr string) (net.Conn, error) { 24 | return net.Dial(network, addr) 25 | } 26 | 27 | // DialContext instantiates a net.Dialer and invokes its DialContext receiver with the supplied parameters. 28 | func (direct) DialContext(ctx context.Context, network, addr string) (net.Conn, error) { 29 | var d net.Dialer 30 | return d.DialContext(ctx, network, addr) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/proxy/socks5.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 proxy 6 | 7 | import ( 8 | "context" 9 | "net" 10 | 11 | "golang.org/x/net/internal/socks" 12 | ) 13 | 14 | // SOCKS5 returns a Dialer that makes SOCKSv5 connections to the given 15 | // address with an optional username and password. 16 | // See RFC 1928 and RFC 1929. 17 | func SOCKS5(network, address string, auth *Auth, forward Dialer) (Dialer, error) { 18 | d := socks.NewDialer(network, address) 19 | if forward != nil { 20 | if f, ok := forward.(ContextDialer); ok { 21 | d.ProxyDial = func(ctx context.Context, network string, address string) (net.Conn, error) { 22 | return f.DialContext(ctx, network, address) 23 | } 24 | } else { 25 | d.ProxyDial = func(ctx context.Context, network string, address string) (net.Conn, error) { 26 | return dialContext(ctx, forward, network, address) 27 | } 28 | } 29 | } 30 | if auth != nil { 31 | up := socks.UsernamePassword{ 32 | Username: auth.User, 33 | Password: auth.Password, 34 | } 35 | d.AuthMethods = []socks.AuthMethod{ 36 | socks.AuthMethodNotRequired, 37 | socks.AuthMethodUsernamePassword, 38 | } 39 | d.Authenticate = up.Authenticate 40 | } 41 | return d, nil 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/byteorder.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | import ( 8 | "encoding/binary" 9 | "runtime" 10 | ) 11 | 12 | // hostByteOrder returns binary.LittleEndian on little-endian machines and 13 | // binary.BigEndian on big-endian machines. 14 | func hostByteOrder() binary.ByteOrder { 15 | switch runtime.GOARCH { 16 | case "386", "amd64", "amd64p32", 17 | "arm", "arm64", 18 | "mipsle", "mips64le", "mips64p32le", 19 | "ppc64le", 20 | "riscv", "riscv64": 21 | return binary.LittleEndian 22 | case "armbe", "arm64be", 23 | "mips", "mips64", "mips64p32", 24 | "ppc", "ppc64", 25 | "s390", "s390x", 26 | "sparc", "sparc64": 27 | return binary.BigEndian 28 | } 29 | panic("unknown architecture") 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix,ppc64 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 128 10 | 11 | const ( 12 | // getsystemcfg constants 13 | _SC_IMPL = 2 14 | _IMPL_POWER8 = 0x10000 15 | _IMPL_POWER9 = 0x20000 16 | ) 17 | 18 | func init() { 19 | impl := getsystemcfg(_SC_IMPL) 20 | if impl&_IMPL_POWER8 != 0 { 21 | PPC64.IsPOWER8 = true 22 | } 23 | if impl&_IMPL_POWER9 != 0 { 24 | PPC64.IsPOWER9 = true 25 | } 26 | 27 | Initialized = true 28 | } 29 | 30 | func getsystemcfg(label int) (n uint64) { 31 | r0, _ := callgetsystemcfg(label) 32 | n = uint64(r0) 33 | return 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | const cacheLineSize = 32 8 | 9 | func doinit() {} 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | package cpu 8 | 9 | // haveAsmFunctions reports whether the other functions in this file can 10 | // be safely called. 11 | func haveAsmFunctions() bool { return true } 12 | 13 | // The following feature detection functions are defined in cpu_s390x.s. 14 | // They are likely to be expensive to call so the results should be cached. 15 | func stfle() facilityList 16 | func kmQuery() queryResult 17 | func kmcQuery() queryResult 18 | func kmctrQuery() queryResult 19 | func kmaQuery() queryResult 20 | func kimdQuery() queryResult 21 | func klmdQuery() queryResult 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_x86.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386 amd64 amd64p32 6 | // +build !gccgo 7 | 8 | package cpu 9 | 10 | // cpuid is implemented in cpu_x86.s for gc compiler 11 | // and in cpu_gccgo.c for gccgo. 12 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) 13 | 14 | // xgetbv with ecx = 0 is implemented in cpu_x86.s for gc compiler 15 | // and in cpu_gccgo.c for gccgo. 16 | func xgetbv() (eax, edx uint32) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gccgo.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386 amd64 amd64p32 6 | // +build gccgo 7 | 8 | package cpu 9 | 10 | //extern gccgoGetCpuidCount 11 | func gccgoGetCpuidCount(eaxArg, ecxArg uint32, eax, ebx, ecx, edx *uint32) 12 | 13 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) { 14 | var a, b, c, d uint32 15 | gccgoGetCpuidCount(eaxArg, ecxArg, &a, &b, &c, &d) 16 | return a, b, c, d 17 | } 18 | 19 | //extern gccgoXgetbv 20 | func gccgoXgetbv(eax, edx *uint32) 21 | 22 | func xgetbv() (eax, edx uint32) { 23 | var a, d uint32 24 | gccgoXgetbv(&a, &d) 25 | return a, d 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo 6 | 7 | package cpu 8 | 9 | // haveAsmFunctions reports whether the other functions in this file can 10 | // be safely called. 11 | func haveAsmFunctions() bool { return false } 12 | 13 | // TODO(mundaym): the following feature detection functions are currently 14 | // stubs. See https://golang.org/cl/162887 for how to fix this. 15 | // They are likely to be expensive to call so the results should be cached. 16 | func stfle() facilityList { panic("not implemented for gccgo") } 17 | func kmQuery() queryResult { panic("not implemented for gccgo") } 18 | func kmcQuery() queryResult { panic("not implemented for gccgo") } 19 | func kmctrQuery() queryResult { panic("not implemented for gccgo") } 20 | func kmaQuery() queryResult { panic("not implemented for gccgo") } 21 | func kimdQuery() queryResult { panic("not implemented for gccgo") } 22 | func klmdQuery() queryResult { panic("not implemented for gccgo") } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64 ppc64le 7 | 8 | package cpu 9 | 10 | const cacheLineSize = 128 11 | 12 | // HWCAP/HWCAP2 bits. These are exposed by the kernel. 13 | const ( 14 | // ISA Level 15 | _PPC_FEATURE2_ARCH_2_07 = 0x80000000 16 | _PPC_FEATURE2_ARCH_3_00 = 0x00800000 17 | 18 | // CPU features 19 | _PPC_FEATURE2_DARN = 0x00200000 20 | _PPC_FEATURE2_SCV = 0x00100000 21 | ) 22 | 23 | func doinit() { 24 | // HWCAP2 feature bits 25 | PPC64.IsPOWER8 = isSet(hwCap2, _PPC_FEATURE2_ARCH_2_07) 26 | PPC64.IsPOWER9 = isSet(hwCap2, _PPC_FEATURE2_ARCH_3_00) 27 | PPC64.HasDARN = isSet(hwCap2, _PPC_FEATURE2_DARN) 28 | PPC64.HasSCV = isSet(hwCap2, _PPC_FEATURE2_SCV) 29 | } 30 | 31 | func isSet(hwc uint, value uint) bool { 32 | return hwc&value != 0 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_mips64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build mips64 mips64le 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 32 10 | 11 | func doinit() {} 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_mipsx.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build mips mipsle 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 32 10 | 11 | func doinit() {} 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !linux,arm64 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 64 10 | 11 | func doinit() {} 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_wasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build wasm 6 | 7 | package cpu 8 | 9 | // We're compiling the cpu package for an unknown (software-abstracted) CPU. 10 | // Make CacheLinePad an empty struct and hope that the usual struct alignment 11 | // rules are good enough. 12 | 13 | const cacheLineSize = 0 14 | 15 | func doinit() {} 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_x86.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386 amd64 amd64p32 6 | // +build !gccgo 7 | 8 | #include "textflag.h" 9 | 10 | // func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) 11 | TEXT ·cpuid(SB), NOSPLIT, $0-24 12 | MOVL eaxArg+0(FP), AX 13 | MOVL ecxArg+4(FP), CX 14 | CPUID 15 | MOVL AX, eax+8(FP) 16 | MOVL BX, ebx+12(FP) 17 | MOVL CX, ecx+16(FP) 18 | MOVL DX, edx+20(FP) 19 | RET 20 | 21 | // func xgetbv() (eax, edx uint32) 22 | TEXT ·xgetbv(SB),NOSPLIT,$0-8 23 | MOVL $0, CX 24 | XGETBV 25 | MOVL AX, eax+0(FP) 26 | MOVL DX, edx+4(FP) 27 | RET 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Minimal copy of x/sys/unix so the cpu package can make a 6 | // system call on AIX without depending on x/sys/unix. 7 | // (See golang.org/issue/32102) 8 | 9 | // +build aix,ppc64 10 | // +build !gccgo 11 | 12 | package cpu 13 | 14 | import ( 15 | "syscall" 16 | "unsafe" 17 | ) 18 | 19 | //go:cgo_import_dynamic libc_getsystemcfg getsystemcfg "libc.a/shr_64.o" 20 | 21 | //go:linkname libc_getsystemcfg libc_getsystemcfg 22 | 23 | type syscallFunc uintptr 24 | 25 | var libc_getsystemcfg syscallFunc 26 | 27 | type errno = syscall.Errno 28 | 29 | // Implemented in runtime/syscall_aix.go. 30 | func rawSyscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err errno) 31 | func syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err errno) 32 | 33 | func callgetsystemcfg(label int) (r1 uintptr, e1 errno) { 34 | r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getsystemcfg)), 1, uintptr(label), 0, 0, 0, 0, 0) 35 | return 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build go1.9 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | type Signal = syscall.Signal 13 | type Errno = syscall.Errno 14 | type SysProcAttr = syscall.SysProcAttr 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm64,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for AMD64, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build arm64 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 21 | BL runtime·entersyscall(SB) 22 | MOVD a1+8(FP), R0 23 | MOVD a2+16(FP), R1 24 | MOVD a3+24(FP), R2 25 | MOVD $0, R3 26 | MOVD $0, R4 27 | MOVD $0, R5 28 | MOVD trap+0(FP), R8 // syscall entry 29 | SVC 30 | MOVD R0, r1+32(FP) // r1 31 | MOVD R1, r2+40(FP) // r2 32 | BL runtime·exitsyscall(SB) 33 | RET 34 | 35 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 36 | B syscall·RawSyscall(SB) 37 | 38 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 39 | B syscall·RawSyscall6(SB) 40 | 41 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 42 | MOVD a1+8(FP), R0 43 | MOVD a2+16(FP), R1 44 | MOVD a3+24(FP), R2 45 | MOVD $0, R3 46 | MOVD $0, R4 47 | MOVD $0, R5 48 | MOVD trap+0(FP), R8 // syscall entry 49 | SVC 50 | MOVD R0, r1+32(FP) 51 | MOVD R1, r2+40(FP) 52 | RET 53 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64 ppc64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for ppc64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 19 | BL runtime·entersyscall(SB) 20 | MOVD a1+8(FP), R3 21 | MOVD a2+16(FP), R4 22 | MOVD a3+24(FP), R5 23 | MOVD R0, R6 24 | MOVD R0, R7 25 | MOVD R0, R8 26 | MOVD trap+0(FP), R9 // syscall entry 27 | SYSCALL R9 28 | MOVD R3, r1+32(FP) 29 | MOVD R4, r2+40(FP) 30 | BL runtime·exitsyscall(SB) 31 | RET 32 | 33 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 34 | MOVD a1+8(FP), R3 35 | MOVD a2+16(FP), R4 36 | MOVD a3+24(FP), R5 37 | MOVD R0, R6 38 | MOVD R0, R7 39 | MOVD R0, R8 40 | MOVD trap+0(FP), R9 // syscall entry 41 | SYSCALL R9 42 | MOVD R3, r1+32(FP) 43 | MOVD R4, r2+40(FP) 44 | RET 45 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_riscv64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build riscv64,!gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for linux/riscv64. 11 | // 12 | // Where available, just jump to package syscall's implementation of 13 | // these functions. 14 | 15 | TEXT ·Syscall(SB),NOSPLIT,$0-56 16 | JMP syscall·Syscall(SB) 17 | 18 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 19 | JMP syscall·Syscall6(SB) 20 | 21 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 22 | CALL runtime·entersyscall(SB) 23 | MOV a1+8(FP), A0 24 | MOV a2+16(FP), A1 25 | MOV a3+24(FP), A2 26 | MOV $0, A3 27 | MOV $0, A4 28 | MOV $0, A5 29 | MOV $0, A6 30 | MOV trap+0(FP), A7 // syscall entry 31 | ECALL 32 | MOV A0, r1+32(FP) // r1 33 | MOV A1, r2+40(FP) // r2 34 | CALL runtime·exitsyscall(SB) 35 | RET 36 | 37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 38 | JMP syscall·RawSyscall(SB) 39 | 40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 41 | JMP syscall·RawSyscall6(SB) 42 | 43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 44 | MOV a1+8(FP), A0 45 | MOV a2+16(FP), A1 46 | MOV a3+24(FP), A2 47 | MOV ZERO, A3 48 | MOV ZERO, A4 49 | MOV ZERO, A5 50 | MOV trap+0(FP), A7 // syscall entry 51 | ECALL 52 | MOV A0, r1+32(FP) 53 | MOV A1, r2+40(FP) 54 | RET 55 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for arm64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | ) 27 | 28 | // Socketoption Level 29 | const ( 30 | SOL_BLUETOOTH = 0x112 31 | SOL_HCI = 0x0 32 | SOL_L2CAP = 0x6 33 | SOL_RFCOMM = 0x12 34 | SOL_SCO = 0x11 35 | ) 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix 6 | // +build ppc 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used by AIX. 10 | 11 | package unix 12 | 13 | // Major returns the major component of a Linux device number. 14 | func Major(dev uint64) uint32 { 15 | return uint32((dev >> 16) & 0xffff) 16 | } 17 | 18 | // Minor returns the minor component of a Linux device number. 19 | func Minor(dev uint64) uint32 { 20 | return uint32(dev & 0xffff) 21 | } 22 | 23 | // Mkdev returns a Linux device number generated from the given major and minor 24 | // components. 25 | func Mkdev(major, minor uint32) uint64 { 26 | return uint64(((major) << 16) | (minor)) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix 6 | // +build ppc64 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used AIX. 10 | 11 | package unix 12 | 13 | // Major returns the major component of a Linux device number. 14 | func Major(dev uint64) uint32 { 15 | return uint32((dev & 0x3fffffff00000000) >> 32) 16 | } 17 | 18 | // Minor returns the minor component of a Linux device number. 19 | func Minor(dev uint64) uint32 { 20 | return uint32((dev & 0x00000000ffffffff) >> 0) 21 | } 22 | 23 | // Mkdev returns a Linux device number generated from the given major and minor 24 | // components. 25 | func Mkdev(major, minor uint32) uint64 { 26 | var DEVNO64 uint64 27 | DEVNO64 = 0x8000000000000000 28 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Dragonfly's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a DragonFlyBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a DragonFlyBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_freebsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in FreeBSD's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a FreeBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a FreeBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a FreeBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build ppc64 s390x mips mips64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le riscv64 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build dragonfly freebsd linux netbsd openbsd 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 12 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. 13 | var fcntl64Syscall uintptr = SYS_FCNTL 14 | 15 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 16 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 17 | valptr, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(arg)) 18 | var err error 19 | if errno != 0 { 20 | err = errno 21 | } 22 | return int(valptr), err 23 | } 24 | 25 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 26 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 27 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 28 | if errno == 0 { 29 | return nil 30 | } 31 | return errno 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 11 | return fcntl(int(fd), cmd, arg) 12 | } 13 | 14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) 17 | return err 18 | } 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm linux,mips linux,mipsle 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_c.c: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo 6 | // +build !aix 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #define _STRINGIFY2_(x) #x 13 | #define _STRINGIFY_(x) _STRINGIFY2_(x) 14 | #define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__) 15 | 16 | // Call syscall from C code because the gccgo support for calling from 17 | // Go to C does not support varargs functions. 18 | 19 | struct ret { 20 | uintptr_t r; 21 | uintptr_t err; 22 | }; 23 | 24 | struct ret 25 | gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) 26 | { 27 | struct ret r; 28 | 29 | errno = 0; 30 | r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); 31 | r.err = errno; 32 | return r; 33 | } 34 | 35 | uintptr_t 36 | gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) 37 | { 38 | return syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); 39 | } 40 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo,linux,amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ioctl.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | import "runtime" 10 | 11 | // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument. 12 | // 13 | // To change fd's window size, the req argument should be TIOCSWINSZ. 14 | func IoctlSetWinsize(fd int, req uint, value *Winsize) error { 15 | // TODO: if we get the chance, remove the req parameter and 16 | // hardcode TIOCSWINSZ. 17 | err := ioctlSetWinsize(fd, req, value) 18 | runtime.KeepAlive(value) 19 | return err 20 | } 21 | 22 | // IoctlSetTermios performs an ioctl on fd with a *Termios. 23 | // 24 | // The req value will usually be TCSETA or TIOCSETA. 25 | func IoctlSetTermios(fd int, req uint, value *Termios) error { 26 | // TODO: if we get the chance, remove the req parameter. 27 | err := ioctlSetTermios(fd, req, value) 28 | runtime.KeepAlive(value) 29 | return err 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,race linux,race freebsd,race 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix dragonfly freebsd linux netbsd openbsd 6 | 7 | package unix 8 | 9 | // ReadDirent reads directory entries from fd and writes them into buf. 10 | func ReadDirent(fd int, buf []byte) (n int, err error) { 11 | return Getdents(fd, buf) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdirentries.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // ReadDirent reads directory entries from fd and writes them into buf. 12 | func ReadDirent(fd int, buf []byte) (n int, err error) { 13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 15 | // actual system call is getdirentries64, 64 is a good guess. 16 | // TODO(rsc): Can we use a single global basep for all calls? 17 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 18 | return Getdirentries(fd, buf, base) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Socket control messages 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // UnixCredentials encodes credentials into a socket control message 12 | // for sending to another process. This can be used for 13 | // authentication. 14 | func UnixCredentials(ucred *Ucred) []byte { 15 | b := make([]byte, CmsgSpace(SizeofUcred)) 16 | h := (*Cmsghdr)(unsafe.Pointer(&b[0])) 17 | h.Level = SOL_SOCKET 18 | h.Type = SCM_CREDENTIALS 19 | h.SetLen(CmsgLen(SizeofUcred)) 20 | *((*Ucred)(cmsgData(h))) = *ucred 21 | return b 22 | } 23 | 24 | // ParseUnixCredentials decodes a socket control message that contains 25 | // credentials in a Ucred structure. To receive such a message, the 26 | // SO_PASSCRED option must be enabled on the socket. 27 | func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) { 28 | if m.Header.Level != SOL_SOCKET { 29 | return nil, EINVAL 30 | } 31 | if m.Header.Type != SCM_CREDENTIALS { 32 | return nil, EINVAL 33 | } 34 | ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0])) 35 | return &ucred, nil 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + uitoa(uint(-val)) 12 | } 13 | return uitoa(uint(val)) 14 | } 15 | 16 | func uitoa(val uint) string { 17 | var buf [32]byte // big enough for int64 18 | i := len(buf) - 1 19 | for val >= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,linux 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,!gccgo 6 | 7 | package unix 8 | 9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 11 | 12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 13 | // fail. 14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,!gccgo,386 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | 15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,gccgo,386 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | 22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 24 | return int(fd), err 25 | } 26 | 27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 29 | return int(fd), err 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,gccgo,arm 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm64,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/386 the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/arm the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm64,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (cmsg *Cmsghdr) SetLen(length int) { 22 | cmsg.Len = uint32(length) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build !gccgo,!ppc64le,!ppc64 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64le ppc64 7 | // +build !gccgo 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 14 | return syscall.Syscall(trap, a1, a2, a3) 15 | } 16 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 17 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) 18 | } 19 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 20 | return syscall.RawSyscall(trap, a1, a2, a3) 21 | } 22 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 23 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/unveil_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import ( 8 | "syscall" 9 | "unsafe" 10 | ) 11 | 12 | // Unveil implements the unveil syscall. 13 | // For more information see unveil(2). 14 | // Note that the special case of blocking further 15 | // unveil calls is handled by UnveilBlock. 16 | func Unveil(path string, flags string) error { 17 | pathPtr, err := syscall.BytePtrFromString(path) 18 | if err != nil { 19 | return err 20 | } 21 | flagsPtr, err := syscall.BytePtrFromString(flags) 22 | if err != nil { 23 | return err 24 | } 25 | _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(unsafe.Pointer(pathPtr)), uintptr(unsafe.Pointer(flagsPtr)), 0) 26 | if e != 0 { 27 | return e 28 | } 29 | return nil 30 | } 31 | 32 | // UnveilBlock blocks future unveil calls. 33 | // For more information see unveil(2). 34 | func UnveilBlock() error { 35 | // Both pointers must be nil. 36 | var pathUnsafe, flagsUnsafe unsafe.Pointer 37 | _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(pathUnsafe), uintptr(flagsUnsafe), 0) 38 | if e != 0 { 39 | return e 40 | } 41 | return nil 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | // +build go1.9 7 | 8 | package windows 9 | 10 | import "syscall" 11 | 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 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-16 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-12 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-24 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | TEXT ·getprocaddress(SB),NOSPLIT,$0 8 | B syscall·getprocaddress(SB) 9 | 10 | TEXT ·loadlibrary(SB),NOSPLIT,$0 11 | B syscall·loadlibrary(SB) 12 | -------------------------------------------------------------------------------- /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 | // +build generate 6 | 7 | package windows 8 | 9 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go 10 | -------------------------------------------------------------------------------- /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/sys/windows/types_windows_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | 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/gopkg.in/src-d/go-billy.v4/.gitignore: -------------------------------------------------------------------------------- 1 | /coverage.txt 2 | /vendor 3 | Gopkg.lock 4 | Gopkg.toml 5 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-billy.v4/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.9.x 5 | - 1.10.x 6 | 7 | go_import_path: gopkg.in/src-d/go-billy.v4 8 | 9 | install: 10 | - go get -v -t ./... 11 | 12 | script: 13 | - make test-coverage 14 | - ./.ci/test-building-binaries-for-supported-os.sh 15 | 16 | after_success: 17 | - bash <(curl -s https://codecov.io/bash) 18 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-billy.v4/DCO: -------------------------------------------------------------------------------- 1 | Developer's Certificate of Origin 1.1 2 | 3 | By making a contribution to this project, I certify that: 4 | 5 | (a) The contribution was created in whole or in part by me and I 6 | have the right to submit it under the open source license 7 | indicated in the file; or 8 | 9 | (b) The contribution is based upon previous work that, to the best 10 | of my knowledge, is covered under an appropriate open source 11 | license and I have the right under that license to submit that 12 | work with modifications, whether created in whole or in part 13 | by me, under the same open source license (unless I am 14 | permitted to submit under a different license), as indicated 15 | in the file; or 16 | 17 | (c) The contribution was provided directly to me by some other 18 | person who certified (a), (b) or (c) and I have not modified 19 | it. 20 | 21 | (d) I understand and agree that this project and the contribution 22 | are public and that a record of the contribution (including all 23 | personal information I submit with it, including my sign-off) is 24 | maintained indefinitely and may be redistributed consistent with 25 | this project or the open source license(s) involved. 26 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-billy.v4/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Máximo Cuadros (@mcuadros) 2 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-billy.v4/Makefile: -------------------------------------------------------------------------------- 1 | # General 2 | WORKDIR = $(PWD) 3 | 4 | # Go parameters 5 | GOCMD = go 6 | GOTEST = $(GOCMD) test -v 7 | 8 | # Coverage 9 | COVERAGE_REPORT = coverage.txt 10 | COVERAGE_PROFILE = profile.out 11 | COVERAGE_MODE = atomic 12 | 13 | test-coverage: 14 | cd $(WORKDIR); \ 15 | echo "" > $(COVERAGE_REPORT); \ 16 | for dir in `find . -name "*.go" | grep -o '.*/' | sort | uniq`; do \ 17 | $(GOTEST) $$dir -coverprofile=$(COVERAGE_PROFILE) -covermode=$(COVERAGE_MODE); \ 18 | if [ $$? != 0 ]; then \ 19 | exit 2; \ 20 | fi; \ 21 | if [ -f $(COVERAGE_PROFILE) ]; then \ 22 | cat $(COVERAGE_PROFILE) >> $(COVERAGE_REPORT); \ 23 | rm $(COVERAGE_PROFILE); \ 24 | fi; \ 25 | done; \ 26 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-billy.v4/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | platform: x64 3 | 4 | clone_folder: c:\gopath\src\gopkg.in\src-d\go-billy.v4 5 | 6 | environment: 7 | GOPATH: c:\gopath 8 | 9 | install: 10 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 11 | - go version 12 | - go get -v -t ./... 13 | 14 | build_script: 15 | - go test -v ./... 16 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-billy.v4/go.mod: -------------------------------------------------------------------------------- 1 | module gopkg.in/src-d/go-billy.v4 2 | 3 | require ( 4 | github.com/kr/pretty v0.1.0 // indirect 5 | github.com/kr/pty v1.1.8 // indirect 6 | golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e 7 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-billy.v4/go.sum: -------------------------------------------------------------------------------- 1 | github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= 2 | github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= 3 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 4 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 5 | github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= 6 | github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= 7 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 8 | golang.org/x/sys v0.0.0-20180903190138-2b024373dcd9 h1:lkiLiLBHGoH3XnqSLUIaBsilGMUjI+Uy2Xu2JLUtTas= 9 | golang.org/x/sys v0.0.0-20180903190138-2b024373dcd9/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 10 | golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 11 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= 12 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 13 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-billy.v4/osfs/os_posix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package osfs 4 | 5 | import ( 6 | "golang.org/x/sys/unix" 7 | ) 8 | 9 | func (f *file) Lock() error { 10 | f.m.Lock() 11 | defer f.m.Unlock() 12 | 13 | return unix.Flock(int(f.File.Fd()), unix.LOCK_EX) 14 | } 15 | 16 | func (f *file) Unlock() error { 17 | f.m.Lock() 18 | defer f.m.Unlock() 19 | 20 | return unix.Flock(int(f.File.Fd()), unix.LOCK_UN) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-billy.v4/osfs/os_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package osfs 4 | 5 | import ( 6 | "os" 7 | "runtime" 8 | "unsafe" 9 | 10 | "golang.org/x/sys/windows" 11 | ) 12 | 13 | type fileInfo struct { 14 | os.FileInfo 15 | name string 16 | } 17 | 18 | func (fi *fileInfo) Name() string { 19 | return fi.name 20 | } 21 | 22 | var ( 23 | kernel32DLL = windows.NewLazySystemDLL("kernel32.dll") 24 | lockFileExProc = kernel32DLL.NewProc("LockFileEx") 25 | unlockFileProc = kernel32DLL.NewProc("UnlockFile") 26 | ) 27 | 28 | const ( 29 | lockfileExclusiveLock = 0x2 30 | ) 31 | 32 | func (f *file) Lock() error { 33 | f.m.Lock() 34 | defer f.m.Unlock() 35 | 36 | var overlapped windows.Overlapped 37 | // err is always non-nil as per sys/windows semantics. 38 | ret, _, err := lockFileExProc.Call(f.File.Fd(), lockfileExclusiveLock, 0, 0xFFFFFFFF, 0, 39 | uintptr(unsafe.Pointer(&overlapped))) 40 | runtime.KeepAlive(&overlapped) 41 | if ret == 0 { 42 | return err 43 | } 44 | return nil 45 | } 46 | 47 | func (f *file) Unlock() error { 48 | f.m.Lock() 49 | defer f.m.Unlock() 50 | 51 | // err is always non-nil as per sys/windows semantics. 52 | ret, _, err := unlockFileProc.Call(f.File.Fd(), 0, 0, 0xFFFFFFFF, 0) 53 | if ret == 0 { 54 | return err 55 | } 56 | return nil 57 | } 58 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/.gitignore: -------------------------------------------------------------------------------- 1 | coverage.out 2 | *~ 3 | coverage.txt 4 | profile.out 5 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.11" 5 | - "1.12" 6 | 7 | go_import_path: gopkg.in/src-d/go-git.v4 8 | 9 | env: 10 | - GIT_VERSION=master 11 | - GIT_VERSION=v1.9.3 12 | - GIT_VERSION=v2.11.0 13 | 14 | cache: 15 | directories: 16 | - $HOME/.git-dist 17 | 18 | before_script: 19 | - export GIT_DIST_PATH=$HOME/.git-dist 20 | - make build-git 21 | 22 | before_install: 23 | - git config --global user.email "travis@example.com" 24 | - git config --global user.name "Travis CI" 25 | 26 | install: 27 | - go get -v -t ./... 28 | 29 | script: 30 | - export GIT_EXEC_PATH=$GIT_DIST_PATH 31 | - export PATH=$GIT_DIST_PATH:$PATH 32 | - git version 33 | - make test-coverage 34 | - go vet ./... 35 | 36 | after_success: 37 | - bash <(curl -s https://codecov.io/bash) 38 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Máximo Cuadros (@mcuadros) 2 | Jeremy Stribling (@strib) 3 | Ori Rawlings (@orirawlings) 4 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | platform: x64 3 | 4 | matrix: 5 | allow_failures: 6 | - platform: x64 7 | 8 | clone_folder: c:\gopath\src\gopkg.in\src-d\go-git.v4 9 | 10 | environment: 11 | GOPATH: c:\gopath 12 | 13 | install: 14 | - set PATH=%GOPATH%\bin;c:\go\bin;"C:\Program Files\Git\mingw64\bin";%PATH% 15 | - go version 16 | - go get -v -t ./... 17 | - git config --global user.email "travis@example.com" 18 | - git config --global user.name "Travis CI 19 | 20 | build_script: 21 | - go test -v ./... 22 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/common.go: -------------------------------------------------------------------------------- 1 | package git 2 | 3 | import "strings" 4 | 5 | const defaultDotGitPath = ".git" 6 | 7 | // countLines returns the number of lines in a string à la git, this is 8 | // The newline character is assumed to be '\n'. The empty string 9 | // contains 0 lines. If the last line of the string doesn't end with a 10 | // newline, it will still be considered a line. 11 | func countLines(s string) int { 12 | if s == "" { 13 | return 0 14 | } 15 | 16 | nEOL := strings.Count(s, "\n") 17 | if strings.HasSuffix(s, "\n") { 18 | return nEOL 19 | } 20 | 21 | return nEOL + 1 22 | } 23 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/doc.go: -------------------------------------------------------------------------------- 1 | // A highly extensible git implementation in pure Go. 2 | // 3 | // go-git aims to reach the completeness of libgit2 or jgit, nowadays covers the 4 | // majority of the plumbing read operations and some of the main write 5 | // operations, but lacks the main porcelain operations such as merges. 6 | // 7 | // It is highly extensible, we have been following the open/close principle in 8 | // its design to facilitate extensions, mainly focusing the efforts on the 9 | // persistence of the objects. 10 | package git // import "gopkg.in/src-d/go-git.v4" 11 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/go.mod: -------------------------------------------------------------------------------- 1 | module gopkg.in/src-d/go-git.v4 2 | 3 | require ( 4 | github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 // indirect 5 | github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 // indirect 6 | github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 7 | github.com/emirpasic/gods v1.12.0 8 | github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 // indirect 9 | github.com/gliderlabs/ssh v0.2.2 10 | github.com/google/go-cmp v0.3.0 11 | github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 12 | github.com/jessevdk/go-flags v1.4.0 13 | github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd 14 | github.com/mitchellh/go-homedir v1.1.0 15 | github.com/pelletier/go-buffruneio v0.2.0 // indirect 16 | github.com/pkg/errors v0.8.1 // indirect 17 | github.com/sergi/go-diff v1.0.0 18 | github.com/src-d/gcfg v1.4.0 19 | github.com/stretchr/objx v0.2.0 // indirect 20 | github.com/xanzy/ssh-agent v0.2.1 21 | golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 22 | golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 23 | golang.org/x/text v0.3.2 24 | golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a // indirect 25 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 26 | gopkg.in/src-d/go-billy.v4 v4.3.2 27 | gopkg.in/src-d/go-git-fixtures.v3 v3.5.0 28 | gopkg.in/warnings.v0 v0.1.2 // indirect 29 | ) 30 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/internal/revision/token.go: -------------------------------------------------------------------------------- 1 | package revision 2 | 3 | // token represents a entity extracted from string parsing 4 | type token int 5 | 6 | const ( 7 | eof token = iota 8 | 9 | aslash 10 | asterisk 11 | at 12 | caret 13 | cbrace 14 | colon 15 | control 16 | dot 17 | emark 18 | minus 19 | number 20 | obrace 21 | obracket 22 | qmark 23 | slash 24 | space 25 | tilde 26 | tokenError 27 | word 28 | ) 29 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/internal/url/url.go: -------------------------------------------------------------------------------- 1 | package url 2 | 3 | import ( 4 | "regexp" 5 | ) 6 | 7 | var ( 8 | isSchemeRegExp = regexp.MustCompile(`^[^:]+://`) 9 | scpLikeUrlRegExp = regexp.MustCompile(`^(?:(?P[^@]+)@)?(?P[^:\s]+):(?:(?P[0-9]{1,5})/)?(?P[^\\].*)$`) 10 | ) 11 | 12 | // MatchesScheme returns true if the given string matches a URL-like 13 | // format scheme. 14 | func MatchesScheme(url string) bool { 15 | return isSchemeRegExp.MatchString(url) 16 | } 17 | 18 | // MatchesScpLike returns true if the given string matches an SCP-like 19 | // format scheme. 20 | func MatchesScpLike(url string) bool { 21 | return scpLikeUrlRegExp.MatchString(url) 22 | } 23 | 24 | // FindScpLikeComponents returns the user, host, port and path of the 25 | // given SCP-like URL. 26 | func FindScpLikeComponents(url string) (user, host, port, path string) { 27 | m := scpLikeUrlRegExp.FindStringSubmatch(url) 28 | return m[1], m[2], m[3], m[4] 29 | } 30 | 31 | // IsLocalEndpoint returns true if the given URL string specifies a 32 | // local file endpoint. For example, on a Linux machine, 33 | // `/home/user/src/go-git` would match as a local endpoint, but 34 | // `https://github.com/src-d/go-git` would not. 35 | func IsLocalEndpoint(url string) bool { 36 | return !MatchesScheme(url) && !MatchesScpLike(url) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/plumbing/error.go: -------------------------------------------------------------------------------- 1 | package plumbing 2 | 3 | import "fmt" 4 | 5 | type PermanentError struct { 6 | Err error 7 | } 8 | 9 | func NewPermanentError(err error) *PermanentError { 10 | if err == nil { 11 | return nil 12 | } 13 | 14 | return &PermanentError{Err: err} 15 | } 16 | 17 | func (e *PermanentError) Error() string { 18 | return fmt.Sprintf("permanent client error: %s", e.Err.Error()) 19 | } 20 | 21 | type UnexpectedError struct { 22 | Err error 23 | } 24 | 25 | func NewUnexpectedError(err error) *UnexpectedError { 26 | if err == nil { 27 | return nil 28 | } 29 | 30 | return &UnexpectedError{Err: err} 31 | } 32 | 33 | func (e *UnexpectedError) Error() string { 34 | return fmt.Sprintf("unexpected client error: %s", e.Err.Error()) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/plumbing/format/config/decoder.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "io" 5 | 6 | "github.com/src-d/gcfg" 7 | ) 8 | 9 | // A Decoder reads and decodes config files from an input stream. 10 | type Decoder struct { 11 | io.Reader 12 | } 13 | 14 | // NewDecoder returns a new decoder that reads from r. 15 | func NewDecoder(r io.Reader) *Decoder { 16 | return &Decoder{r} 17 | } 18 | 19 | // Decode reads the whole config from its input and stores it in the 20 | // value pointed to by config. 21 | func (d *Decoder) Decode(config *Config) error { 22 | cb := func(s string, ss string, k string, v string, bv bool) error { 23 | if ss == "" && k == "" { 24 | config.Section(s) 25 | return nil 26 | } 27 | 28 | if ss != "" && k == "" { 29 | config.Section(s).Subsection(ss) 30 | return nil 31 | } 32 | 33 | config.AddOption(s, ss, k, v) 34 | return nil 35 | } 36 | return gcfg.ReadWithCallback(d, cb) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/plumbing/format/gitignore/matcher.go: -------------------------------------------------------------------------------- 1 | package gitignore 2 | 3 | // Matcher defines a global multi-pattern matcher for gitignore patterns 4 | type Matcher interface { 5 | // Match matches patterns in the order of priorities. As soon as an inclusion or 6 | // exclusion is found, not further matching is performed. 7 | Match(path []string, isDir bool) bool 8 | } 9 | 10 | // NewMatcher constructs a new global matcher. Patterns must be given in the order of 11 | // increasing priority. That is most generic settings files first, then the content of 12 | // the repo .gitignore, then content of .gitignore down the path or the repo and then 13 | // the content command line arguments. 14 | func NewMatcher(ps []Pattern) Matcher { 15 | return &matcher{ps} 16 | } 17 | 18 | type matcher struct { 19 | patterns []Pattern 20 | } 21 | 22 | func (m *matcher) Match(path []string, isDir bool) bool { 23 | n := len(m.patterns) 24 | for i := n - 1; i >= 0; i-- { 25 | if match := m.patterns[i].Match(path, isDir); match > NoMatch { 26 | return match == Exclude 27 | } 28 | } 29 | return false 30 | } 31 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/plumbing/format/objfile/doc.go: -------------------------------------------------------------------------------- 1 | // Package objfile implements encoding and decoding of object files. 2 | package objfile 3 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/error.go: -------------------------------------------------------------------------------- 1 | package packfile 2 | 3 | import "fmt" 4 | 5 | // Error specifies errors returned during packfile parsing. 6 | type Error struct { 7 | reason, details string 8 | } 9 | 10 | // NewError returns a new error. 11 | func NewError(reason string) *Error { 12 | return &Error{reason: reason} 13 | } 14 | 15 | // Error returns a text representation of the error. 16 | func (e *Error) Error() string { 17 | if e.details == "" { 18 | return e.reason 19 | } 20 | 21 | return fmt.Sprintf("%s: %s", e.reason, e.details) 22 | } 23 | 24 | // AddDetails adds details to an error, with additional text. 25 | func (e *Error) AddDetails(format string, args ...interface{}) *Error { 26 | return &Error{ 27 | reason: e.reason, 28 | details: fmt.Sprintf(format, args...), 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/plumbing/object/common.go: -------------------------------------------------------------------------------- 1 | package object 2 | 3 | import ( 4 | "bufio" 5 | "sync" 6 | ) 7 | 8 | var bufPool = sync.Pool{ 9 | New: func() interface{} { 10 | return bufio.NewReader(nil) 11 | }, 12 | } 13 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/plumbing/object/difftree.go: -------------------------------------------------------------------------------- 1 | package object 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | 7 | "gopkg.in/src-d/go-git.v4/utils/merkletrie" 8 | "gopkg.in/src-d/go-git.v4/utils/merkletrie/noder" 9 | ) 10 | 11 | // DiffTree compares the content and mode of the blobs found via two 12 | // tree objects. 13 | func DiffTree(a, b *Tree) (Changes, error) { 14 | return DiffTreeContext(context.Background(), a, b) 15 | } 16 | 17 | // DiffTree compares the content and mode of the blobs found via two 18 | // tree objects. Provided context must be non-nil. 19 | // An error will be return if context expires 20 | func DiffTreeContext(ctx context.Context, a, b *Tree) (Changes, error) { 21 | from := NewTreeRootNode(a) 22 | to := NewTreeRootNode(b) 23 | 24 | hashEqual := func(a, b noder.Hasher) bool { 25 | return bytes.Equal(a.Hash(), b.Hash()) 26 | } 27 | 28 | merkletrieChanges, err := merkletrie.DiffTreeContext(ctx, from, to, hashEqual) 29 | if err != nil { 30 | if err == merkletrie.ErrCanceled { 31 | return nil, ErrCanceled 32 | } 33 | return nil, err 34 | } 35 | 36 | return newChanges(merkletrieChanges) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/plumbing/protocol/packp/sideband/common.go: -------------------------------------------------------------------------------- 1 | package sideband 2 | 3 | // Type sideband type "side-band" or "side-band-64k" 4 | type Type int8 5 | 6 | const ( 7 | // Sideband legacy sideband type up to 1000-byte messages 8 | Sideband Type = iota 9 | // Sideband64k sideband type up to 65519-byte messages 10 | Sideband64k Type = iota 11 | 12 | // MaxPackedSize for Sideband type 13 | MaxPackedSize = 1000 14 | // MaxPackedSize64k for Sideband64k type 15 | MaxPackedSize64k = 65520 16 | ) 17 | 18 | // Channel sideband channel 19 | type Channel byte 20 | 21 | // WithPayload encode the payload as a message 22 | func (ch Channel) WithPayload(payload []byte) []byte { 23 | return append([]byte{byte(ch)}, payload...) 24 | } 25 | 26 | const ( 27 | // PackData packfile content 28 | PackData Channel = 1 29 | // ProgressMessage progress messages 30 | ProgressMessage Channel = 2 31 | // ErrorMessage fatal error message just before stream aborts 32 | ErrorMessage Channel = 3 33 | ) 34 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/plumbing/revision.go: -------------------------------------------------------------------------------- 1 | package plumbing 2 | 3 | // Revision represents a git revision 4 | // to get more details about git revisions 5 | // please check git manual page : 6 | // https://www.kernel.org/pub/software/scm/git/docs/gitrevisions.html 7 | type Revision string 8 | 9 | func (r Revision) String() string { 10 | return string(r) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/plumbing/storer/doc.go: -------------------------------------------------------------------------------- 1 | // Package storer defines the interfaces to store objects, references, etc. 2 | package storer 3 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/plumbing/storer/index.go: -------------------------------------------------------------------------------- 1 | package storer 2 | 3 | import "gopkg.in/src-d/go-git.v4/plumbing/format/index" 4 | 5 | // IndexStorer generic storage of index.Index 6 | type IndexStorer interface { 7 | SetIndex(*index.Index) error 8 | Index() (*index.Index, error) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/plumbing/storer/shallow.go: -------------------------------------------------------------------------------- 1 | package storer 2 | 3 | import "gopkg.in/src-d/go-git.v4/plumbing" 4 | 5 | // ShallowStorer is a storage of references to shallow commits by hash, 6 | // meaning that these commits have missing parents because of a shallow fetch. 7 | type ShallowStorer interface { 8 | SetShallow([]plumbing.Hash) error 9 | Shallow() ([]plumbing.Hash, error) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/plumbing/storer/storer.go: -------------------------------------------------------------------------------- 1 | package storer 2 | 3 | // Storer is a basic storer for encoded objects and references. 4 | type Storer interface { 5 | EncodedObjectStorer 6 | ReferenceStorer 7 | } 8 | 9 | // Initializer should be implemented by storers that require to perform any 10 | // operation when creating a new repository (i.e. git init). 11 | type Initializer interface { 12 | // Init performs initialization of the storer and returns the error, if 13 | // any. 14 | Init() error 15 | } 16 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/storage/filesystem/config.go: -------------------------------------------------------------------------------- 1 | package filesystem 2 | 3 | import ( 4 | stdioutil "io/ioutil" 5 | "os" 6 | 7 | "gopkg.in/src-d/go-git.v4/config" 8 | "gopkg.in/src-d/go-git.v4/storage/filesystem/dotgit" 9 | "gopkg.in/src-d/go-git.v4/utils/ioutil" 10 | ) 11 | 12 | type ConfigStorage struct { 13 | dir *dotgit.DotGit 14 | } 15 | 16 | func (c *ConfigStorage) Config() (conf *config.Config, err error) { 17 | cfg := config.NewConfig() 18 | 19 | f, err := c.dir.Config() 20 | if err != nil { 21 | if os.IsNotExist(err) { 22 | return cfg, nil 23 | } 24 | 25 | return nil, err 26 | } 27 | 28 | defer ioutil.CheckClose(f, &err) 29 | 30 | b, err := stdioutil.ReadAll(f) 31 | if err != nil { 32 | return nil, err 33 | } 34 | 35 | if err = cfg.Unmarshal(b); err != nil { 36 | return nil, err 37 | } 38 | 39 | return cfg, err 40 | } 41 | 42 | func (c *ConfigStorage) SetConfig(cfg *config.Config) (err error) { 43 | if err = cfg.Validate(); err != nil { 44 | return err 45 | } 46 | 47 | f, err := c.dir.ConfigWriter() 48 | if err != nil { 49 | return err 50 | } 51 | 52 | defer ioutil.CheckClose(f, &err) 53 | 54 | b, err := cfg.Marshal() 55 | if err != nil { 56 | return err 57 | } 58 | 59 | _, err = f.Write(b) 60 | return err 61 | } 62 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/storage/filesystem/deltaobject.go: -------------------------------------------------------------------------------- 1 | package filesystem 2 | 3 | import ( 4 | "gopkg.in/src-d/go-git.v4/plumbing" 5 | ) 6 | 7 | type deltaObject struct { 8 | plumbing.EncodedObject 9 | base plumbing.Hash 10 | hash plumbing.Hash 11 | size int64 12 | } 13 | 14 | func newDeltaObject( 15 | obj plumbing.EncodedObject, 16 | hash plumbing.Hash, 17 | base plumbing.Hash, 18 | size int64) plumbing.DeltaObject { 19 | return &deltaObject{ 20 | EncodedObject: obj, 21 | hash: hash, 22 | base: base, 23 | size: size, 24 | } 25 | } 26 | 27 | func (o *deltaObject) BaseHash() plumbing.Hash { 28 | return o.base 29 | } 30 | 31 | func (o *deltaObject) ActualSize() int64 { 32 | return o.size 33 | } 34 | 35 | func (o *deltaObject) ActualHash() plumbing.Hash { 36 | return o.hash 37 | } 38 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/storage/filesystem/index.go: -------------------------------------------------------------------------------- 1 | package filesystem 2 | 3 | import ( 4 | "bufio" 5 | "os" 6 | 7 | "gopkg.in/src-d/go-git.v4/plumbing/format/index" 8 | "gopkg.in/src-d/go-git.v4/storage/filesystem/dotgit" 9 | "gopkg.in/src-d/go-git.v4/utils/ioutil" 10 | ) 11 | 12 | type IndexStorage struct { 13 | dir *dotgit.DotGit 14 | } 15 | 16 | func (s *IndexStorage) SetIndex(idx *index.Index) (err error) { 17 | f, err := s.dir.IndexWriter() 18 | if err != nil { 19 | return err 20 | } 21 | 22 | defer ioutil.CheckClose(f, &err) 23 | bw := bufio.NewWriter(f) 24 | defer func() { 25 | if e := bw.Flush(); err == nil && e != nil { 26 | err = e 27 | } 28 | }() 29 | 30 | e := index.NewEncoder(bw) 31 | err = e.Encode(idx) 32 | return err 33 | } 34 | 35 | func (s *IndexStorage) Index() (i *index.Index, err error) { 36 | idx := &index.Index{ 37 | Version: 2, 38 | } 39 | 40 | f, err := s.dir.Index() 41 | if err != nil { 42 | if os.IsNotExist(err) { 43 | return idx, nil 44 | } 45 | 46 | return nil, err 47 | } 48 | 49 | defer ioutil.CheckClose(f, &err) 50 | 51 | d := index.NewDecoder(bufio.NewReader(f)) 52 | err = d.Decode(idx) 53 | return idx, err 54 | } 55 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/storage/filesystem/module.go: -------------------------------------------------------------------------------- 1 | package filesystem 2 | 3 | import ( 4 | "gopkg.in/src-d/go-git.v4/plumbing/cache" 5 | "gopkg.in/src-d/go-git.v4/storage" 6 | "gopkg.in/src-d/go-git.v4/storage/filesystem/dotgit" 7 | ) 8 | 9 | type ModuleStorage struct { 10 | dir *dotgit.DotGit 11 | } 12 | 13 | func (s *ModuleStorage) Module(name string) (storage.Storer, error) { 14 | fs, err := s.dir.Module(name) 15 | if err != nil { 16 | return nil, err 17 | } 18 | 19 | return NewStorage(fs, cache.NewObjectLRUDefault()), nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/storage/filesystem/reference.go: -------------------------------------------------------------------------------- 1 | package filesystem 2 | 3 | import ( 4 | "gopkg.in/src-d/go-git.v4/plumbing" 5 | "gopkg.in/src-d/go-git.v4/plumbing/storer" 6 | "gopkg.in/src-d/go-git.v4/storage/filesystem/dotgit" 7 | ) 8 | 9 | type ReferenceStorage struct { 10 | dir *dotgit.DotGit 11 | } 12 | 13 | func (r *ReferenceStorage) SetReference(ref *plumbing.Reference) error { 14 | return r.dir.SetRef(ref, nil) 15 | } 16 | 17 | func (r *ReferenceStorage) CheckAndSetReference(ref, old *plumbing.Reference) error { 18 | return r.dir.SetRef(ref, old) 19 | } 20 | 21 | func (r *ReferenceStorage) Reference(n plumbing.ReferenceName) (*plumbing.Reference, error) { 22 | return r.dir.Ref(n) 23 | } 24 | 25 | func (r *ReferenceStorage) IterReferences() (storer.ReferenceIter, error) { 26 | refs, err := r.dir.Refs() 27 | if err != nil { 28 | return nil, err 29 | } 30 | 31 | return storer.NewReferenceSliceIter(refs), nil 32 | } 33 | 34 | func (r *ReferenceStorage) RemoveReference(n plumbing.ReferenceName) error { 35 | return r.dir.RemoveRef(n) 36 | } 37 | 38 | func (r *ReferenceStorage) CountLooseRefs() (int, error) { 39 | return r.dir.CountLooseRefs() 40 | } 41 | 42 | func (r *ReferenceStorage) PackRefs() error { 43 | return r.dir.PackRefs() 44 | } 45 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/storage/storer.go: -------------------------------------------------------------------------------- 1 | package storage 2 | 3 | import ( 4 | "errors" 5 | 6 | "gopkg.in/src-d/go-git.v4/config" 7 | "gopkg.in/src-d/go-git.v4/plumbing/storer" 8 | ) 9 | 10 | var ErrReferenceHasChanged = errors.New("reference has changed concurrently") 11 | 12 | // Storer is a generic storage of objects, references and any information 13 | // related to a particular repository. The package gopkg.in/src-d/go-git.v4/storage 14 | // contains two implementation a filesystem base implementation (such as `.git`) 15 | // and a memory implementations being ephemeral 16 | type Storer interface { 17 | storer.EncodedObjectStorer 18 | storer.ReferenceStorer 19 | storer.ShallowStorer 20 | storer.IndexStorer 21 | config.ConfigStorer 22 | ModuleStorer 23 | } 24 | 25 | // ModuleStorer allows interact with the modules' Storers 26 | type ModuleStorer interface { 27 | // Module returns a Storer representing a submodule, if not exists returns a 28 | // new empty Storer is returned 29 | Module(name string) (Storer, error) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/worktree_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd netbsd 2 | 3 | package git 4 | 5 | import ( 6 | "syscall" 7 | "time" 8 | 9 | "gopkg.in/src-d/go-git.v4/plumbing/format/index" 10 | ) 11 | 12 | func init() { 13 | fillSystemInfo = func(e *index.Entry, sys interface{}) { 14 | if os, ok := sys.(*syscall.Stat_t); ok { 15 | e.CreatedAt = time.Unix(int64(os.Atimespec.Sec), int64(os.Atimespec.Nsec)) 16 | e.Dev = uint32(os.Dev) 17 | e.Inode = uint32(os.Ino) 18 | e.GID = os.Gid 19 | e.UID = os.Uid 20 | } 21 | } 22 | } 23 | 24 | func isSymlinkWindowsNonAdmin(err error) bool { 25 | return false 26 | } 27 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/worktree_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package git 4 | 5 | import ( 6 | "syscall" 7 | "time" 8 | 9 | "gopkg.in/src-d/go-git.v4/plumbing/format/index" 10 | ) 11 | 12 | func init() { 13 | fillSystemInfo = func(e *index.Entry, sys interface{}) { 14 | if os, ok := sys.(*syscall.Stat_t); ok { 15 | e.CreatedAt = time.Unix(int64(os.Ctim.Sec), int64(os.Ctim.Nsec)) 16 | e.Dev = uint32(os.Dev) 17 | e.Inode = uint32(os.Ino) 18 | e.GID = os.Gid 19 | e.UID = os.Uid 20 | } 21 | } 22 | } 23 | 24 | func isSymlinkWindowsNonAdmin(err error) bool { 25 | return false 26 | } 27 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/worktree_unix_other.go: -------------------------------------------------------------------------------- 1 | // +build openbsd dragonfly solaris 2 | 3 | package git 4 | 5 | import ( 6 | "syscall" 7 | "time" 8 | 9 | "gopkg.in/src-d/go-git.v4/plumbing/format/index" 10 | ) 11 | 12 | func init() { 13 | fillSystemInfo = func(e *index.Entry, sys interface{}) { 14 | if os, ok := sys.(*syscall.Stat_t); ok { 15 | e.CreatedAt = time.Unix(int64(os.Atim.Sec), int64(os.Atim.Nsec)) 16 | e.Dev = uint32(os.Dev) 17 | e.Inode = uint32(os.Ino) 18 | e.GID = os.Gid 19 | e.UID = os.Uid 20 | } 21 | } 22 | } 23 | 24 | func isSymlinkWindowsNonAdmin(err error) bool { 25 | return false 26 | } 27 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/go-git.v4/worktree_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package git 4 | 5 | import ( 6 | "os" 7 | "syscall" 8 | "time" 9 | 10 | "gopkg.in/src-d/go-git.v4/plumbing/format/index" 11 | ) 12 | 13 | func init() { 14 | fillSystemInfo = func(e *index.Entry, sys interface{}) { 15 | if os, ok := sys.(*syscall.Win32FileAttributeData); ok { 16 | seconds := os.CreationTime.Nanoseconds() / 1000000000 17 | nanoseconds := os.CreationTime.Nanoseconds() - seconds*1000000000 18 | e.CreatedAt = time.Unix(seconds, nanoseconds) 19 | } 20 | } 21 | } 22 | 23 | func isSymlinkWindowsNonAdmin(err error) bool { 24 | const ERROR_PRIVILEGE_NOT_HELD syscall.Errno = 1314 25 | 26 | if err != nil { 27 | if errLink, ok := err.(*os.LinkError); ok { 28 | if errNo, ok := errLink.Err.(syscall.Errno); ok { 29 | return errNo == ERROR_PRIVILEGE_NOT_HELD 30 | } 31 | } 32 | } 33 | 34 | return false 35 | } 36 | -------------------------------------------------------------------------------- /vendor/gopkg.in/warnings.v0/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Péter Surányi. 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 | 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 | OWNER 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 | --------------------------------------------------------------------------------