├── .gitignore
├── CONTRIBUTING.md
├── DCO
├── LICENSE
├── Makefile
├── NOTICE
├── README.md
├── code-of-conduct.md
├── example.json
├── glide.lock
├── glide.yaml
├── kube_namespace.go
├── kube_namespace_test.go
└── vendor
├── github.com
├── Sirupsen
│ └── logrus
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── doc.go
│ │ ├── entry.go
│ │ ├── entry_test.go
│ │ ├── examples
│ │ ├── basic
│ │ │ └── basic.go
│ │ └── hook
│ │ │ └── hook.go
│ │ ├── exported.go
│ │ ├── formatter.go
│ │ ├── formatter_bench_test.go
│ │ ├── formatters
│ │ └── logstash
│ │ │ ├── logstash.go
│ │ │ └── logstash_test.go
│ │ ├── hook_test.go
│ │ ├── hooks.go
│ │ ├── hooks
│ │ ├── syslog
│ │ │ ├── README.md
│ │ │ ├── syslog.go
│ │ │ └── syslog_test.go
│ │ └── test
│ │ │ ├── test.go
│ │ │ └── test_test.go
│ │ ├── json_formatter.go
│ │ ├── json_formatter_test.go
│ │ ├── logger.go
│ │ ├── logrus.go
│ │ ├── logrus_test.go
│ │ ├── terminal_bsd.go
│ │ ├── terminal_linux.go
│ │ ├── terminal_notwindows.go
│ │ ├── terminal_solaris.go
│ │ ├── terminal_windows.go
│ │ ├── text_formatter.go
│ │ ├── text_formatter_test.go
│ │ └── writer.go
├── containernetworking
│ └── cni
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── CONTRIBUTING.md
│ │ ├── DCO
│ │ ├── Documentation
│ │ ├── bridge.md
│ │ ├── dhcp.md
│ │ ├── flannel.md
│ │ ├── host-local.md
│ │ ├── ipvlan.md
│ │ ├── macvlan.md
│ │ ├── ptp.md
│ │ └── tuning.md
│ │ ├── Godeps
│ │ ├── Godeps.json
│ │ └── Readme
│ │ ├── LICENSE
│ │ ├── MAINTAINERS
│ │ ├── README.md
│ │ ├── ROADMAP.md
│ │ ├── SPEC.md
│ │ ├── Vagrantfile
│ │ ├── build
│ │ ├── cnitool
│ │ └── cni.go
│ │ ├── libcni
│ │ ├── api.go
│ │ ├── api_test.go
│ │ ├── conf.go
│ │ ├── conf_test.go
│ │ └── libcni_suite_test.go
│ │ ├── pkg
│ │ ├── invoke
│ │ │ ├── args.go
│ │ │ ├── delegate.go
│ │ │ ├── exec.go
│ │ │ ├── exec_test.go
│ │ │ ├── fakes
│ │ │ │ ├── cni_args.go
│ │ │ │ ├── raw_exec.go
│ │ │ │ └── version_decoder.go
│ │ │ ├── find.go
│ │ │ ├── find_test.go
│ │ │ ├── get_version_integration_test.go
│ │ │ ├── invoke_suite_test.go
│ │ │ ├── raw_exec.go
│ │ │ └── raw_exec_test.go
│ │ ├── ip
│ │ │ ├── cidr.go
│ │ │ ├── ip_suite_test.go
│ │ │ ├── ipforward.go
│ │ │ ├── ipmasq.go
│ │ │ ├── link.go
│ │ │ ├── link_test.go
│ │ │ └── route.go
│ │ ├── ipam
│ │ │ ├── ipam.go
│ │ │ └── ipam_suite_test.go
│ │ ├── ns
│ │ │ ├── README.md
│ │ │ ├── ns.go
│ │ │ ├── ns_suite_test.go
│ │ │ └── ns_test.go
│ │ ├── skel
│ │ │ ├── skel.go
│ │ │ ├── skel_suite_test.go
│ │ │ └── skel_test.go
│ │ ├── testutils
│ │ │ ├── bad_reader.go
│ │ │ └── cmd.go
│ │ ├── types
│ │ │ ├── args.go
│ │ │ ├── args_test.go
│ │ │ ├── types.go
│ │ │ └── types_suite_test.go
│ │ ├── utils
│ │ │ ├── hwaddr
│ │ │ │ ├── hwaddr.go
│ │ │ │ ├── hwaddr_suite_test.go
│ │ │ │ └── hwaddr_test.go
│ │ │ ├── sysctl
│ │ │ │ └── sysctl_linux.go
│ │ │ ├── utils.go
│ │ │ ├── utils_suite_test.go
│ │ │ └── utils_test.go
│ │ └── version
│ │ │ ├── conf.go
│ │ │ ├── conf_test.go
│ │ │ ├── plugin.go
│ │ │ ├── plugin_test.go
│ │ │ ├── reconcile.go
│ │ │ ├── reconcile_test.go
│ │ │ ├── testhelpers
│ │ │ ├── testhelpers.go
│ │ │ ├── testhelpers_suite_test.go
│ │ │ └── testhelpers_test.go
│ │ │ ├── version.go
│ │ │ └── version_suite_test.go
│ │ ├── plugins
│ │ ├── ipam
│ │ │ ├── dhcp
│ │ │ │ ├── daemon.go
│ │ │ │ ├── lease.go
│ │ │ │ ├── main.go
│ │ │ │ ├── options.go
│ │ │ │ └── options_test.go
│ │ │ └── host-local
│ │ │ │ ├── README.md
│ │ │ │ ├── allocator.go
│ │ │ │ ├── allocator_test.go
│ │ │ │ ├── backend
│ │ │ │ ├── disk
│ │ │ │ │ ├── backend.go
│ │ │ │ │ └── lock.go
│ │ │ │ ├── store.go
│ │ │ │ └── testing
│ │ │ │ │ └── fake_store.go
│ │ │ │ ├── config.go
│ │ │ │ ├── host_local_suite_test.go
│ │ │ │ └── main.go
│ │ ├── main
│ │ │ ├── bridge
│ │ │ │ ├── bridge.go
│ │ │ │ ├── bridge_suite_test.go
│ │ │ │ └── bridge_test.go
│ │ │ ├── ipvlan
│ │ │ │ ├── ipvlan.go
│ │ │ │ ├── ipvlan_suite_test.go
│ │ │ │ └── ipvlan_test.go
│ │ │ ├── loopback
│ │ │ │ ├── loopback.go
│ │ │ │ ├── loopback_suite_test.go
│ │ │ │ └── loopback_test.go
│ │ │ ├── macvlan
│ │ │ │ ├── macvlan.go
│ │ │ │ ├── macvlan_suite_test.go
│ │ │ │ └── macvlan_test.go
│ │ │ └── ptp
│ │ │ │ ├── ptp.go
│ │ │ │ ├── ptp_suite_test.go
│ │ │ │ └── ptp_test.go
│ │ ├── meta
│ │ │ ├── flannel
│ │ │ │ └── flannel.go
│ │ │ └── tuning
│ │ │ │ └── tuning.go
│ │ └── test
│ │ │ └── noop
│ │ │ ├── debug
│ │ │ └── debug.go
│ │ │ ├── main.go
│ │ │ ├── noop_suite_test.go
│ │ │ └── noop_test.go
│ │ ├── scripts
│ │ ├── docker-run.sh
│ │ ├── exec-plugins.sh
│ │ ├── priv-net-run.sh
│ │ └── release-with-rkt.sh
│ │ ├── test
│ │ └── vendor
│ │ ├── github.com
│ │ ├── coreos
│ │ │ ├── go-iptables
│ │ │ │ ├── LICENSE
│ │ │ │ └── iptables
│ │ │ │ │ ├── iptables.go
│ │ │ │ │ └── lock.go
│ │ │ └── go-systemd
│ │ │ │ ├── LICENSE
│ │ │ │ └── activation
│ │ │ │ ├── files.go
│ │ │ │ ├── listeners.go
│ │ │ │ └── packetconns.go
│ │ ├── d2g
│ │ │ ├── dhcp4
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── constants.go
│ │ │ │ ├── helpers.go
│ │ │ │ ├── option.go
│ │ │ │ └── packet.go
│ │ │ └── dhcp4client
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── client.go
│ │ │ │ ├── inetsock.go
│ │ │ │ ├── init.go
│ │ │ │ └── pktsock_linux.go
│ │ ├── onsi
│ │ │ ├── ginkgo
│ │ │ │ ├── .gitignore
│ │ │ │ ├── .travis.yml
│ │ │ │ ├── CHANGELOG.md
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── config
│ │ │ │ │ └── config.go
│ │ │ │ ├── extensions
│ │ │ │ │ └── table
│ │ │ │ │ │ ├── table.go
│ │ │ │ │ │ └── table_entry.go
│ │ │ │ ├── ginkgo
│ │ │ │ │ ├── bootstrap_command.go
│ │ │ │ │ ├── build_command.go
│ │ │ │ │ ├── convert
│ │ │ │ │ │ ├── ginkgo_ast_nodes.go
│ │ │ │ │ │ ├── import.go
│ │ │ │ │ │ ├── package_rewriter.go
│ │ │ │ │ │ ├── test_finder.go
│ │ │ │ │ │ ├── testfile_rewriter.go
│ │ │ │ │ │ └── testing_t_rewriter.go
│ │ │ │ │ ├── convert_command.go
│ │ │ │ │ ├── generate_command.go
│ │ │ │ │ ├── help_command.go
│ │ │ │ │ ├── interrupthandler
│ │ │ │ │ │ ├── interrupt_handler.go
│ │ │ │ │ │ ├── sigquit_swallower_unix.go
│ │ │ │ │ │ └── sigquit_swallower_windows.go
│ │ │ │ │ ├── main.go
│ │ │ │ │ ├── nodot
│ │ │ │ │ │ └── nodot.go
│ │ │ │ │ ├── nodot_command.go
│ │ │ │ │ ├── notifications.go
│ │ │ │ │ ├── run_command.go
│ │ │ │ │ ├── run_watch_and_build_command_flags.go
│ │ │ │ │ ├── suite_runner.go
│ │ │ │ │ ├── testrunner
│ │ │ │ │ │ ├── log_writer.go
│ │ │ │ │ │ ├── run_result.go
│ │ │ │ │ │ └── test_runner.go
│ │ │ │ │ ├── testsuite
│ │ │ │ │ │ └── test_suite.go
│ │ │ │ │ ├── unfocus_command.go
│ │ │ │ │ ├── version_command.go
│ │ │ │ │ ├── watch
│ │ │ │ │ │ ├── delta.go
│ │ │ │ │ │ ├── delta_tracker.go
│ │ │ │ │ │ ├── dependencies.go
│ │ │ │ │ │ ├── package_hash.go
│ │ │ │ │ │ ├── package_hashes.go
│ │ │ │ │ │ └── suite.go
│ │ │ │ │ └── watch_command.go
│ │ │ │ ├── ginkgo_dsl.go
│ │ │ │ ├── integration
│ │ │ │ │ └── integration.go
│ │ │ │ ├── internal
│ │ │ │ │ ├── codelocation
│ │ │ │ │ │ └── code_location.go
│ │ │ │ │ ├── containernode
│ │ │ │ │ │ └── container_node.go
│ │ │ │ │ ├── failer
│ │ │ │ │ │ └── failer.go
│ │ │ │ │ ├── leafnodes
│ │ │ │ │ │ ├── benchmarker.go
│ │ │ │ │ │ ├── interfaces.go
│ │ │ │ │ │ ├── it_node.go
│ │ │ │ │ │ ├── measure_node.go
│ │ │ │ │ │ ├── runner.go
│ │ │ │ │ │ ├── setup_nodes.go
│ │ │ │ │ │ ├── suite_nodes.go
│ │ │ │ │ │ ├── synchronized_after_suite_node.go
│ │ │ │ │ │ └── synchronized_before_suite_node.go
│ │ │ │ │ ├── remote
│ │ │ │ │ │ ├── aggregator.go
│ │ │ │ │ │ ├── forwarding_reporter.go
│ │ │ │ │ │ ├── output_interceptor.go
│ │ │ │ │ │ ├── output_interceptor_unix.go
│ │ │ │ │ │ ├── output_interceptor_win.go
│ │ │ │ │ │ └── server.go
│ │ │ │ │ ├── spec
│ │ │ │ │ │ ├── index_computer.go
│ │ │ │ │ │ ├── spec.go
│ │ │ │ │ │ └── specs.go
│ │ │ │ │ ├── specrunner
│ │ │ │ │ │ ├── random_id.go
│ │ │ │ │ │ └── spec_runner.go
│ │ │ │ │ ├── suite
│ │ │ │ │ │ └── suite.go
│ │ │ │ │ ├── testingtproxy
│ │ │ │ │ │ └── testing_t_proxy.go
│ │ │ │ │ └── writer
│ │ │ │ │ │ ├── fake_writer.go
│ │ │ │ │ │ └── writer.go
│ │ │ │ ├── reporters
│ │ │ │ │ ├── default_reporter.go
│ │ │ │ │ ├── fake_reporter.go
│ │ │ │ │ ├── junit_reporter.go
│ │ │ │ │ ├── reporter.go
│ │ │ │ │ ├── stenographer
│ │ │ │ │ │ ├── console_logging.go
│ │ │ │ │ │ ├── fake_stenographer.go
│ │ │ │ │ │ └── stenographer.go
│ │ │ │ │ └── teamcity_reporter.go
│ │ │ │ └── types
│ │ │ │ │ ├── code_location.go
│ │ │ │ │ ├── synchronization.go
│ │ │ │ │ └── types.go
│ │ │ └── gomega
│ │ │ │ ├── .gitignore
│ │ │ │ ├── .travis.yml
│ │ │ │ ├── CHANGELOG.md
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── format
│ │ │ │ └── format.go
│ │ │ │ ├── gbytes
│ │ │ │ ├── buffer.go
│ │ │ │ └── say_matcher.go
│ │ │ │ ├── gexec
│ │ │ │ ├── build.go
│ │ │ │ ├── exit_matcher.go
│ │ │ │ ├── prefixed_writer.go
│ │ │ │ └── session.go
│ │ │ │ ├── gomega_dsl.go
│ │ │ │ ├── internal
│ │ │ │ ├── assertion
│ │ │ │ │ └── assertion.go
│ │ │ │ ├── asyncassertion
│ │ │ │ │ └── async_assertion.go
│ │ │ │ ├── oraclematcher
│ │ │ │ │ └── oracle_matcher.go
│ │ │ │ └── testingtsupport
│ │ │ │ │ └── testing_t_support.go
│ │ │ │ ├── matchers.go
│ │ │ │ ├── matchers
│ │ │ │ ├── and.go
│ │ │ │ ├── assignable_to_type_of_matcher.go
│ │ │ │ ├── be_a_directory.go
│ │ │ │ ├── be_a_regular_file.go
│ │ │ │ ├── be_an_existing_file.go
│ │ │ │ ├── be_closed_matcher.go
│ │ │ │ ├── be_empty_matcher.go
│ │ │ │ ├── be_equivalent_to_matcher.go
│ │ │ │ ├── be_false_matcher.go
│ │ │ │ ├── be_nil_matcher.go
│ │ │ │ ├── be_numerically_matcher.go
│ │ │ │ ├── be_sent_matcher.go
│ │ │ │ ├── be_temporally_matcher.go
│ │ │ │ ├── be_true_matcher.go
│ │ │ │ ├── be_zero_matcher.go
│ │ │ │ ├── consist_of.go
│ │ │ │ ├── contain_element_matcher.go
│ │ │ │ ├── contain_substring_matcher.go
│ │ │ │ ├── equal_matcher.go
│ │ │ │ ├── have_key_matcher.go
│ │ │ │ ├── have_key_with_value_matcher.go
│ │ │ │ ├── have_len_matcher.go
│ │ │ │ ├── have_occurred_matcher.go
│ │ │ │ ├── have_prefix_matcher.go
│ │ │ │ ├── have_suffix_matcher.go
│ │ │ │ ├── match_error_matcher.go
│ │ │ │ ├── match_json_matcher.go
│ │ │ │ ├── match_regexp_matcher.go
│ │ │ │ ├── not.go
│ │ │ │ ├── or.go
│ │ │ │ ├── panic_matcher.go
│ │ │ │ ├── receive_matcher.go
│ │ │ │ ├── succeed_matcher.go
│ │ │ │ ├── support
│ │ │ │ │ └── goraph
│ │ │ │ │ │ ├── bipartitegraph
│ │ │ │ │ │ ├── bipartitegraph.go
│ │ │ │ │ │ └── bipartitegraphmatching.go
│ │ │ │ │ │ ├── edge
│ │ │ │ │ │ └── edge.go
│ │ │ │ │ │ ├── node
│ │ │ │ │ │ └── node.go
│ │ │ │ │ │ └── util
│ │ │ │ │ │ └── util.go
│ │ │ │ ├── type_support.go
│ │ │ │ └── with_transform.go
│ │ │ │ └── types
│ │ │ │ └── types.go
│ │ └── vishvananda
│ │ │ ├── netlink
│ │ │ ├── .travis.yml
│ │ │ ├── LICENSE
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ ├── addr.go
│ │ │ ├── addr_linux.go
│ │ │ ├── bpf_linux.go
│ │ │ ├── class.go
│ │ │ ├── class_linux.go
│ │ │ ├── filter.go
│ │ │ ├── filter_linux.go
│ │ │ ├── handle_linux.go
│ │ │ ├── link.go
│ │ │ ├── link_linux.go
│ │ │ ├── link_tuntap_linux.go
│ │ │ ├── neigh.go
│ │ │ ├── neigh_linux.go
│ │ │ ├── netlink.go
│ │ │ ├── netlink_linux.go
│ │ │ ├── netlink_unspecified.go
│ │ │ ├── nl
│ │ │ │ ├── addr_linux.go
│ │ │ │ ├── link_linux.go
│ │ │ │ ├── nl_linux.go
│ │ │ │ ├── route_linux.go
│ │ │ │ ├── syscall.go
│ │ │ │ ├── tc_linux.go
│ │ │ │ ├── xfrm_linux.go
│ │ │ │ ├── xfrm_policy_linux.go
│ │ │ │ └── xfrm_state_linux.go
│ │ │ ├── protinfo.go
│ │ │ ├── protinfo_linux.go
│ │ │ ├── qdisc.go
│ │ │ ├── qdisc_linux.go
│ │ │ ├── route.go
│ │ │ ├── route_linux.go
│ │ │ ├── route_unspecified.go
│ │ │ ├── rule.go
│ │ │ ├── rule_linux.go
│ │ │ ├── xfrm.go
│ │ │ ├── xfrm_policy.go
│ │ │ ├── xfrm_policy_linux.go
│ │ │ ├── xfrm_state.go
│ │ │ └── xfrm_state_linux.go
│ │ │ └── netns
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── netns.go
│ │ │ ├── netns_linux.go
│ │ │ └── netns_unspecified.go
│ │ └── golang.org
│ │ └── x
│ │ └── sys
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ └── unix
│ │ ├── .gitignore
│ │ ├── asm.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_linux_386.s
│ │ ├── asm_linux_amd64.s
│ │ ├── asm_linux_arm.s
│ │ ├── asm_linux_arm64.s
│ │ ├── asm_linux_mips64x.s
│ │ ├── asm_linux_ppc64x.s
│ │ ├── asm_linux_s390x.s
│ │ ├── asm_netbsd_386.s
│ │ ├── asm_netbsd_amd64.s
│ │ ├── asm_netbsd_arm.s
│ │ ├── asm_openbsd_386.s
│ │ ├── asm_openbsd_amd64.s
│ │ ├── asm_solaris_amd64.s
│ │ ├── bluetooth_linux.go
│ │ ├── constants.go
│ │ ├── env_unix.go
│ │ ├── env_unset.go
│ │ ├── flock.go
│ │ ├── flock_linux_32bit.go
│ │ ├── gccgo.go
│ │ ├── gccgo_c.c
│ │ ├── gccgo_linux_amd64.go
│ │ ├── mkall.sh
│ │ ├── mkerrors.sh
│ │ ├── mkpost.go
│ │ ├── mksyscall.pl
│ │ ├── mksyscall_solaris.pl
│ │ ├── mksysctl_openbsd.pl
│ │ ├── mksysnum_darwin.pl
│ │ ├── mksysnum_dragonfly.pl
│ │ ├── mksysnum_freebsd.pl
│ │ ├── mksysnum_linux.pl
│ │ ├── mksysnum_netbsd.pl
│ │ ├── mksysnum_openbsd.pl
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── sockcmsg_linux.go
│ │ ├── sockcmsg_unix.go
│ │ ├── str.go
│ │ ├── syscall.go
│ │ ├── syscall_bsd.go
│ │ ├── syscall_darwin.go
│ │ ├── syscall_darwin_386.go
│ │ ├── syscall_darwin_amd64.go
│ │ ├── syscall_darwin_arm.go
│ │ ├── syscall_darwin_arm64.go
│ │ ├── syscall_dragonfly.go
│ │ ├── syscall_dragonfly_amd64.go
│ │ ├── syscall_freebsd.go
│ │ ├── syscall_freebsd_386.go
│ │ ├── syscall_freebsd_amd64.go
│ │ ├── syscall_freebsd_arm.go
│ │ ├── syscall_linux.go
│ │ ├── syscall_linux_386.go
│ │ ├── syscall_linux_amd64.go
│ │ ├── syscall_linux_arm.go
│ │ ├── syscall_linux_arm64.go
│ │ ├── syscall_linux_mips64x.go
│ │ ├── syscall_linux_ppc64x.go
│ │ ├── syscall_linux_s390x.go
│ │ ├── syscall_netbsd.go
│ │ ├── syscall_netbsd_386.go
│ │ ├── syscall_netbsd_amd64.go
│ │ ├── syscall_netbsd_arm.go
│ │ ├── syscall_no_getwd.go
│ │ ├── syscall_openbsd.go
│ │ ├── syscall_openbsd_386.go
│ │ ├── syscall_openbsd_amd64.go
│ │ ├── syscall_solaris.go
│ │ ├── syscall_solaris_amd64.go
│ │ ├── syscall_unix.go
│ │ ├── types_darwin.go
│ │ ├── types_dragonfly.go
│ │ ├── types_freebsd.go
│ │ ├── types_linux.go
│ │ ├── types_netbsd.go
│ │ ├── types_openbsd.go
│ │ ├── types_solaris.go
│ │ ├── zerrors_darwin_386.go
│ │ ├── zerrors_darwin_amd64.go
│ │ ├── zerrors_darwin_arm.go
│ │ ├── zerrors_darwin_arm64.go
│ │ ├── zerrors_dragonfly_amd64.go
│ │ ├── zerrors_freebsd_386.go
│ │ ├── zerrors_freebsd_amd64.go
│ │ ├── zerrors_freebsd_arm.go
│ │ ├── zerrors_linux_386.go
│ │ ├── zerrors_linux_amd64.go
│ │ ├── zerrors_linux_arm.go
│ │ ├── zerrors_linux_arm64.go
│ │ ├── zerrors_linux_mips64.go
│ │ ├── zerrors_linux_mips64le.go
│ │ ├── zerrors_linux_ppc64.go
│ │ ├── zerrors_linux_ppc64le.go
│ │ ├── zerrors_linux_s390x.go
│ │ ├── zerrors_netbsd_386.go
│ │ ├── zerrors_netbsd_amd64.go
│ │ ├── zerrors_netbsd_arm.go
│ │ ├── zerrors_openbsd_386.go
│ │ ├── zerrors_openbsd_amd64.go
│ │ ├── zerrors_solaris_amd64.go
│ │ ├── zsyscall_darwin_386.go
│ │ ├── zsyscall_darwin_amd64.go
│ │ ├── zsyscall_darwin_arm.go
│ │ ├── zsyscall_darwin_arm64.go
│ │ ├── zsyscall_dragonfly_amd64.go
│ │ ├── zsyscall_freebsd_386.go
│ │ ├── zsyscall_freebsd_amd64.go
│ │ ├── zsyscall_freebsd_arm.go
│ │ ├── zsyscall_linux_386.go
│ │ ├── zsyscall_linux_amd64.go
│ │ ├── zsyscall_linux_arm.go
│ │ ├── zsyscall_linux_arm64.go
│ │ ├── zsyscall_linux_mips64.go
│ │ ├── zsyscall_linux_mips64le.go
│ │ ├── zsyscall_linux_ppc64.go
│ │ ├── zsyscall_linux_ppc64le.go
│ │ ├── zsyscall_linux_s390x.go
│ │ ├── zsyscall_netbsd_386.go
│ │ ├── zsyscall_netbsd_amd64.go
│ │ ├── zsyscall_netbsd_arm.go
│ │ ├── zsyscall_openbsd_386.go
│ │ ├── zsyscall_openbsd_amd64.go
│ │ ├── zsyscall_solaris_amd64.go
│ │ ├── zsysctl_openbsd.go
│ │ ├── zsysnum_darwin_386.go
│ │ ├── zsysnum_darwin_amd64.go
│ │ ├── zsysnum_darwin_arm.go
│ │ ├── zsysnum_darwin_arm64.go
│ │ ├── zsysnum_dragonfly_amd64.go
│ │ ├── zsysnum_freebsd_386.go
│ │ ├── zsysnum_freebsd_amd64.go
│ │ ├── zsysnum_freebsd_arm.go
│ │ ├── zsysnum_linux_386.go
│ │ ├── zsysnum_linux_amd64.go
│ │ ├── zsysnum_linux_arm.go
│ │ ├── zsysnum_linux_arm64.go
│ │ ├── zsysnum_linux_mips64.go
│ │ ├── zsysnum_linux_mips64le.go
│ │ ├── zsysnum_linux_ppc64.go
│ │ ├── zsysnum_linux_ppc64le.go
│ │ ├── zsysnum_linux_s390x.go
│ │ ├── zsysnum_netbsd_386.go
│ │ ├── zsysnum_netbsd_amd64.go
│ │ ├── zsysnum_netbsd_arm.go
│ │ ├── zsysnum_openbsd_386.go
│ │ ├── zsysnum_openbsd_amd64.go
│ │ ├── zsysnum_solaris_amd64.go
│ │ ├── ztypes_darwin_386.go
│ │ ├── ztypes_darwin_amd64.go
│ │ ├── ztypes_darwin_arm.go
│ │ ├── ztypes_darwin_arm64.go
│ │ ├── ztypes_dragonfly_amd64.go
│ │ ├── ztypes_freebsd_386.go
│ │ ├── ztypes_freebsd_amd64.go
│ │ ├── ztypes_freebsd_arm.go
│ │ ├── ztypes_linux_386.go
│ │ ├── ztypes_linux_amd64.go
│ │ ├── ztypes_linux_arm.go
│ │ ├── ztypes_linux_arm64.go
│ │ ├── ztypes_linux_mips64.go
│ │ ├── ztypes_linux_mips64le.go
│ │ ├── ztypes_linux_ppc64.go
│ │ ├── ztypes_linux_ppc64le.go
│ │ ├── ztypes_linux_s390x.go
│ │ ├── ztypes_netbsd_386.go
│ │ ├── ztypes_netbsd_amd64.go
│ │ ├── ztypes_netbsd_arm.go
│ │ ├── ztypes_openbsd_386.go
│ │ ├── ztypes_openbsd_amd64.go
│ │ └── ztypes_solaris_amd64.go
├── davecgh
│ └── go-spew
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── cov_report.sh
│ │ ├── spew
│ │ ├── bypass.go
│ │ ├── bypasssafe.go
│ │ ├── common.go
│ │ ├── common_test.go
│ │ ├── config.go
│ │ ├── doc.go
│ │ ├── dump.go
│ │ ├── dump_test.go
│ │ ├── dumpcgo_test.go
│ │ ├── dumpnocgo_test.go
│ │ ├── example_test.go
│ │ ├── format.go
│ │ ├── format_test.go
│ │ ├── internal_test.go
│ │ ├── internalunsafe_test.go
│ │ ├── spew.go
│ │ ├── spew_test.go
│ │ └── testdata
│ │ │ └── dumpcgo.go
│ │ └── test_coverage.txt
├── pmezard
│ └── go-difflib
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── difflib
│ │ ├── difflib.go
│ │ └── difflib_test.go
└── stretchr
│ └── testify
│ ├── .gitignore
│ ├── .travis.yml
│ ├── Godeps
│ ├── Godeps.json
│ └── Readme
│ ├── LICENCE.txt
│ ├── LICENSE
│ ├── README.md
│ ├── _codegen
│ └── main.go
│ ├── assert
│ ├── assertion_forward.go
│ ├── assertion_forward.go.tmpl
│ ├── assertions.go
│ ├── assertions_test.go
│ ├── doc.go
│ ├── errors.go
│ ├── forward_assertions.go
│ ├── forward_assertions_test.go
│ ├── http_assertions.go
│ └── http_assertions_test.go
│ ├── doc.go
│ ├── http
│ ├── doc.go
│ ├── test_response_writer.go
│ └── test_round_tripper.go
│ ├── mock
│ ├── doc.go
│ ├── mock.go
│ └── mock_test.go
│ ├── package_test.go
│ ├── require
│ ├── doc.go
│ ├── forward_requirements.go
│ ├── forward_requirements_test.go
│ ├── require.go
│ ├── require.go.tmpl
│ ├── require_forward.go
│ ├── require_forward.go.tmpl
│ ├── requirements.go
│ └── requirements_test.go
│ ├── suite
│ ├── doc.go
│ ├── interfaces.go
│ ├── suite.go
│ └── suite_test.go
│ └── vendor
│ └── github.com
│ ├── davecgh
│ └── go-spew
│ │ ├── LICENSE
│ │ └── spew
│ │ ├── bypass.go
│ │ ├── bypasssafe.go
│ │ ├── common.go
│ │ ├── config.go
│ │ ├── doc.go
│ │ ├── dump.go
│ │ ├── format.go
│ │ └── spew.go
│ ├── pmezard
│ └── go-difflib
│ │ ├── LICENSE
│ │ └── difflib
│ │ └── difflib.go
│ └── stretchr
│ └── objx
│ ├── .gitignore
│ ├── LICENSE.md
│ ├── README.md
│ ├── accessors.go
│ ├── codegen
│ ├── array-access.txt
│ ├── index.html
│ ├── template.txt
│ └── types_list.txt
│ ├── constants.go
│ ├── conversions.go
│ ├── doc.go
│ ├── map.go
│ ├── mutations.go
│ ├── security.go
│ ├── tests.go
│ ├── type_specific_codegen.go
│ └── value.go
└── golang.org
└── x
└── sys
├── .gitattributes
├── .gitignore
├── AUTHORS
├── CONTRIBUTING.md
├── CONTRIBUTORS
├── LICENSE
├── PATENTS
├── README
├── codereview.cfg
├── plan9
├── asm.s
├── asm_plan9_386.s
├── asm_plan9_amd64.s
├── const_plan9.go
├── dir_plan9.go
├── env_plan9.go
├── env_unset.go
├── errors_plan9.go
├── mkall.sh
├── mkerrors.sh
├── mksyscall.pl
├── mksysnum_plan9.sh
├── pwd_go15_plan9.go
├── pwd_plan9.go
├── race.go
├── race0.go
├── str.go
├── syscall.go
├── syscall_plan9.go
├── syscall_test.go
├── zsyscall_plan9_386.go
├── zsyscall_plan9_amd64.go
└── zsysnum_plan9.go
├── unix
├── .gitignore
├── asm.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_linux_386.s
├── asm_linux_amd64.s
├── asm_linux_arm.s
├── asm_linux_arm64.s
├── asm_linux_mips64x.s
├── asm_linux_ppc64x.s
├── asm_linux_s390x.s
├── asm_netbsd_386.s
├── asm_netbsd_amd64.s
├── asm_netbsd_arm.s
├── asm_openbsd_386.s
├── asm_openbsd_amd64.s
├── asm_solaris_amd64.s
├── bluetooth_linux.go
├── constants.go
├── creds_test.go
├── env_unix.go
├── env_unset.go
├── export_test.go
├── flock.go
├── flock_linux_32bit.go
├── gccgo.go
├── gccgo_c.c
├── gccgo_linux_amd64.go
├── mkall.sh
├── mkerrors.sh
├── mkpost.go
├── mksyscall.pl
├── mksyscall_solaris.pl
├── mksysctl_openbsd.pl
├── mksysnum_darwin.pl
├── mksysnum_dragonfly.pl
├── mksysnum_freebsd.pl
├── mksysnum_linux.pl
├── mksysnum_netbsd.pl
├── mksysnum_openbsd.pl
├── mmap_unix_test.go
├── race.go
├── race0.go
├── sockcmsg_linux.go
├── sockcmsg_unix.go
├── str.go
├── syscall.go
├── syscall_bsd.go
├── syscall_bsd_test.go
├── syscall_darwin.go
├── syscall_darwin_386.go
├── syscall_darwin_amd64.go
├── syscall_darwin_arm.go
├── syscall_darwin_arm64.go
├── syscall_dragonfly.go
├── syscall_dragonfly_amd64.go
├── syscall_freebsd.go
├── syscall_freebsd_386.go
├── syscall_freebsd_amd64.go
├── syscall_freebsd_arm.go
├── syscall_freebsd_test.go
├── syscall_linux.go
├── syscall_linux_386.go
├── syscall_linux_amd64.go
├── syscall_linux_arm.go
├── syscall_linux_arm64.go
├── syscall_linux_mips64x.go
├── syscall_linux_ppc64x.go
├── syscall_linux_s390x.go
├── syscall_linux_test.go
├── syscall_netbsd.go
├── syscall_netbsd_386.go
├── syscall_netbsd_amd64.go
├── syscall_netbsd_arm.go
├── syscall_no_getwd.go
├── syscall_openbsd.go
├── syscall_openbsd_386.go
├── syscall_openbsd_amd64.go
├── syscall_solaris.go
├── syscall_solaris_amd64.go
├── syscall_test.go
├── syscall_unix.go
├── syscall_unix_test.go
├── types_darwin.go
├── types_dragonfly.go
├── types_freebsd.go
├── types_linux.go
├── types_netbsd.go
├── types_openbsd.go
├── types_solaris.go
├── zerrors_darwin_386.go
├── zerrors_darwin_amd64.go
├── zerrors_darwin_arm.go
├── zerrors_darwin_arm64.go
├── zerrors_dragonfly_amd64.go
├── zerrors_freebsd_386.go
├── zerrors_freebsd_amd64.go
├── zerrors_freebsd_arm.go
├── zerrors_linux_386.go
├── zerrors_linux_amd64.go
├── zerrors_linux_arm.go
├── zerrors_linux_arm64.go
├── zerrors_linux_mips64.go
├── zerrors_linux_mips64le.go
├── zerrors_linux_ppc64.go
├── zerrors_linux_ppc64le.go
├── zerrors_linux_s390x.go
├── zerrors_netbsd_386.go
├── zerrors_netbsd_amd64.go
├── zerrors_netbsd_arm.go
├── zerrors_openbsd_386.go
├── zerrors_openbsd_amd64.go
├── zerrors_solaris_amd64.go
├── zsyscall_darwin_386.go
├── zsyscall_darwin_amd64.go
├── zsyscall_darwin_arm.go
├── zsyscall_darwin_arm64.go
├── zsyscall_dragonfly_amd64.go
├── zsyscall_freebsd_386.go
├── zsyscall_freebsd_amd64.go
├── zsyscall_freebsd_arm.go
├── zsyscall_linux_386.go
├── zsyscall_linux_amd64.go
├── zsyscall_linux_arm.go
├── zsyscall_linux_arm64.go
├── zsyscall_linux_mips64.go
├── zsyscall_linux_mips64le.go
├── zsyscall_linux_ppc64.go
├── zsyscall_linux_ppc64le.go
├── zsyscall_linux_s390x.go
├── zsyscall_netbsd_386.go
├── zsyscall_netbsd_amd64.go
├── zsyscall_netbsd_arm.go
├── zsyscall_openbsd_386.go
├── zsyscall_openbsd_amd64.go
├── zsyscall_solaris_amd64.go
├── zsysctl_openbsd.go
├── zsysnum_darwin_386.go
├── zsysnum_darwin_amd64.go
├── zsysnum_darwin_arm.go
├── zsysnum_darwin_arm64.go
├── zsysnum_dragonfly_amd64.go
├── zsysnum_freebsd_386.go
├── zsysnum_freebsd_amd64.go
├── zsysnum_freebsd_arm.go
├── zsysnum_linux_386.go
├── zsysnum_linux_amd64.go
├── zsysnum_linux_arm.go
├── zsysnum_linux_arm64.go
├── zsysnum_linux_mips64.go
├── zsysnum_linux_mips64le.go
├── zsysnum_linux_ppc64.go
├── zsysnum_linux_ppc64le.go
├── zsysnum_linux_s390x.go
├── zsysnum_netbsd_386.go
├── zsysnum_netbsd_amd64.go
├── zsysnum_netbsd_arm.go
├── zsysnum_openbsd_386.go
├── zsysnum_openbsd_amd64.go
├── zsysnum_solaris_amd64.go
├── ztypes_darwin_386.go
├── ztypes_darwin_amd64.go
├── ztypes_darwin_arm.go
├── ztypes_darwin_arm64.go
├── ztypes_dragonfly_amd64.go
├── ztypes_freebsd_386.go
├── ztypes_freebsd_amd64.go
├── ztypes_freebsd_arm.go
├── ztypes_linux_386.go
├── ztypes_linux_amd64.go
├── ztypes_linux_arm.go
├── ztypes_linux_arm64.go
├── ztypes_linux_mips64.go
├── ztypes_linux_mips64le.go
├── ztypes_linux_ppc64.go
├── ztypes_linux_ppc64le.go
├── ztypes_linux_s390x.go
├── ztypes_netbsd_386.go
├── ztypes_netbsd_amd64.go
├── ztypes_netbsd_arm.go
├── ztypes_openbsd_386.go
├── ztypes_openbsd_amd64.go
└── ztypes_solaris_amd64.go
└── windows
├── asm_windows_386.s
├── asm_windows_amd64.s
├── dll_windows.go
├── env_unset.go
├── env_windows.go
├── eventlog.go
├── exec_windows.go
├── mksyscall.go
├── race.go
├── race0.go
├── registry
├── export_test.go
├── key.go
├── mksyscall.go
├── registry_test.go
├── syscall.go
├── value.go
└── zsyscall_windows.go
├── security_windows.go
├── service.go
├── str.go
├── svc
├── debug
│ ├── log.go
│ └── service.go
├── event.go
├── eventlog
│ ├── install.go
│ ├── log.go
│ └── log_test.go
├── example
│ ├── beep.go
│ ├── install.go
│ ├── main.go
│ ├── manage.go
│ └── service.go
├── go12.c
├── go12.go
├── go13.go
├── mgr
│ ├── config.go
│ ├── mgr.go
│ ├── mgr_test.go
│ └── service.go
├── security.go
├── service.go
├── svc_test.go
├── sys_386.s
└── sys_amd64.s
├── syscall.go
├── syscall_test.go
├── syscall_windows.go
├── syscall_windows_test.go
├── zsyscall_windows.go
├── ztypes_windows.go
├── ztypes_windows_386.go
└── ztypes_windows_amd64.go
/.gitignore:
--------------------------------------------------------------------------------
1 | *.test
2 | /kube-namespace
3 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: all build
2 |
3 | all: build
4 |
5 | build:
6 | @go build -o kube-namespace
7 |
8 | test:
9 | @go test -v .
10 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | CoreOS Project
2 | Copyright 2016 CoreOS, Inc
3 |
4 | This product includes software developed at CoreOS, Inc.
5 | (http://www.coreos.com/).
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Kubernetes Per-Namespace CNI Configuration
2 |
3 | This is a CNI plugin for use with Kubernetes. It takes a mapping of
4 | namespaces to CNI network configurations, with an optional default,
5 | and delegates to other CNI plugins to set up networking. You might
6 | use this to place pods in a particular namespace onto an isolated
7 | network.
8 |
9 | There is an example configuration in `example.json`.
10 |
--------------------------------------------------------------------------------
/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "kube-namespace",
3 | "type": "kube-namespace",
4 | "log_level": "debug",
5 | "namespaces": {
6 | "isolated": {
7 | "name": "isolated-bridge",
8 | "type": "bridge",
9 | "bridge": "isolated-br0",
10 | "mtu": 1460,
11 | "addIf": "true",
12 | "isGateway": true,
13 | "ipMasq": true,
14 | "ipam": {
15 | "type": "host-local",
16 | "subnet": "10.2.0.0/16",
17 | "gateway": "10.2.0.1",
18 | "routes": [
19 | {
20 | "dst": "0.0.0.0/0"
21 | }
22 | ]
23 | }
24 | }
25 | },
26 | "default": {
27 | "name": "default-bridge",
28 | "type": "bridge",
29 | "bridge": "mybridge",
30 | "mtu": 1460,
31 | "addIf": "true",
32 | "isGateway": true,
33 | "ipMasq": true,
34 | "ipam": {
35 | "type": "host-local",
36 | "subnet": "10.1.0.0/16",
37 | "gateway": "10.1.0.1",
38 | "routes": [
39 | {
40 | "dst": "0.0.0.0/0"
41 | }
42 | ]
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/glide.lock:
--------------------------------------------------------------------------------
1 | hash: 9f832bbdf64df9fe9787b78c1244b818969b28066ca12970130ce029513704d6
2 | updated: 2016-09-27T11:53:34.925833123-04:00
3 | imports:
4 | - name: github.com/containernetworking/cni
5 | version: a29fc24f113ec11328edabaf883f9a8777a39ff2
6 | subpackages:
7 | - pkg/invoke
8 | - pkg/skel
9 | - pkg/types
10 | - pkg/version
11 | - name: github.com/Sirupsen/logrus
12 | version: 4b6ea7319e214d98c938f12692336f7ca9348d6b
13 | - name: golang.org/x/sys
14 | version: 8f0908ab3b2457e2e15403d3697c9ef5cb4b57a9
15 | subpackages:
16 | - unix
17 | testImports:
18 | - name: github.com/davecgh/go-spew
19 | version: 6d212800a42e8ab5c146b8ace3490ee17e5225f9
20 | subpackages:
21 | - spew
22 | - name: github.com/pmezard/go-difflib
23 | version: 792786c7400a136282c1664665ae0a8db921c6c2
24 | subpackages:
25 | - difflib
26 | - name: github.com/stretchr/testify
27 | version: 976c720a22c8eb4eb6a0b4348ad85ad12491a506
28 | subpackages:
29 | - assert
30 |
--------------------------------------------------------------------------------
/glide.yaml:
--------------------------------------------------------------------------------
1 | package: github.com/coreos/kube-namespace-cni
2 | import:
3 | - package: github.com/Sirupsen/logrus
4 | version: ~0.10.0
5 | - package: github.com/containernetworking/cni
6 | version: master
7 | subpackages:
8 | - pkg/invoke
9 | - pkg/skel
10 | - pkg/version
11 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/.gitignore:
--------------------------------------------------------------------------------
1 | logrus
2 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.3
4 | - 1.4
5 | - 1.5
6 | - tip
7 | install:
8 | - go get -t ./...
9 | script: GOMAXPROCS=4 GORACE="halt_on_error=1" go test -race -v ./...
10 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Simon Eskildsen
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
3 |
4 |
5 | The simplest way to use Logrus is simply the package-level exported logger:
6 |
7 | package main
8 |
9 | import (
10 | log "github.com/Sirupsen/logrus"
11 | )
12 |
13 | func main() {
14 | log.WithFields(log.Fields{
15 | "animal": "walrus",
16 | "number": 1,
17 | "size": 10,
18 | }).Info("A walrus appears")
19 | }
20 |
21 | Output:
22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10
23 |
24 | For a full guide visit https://github.com/Sirupsen/logrus
25 | */
26 | package logrus
27 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/examples/basic/basic.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "github.com/Sirupsen/logrus"
5 | )
6 |
7 | var log = logrus.New()
8 |
9 | func init() {
10 | log.Formatter = new(logrus.JSONFormatter)
11 | log.Formatter = new(logrus.TextFormatter) // default
12 | log.Level = logrus.DebugLevel
13 | }
14 |
15 | func main() {
16 | defer func() {
17 | err := recover()
18 | if err != nil {
19 | log.WithFields(logrus.Fields{
20 | "omg": true,
21 | "err": err,
22 | "number": 100,
23 | }).Fatal("The ice breaks!")
24 | }
25 | }()
26 |
27 | log.WithFields(logrus.Fields{
28 | "animal": "walrus",
29 | "number": 8,
30 | }).Debug("Started observing beach")
31 |
32 | log.WithFields(logrus.Fields{
33 | "animal": "walrus",
34 | "size": 10,
35 | }).Info("A group of walrus emerges from the ocean")
36 |
37 | log.WithFields(logrus.Fields{
38 | "omg": true,
39 | "number": 122,
40 | }).Warn("The group's number increased tremendously!")
41 |
42 | log.WithFields(logrus.Fields{
43 | "temperature": -4,
44 | }).Debug("Temperature changes")
45 |
46 | log.WithFields(logrus.Fields{
47 | "animal": "orca",
48 | "size": 9009,
49 | }).Panic("It's over 9000!")
50 | }
51 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/examples/hook/hook.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "github.com/Sirupsen/logrus"
5 | "gopkg.in/gemnasium/logrus-airbrake-hook.v2"
6 | )
7 |
8 | var log = logrus.New()
9 |
10 | func init() {
11 | log.Formatter = new(logrus.TextFormatter) // default
12 | log.Hooks.Add(airbrake.NewHook(123, "xyz", "development"))
13 | }
14 |
15 | func main() {
16 | log.WithFields(logrus.Fields{
17 | "animal": "walrus",
18 | "size": 10,
19 | }).Info("A group of walrus emerges from the ocean")
20 |
21 | log.WithFields(logrus.Fields{
22 | "omg": true,
23 | "number": 122,
24 | }).Warn("The group's number increased tremendously!")
25 |
26 | log.WithFields(logrus.Fields{
27 | "omg": true,
28 | "number": 100,
29 | }).Fatal("The ice breaks!")
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/hooks/syslog/README.md:
--------------------------------------------------------------------------------
1 | # Syslog Hooks for Logrus
2 |
3 | ## Usage
4 |
5 | ```go
6 | import (
7 | "log/syslog"
8 | "github.com/Sirupsen/logrus"
9 | logrus_syslog "github.com/Sirupsen/logrus/hooks/syslog"
10 | )
11 |
12 | func main() {
13 | log := logrus.New()
14 | hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "")
15 |
16 | if err == nil {
17 | log.Hooks.Add(hook)
18 | }
19 | }
20 | ```
21 |
22 | If you want to connect to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). Just assign empty string to the first two parameters of `NewSyslogHook`. It should look like the following.
23 |
24 | ```go
25 | import (
26 | "log/syslog"
27 | "github.com/Sirupsen/logrus"
28 | logrus_syslog "github.com/Sirupsen/logrus/hooks/syslog"
29 | )
30 |
31 | func main() {
32 | log := logrus.New()
33 | hook, err := logrus_syslog.NewSyslogHook("", "", syslog.LOG_INFO, "")
34 |
35 | if err == nil {
36 | log.Hooks.Add(hook)
37 | }
38 | }
39 | ```
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog_test.go:
--------------------------------------------------------------------------------
1 | package logrus_syslog
2 |
3 | import (
4 | "github.com/Sirupsen/logrus"
5 | "log/syslog"
6 | "testing"
7 | )
8 |
9 | func TestLocalhostAddAndPrint(t *testing.T) {
10 | log := logrus.New()
11 | hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "")
12 |
13 | if err != nil {
14 | t.Errorf("Unable to connect to local syslog.")
15 | }
16 |
17 | log.Hooks.Add(hook)
18 |
19 | for _, level := range hook.Levels() {
20 | if len(log.Hooks[level]) != 1 {
21 | t.Errorf("SyslogHook was not added. The length of log.Hooks[%v]: %v", level, len(log.Hooks[level]))
22 | }
23 | }
24 |
25 | log.Info("Congratulations!")
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/hooks/test/test_test.go:
--------------------------------------------------------------------------------
1 | package test
2 |
3 | import (
4 | "testing"
5 |
6 | "github.com/Sirupsen/logrus"
7 | "github.com/stretchr/testify/assert"
8 | )
9 |
10 | func TestAllHooks(t *testing.T) {
11 |
12 | assert := assert.New(t)
13 |
14 | logger, hook := NewNullLogger()
15 | assert.Nil(hook.LastEntry())
16 | assert.Equal(0, len(hook.Entries))
17 |
18 | logger.Error("Hello error")
19 | assert.Equal(logrus.ErrorLevel, hook.LastEntry().Level)
20 | assert.Equal("Hello error", hook.LastEntry().Message)
21 | assert.Equal(1, len(hook.Entries))
22 |
23 | logger.Warn("Hello warning")
24 | assert.Equal(logrus.WarnLevel, hook.LastEntry().Level)
25 | assert.Equal("Hello warning", hook.LastEntry().Message)
26 | assert.Equal(2, len(hook.Entries))
27 |
28 | hook.Reset()
29 | assert.Nil(hook.LastEntry())
30 | assert.Equal(0, len(hook.Entries))
31 |
32 | hook = NewGlobal()
33 |
34 | logrus.Error("Hello error")
35 | assert.Equal(logrus.ErrorLevel, hook.LastEntry().Level)
36 | assert.Equal("Hello error", hook.LastEntry().Message)
37 | assert.Equal(1, len(hook.Entries))
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/json_formatter.go:
--------------------------------------------------------------------------------
1 | package logrus
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | )
7 |
8 | type JSONFormatter struct {
9 | // TimestampFormat sets the format used for marshaling timestamps.
10 | TimestampFormat string
11 | }
12 |
13 | func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) {
14 | data := make(Fields, len(entry.Data)+3)
15 | for k, v := range entry.Data {
16 | switch v := v.(type) {
17 | case error:
18 | // Otherwise errors are ignored by `encoding/json`
19 | // https://github.com/Sirupsen/logrus/issues/137
20 | data[k] = v.Error()
21 | default:
22 | data[k] = v
23 | }
24 | }
25 | prefixFieldClashes(data)
26 |
27 | timestampFormat := f.TimestampFormat
28 | if timestampFormat == "" {
29 | timestampFormat = DefaultTimestampFormat
30 | }
31 |
32 | data["time"] = entry.Time.Format(timestampFormat)
33 | data["msg"] = entry.Message
34 | data["level"] = entry.Level.String()
35 |
36 | serialized, err := json.Marshal(data)
37 | if err != nil {
38 | return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
39 | }
40 | return append(serialized, '\n'), nil
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/terminal_bsd.go:
--------------------------------------------------------------------------------
1 | // +build darwin freebsd openbsd netbsd dragonfly
2 |
3 | package logrus
4 |
5 | import "syscall"
6 |
7 | const ioctlReadTermios = syscall.TIOCGETA
8 |
9 | type Termios syscall.Termios
10 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/terminal_linux.go:
--------------------------------------------------------------------------------
1 | // Based on ssh/terminal:
2 | // Copyright 2013 The Go Authors. All rights reserved.
3 | // Use of this source code is governed by a BSD-style
4 | // license that can be found in the LICENSE file.
5 |
6 | package logrus
7 |
8 | import "syscall"
9 |
10 | const ioctlReadTermios = syscall.TCGETS
11 |
12 | type Termios syscall.Termios
13 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/terminal_notwindows.go:
--------------------------------------------------------------------------------
1 | // Based on ssh/terminal:
2 | // Copyright 2011 The Go Authors. All rights reserved.
3 | // Use of this source code is governed by a BSD-style
4 | // license that can be found in the LICENSE file.
5 |
6 | // +build linux darwin freebsd openbsd netbsd dragonfly
7 |
8 | package logrus
9 |
10 | import (
11 | "syscall"
12 | "unsafe"
13 | )
14 |
15 | // IsTerminal returns true if stderr's file descriptor is a terminal.
16 | func IsTerminal() bool {
17 | fd := syscall.Stderr
18 | var termios Termios
19 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
20 | return err == 0
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/terminal_solaris.go:
--------------------------------------------------------------------------------
1 | // +build solaris
2 |
3 | package logrus
4 |
5 | import (
6 | "os"
7 |
8 | "golang.org/x/sys/unix"
9 | )
10 |
11 | // IsTerminal returns true if the given file descriptor is a terminal.
12 | func IsTerminal() bool {
13 | _, err := unix.IoctlGetTermios(int(os.Stdout.Fd()), unix.TCGETA)
14 | return err == nil
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/terminal_windows.go:
--------------------------------------------------------------------------------
1 | // Based on ssh/terminal:
2 | // Copyright 2011 The Go Authors. All rights reserved.
3 | // Use of this source code is governed by a BSD-style
4 | // license that can be found in the LICENSE file.
5 |
6 | // +build windows
7 |
8 | package logrus
9 |
10 | import (
11 | "syscall"
12 | "unsafe"
13 | )
14 |
15 | var kernel32 = syscall.NewLazyDLL("kernel32.dll")
16 |
17 | var (
18 | procGetConsoleMode = kernel32.NewProc("GetConsoleMode")
19 | )
20 |
21 | // IsTerminal returns true if stderr's file descriptor is a terminal.
22 | func IsTerminal() bool {
23 | fd := syscall.Stderr
24 | var st uint32
25 | r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0)
26 | return r != 0 && e == 0
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/writer.go:
--------------------------------------------------------------------------------
1 | package logrus
2 |
3 | import (
4 | "bufio"
5 | "io"
6 | "runtime"
7 | )
8 |
9 | func (logger *Logger) Writer() *io.PipeWriter {
10 | reader, writer := io.Pipe()
11 |
12 | go logger.writerScanner(reader)
13 | runtime.SetFinalizer(writer, writerFinalizer)
14 |
15 | return writer
16 | }
17 |
18 | func (logger *Logger) writerScanner(reader *io.PipeReader) {
19 | scanner := bufio.NewScanner(reader)
20 | for scanner.Scan() {
21 | logger.Print(scanner.Text())
22 | }
23 | if err := scanner.Err(); err != nil {
24 | logger.Errorf("Error while reading from Writer: %s", err)
25 | }
26 | reader.Close()
27 | }
28 |
29 | func writerFinalizer(writer *io.PipeWriter) {
30 | writer.Close()
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/.gitignore:
--------------------------------------------------------------------------------
1 | bin/
2 | gopath/
3 | *.sw[ponm]
4 | .vagrant
5 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | sudo: required
3 | dist: trusty
4 |
5 | go:
6 | - 1.5.4
7 | - 1.6.2
8 | - tip
9 |
10 | env:
11 | global:
12 | - TOOLS_CMD=golang.org/x/tools/cmd
13 | - PATH=$GOROOT/bin:$PATH
14 | - GO15VENDOREXPERIMENT=1
15 | matrix:
16 | - TARGET=amd64
17 | - TARGET=arm
18 | - TARGET=arm64
19 | - TARGET=ppc64le
20 |
21 | matrix:
22 | fast_finish: true
23 | allow_failures:
24 | - go: tip
25 | exclude:
26 | - go: 1.5.4
27 | env: arm
28 | - go: 1.5.4
29 | env: arm64
30 | - go: 1.5.4
31 | env: ppc64le
32 | - go: tip
33 | env: arm
34 | - go: tip
35 | env: arm64
36 | - go: tip
37 | env: ppc64le
38 |
39 | install:
40 | - go get ${TOOLS_CMD}/cover
41 | - go get github.com/modocache/gover
42 | - go get github.com/mattn/goveralls
43 |
44 | script:
45 | - >
46 | if [ "${TARGET}" == "amd64" ]; then
47 | GOARCH="${TARGET}" ./test;
48 | else
49 | GOARCH="${TARGET}" ./build;
50 | fi
51 |
52 | notifications:
53 | email: false
54 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/Documentation/dhcp.md:
--------------------------------------------------------------------------------
1 | # dhcp plugin
2 |
3 | ## Overview
4 |
5 | With dhcp plugin the containers can get an IP allocated by a DHCP server already running on your network.
6 | This can be especially useful with plugin types such as [macvlan](https://github.com/containernetworking/cni/blob/master/Documentation/macvlan.md).
7 | Because a DHCP lease must be periodically renewed for the duration of container lifetime, a separate daemon is required to be running.
8 | The same plugin binary can also be run in the daemon mode.
9 |
10 | ## Operation
11 | To use the dhcp IPAM plugin, first launch the dhcp daemon:
12 |
13 | ```
14 | # Make sure the unix socket has been removed
15 | $ rm -f /run/cni/dhcp.sock
16 | $ ./dhcp daemon
17 | ```
18 |
19 | Alternatively, you can use systemd socket activation protocol.
20 | Be sure that the .socket file uses /run/cni/dhcp.sock as the socket path.
21 |
22 | With the daemon running, containers using the dhcp plugin can be launched.
23 |
24 | ## Example configuration
25 |
26 | ```
27 | {
28 | "ipam": {
29 | "type": "dhcp",
30 | }
31 | }
32 |
33 | ## Network configuration reference
34 |
35 | * `type` (string, required): "dhcp"
36 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/Documentation/tuning.md:
--------------------------------------------------------------------------------
1 | # tuning plugin
2 |
3 | ## Overview
4 |
5 | This plugin can change some system controls (sysctls) in the network namespace.
6 | It does not create any network interfaces and therefore does not bring connectivity by itself.
7 | It is only useful when used in addition to other plugins.
8 |
9 | ## Operation
10 | The following network configuration file
11 | ```
12 | {
13 | "name": "mytuning",
14 | "type": "tuning",
15 | "sysctl": {
16 | "net.core.somaxconn": "500"
17 | }
18 | }
19 | ```
20 | will set /proc/sys/net/core/somaxconn to 500.
21 | Other sysctls can be modified as long as they belong to the network namespace (`/proc/sys/net/*`).
22 |
23 | A successful result would simply be:
24 | ```
25 | { }
26 | ```
27 |
28 | ## Network sysctls documentation
29 |
30 | Some network sysctls are documented in the Linux sources:
31 |
32 | - [Documentation/sysctl/net.txt](https://www.kernel.org/doc/Documentation/sysctl/net.txt)
33 | - [Documentation/networking/ip-sysctl.txt](https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt)
34 | - [Documentation/networking/](https://www.kernel.org/doc/Documentation/networking/)
35 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/Godeps/Readme:
--------------------------------------------------------------------------------
1 | This directory tree is generated automatically by godep.
2 |
3 | Please do not edit.
4 |
5 | See https://github.com/tools/godep for more information.
6 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/MAINTAINERS:
--------------------------------------------------------------------------------
1 | Dan Williams (@dcbw)
2 | Gabe Rosenhouse (@rosenhouse)
3 | Michael Bridgen (@squaremo)
4 | Stefan Junker (@steveeJ)
5 | Tom Denham (@tomdee)
6 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/Vagrantfile:
--------------------------------------------------------------------------------
1 | # -*- mode: ruby -*-
2 | # vi: set ft=ruby :
3 |
4 | Vagrant.configure(2) do |config|
5 | config.vm.box = "bento/ubuntu-16.04"
6 |
7 | config.vm.synced_folder ".", "/go/src/github.com/containernetworking/cni"
8 |
9 | config.vm.provision "shell", inline: <<-SHELL
10 | set -e -x -u
11 |
12 | apt-get update -y || (sleep 40 && apt-get update -y)
13 | apt-get install -y golang git
14 | echo "export GOPATH=/go" >> /root/.bashrc
15 | export GOPATH=/go
16 | go get github.com/tools/godep
17 | cd /go/src/github.com/containernetworking/cni
18 | /go/bin/godep restore
19 | SHELL
20 | end
21 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/build:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | set -e
3 |
4 | ORG_PATH="github.com/containernetworking"
5 | REPO_PATH="${ORG_PATH}/cni"
6 |
7 | if [ ! -h gopath/src/${REPO_PATH} ]; then
8 | mkdir -p gopath/src/${ORG_PATH}
9 | ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255
10 | fi
11 |
12 | export GO15VENDOREXPERIMENT=1
13 | export GOPATH=${PWD}/gopath
14 |
15 | echo "Building API"
16 | go build "$@" ${REPO_PATH}/libcni
17 |
18 | echo "Building reference CLI"
19 | go build -o ${PWD}/bin/cnitool "$@" ${REPO_PATH}/cnitool
20 |
21 | echo "Building plugins"
22 | PLUGINS="plugins/meta/* plugins/main/* plugins/ipam/* plugins/test/*"
23 | for d in $PLUGINS; do
24 | if [ -d $d ]; then
25 | plugin=$(basename $d)
26 | echo " " $plugin
27 | go build -o ${PWD}/bin/$plugin "$@" ${REPO_PATH}/$d
28 | fi
29 | done
30 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/pkg/invoke/fakes/cni_args.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package fakes
16 |
17 | type CNIArgs struct {
18 | AsEnvCall struct {
19 | Returns struct {
20 | Env []string
21 | }
22 | }
23 | }
24 |
25 | func (a *CNIArgs) AsEnv() []string {
26 | return a.AsEnvCall.Returns.Env
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/pkg/invoke/fakes/version_decoder.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package fakes
16 |
17 | import "github.com/containernetworking/cni/pkg/version"
18 |
19 | type VersionDecoder struct {
20 | DecodeCall struct {
21 | Received struct {
22 | JSONBytes []byte
23 | }
24 | Returns struct {
25 | PluginInfo version.PluginInfo
26 | Error error
27 | }
28 | }
29 | }
30 |
31 | func (e *VersionDecoder) Decode(jsonData []byte) (version.PluginInfo, error) {
32 | e.DecodeCall.Received.JSONBytes = jsonData
33 | return e.DecodeCall.Returns.PluginInfo, e.DecodeCall.Returns.Error
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/pkg/ip/ip_suite_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package ip_test
16 |
17 | import (
18 | . "github.com/onsi/ginkgo"
19 | . "github.com/onsi/gomega"
20 |
21 | "testing"
22 | )
23 |
24 | func TestIp(t *testing.T) {
25 | RegisterFailHandler(Fail)
26 | RunSpecs(t, "Ip Suite")
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/pkg/ip/ipforward.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package ip
16 |
17 | import (
18 | "io/ioutil"
19 | )
20 |
21 | func EnableIP4Forward() error {
22 | return echo1("/proc/sys/net/ipv4/ip_forward")
23 | }
24 |
25 | func EnableIP6Forward() error {
26 | return echo1("/proc/sys/net/ipv6/conf/all/forwarding")
27 | }
28 |
29 | func echo1(f string) error {
30 | return ioutil.WriteFile(f, []byte("1"), 0644)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/pkg/ipam/ipam_suite_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package ipam_test
16 |
17 | import (
18 | . "github.com/onsi/ginkgo"
19 | . "github.com/onsi/gomega"
20 |
21 | "testing"
22 | )
23 |
24 | func TestIpam(t *testing.T) {
25 | RegisterFailHandler(Fail)
26 | RunSpecs(t, "Ipam Suite")
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/pkg/ns/ns_suite_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package ns_test
16 |
17 | import (
18 | "math/rand"
19 | "runtime"
20 |
21 | . "github.com/onsi/ginkgo"
22 | "github.com/onsi/ginkgo/config"
23 | . "github.com/onsi/gomega"
24 |
25 | "testing"
26 | )
27 |
28 | func TestNs(t *testing.T) {
29 | rand.Seed(config.GinkgoConfig.RandomSeed)
30 | runtime.LockOSThread()
31 |
32 | RegisterFailHandler(Fail)
33 | RunSpecs(t, "pkg/ns Suite")
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/pkg/skel/skel_suite_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package skel
16 |
17 | import (
18 | . "github.com/onsi/ginkgo"
19 | . "github.com/onsi/gomega"
20 |
21 | "testing"
22 | )
23 |
24 | func TestSkel(t *testing.T) {
25 | RegisterFailHandler(Fail)
26 | RunSpecs(t, "Skel Suite")
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/pkg/testutils/bad_reader.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package testutils
16 |
17 | import "errors"
18 |
19 | // BadReader is an io.Reader which always errors
20 | type BadReader struct {
21 | Error error
22 | }
23 |
24 | func (r *BadReader) Read(buffer []byte) (int, error) {
25 | if r.Error != nil {
26 | return 0, r.Error
27 | }
28 | return 0, errors.New("banana")
29 | }
30 |
31 | func (r *BadReader) Close() error {
32 | return nil
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/pkg/types/types_suite_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package types_test
16 |
17 | import (
18 | . "github.com/onsi/ginkgo"
19 | . "github.com/onsi/gomega"
20 |
21 | "testing"
22 | )
23 |
24 | func TestTypes(t *testing.T) {
25 | RegisterFailHandler(Fail)
26 | RunSpecs(t, "Types Suite")
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/pkg/utils/hwaddr/hwaddr_suite_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package hwaddr_test
16 |
17 | import (
18 | . "github.com/onsi/ginkgo"
19 | . "github.com/onsi/gomega"
20 |
21 | "testing"
22 | )
23 |
24 | func TestHwaddr(t *testing.T) {
25 | RegisterFailHandler(Fail)
26 | RunSpecs(t, "Hwaddr Suite")
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/pkg/utils/utils_suite_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package utils_test
16 |
17 | import (
18 | . "github.com/onsi/ginkgo"
19 | . "github.com/onsi/gomega"
20 |
21 | "testing"
22 | )
23 |
24 | func TestUtils(t *testing.T) {
25 | RegisterFailHandler(Fail)
26 | RunSpecs(t, "Utils Suite")
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/pkg/version/testhelpers/testhelpers_suite_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package testhelpers_test
16 |
17 | import (
18 | . "github.com/onsi/ginkgo"
19 | . "github.com/onsi/gomega"
20 |
21 | "testing"
22 | )
23 |
24 | func TestTesthelpers(t *testing.T) {
25 | RegisterFailHandler(Fail)
26 | RunSpecs(t, "Testhelpers Suite")
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/pkg/version/version_suite_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package version_test
16 |
17 | import (
18 | . "github.com/onsi/ginkgo"
19 | . "github.com/onsi/gomega"
20 |
21 | "testing"
22 | )
23 |
24 | func TestVersion(t *testing.T) {
25 | RegisterFailHandler(Fail)
26 | RunSpecs(t, "Version Suite")
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/plugins/ipam/host-local/backend/store.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package backend
16 |
17 | import "net"
18 |
19 | type Store interface {
20 | Lock() error
21 | Unlock() error
22 | Close() error
23 | Reserve(id string, ip net.IP) (bool, error)
24 | LastReservedIP() (net.IP, error)
25 | Release(ip net.IP) error
26 | ReleaseByID(id string) error
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/plugins/ipam/host-local/host_local_suite_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package main_test
16 |
17 | import (
18 | . "github.com/onsi/ginkgo"
19 | . "github.com/onsi/gomega"
20 |
21 | "testing"
22 | )
23 |
24 | func TestHostLocal(t *testing.T) {
25 | RegisterFailHandler(Fail)
26 | RunSpecs(t, "HostLocal Suite")
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/plugins/main/bridge/bridge_suite_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package main
16 |
17 | import (
18 | . "github.com/onsi/ginkgo"
19 | . "github.com/onsi/gomega"
20 |
21 | "testing"
22 | )
23 |
24 | func TestBridge(t *testing.T) {
25 | RegisterFailHandler(Fail)
26 | RunSpecs(t, "bridge Suite")
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/plugins/main/ipvlan/ipvlan_suite_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package main
16 |
17 | import (
18 | . "github.com/onsi/ginkgo"
19 | . "github.com/onsi/gomega"
20 |
21 | "testing"
22 | )
23 |
24 | func TestIpvlan(t *testing.T) {
25 | RegisterFailHandler(Fail)
26 | RunSpecs(t, "ipvlan Suite")
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/plugins/main/macvlan/macvlan_suite_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package main
16 |
17 | import (
18 | . "github.com/onsi/ginkgo"
19 | . "github.com/onsi/gomega"
20 |
21 | "testing"
22 | )
23 |
24 | func TestMacvlan(t *testing.T) {
25 | RegisterFailHandler(Fail)
26 | RunSpecs(t, "macvlan Suite")
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/plugins/main/ptp/ptp_suite_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 CNI authors
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package main
16 |
17 | import (
18 | . "github.com/onsi/ginkgo"
19 | . "github.com/onsi/gomega"
20 |
21 | "testing"
22 | )
23 |
24 | func TestPtp(t *testing.T) {
25 | RegisterFailHandler(Fail)
26 | RunSpecs(t, "ptp Suite")
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/scripts/docker-run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Run a docker container with network namespace set up by the
4 | # CNI plugins.
5 |
6 | # Example usage: ./docker-run.sh --rm busybox /sbin/ifconfig
7 |
8 | contid=$(docker run -d --net=none busybox:latest /bin/sleep 10000000)
9 | pid=$(docker inspect -f '{{ .State.Pid }}' $contid)
10 | netnspath=/proc/$pid/ns/net
11 |
12 | ./exec-plugins.sh add $contid $netnspath
13 |
14 | function cleanup() {
15 | ./exec-plugins.sh del $contid $netnspath
16 | docker kill $contid >/dev/null
17 | }
18 | trap cleanup EXIT
19 |
20 | docker run --net=container:$contid $@
21 |
22 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/scripts/exec-plugins.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | if [[ ${DEBUG} -gt 0 ]]; then set -x; fi
4 |
5 | NETCONFPATH=${NETCONFPATH-/etc/cni/net.d}
6 |
7 | function exec_plugins() {
8 | i=0
9 | contid=$2
10 | netns=$3
11 | export CNI_COMMAND=$(echo $1 | tr '[:lower:]' '[:upper:]')
12 | export PATH=$CNI_PATH:$PATH
13 | export CNI_CONTAINERID=$contid
14 | export CNI_NETNS=$netns
15 |
16 | for netconf in $(echo $NETCONFPATH/*.conf | sort); do
17 | name=$(jq -r '.name' <$netconf)
18 | plugin=$(jq -r '.type' <$netconf)
19 | export CNI_IFNAME=$(printf eth%d $i)
20 |
21 | res=$($plugin <$netconf)
22 | if [ $? -ne 0 ]; then
23 | errmsg=$(echo $res | jq -r '.msg')
24 | if [ -z "$errmsg" ]; then
25 | errmsg=$res
26 | fi
27 |
28 | echo "${name} : error executing $CNI_COMMAND: $errmsg"
29 | exit 1
30 | elif [[ ${DEBUG} -gt 0 ]]; then
31 | echo ${res} | jq -r .
32 | fi
33 |
34 | let "i=i+1"
35 | done
36 | }
37 |
38 | if [ $# -ne 3 ]; then
39 | echo "Usage: $0 add|del CONTAINER-ID NETNS-PATH"
40 | echo " Adds or deletes the container specified by NETNS-PATH to the networks"
41 | echo " specified in \$NETCONFPATH directory"
42 | exit 1
43 | fi
44 |
45 | exec_plugins $1 $2 $3
46 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/scripts/priv-net-run.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | set -e
3 | if [[ ${DEBUG} -gt 0 ]]; then set -x; fi
4 |
5 | # Run a command in a private network namespace
6 | # set up by CNI plugins
7 | contid=$(printf '%x%x%x%x' $RANDOM $RANDOM $RANDOM $RANDOM)
8 | netnspath=/var/run/netns/$contid
9 |
10 | ip netns add $contid
11 | ./exec-plugins.sh add $contid $netnspath
12 |
13 |
14 | function cleanup() {
15 | ./exec-plugins.sh del $contid $netnspath
16 | ip netns delete $contid
17 | }
18 | trap cleanup EXIT
19 |
20 | ip netns exec $contid "$@"
21 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/d2g/dhcp4/README.md:
--------------------------------------------------------------------------------
1 | # DHCP4 - A DHCP library written in Go.
2 |
3 | Warning: This library is still being developed. Function calls will change.
4 |
5 | I've removed Server Functionality, for me this project supports the underlying DHCP format not the implementation.
6 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/d2g/dhcp4client/README.md:
--------------------------------------------------------------------------------
1 | dhcp4client [](http://godoc.org/github.com/d2g/dhcp4client) [](https://coveralls.io/r/d2g/dhcp4client?branch=HEAD) [](https://codeship.com/projects/70187)
2 | ===========
3 |
4 | DHCP Client
5 |
6 |
7 | ###### Thanks to:
8 | @eyakubovich For AF_PACKET support.
9 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/d2g/dhcp4client/init.go:
--------------------------------------------------------------------------------
1 | package dhcp4client
2 |
3 | import (
4 | "math/rand"
5 | "time"
6 | )
7 |
8 | func init() {
9 | rand.Seed(time.Now().Unix())
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | TODO
3 | tmp/**/*
4 | *.coverprofile
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.3
4 | - 1.4
5 | - 1.5
6 | - tip
7 |
8 | install:
9 | - go get -v -t ./...
10 | - go get golang.org/x/tools/cmd/cover
11 | - go get github.com/onsi/gomega
12 | - go install github.com/onsi/ginkgo/ginkgo
13 | - export PATH=$PATH:$HOME/gopath/bin
14 |
15 | script: $HOME/gopath/bin/ginkgo -r --randomizeAllSpecs --randomizeSuites --race --trace
16 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013-2014 Onsi Fakhouri
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/ginkgo/convert_command.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "flag"
5 | "fmt"
6 | "github.com/onsi/ginkgo/ginkgo/convert"
7 | "os"
8 | )
9 |
10 | func BuildConvertCommand() *Command {
11 | return &Command{
12 | Name: "convert",
13 | FlagSet: flag.NewFlagSet("convert", flag.ExitOnError),
14 | UsageCommand: "ginkgo convert /path/to/package",
15 | Usage: []string{
16 | "Convert the package at the passed in path from an XUnit-style test to a Ginkgo-style test",
17 | },
18 | Command: convertPackage,
19 | }
20 | }
21 |
22 | func convertPackage(args []string, additionalArgs []string) {
23 | if len(args) != 1 {
24 | println(fmt.Sprintf("usage: ginkgo convert /path/to/your/package"))
25 | os.Exit(1)
26 | }
27 |
28 | defer func() {
29 | err := recover()
30 | if err != nil {
31 | switch err := err.(type) {
32 | case error:
33 | println(err.Error())
34 | case string:
35 | println(err)
36 | default:
37 | println(fmt.Sprintf("unexpected error: %#v", err))
38 | }
39 | os.Exit(1)
40 | }
41 | }()
42 |
43 | convert.RewritePackage(args[0])
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/ginkgo/help_command.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "flag"
5 | "fmt"
6 | )
7 |
8 | func BuildHelpCommand() *Command {
9 | return &Command{
10 | Name: "help",
11 | FlagSet: flag.NewFlagSet("help", flag.ExitOnError),
12 | UsageCommand: "ginkgo help ",
13 | Usage: []string{
14 | "Print usage information. If a command is passed in, print usage information just for that command.",
15 | },
16 | Command: printHelp,
17 | }
18 | }
19 |
20 | func printHelp(args []string, additionalArgs []string) {
21 | if len(args) == 0 {
22 | usage()
23 | } else {
24 | command, found := commandMatching(args[0])
25 | if !found {
26 | complainAndQuit(fmt.Sprintf("Unknown command: %s", args[0]))
27 | }
28 |
29 | usageForCommand(command, true)
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/ginkgo/interrupthandler/interrupt_handler.go:
--------------------------------------------------------------------------------
1 | package interrupthandler
2 |
3 | import (
4 | "os"
5 | "os/signal"
6 | "sync"
7 | "syscall"
8 | )
9 |
10 | type InterruptHandler struct {
11 | interruptCount int
12 | lock *sync.Mutex
13 | C chan bool
14 | }
15 |
16 | func NewInterruptHandler() *InterruptHandler {
17 | h := &InterruptHandler{
18 | lock: &sync.Mutex{},
19 | C: make(chan bool, 0),
20 | }
21 |
22 | go h.handleInterrupt()
23 | SwallowSigQuit()
24 |
25 | return h
26 | }
27 |
28 | func (h *InterruptHandler) WasInterrupted() bool {
29 | h.lock.Lock()
30 | defer h.lock.Unlock()
31 |
32 | return h.interruptCount > 0
33 | }
34 |
35 | func (h *InterruptHandler) handleInterrupt() {
36 | c := make(chan os.Signal, 1)
37 | signal.Notify(c, os.Interrupt, syscall.SIGTERM)
38 |
39 | <-c
40 | signal.Stop(c)
41 |
42 | h.lock.Lock()
43 | h.interruptCount++
44 | if h.interruptCount == 1 {
45 | close(h.C)
46 | } else if h.interruptCount > 5 {
47 | os.Exit(1)
48 | }
49 | h.lock.Unlock()
50 |
51 | go h.handleInterrupt()
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/ginkgo/interrupthandler/sigquit_swallower_unix.go:
--------------------------------------------------------------------------------
1 | // +build freebsd openbsd netbsd dragonfly darwin linux
2 |
3 | package interrupthandler
4 |
5 | import (
6 | "os"
7 | "os/signal"
8 | "syscall"
9 | )
10 |
11 | func SwallowSigQuit() {
12 | c := make(chan os.Signal, 1024)
13 | signal.Notify(c, syscall.SIGQUIT)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/ginkgo/interrupthandler/sigquit_swallower_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package interrupthandler
4 |
5 | func SwallowSigQuit() {
6 | //noop
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/log_writer.go:
--------------------------------------------------------------------------------
1 | package testrunner
2 |
3 | import (
4 | "bytes"
5 | "fmt"
6 | "io"
7 | "log"
8 | "strings"
9 | "sync"
10 | )
11 |
12 | type logWriter struct {
13 | buffer *bytes.Buffer
14 | lock *sync.Mutex
15 | log *log.Logger
16 | }
17 |
18 | func newLogWriter(target io.Writer, node int) *logWriter {
19 | return &logWriter{
20 | buffer: &bytes.Buffer{},
21 | lock: &sync.Mutex{},
22 | log: log.New(target, fmt.Sprintf("[%d] ", node), 0),
23 | }
24 | }
25 |
26 | func (w *logWriter) Write(data []byte) (n int, err error) {
27 | w.lock.Lock()
28 | defer w.lock.Unlock()
29 |
30 | w.buffer.Write(data)
31 | contents := w.buffer.String()
32 |
33 | lines := strings.Split(contents, "\n")
34 | for _, line := range lines[0 : len(lines)-1] {
35 | w.log.Println(line)
36 | }
37 |
38 | w.buffer.Reset()
39 | w.buffer.Write([]byte(lines[len(lines)-1]))
40 | return len(data), nil
41 | }
42 |
43 | func (w *logWriter) Close() error {
44 | w.lock.Lock()
45 | defer w.lock.Unlock()
46 |
47 | if w.buffer.Len() > 0 {
48 | w.log.Println(w.buffer.String())
49 | }
50 |
51 | return nil
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/run_result.go:
--------------------------------------------------------------------------------
1 | package testrunner
2 |
3 | type RunResult struct {
4 | Passed bool
5 | HasProgrammaticFocus bool
6 | }
7 |
8 | func PassingRunResult() RunResult {
9 | return RunResult{
10 | Passed: true,
11 | HasProgrammaticFocus: false,
12 | }
13 | }
14 |
15 | func FailingRunResult() RunResult {
16 | return RunResult{
17 | Passed: false,
18 | HasProgrammaticFocus: false,
19 | }
20 | }
21 |
22 | func (r RunResult) Merge(o RunResult) RunResult {
23 | return RunResult{
24 | Passed: r.Passed && o.Passed,
25 | HasProgrammaticFocus: r.HasProgrammaticFocus || o.HasProgrammaticFocus,
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/ginkgo/unfocus_command.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "flag"
5 | "fmt"
6 | "os/exec"
7 | )
8 |
9 | func BuildUnfocusCommand() *Command {
10 | return &Command{
11 | Name: "unfocus",
12 | AltName: "blur",
13 | FlagSet: flag.NewFlagSet("unfocus", flag.ExitOnError),
14 | UsageCommand: "ginkgo unfocus (or ginkgo blur)",
15 | Usage: []string{
16 | "Recursively unfocuses any focused tests under the current directory",
17 | },
18 | Command: unfocusSpecs,
19 | }
20 | }
21 |
22 | func unfocusSpecs([]string, []string) {
23 | unfocus("Describe")
24 | unfocus("Context")
25 | unfocus("It")
26 | unfocus("Measure")
27 | unfocus("DescribeTable")
28 | unfocus("Entry")
29 | }
30 |
31 | func unfocus(component string) {
32 | fmt.Printf("Removing F%s...\n", component)
33 | cmd := exec.Command("gofmt", fmt.Sprintf("-r=F%s -> %s", component, component), "-w", ".")
34 | out, _ := cmd.CombinedOutput()
35 | if string(out) != "" {
36 | println(string(out))
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/ginkgo/version_command.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "flag"
5 | "fmt"
6 | "github.com/onsi/ginkgo/config"
7 | )
8 |
9 | func BuildVersionCommand() *Command {
10 | return &Command{
11 | Name: "version",
12 | FlagSet: flag.NewFlagSet("version", flag.ExitOnError),
13 | UsageCommand: "ginkgo version",
14 | Usage: []string{
15 | "Print Ginkgo's version",
16 | },
17 | Command: printVersion,
18 | }
19 | }
20 |
21 | func printVersion([]string, []string) {
22 | fmt.Printf("Ginkgo Version %s\n", config.VERSION)
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/ginkgo/watch/delta.go:
--------------------------------------------------------------------------------
1 | package watch
2 |
3 | import "sort"
4 |
5 | type Delta struct {
6 | ModifiedPackages []string
7 |
8 | NewSuites []*Suite
9 | RemovedSuites []*Suite
10 | modifiedSuites []*Suite
11 | }
12 |
13 | type DescendingByDelta []*Suite
14 |
15 | func (a DescendingByDelta) Len() int { return len(a) }
16 | func (a DescendingByDelta) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
17 | func (a DescendingByDelta) Less(i, j int) bool { return a[i].Delta() > a[j].Delta() }
18 |
19 | func (d Delta) ModifiedSuites() []*Suite {
20 | sort.Sort(DescendingByDelta(d.modifiedSuites))
21 | return d.modifiedSuites
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/integration/integration.go:
--------------------------------------------------------------------------------
1 | package integration
2 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/internal/codelocation/code_location.go:
--------------------------------------------------------------------------------
1 | package codelocation
2 |
3 | import (
4 | "regexp"
5 | "runtime"
6 | "runtime/debug"
7 | "strings"
8 |
9 | "github.com/onsi/ginkgo/types"
10 | )
11 |
12 | func New(skip int) types.CodeLocation {
13 | _, file, line, _ := runtime.Caller(skip + 1)
14 | stackTrace := PruneStack(string(debug.Stack()), skip)
15 | return types.CodeLocation{FileName: file, LineNumber: line, FullStackTrace: stackTrace}
16 | }
17 |
18 | func PruneStack(fullStackTrace string, skip int) string {
19 | stack := strings.Split(fullStackTrace, "\n")
20 | if len(stack) > 2*(skip+1) {
21 | stack = stack[2*(skip+1):]
22 | }
23 | prunedStack := []string{}
24 | re := regexp.MustCompile(`\/ginkgo\/|\/pkg\/testing\/|\/pkg\/runtime\/`)
25 | for i := 0; i < len(stack)/2; i++ {
26 | if !re.Match([]byte(stack[i*2])) {
27 | prunedStack = append(prunedStack, stack[i*2])
28 | prunedStack = append(prunedStack, stack[i*2+1])
29 | }
30 | }
31 | return strings.Join(prunedStack, "\n")
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/internal/leafnodes/interfaces.go:
--------------------------------------------------------------------------------
1 | package leafnodes
2 |
3 | import (
4 | "github.com/onsi/ginkgo/types"
5 | )
6 |
7 | type BasicNode interface {
8 | Type() types.SpecComponentType
9 | Run() (types.SpecState, types.SpecFailure)
10 | CodeLocation() types.CodeLocation
11 | }
12 |
13 | type SubjectNode interface {
14 | BasicNode
15 |
16 | Text() string
17 | Flag() types.FlagType
18 | Samples() int
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor.go:
--------------------------------------------------------------------------------
1 | package remote
2 |
3 | /*
4 | The OutputInterceptor is used by the ForwardingReporter to
5 | intercept and capture all stdin and stderr output during a test run.
6 | */
7 | type OutputInterceptor interface {
8 | StartInterceptingOutput() error
9 | StopInterceptingAndReturnOutput() (string, error)
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_win.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package remote
4 |
5 | import (
6 | "errors"
7 | )
8 |
9 | func NewOutputInterceptor() OutputInterceptor {
10 | return &outputInterceptor{}
11 | }
12 |
13 | type outputInterceptor struct {
14 | intercepting bool
15 | }
16 |
17 | func (interceptor *outputInterceptor) StartInterceptingOutput() error {
18 | if interceptor.intercepting {
19 | return errors.New("Already intercepting output!")
20 | }
21 | interceptor.intercepting = true
22 |
23 | // not working on windows...
24 |
25 | return nil
26 | }
27 |
28 | func (interceptor *outputInterceptor) StopInterceptingAndReturnOutput() (string, error) {
29 | // not working on windows...
30 | interceptor.intercepting = false
31 |
32 | return "", nil
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/internal/specrunner/random_id.go:
--------------------------------------------------------------------------------
1 | package specrunner
2 |
3 | import (
4 | "crypto/rand"
5 | "fmt"
6 | )
7 |
8 | func randomID() string {
9 | b := make([]byte, 8)
10 | _, err := rand.Read(b)
11 | if err != nil {
12 | return ""
13 | }
14 | return fmt.Sprintf("%x-%x-%x-%x", b[0:2], b[2:4], b[4:6], b[6:8])
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/internal/writer/fake_writer.go:
--------------------------------------------------------------------------------
1 | package writer
2 |
3 | type FakeGinkgoWriter struct {
4 | EventStream []string
5 | }
6 |
7 | func NewFake() *FakeGinkgoWriter {
8 | return &FakeGinkgoWriter{
9 | EventStream: []string{},
10 | }
11 | }
12 |
13 | func (writer *FakeGinkgoWriter) AddEvent(event string) {
14 | writer.EventStream = append(writer.EventStream, event)
15 | }
16 |
17 | func (writer *FakeGinkgoWriter) Truncate() {
18 | writer.EventStream = append(writer.EventStream, "TRUNCATE")
19 | }
20 |
21 | func (writer *FakeGinkgoWriter) DumpOut() {
22 | writer.EventStream = append(writer.EventStream, "DUMP")
23 | }
24 |
25 | func (writer *FakeGinkgoWriter) DumpOutWithHeader(header string) {
26 | writer.EventStream = append(writer.EventStream, "DUMP_WITH_HEADER: "+header)
27 | }
28 |
29 | func (writer *FakeGinkgoWriter) Write(data []byte) (n int, err error) {
30 | return 0, nil
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/reporters/reporter.go:
--------------------------------------------------------------------------------
1 | package reporters
2 |
3 | import (
4 | "github.com/onsi/ginkgo/config"
5 | "github.com/onsi/ginkgo/types"
6 | )
7 |
8 | type Reporter interface {
9 | SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary)
10 | BeforeSuiteDidRun(setupSummary *types.SetupSummary)
11 | SpecWillRun(specSummary *types.SpecSummary)
12 | SpecDidComplete(specSummary *types.SpecSummary)
13 | AfterSuiteDidRun(setupSummary *types.SetupSummary)
14 | SpecSuiteDidEnd(summary *types.SuiteSummary)
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/types/code_location.go:
--------------------------------------------------------------------------------
1 | package types
2 |
3 | import (
4 | "fmt"
5 | )
6 |
7 | type CodeLocation struct {
8 | FileName string
9 | LineNumber int
10 | FullStackTrace string
11 | }
12 |
13 | func (codeLocation CodeLocation) String() string {
14 | return fmt.Sprintf("%s:%d", codeLocation.FileName, codeLocation.LineNumber)
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/ginkgo/types/synchronization.go:
--------------------------------------------------------------------------------
1 | package types
2 |
3 | import (
4 | "encoding/json"
5 | )
6 |
7 | type RemoteBeforeSuiteState int
8 |
9 | const (
10 | RemoteBeforeSuiteStateInvalid RemoteBeforeSuiteState = iota
11 |
12 | RemoteBeforeSuiteStatePending
13 | RemoteBeforeSuiteStatePassed
14 | RemoteBeforeSuiteStateFailed
15 | RemoteBeforeSuiteStateDisappeared
16 | )
17 |
18 | type RemoteBeforeSuiteData struct {
19 | Data []byte
20 | State RemoteBeforeSuiteState
21 | }
22 |
23 | func (r RemoteBeforeSuiteData) ToJSON() []byte {
24 | data, _ := json.Marshal(r)
25 | return data
26 | }
27 |
28 | type RemoteAfterSuiteData struct {
29 | CanRun bool
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | *.test
3 | .
4 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.4
4 | - 1.5
5 |
6 | install:
7 | - go get -v ./...
8 | - go get github.com/onsi/ginkgo
9 | - go install github.com/onsi/ginkgo/ginkgo
10 |
11 | script: $HOME/gopath/bin/ginkgo -r --randomizeAllSpecs --failOnPending --randomizeSuites --race
12 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013-2014 Onsi Fakhouri
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | [](https://travis-ci.org/onsi/gomega)
4 |
5 | Jump straight to the [docs](http://onsi.github.io/gomega/) to learn about Gomega, including a list of [all available matchers](http://onsi.github.io/gomega/#provided-matchers).
6 |
7 | To discuss Gomega and get updates, join the [google group](https://groups.google.com/d/forum/ginkgo-and-gomega).
8 |
9 | ## [Ginkgo](http://github.com/onsi/ginkgo): a BDD Testing Framework for Golang
10 |
11 | Learn more about Ginkgo [here](http://onsi.github.io/ginkgo/)
12 |
13 | ## License
14 |
15 | Gomega is MIT-Licensed
16 |
17 | The `ConsistOf` matcher uses [goraph](https://github.com/amitkgupta/goraph) which is embedded in the source to simplify distribution. goraph has an MIT license.
18 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/internal/oraclematcher/oracle_matcher.go:
--------------------------------------------------------------------------------
1 | package oraclematcher
2 |
3 | import "github.com/onsi/gomega/types"
4 |
5 | /*
6 | GomegaMatchers that also match the OracleMatcher interface can convey information about
7 | whether or not their result will change upon future attempts.
8 |
9 | This allows `Eventually` and `Consistently` to short circuit if success becomes impossible.
10 |
11 | For example, a process' exit code can never change. So, gexec's Exit matcher returns `true`
12 | for `MatchMayChangeInTheFuture` until the process exits, at which point it returns `false` forevermore.
13 | */
14 | type OracleMatcher interface {
15 | MatchMayChangeInTheFuture(actual interface{}) bool
16 | }
17 |
18 | func MatchMayChangeInTheFuture(matcher types.GomegaMatcher, value interface{}) bool {
19 | oracleMatcher, ok := matcher.(OracleMatcher)
20 | if !ok {
21 | return true
22 | }
23 |
24 | return oracleMatcher.MatchMayChangeInTheFuture(value)
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/internal/testingtsupport/testing_t_support.go:
--------------------------------------------------------------------------------
1 | package testingtsupport
2 |
3 | import (
4 | "regexp"
5 | "runtime/debug"
6 | "strings"
7 |
8 | "github.com/onsi/gomega/types"
9 | )
10 |
11 | type gomegaTestingT interface {
12 | Errorf(format string, args ...interface{})
13 | }
14 |
15 | func BuildTestingTGomegaFailHandler(t gomegaTestingT) types.GomegaFailHandler {
16 | return func(message string, callerSkip ...int) {
17 | skip := 1
18 | if len(callerSkip) > 0 {
19 | skip = callerSkip[0]
20 | }
21 | stackTrace := pruneStack(string(debug.Stack()), skip)
22 | t.Errorf("\n%s\n%s", stackTrace, message)
23 | }
24 | }
25 |
26 | func pruneStack(fullStackTrace string, skip int) string {
27 | stack := strings.Split(fullStackTrace, "\n")
28 | if len(stack) > 2*(skip+1) {
29 | stack = stack[2*(skip+1):]
30 | }
31 | prunedStack := []string{}
32 | re := regexp.MustCompile(`\/ginkgo\/|\/pkg\/testing\/|\/pkg\/runtime\/`)
33 | for i := 0; i < len(stack)/2; i++ {
34 | if !re.Match([]byte(stack[i*2])) {
35 | prunedStack = append(prunedStack, stack[i*2])
36 | prunedStack = append(prunedStack, stack[i*2+1])
37 | }
38 | }
39 | return strings.Join(prunedStack, "\n")
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher.go:
--------------------------------------------------------------------------------
1 | package matchers
2 |
3 | import (
4 | "fmt"
5 | "reflect"
6 |
7 | "github.com/onsi/gomega/format"
8 | )
9 |
10 | type AssignableToTypeOfMatcher struct {
11 | Expected interface{}
12 | }
13 |
14 | func (matcher *AssignableToTypeOfMatcher) Match(actual interface{}) (success bool, err error) {
15 | if actual == nil || matcher.Expected == nil {
16 | return false, fmt.Errorf("Refusing to compare to .\nBe explicit and use BeNil() instead. This is to avoid mistakes where both sides of an assertion are erroneously uninitialized.")
17 | }
18 |
19 | actualType := reflect.TypeOf(actual)
20 | expectedType := reflect.TypeOf(matcher.Expected)
21 |
22 | return actualType.AssignableTo(expectedType), nil
23 | }
24 |
25 | func (matcher *AssignableToTypeOfMatcher) FailureMessage(actual interface{}) string {
26 | return format.Message(actual, fmt.Sprintf("to be assignable to the type: %T", matcher.Expected))
27 | }
28 |
29 | func (matcher *AssignableToTypeOfMatcher) NegatedFailureMessage(actual interface{}) string {
30 | return format.Message(actual, fmt.Sprintf("not to be assignable to the type: %T", matcher.Expected))
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/matchers/be_an_existing_file.go:
--------------------------------------------------------------------------------
1 | package matchers
2 |
3 | import (
4 | "fmt"
5 | "os"
6 |
7 | "github.com/onsi/gomega/format"
8 | )
9 |
10 | type BeAnExistingFileMatcher struct {
11 | expected interface{}
12 | }
13 |
14 | func (matcher *BeAnExistingFileMatcher) Match(actual interface{}) (success bool, err error) {
15 | actualFilename, ok := actual.(string)
16 | if !ok {
17 | return false, fmt.Errorf("BeAnExistingFileMatcher matcher expects a file path")
18 | }
19 |
20 | if _, err = os.Stat(actualFilename); err != nil {
21 | switch {
22 | case os.IsNotExist(err):
23 | return false, nil
24 | default:
25 | return false, err
26 | }
27 | }
28 |
29 | return true, nil
30 | }
31 |
32 | func (matcher *BeAnExistingFileMatcher) FailureMessage(actual interface{}) (message string) {
33 | return format.Message(actual, fmt.Sprintf("to exist"))
34 | }
35 |
36 | func (matcher *BeAnExistingFileMatcher) NegatedFailureMessage(actual interface{}) (message string) {
37 | return format.Message(actual, fmt.Sprintf("not to exist"))
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go:
--------------------------------------------------------------------------------
1 | package matchers
2 |
3 | import (
4 | "fmt"
5 | "github.com/onsi/gomega/format"
6 | )
7 |
8 | type BeEmptyMatcher struct {
9 | }
10 |
11 | func (matcher *BeEmptyMatcher) Match(actual interface{}) (success bool, err error) {
12 | length, ok := lengthOf(actual)
13 | if !ok {
14 | return false, fmt.Errorf("BeEmpty matcher expects a string/array/map/channel/slice. Got:\n%s", format.Object(actual, 1))
15 | }
16 |
17 | return length == 0, nil
18 | }
19 |
20 | func (matcher *BeEmptyMatcher) FailureMessage(actual interface{}) (message string) {
21 | return format.Message(actual, "to be empty")
22 | }
23 |
24 | func (matcher *BeEmptyMatcher) NegatedFailureMessage(actual interface{}) (message string) {
25 | return format.Message(actual, "not to be empty")
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher.go:
--------------------------------------------------------------------------------
1 | package matchers
2 |
3 | import (
4 | "fmt"
5 | "github.com/onsi/gomega/format"
6 | "reflect"
7 | )
8 |
9 | type BeEquivalentToMatcher struct {
10 | Expected interface{}
11 | }
12 |
13 | func (matcher *BeEquivalentToMatcher) Match(actual interface{}) (success bool, err error) {
14 | if actual == nil && matcher.Expected == nil {
15 | return false, fmt.Errorf("Both actual and expected must not be nil.")
16 | }
17 |
18 | convertedActual := actual
19 |
20 | if actual != nil && matcher.Expected != nil && reflect.TypeOf(actual).ConvertibleTo(reflect.TypeOf(matcher.Expected)) {
21 | convertedActual = reflect.ValueOf(actual).Convert(reflect.TypeOf(matcher.Expected)).Interface()
22 | }
23 |
24 | return reflect.DeepEqual(convertedActual, matcher.Expected), nil
25 | }
26 |
27 | func (matcher *BeEquivalentToMatcher) FailureMessage(actual interface{}) (message string) {
28 | return format.Message(actual, "to be equivalent to", matcher.Expected)
29 | }
30 |
31 | func (matcher *BeEquivalentToMatcher) NegatedFailureMessage(actual interface{}) (message string) {
32 | return format.Message(actual, "not to be equivalent to", matcher.Expected)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/matchers/be_false_matcher.go:
--------------------------------------------------------------------------------
1 | package matchers
2 |
3 | import (
4 | "fmt"
5 | "github.com/onsi/gomega/format"
6 | )
7 |
8 | type BeFalseMatcher struct {
9 | }
10 |
11 | func (matcher *BeFalseMatcher) Match(actual interface{}) (success bool, err error) {
12 | if !isBool(actual) {
13 | return false, fmt.Errorf("Expected a boolean. Got:\n%s", format.Object(actual, 1))
14 | }
15 |
16 | return actual == false, nil
17 | }
18 |
19 | func (matcher *BeFalseMatcher) FailureMessage(actual interface{}) (message string) {
20 | return format.Message(actual, "to be false")
21 | }
22 |
23 | func (matcher *BeFalseMatcher) NegatedFailureMessage(actual interface{}) (message string) {
24 | return format.Message(actual, "not to be false")
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go:
--------------------------------------------------------------------------------
1 | package matchers
2 |
3 | import "github.com/onsi/gomega/format"
4 |
5 | type BeNilMatcher struct {
6 | }
7 |
8 | func (matcher *BeNilMatcher) Match(actual interface{}) (success bool, err error) {
9 | return isNil(actual), nil
10 | }
11 |
12 | func (matcher *BeNilMatcher) FailureMessage(actual interface{}) (message string) {
13 | return format.Message(actual, "to be nil")
14 | }
15 |
16 | func (matcher *BeNilMatcher) NegatedFailureMessage(actual interface{}) (message string) {
17 | return format.Message(actual, "not to be nil")
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/matchers/be_true_matcher.go:
--------------------------------------------------------------------------------
1 | package matchers
2 |
3 | import (
4 | "fmt"
5 | "github.com/onsi/gomega/format"
6 | )
7 |
8 | type BeTrueMatcher struct {
9 | }
10 |
11 | func (matcher *BeTrueMatcher) Match(actual interface{}) (success bool, err error) {
12 | if !isBool(actual) {
13 | return false, fmt.Errorf("Expected a boolean. Got:\n%s", format.Object(actual, 1))
14 | }
15 |
16 | return actual.(bool), nil
17 | }
18 |
19 | func (matcher *BeTrueMatcher) FailureMessage(actual interface{}) (message string) {
20 | return format.Message(actual, "to be true")
21 | }
22 |
23 | func (matcher *BeTrueMatcher) NegatedFailureMessage(actual interface{}) (message string) {
24 | return format.Message(actual, "not to be true")
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go:
--------------------------------------------------------------------------------
1 | package matchers
2 |
3 | import (
4 | "github.com/onsi/gomega/format"
5 | "reflect"
6 | )
7 |
8 | type BeZeroMatcher struct {
9 | }
10 |
11 | func (matcher *BeZeroMatcher) Match(actual interface{}) (success bool, err error) {
12 | if actual == nil {
13 | return true, nil
14 | }
15 | zeroValue := reflect.Zero(reflect.TypeOf(actual)).Interface()
16 |
17 | return reflect.DeepEqual(zeroValue, actual), nil
18 |
19 | }
20 |
21 | func (matcher *BeZeroMatcher) FailureMessage(actual interface{}) (message string) {
22 | return format.Message(actual, "to be zero-valued")
23 | }
24 |
25 | func (matcher *BeZeroMatcher) NegatedFailureMessage(actual interface{}) (message string) {
26 | return format.Message(actual, "not to be zero-valued")
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/matchers/equal_matcher.go:
--------------------------------------------------------------------------------
1 | package matchers
2 |
3 | import (
4 | "fmt"
5 | "reflect"
6 |
7 | "github.com/onsi/gomega/format"
8 | )
9 |
10 | type EqualMatcher struct {
11 | Expected interface{}
12 | }
13 |
14 | func (matcher *EqualMatcher) Match(actual interface{}) (success bool, err error) {
15 | if actual == nil && matcher.Expected == nil {
16 | return false, fmt.Errorf("Refusing to compare to .\nBe explicit and use BeNil() instead. This is to avoid mistakes where both sides of an assertion are erroneously uninitialized.")
17 | }
18 | return reflect.DeepEqual(actual, matcher.Expected), nil
19 | }
20 |
21 | func (matcher *EqualMatcher) FailureMessage(actual interface{}) (message string) {
22 | return format.Message(actual, "to equal", matcher.Expected)
23 | }
24 |
25 | func (matcher *EqualMatcher) NegatedFailureMessage(actual interface{}) (message string) {
26 | return format.Message(actual, "not to equal", matcher.Expected)
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/matchers/have_len_matcher.go:
--------------------------------------------------------------------------------
1 | package matchers
2 |
3 | import (
4 | "fmt"
5 | "github.com/onsi/gomega/format"
6 | )
7 |
8 | type HaveLenMatcher struct {
9 | Count int
10 | }
11 |
12 | func (matcher *HaveLenMatcher) Match(actual interface{}) (success bool, err error) {
13 | length, ok := lengthOf(actual)
14 | if !ok {
15 | return false, fmt.Errorf("HaveLen matcher expects a string/array/map/channel/slice. Got:\n%s", format.Object(actual, 1))
16 | }
17 |
18 | return length == matcher.Count, nil
19 | }
20 |
21 | func (matcher *HaveLenMatcher) FailureMessage(actual interface{}) (message string) {
22 | return fmt.Sprintf("Expected\n%s\nto have length %d", format.Object(actual, 1), matcher.Count)
23 | }
24 |
25 | func (matcher *HaveLenMatcher) NegatedFailureMessage(actual interface{}) (message string) {
26 | return fmt.Sprintf("Expected\n%s\nnot to have length %d", format.Object(actual, 1), matcher.Count)
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go:
--------------------------------------------------------------------------------
1 | package matchers
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/onsi/gomega/format"
7 | )
8 |
9 | type HaveOccurredMatcher struct {
10 | }
11 |
12 | func (matcher *HaveOccurredMatcher) Match(actual interface{}) (success bool, err error) {
13 | if isNil(actual) {
14 | return false, nil
15 | }
16 |
17 | if isError(actual) {
18 | return true, nil
19 | }
20 |
21 | return false, fmt.Errorf("Expected an error. Got:\n%s", format.Object(actual, 1))
22 | }
23 |
24 | func (matcher *HaveOccurredMatcher) FailureMessage(actual interface{}) (message string) {
25 | return fmt.Sprintf("Expected an error to have occurred. Got:\n%s", format.Object(actual, 1))
26 | }
27 |
28 | func (matcher *HaveOccurredMatcher) NegatedFailureMessage(actual interface{}) (message string) {
29 | return fmt.Sprintf("Expected error:\n%s\n%s\n%s", format.Object(actual, 1), format.IndentString(actual.(error).Error(), 1), "not to have occurred")
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go:
--------------------------------------------------------------------------------
1 | package matchers
2 |
3 | import (
4 | "fmt"
5 | "github.com/onsi/gomega/format"
6 | )
7 |
8 | type HavePrefixMatcher struct {
9 | Prefix string
10 | Args []interface{}
11 | }
12 |
13 | func (matcher *HavePrefixMatcher) Match(actual interface{}) (success bool, err error) {
14 | actualString, ok := toString(actual)
15 | if !ok {
16 | return false, fmt.Errorf("HavePrefix matcher requires a string or stringer. Got:\n%s", format.Object(actual, 1))
17 | }
18 | prefix := matcher.prefix()
19 | return len(actualString) >= len(prefix) && actualString[0:len(prefix)] == prefix, nil
20 | }
21 |
22 | func (matcher *HavePrefixMatcher) prefix() string {
23 | if len(matcher.Args) > 0 {
24 | return fmt.Sprintf(matcher.Prefix, matcher.Args...)
25 | }
26 | return matcher.Prefix
27 | }
28 |
29 | func (matcher *HavePrefixMatcher) FailureMessage(actual interface{}) (message string) {
30 | return format.Message(actual, "to have prefix", matcher.prefix())
31 | }
32 |
33 | func (matcher *HavePrefixMatcher) NegatedFailureMessage(actual interface{}) (message string) {
34 | return format.Message(actual, "not to have prefix", matcher.prefix())
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/matchers/not.go:
--------------------------------------------------------------------------------
1 | package matchers
2 |
3 | import (
4 | "github.com/onsi/gomega/internal/oraclematcher"
5 | "github.com/onsi/gomega/types"
6 | )
7 |
8 | type NotMatcher struct {
9 | Matcher types.GomegaMatcher
10 | }
11 |
12 | func (m *NotMatcher) Match(actual interface{}) (bool, error) {
13 | success, err := m.Matcher.Match(actual)
14 | if err != nil {
15 | return false, err
16 | }
17 | return !success, nil
18 | }
19 |
20 | func (m *NotMatcher) FailureMessage(actual interface{}) (message string) {
21 | return m.Matcher.NegatedFailureMessage(actual) // works beautifully
22 | }
23 |
24 | func (m *NotMatcher) NegatedFailureMessage(actual interface{}) (message string) {
25 | return m.Matcher.FailureMessage(actual) // works beautifully
26 | }
27 |
28 | func (m *NotMatcher) MatchMayChangeInTheFuture(actual interface{}) bool {
29 | return oraclematcher.MatchMayChangeInTheFuture(m.Matcher, actual) // just return m.Matcher's value
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/matchers/succeed_matcher.go:
--------------------------------------------------------------------------------
1 | package matchers
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/onsi/gomega/format"
7 | )
8 |
9 | type SucceedMatcher struct {
10 | }
11 |
12 | func (matcher *SucceedMatcher) Match(actual interface{}) (success bool, err error) {
13 | if actual == nil {
14 | return true, nil
15 | }
16 |
17 | if isError(actual) {
18 | return false, nil
19 | }
20 |
21 | return false, fmt.Errorf("Expected an error-type. Got:\n%s", format.Object(actual, 1))
22 | }
23 |
24 | func (matcher *SucceedMatcher) FailureMessage(actual interface{}) (message string) {
25 | return fmt.Sprintf("Expected success, but got an error:\n%s\n%s", format.Object(actual, 1), format.IndentString(actual.(error).Error(), 1))
26 | }
27 |
28 | func (matcher *SucceedMatcher) NegatedFailureMessage(actual interface{}) (message string) {
29 | return "Expected failure, but got no error."
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/matchers/support/goraph/node/node.go:
--------------------------------------------------------------------------------
1 | package node
2 |
3 | type Node struct {
4 | Id int
5 | }
6 |
7 | type NodeOrderedSet []Node
8 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/matchers/support/goraph/util/util.go:
--------------------------------------------------------------------------------
1 | package util
2 |
3 | import "math"
4 |
5 | func Odd(n int) bool {
6 | return math.Mod(float64(n), 2.0) == 1.0
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/onsi/gomega/types/types.go:
--------------------------------------------------------------------------------
1 | package types
2 |
3 | type GomegaFailHandler func(message string, callerSkip ...int)
4 |
5 | //A simple *testing.T interface wrapper
6 | type GomegaTestingT interface {
7 | Errorf(format string, args ...interface{})
8 | }
9 |
10 | //All Gomega matchers must implement the GomegaMatcher interface
11 | //
12 | //For details on writing custom matchers, check out: http://onsi.github.io/gomega/#adding_your_own_matchers
13 | type GomegaMatcher interface {
14 | Match(actual interface{}) (success bool, err error)
15 | FailureMessage(actual interface{}) (message string)
16 | NegatedFailureMessage(actual interface{}) (message string)
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/vishvananda/netlink/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | before_script:
3 | # make sure we keep path in tact when we sudo
4 | - sudo sed -i -e 's/^Defaults\tsecure_path.*$//' /etc/sudoers
5 | # modprobe ip_gre or else the first gre device can't be deleted
6 | - sudo modprobe ip_gre
7 | install:
8 | - go get github.com/vishvananda/netns
9 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/vishvananda/netlink/Makefile:
--------------------------------------------------------------------------------
1 | DIRS := \
2 | . \
3 | nl
4 |
5 | DEPS = \
6 | github.com/vishvananda/netns
7 |
8 | uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
9 | testdirs = $(call uniq,$(foreach d,$(1),$(dir $(wildcard $(d)/*_test.go))))
10 | goroot = $(addprefix ../../../,$(1))
11 | unroot = $(subst ../../../,,$(1))
12 | fmt = $(addprefix fmt-,$(1))
13 |
14 | all: test
15 |
16 | $(call goroot,$(DEPS)):
17 | go get $(call unroot,$@)
18 |
19 | .PHONY: $(call testdirs,$(DIRS))
20 | $(call testdirs,$(DIRS)):
21 | sudo -E go test -test.parallel 4 -timeout 60s -v github.com/vishvananda/netlink/$@
22 |
23 | $(call fmt,$(call testdirs,$(DIRS))):
24 | ! gofmt -l $(subst fmt-,,$@)/*.go | grep ''
25 |
26 | .PHONY: fmt
27 | fmt: $(call fmt,$(call testdirs,$(DIRS)))
28 |
29 | test: fmt $(call goroot,$(DEPS)) $(call testdirs,$(DIRS))
30 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/vishvananda/netlink/link_tuntap_linux.go:
--------------------------------------------------------------------------------
1 | package netlink
2 |
3 | // ideally golang.org/x/sys/unix would define IfReq but it only has
4 | // IFNAMSIZ, hence this minimalistic implementation
5 | const (
6 | SizeOfIfReq = 40
7 | IFNAMSIZ = 16
8 | )
9 |
10 | type ifReq struct {
11 | Name [IFNAMSIZ]byte
12 | Flags uint16
13 | pad [SizeOfIfReq - IFNAMSIZ - 2]byte
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/vishvananda/netlink/neigh.go:
--------------------------------------------------------------------------------
1 | package netlink
2 |
3 | import (
4 | "fmt"
5 | "net"
6 | )
7 |
8 | // Neigh represents a link layer neighbor from netlink.
9 | type Neigh struct {
10 | LinkIndex int
11 | Family int
12 | State int
13 | Type int
14 | Flags int
15 | IP net.IP
16 | HardwareAddr net.HardwareAddr
17 | }
18 |
19 | // String returns $ip/$hwaddr $label
20 | func (neigh *Neigh) String() string {
21 | return fmt.Sprintf("%s %s", neigh.IP, neigh.HardwareAddr)
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/vishvananda/netlink/netlink_linux.go:
--------------------------------------------------------------------------------
1 | package netlink
2 |
3 | import "github.com/vishvananda/netlink/nl"
4 |
5 | // Family type definitions
6 | const (
7 | FAMILY_ALL = nl.FAMILY_ALL
8 | FAMILY_V4 = nl.FAMILY_V4
9 | FAMILY_V6 = nl.FAMILY_V6
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/vishvananda/netlink/nl/addr_linux.go:
--------------------------------------------------------------------------------
1 | package nl
2 |
3 | import (
4 | "syscall"
5 | "unsafe"
6 | )
7 |
8 | type IfAddrmsg struct {
9 | syscall.IfAddrmsg
10 | }
11 |
12 | func NewIfAddrmsg(family int) *IfAddrmsg {
13 | return &IfAddrmsg{
14 | IfAddrmsg: syscall.IfAddrmsg{
15 | Family: uint8(family),
16 | },
17 | }
18 | }
19 |
20 | // struct ifaddrmsg {
21 | // __u8 ifa_family;
22 | // __u8 ifa_prefixlen; /* The prefix length */
23 | // __u8 ifa_flags; /* Flags */
24 | // __u8 ifa_scope; /* Address scope */
25 | // __u32 ifa_index; /* Link index */
26 | // };
27 |
28 | // type IfAddrmsg struct {
29 | // Family uint8
30 | // Prefixlen uint8
31 | // Flags uint8
32 | // Scope uint8
33 | // Index uint32
34 | // }
35 | // SizeofIfAddrmsg = 0x8
36 |
37 | func DeserializeIfAddrmsg(b []byte) *IfAddrmsg {
38 | return (*IfAddrmsg)(unsafe.Pointer(&b[0:syscall.SizeofIfAddrmsg][0]))
39 | }
40 |
41 | func (msg *IfAddrmsg) Serialize() []byte {
42 | return (*(*[syscall.SizeofIfAddrmsg]byte)(unsafe.Pointer(msg)))[:]
43 | }
44 |
45 | func (msg *IfAddrmsg) Len() int {
46 | return syscall.SizeofIfAddrmsg
47 | }
48 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/vishvananda/netlink/nl/syscall.go:
--------------------------------------------------------------------------------
1 | package nl
2 |
3 | // syscall package lack of rule atributes type.
4 | // Thus there are defined below
5 | const (
6 | FRA_UNSPEC = iota
7 | FRA_DST /* destination address */
8 | FRA_SRC /* source address */
9 | FRA_IIFNAME /* interface name */
10 | FRA_GOTO /* target to jump to (FR_ACT_GOTO) */
11 | FRA_UNUSED2
12 | FRA_PRIORITY /* priority/preference */
13 | FRA_UNUSED3
14 | FRA_UNUSED4
15 | FRA_UNUSED5
16 | FRA_FWMARK /* mark */
17 | FRA_FLOW /* flow/class id */
18 | FRA_TUN_ID
19 | FRA_SUPPRESS_IFGROUP
20 | FRA_SUPPRESS_PREFIXLEN
21 | FRA_TABLE /* Extended table id */
22 | FRA_FWMASK /* mask for netfilter mark */
23 | FRA_OIFNAME
24 | )
25 |
26 | // ip rule netlink request types
27 | const (
28 | FR_ACT_UNSPEC = iota
29 | FR_ACT_TO_TBL /* Pass to fixed table */
30 | FR_ACT_GOTO /* Jump to another rule */
31 | FR_ACT_NOP /* No operation */
32 | FR_ACT_RES3
33 | FR_ACT_RES4
34 | FR_ACT_BLACKHOLE /* Drop without notification */
35 | FR_ACT_UNREACHABLE /* Drop with ENETUNREACH */
36 | FR_ACT_PROHIBIT /* Drop with EACCES */
37 | )
38 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/vishvananda/netlink/route_unspecified.go:
--------------------------------------------------------------------------------
1 | // +build !linux
2 |
3 | package netlink
4 |
5 | func (r *Route) ListFlags() []string {
6 | return []string{}
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/vishvananda/netlink/rule.go:
--------------------------------------------------------------------------------
1 | package netlink
2 |
3 | import (
4 | "fmt"
5 | "net"
6 | )
7 |
8 | // Rule represents a netlink rule.
9 | type Rule struct {
10 | Priority int
11 | Table int
12 | Mark int
13 | Mask int
14 | TunID uint
15 | Goto int
16 | Src *net.IPNet
17 | Dst *net.IPNet
18 | Flow int
19 | IifName string
20 | OifName string
21 | SuppressIfgroup int
22 | SuppressPrefixlen int
23 | }
24 |
25 | func (r Rule) String() string {
26 | return fmt.Sprintf("ip rule %d: from %s table %d", r.Priority, r.Src, r.Table)
27 | }
28 |
29 | // NewRule return empty rules.
30 | func NewRule() *Rule {
31 | return &Rule{
32 | SuppressIfgroup: -1,
33 | SuppressPrefixlen: -1,
34 | Priority: -1,
35 | Mark: -1,
36 | Mask: -1,
37 | Goto: -1,
38 | Flow: -1,
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/github.com/vishvananda/netns/netns_unspecified.go:
--------------------------------------------------------------------------------
1 | // +build !linux
2 |
3 | package netns
4 |
5 | import (
6 | "errors"
7 | )
8 |
9 | var (
10 | ErrNotImplemented = errors.New("not implemented")
11 | )
12 |
13 | func Set(ns NsHandle) (err error) {
14 | return ErrNotImplemented
15 | }
16 |
17 | func New() (ns NsHandle, err error) {
18 | return -1, ErrNotImplemented
19 | }
20 |
21 | func Get() (NsHandle, error) {
22 | return -1, ErrNotImplemented
23 | }
24 |
25 | func GetFromName(name string) (NsHandle, error) {
26 | return -1, ErrNotImplemented
27 | }
28 |
29 | func GetFromPid(pid int) (NsHandle, error) {
30 | return -1, ErrNotImplemented
31 | }
32 |
33 | func GetFromDocker(id string) (NsHandle, error) {
34 | return -1, ErrNotImplemented
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/.gitignore:
--------------------------------------------------------------------------------
1 | _obj/
2 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/asm.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 | TEXT ·use(SB),NOSPLIT,$0
10 | RET
11 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/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/github.com/containernetworking/cni/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/github.com/containernetworking/cni/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/github.com/containernetworking/cni/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/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, DragonFly
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-64
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-88
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-112
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-64
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-88
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/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/github.com/containernetworking/cni/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/github.com/containernetworking/cni/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/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/asm_linux_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for 386, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
23 | JMP syscall·RawSyscall(SB)
24 |
25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
26 | JMP syscall·RawSyscall6(SB)
27 |
28 | TEXT ·socketcall(SB),NOSPLIT,$0-36
29 | JMP syscall·socketcall(SB)
30 |
31 | TEXT ·rawsocketcall(SB),NOSPLIT,$0-36
32 | JMP syscall·rawsocketcall(SB)
33 |
34 | TEXT ·seek(SB),NOSPLIT,$0-28
35 | JMP syscall·seek(SB)
36 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/asm_linux_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for AMD64, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
23 | JMP syscall·RawSyscall(SB)
24 |
25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
26 | JMP syscall·RawSyscall6(SB)
27 |
28 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16
29 | JMP syscall·gettimeofday(SB)
30 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/asm_linux_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for arm, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
23 | B syscall·RawSyscall(SB)
24 |
25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
26 | B syscall·RawSyscall6(SB)
27 |
28 | TEXT ·seek(SB),NOSPLIT,$0-32
29 | B syscall·seek(SB)
30 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/asm_linux_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build arm64
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-56
15 | B syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
18 | B syscall·Syscall6(SB)
19 |
20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
21 | B syscall·RawSyscall(SB)
22 |
23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
24 | B syscall·RawSyscall6(SB)
25 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build mips64 mips64le
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for mips64, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | JMP syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | JMP syscall·Syscall6(SB)
23 |
24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
25 | JMP syscall·RawSyscall(SB)
26 |
27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
28 | JMP syscall·RawSyscall6(SB)
29 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build ppc64 ppc64le
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for ppc64, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | BR syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | BR syscall·Syscall6(SB)
23 |
24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
25 | BR syscall·RawSyscall(SB)
26 |
27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
28 | BR syscall·RawSyscall6(SB)
29 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/asm_linux_s390x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build s390x
6 | // +build linux
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for s390x, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | BR syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | BR syscall·Syscall6(SB)
23 |
24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
25 | BR syscall·RawSyscall(SB)
26 |
27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
28 | BR syscall·RawSyscall6(SB)
29 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/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/github.com/containernetworking/cni/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/github.com/containernetworking/cni/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/github.com/containernetworking/cni/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/github.com/containernetworking/cni/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/github.com/containernetworking/cni/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-64
14 | JMP syscall·sysvicall6(SB)
15 |
16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-64
17 | JMP syscall·rawSysvicall6(SB)
18 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/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/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/constants.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | const (
10 | R_OK = 0x4
11 | W_OK = 0x2
12 | X_OK = 0x1
13 | )
14 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/env_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | // Unix environment variables.
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Getenv(key string) (value string, found bool) {
14 | return syscall.Getenv(key)
15 | }
16 |
17 | func Setenv(key, value string) error {
18 | return syscall.Setenv(key, value)
19 | }
20 |
21 | func Clearenv() {
22 | syscall.Clearenv()
23 | }
24 |
25 | func Environ() []string {
26 | return syscall.Environ()
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/env_unset.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build go1.4
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | func Unsetenv(key string) error {
12 | // This was added in Go 1.4.
13 | return syscall.Unsetenv(key)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/flock.go:
--------------------------------------------------------------------------------
1 | // +build linux darwin freebsd openbsd netbsd dragonfly
2 |
3 | // Copyright 2014 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // +build darwin dragonfly freebsd linux netbsd openbsd
8 |
9 | package unix
10 |
11 | import "unsafe"
12 |
13 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux
14 | // systems by flock_linux_32bit.go to be SYS_FCNTL64.
15 | var fcntl64Syscall uintptr = SYS_FCNTL
16 |
17 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
18 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
19 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
20 | if errno == 0 {
21 | return nil
22 | }
23 | return errno
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/flock_linux_32bit.go:
--------------------------------------------------------------------------------
1 | // +build linux,386 linux,arm
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/github.com/containernetworking/cni/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/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env perl
2 | # Copyright 2009 The Go Authors. All rights reserved.
3 | # Use of this source code is governed by a BSD-style
4 | # license that can be found in the LICENSE file.
5 | #
6 | # Generate system call table for Darwin from sys/syscall.h
7 |
8 | use strict;
9 |
10 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
11 | print STDERR "GOARCH or GOOS not defined in environment\n";
12 | exit 1;
13 | }
14 |
15 | my $command = "mksysnum_darwin.pl " . join(' ', @ARGV);
16 |
17 | print <){
29 | if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){
30 | my $name = $1;
31 | my $num = $2;
32 | $name =~ y/a-z/A-Z/;
33 | print " SYS_$name = $num;"
34 | }
35 | }
36 |
37 | print <= 10 {
20 | buf[i] = byte(val%10 + '0')
21 | i--
22 | val /= 10
23 | }
24 | buf[i] = byte(val + '0')
25 | return string(buf[i:])
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386,netbsd
6 |
7 | package unix
8 |
9 | func Getpagesize() int { return 4096 }
10 |
11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
12 |
13 | func NsecToTimespec(nsec int64) (ts Timespec) {
14 | ts.Sec = int64(nsec / 1e9)
15 | ts.Nsec = int32(nsec % 1e9)
16 | return
17 | }
18 |
19 | func NsecToTimeval(nsec int64) (tv Timeval) {
20 | nsec += 999 // round up to microsecond
21 | tv.Usec = int32(nsec % 1e9 / 1e3)
22 | tv.Sec = int64(nsec / 1e9)
23 | return
24 | }
25 |
26 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
27 | k.Ident = uint32(fd)
28 | k.Filter = uint32(mode)
29 | k.Flags = uint32(flags)
30 | }
31 |
32 | func (iov *Iovec) SetLen(length int) {
33 | iov.Len = uint32(length)
34 | }
35 |
36 | func (msghdr *Msghdr) SetControllen(length int) {
37 | msghdr.Controllen = uint32(length)
38 | }
39 |
40 | func (cmsg *Cmsghdr) SetLen(length int) {
41 | cmsg.Len = uint32(length)
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,netbsd
6 |
7 | package unix
8 |
9 | func Getpagesize() int { return 4096 }
10 |
11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
12 |
13 | func NsecToTimespec(nsec int64) (ts Timespec) {
14 | ts.Sec = int64(nsec / 1e9)
15 | ts.Nsec = int64(nsec % 1e9)
16 | return
17 | }
18 |
19 | func NsecToTimeval(nsec int64) (tv Timeval) {
20 | nsec += 999 // round up to microsecond
21 | tv.Usec = int32(nsec % 1e9 / 1e3)
22 | tv.Sec = int64(nsec / 1e9)
23 | return
24 | }
25 |
26 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
27 | k.Ident = uint64(fd)
28 | k.Filter = uint32(mode)
29 | k.Flags = uint32(flags)
30 | }
31 |
32 | func (iov *Iovec) SetLen(length int) {
33 | iov.Len = uint64(length)
34 | }
35 |
36 | func (msghdr *Msghdr) SetControllen(length int) {
37 | msghdr.Controllen = uint32(length)
38 | }
39 |
40 | func (cmsg *Cmsghdr) SetLen(length int) {
41 | cmsg.Len = uint32(length)
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm,netbsd
6 |
7 | package unix
8 |
9 | func Getpagesize() int { return 4096 }
10 |
11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
12 |
13 | func NsecToTimespec(nsec int64) (ts Timespec) {
14 | ts.Sec = int64(nsec / 1e9)
15 | ts.Nsec = int32(nsec % 1e9)
16 | return
17 | }
18 |
19 | func NsecToTimeval(nsec int64) (tv Timeval) {
20 | nsec += 999 // round up to microsecond
21 | tv.Usec = int32(nsec % 1e9 / 1e3)
22 | tv.Sec = int64(nsec / 1e9)
23 | return
24 | }
25 |
26 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
27 | k.Ident = uint32(fd)
28 | k.Filter = uint32(mode)
29 | k.Flags = uint32(flags)
30 | }
31 |
32 | func (iov *Iovec) SetLen(length int) {
33 | iov.Len = uint32(length)
34 | }
35 |
36 | func (msghdr *Msghdr) SetControllen(length int) {
37 | msghdr.Controllen = uint32(length)
38 | }
39 |
40 | func (cmsg *Cmsghdr) SetLen(length int) {
41 | cmsg.Len = uint32(length)
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/syscall_no_getwd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build dragonfly freebsd netbsd openbsd
6 |
7 | package unix
8 |
9 | const ImplementsGetwd = false
10 |
11 | func Getwd() (string, error) { return "", ENOTSUP }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386,openbsd
6 |
7 | package unix
8 |
9 | func Getpagesize() int { return 4096 }
10 |
11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
12 |
13 | func NsecToTimespec(nsec int64) (ts Timespec) {
14 | ts.Sec = int64(nsec / 1e9)
15 | ts.Nsec = int32(nsec % 1e9)
16 | return
17 | }
18 |
19 | func NsecToTimeval(nsec int64) (tv Timeval) {
20 | nsec += 999 // round up to microsecond
21 | tv.Usec = int32(nsec % 1e9 / 1e3)
22 | tv.Sec = int64(nsec / 1e9)
23 | return
24 | }
25 |
26 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
27 | k.Ident = uint32(fd)
28 | k.Filter = int16(mode)
29 | k.Flags = uint16(flags)
30 | }
31 |
32 | func (iov *Iovec) SetLen(length int) {
33 | iov.Len = uint32(length)
34 | }
35 |
36 | func (msghdr *Msghdr) SetControllen(length int) {
37 | msghdr.Controllen = uint32(length)
38 | }
39 |
40 | func (cmsg *Cmsghdr) SetLen(length int) {
41 | cmsg.Len = uint32(length)
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,openbsd
6 |
7 | package unix
8 |
9 | func Getpagesize() int { return 4096 }
10 |
11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
12 |
13 | func NsecToTimespec(nsec int64) (ts Timespec) {
14 | ts.Sec = nsec / 1e9
15 | ts.Nsec = nsec % 1e9
16 | return
17 | }
18 |
19 | func NsecToTimeval(nsec int64) (tv Timeval) {
20 | nsec += 999 // round up to microsecond
21 | tv.Usec = nsec % 1e9 / 1e3
22 | tv.Sec = nsec / 1e9
23 | return
24 | }
25 |
26 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
27 | k.Ident = uint64(fd)
28 | k.Filter = int16(mode)
29 | k.Flags = uint16(flags)
30 | }
31 |
32 | func (iov *Iovec) SetLen(length int) {
33 | iov.Len = uint64(length)
34 | }
35 |
36 | func (msghdr *Msghdr) SetControllen(length int) {
37 | msghdr.Controllen = uint32(length)
38 | }
39 |
40 | func (cmsg *Cmsghdr) SetLen(length int) {
41 | cmsg.Len = uint32(length)
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,solaris
6 |
7 | package unix
8 |
9 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
10 |
11 | func NsecToTimespec(nsec int64) (ts Timespec) {
12 | ts.Sec = nsec / 1e9
13 | ts.Nsec = nsec % 1e9
14 | return
15 | }
16 |
17 | func NsecToTimeval(nsec int64) (tv Timeval) {
18 | nsec += 999 // round up to microsecond
19 | tv.Usec = nsec % 1e9 / 1e3
20 | tv.Sec = int64(nsec / 1e9)
21 | return
22 | }
23 |
24 | func (iov *Iovec) SetLen(length int) {
25 | iov.Len = uint64(length)
26 | }
27 |
28 | func (cmsg *Cmsghdr) SetLen(length int) {
29 | cmsg.Len = uint32(length)
30 | }
31 |
32 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
33 | // TODO(aram): implement this, see issue 5847.
34 | panic("unimplemented")
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/github.com/containernetworking/cni/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,solaris
6 |
7 | package unix
8 |
9 | // TODO(aram): remove these before Go 1.3.
10 | const (
11 | SYS_EXECVE = 59
12 | SYS_FCNTL = 62
13 | )
14 |
--------------------------------------------------------------------------------
/vendor/github.com/davecgh/go-spew/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 |
--------------------------------------------------------------------------------
/vendor/github.com/davecgh/go-spew/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.5.4
4 | - 1.6.3
5 | - 1.7
6 | install:
7 | - go get -v golang.org/x/tools/cmd/cover
8 | script:
9 | - go test -v -tags=safe ./spew
10 | - go test -v -tags=testcgo ./spew -covermode=count -coverprofile=profile.cov
11 | after_success:
12 | - go get -v github.com/mattn/goveralls
13 | - export PATH=$PATH:$HOME/gopath/bin
14 | - goveralls -coverprofile=profile.cov -service=travis-ci
15 |
--------------------------------------------------------------------------------
/vendor/github.com/davecgh/go-spew/LICENSE:
--------------------------------------------------------------------------------
1 | ISC License
2 |
3 | Copyright (c) 2012-2013 Dave Collins
4 |
5 | Permission to use, copy, modify, and distribute this software for any
6 | purpose with or without fee is hereby granted, provided that the above
7 | copyright notice and this permission notice appear in all copies.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 |
--------------------------------------------------------------------------------
/vendor/github.com/davecgh/go-spew/cov_report.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # This script uses gocov to generate a test coverage report.
4 | # The gocov tool my be obtained with the following command:
5 | # go get github.com/axw/gocov/gocov
6 | #
7 | # It will be installed to $GOPATH/bin, so ensure that location is in your $PATH.
8 |
9 | # Check for gocov.
10 | if ! type gocov >/dev/null 2>&1; then
11 | echo >&2 "This script requires the gocov tool."
12 | echo >&2 "You may obtain it with the following command:"
13 | echo >&2 "go get github.com/axw/gocov/gocov"
14 | exit 1
15 | fi
16 |
17 | # Only run the cgo tests if gcc is installed.
18 | if type gcc >/dev/null 2>&1; then
19 | (cd spew && gocov test -tags testcgo | gocov report)
20 | else
21 | (cd spew && gocov test | gocov report)
22 | fi
23 |
--------------------------------------------------------------------------------
/vendor/github.com/pmezard/go-difflib/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.5
4 | - tip
5 |
6 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 |
24 | .DS_Store
25 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | sudo: false
4 |
5 | go:
6 | - 1.1
7 | - 1.2
8 | - 1.3
9 | - 1.4
10 | - 1.5
11 | - 1.6
12 | - 1.7
13 | - tip
14 |
15 | script:
16 | - go test -v ./...
17 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/Godeps/Godeps.json:
--------------------------------------------------------------------------------
1 | {
2 | "ImportPath": "github.com/stretchr/testify",
3 | "GoVersion": "go1.5",
4 | "GodepVersion": "v74",
5 | "Packages": [
6 | "./..."
7 | ],
8 | "Deps": [
9 | {
10 | "ImportPath": "github.com/davecgh/go-spew/spew",
11 | "Comment": "v1.0.0-3-g6d21280",
12 | "Rev": "6d212800a42e8ab5c146b8ace3490ee17e5225f9"
13 | },
14 | {
15 | "ImportPath": "github.com/pmezard/go-difflib/difflib",
16 | "Rev": "d8ed2627bdf02c080bf22230dbb337003b7aba2d"
17 | },
18 | {
19 | "ImportPath": "github.com/stretchr/objx",
20 | "Rev": "cbeaeb16a013161a98496fad62933b1d21786672"
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/Godeps/Readme:
--------------------------------------------------------------------------------
1 | This directory tree is generated automatically by godep.
2 |
3 | Please do not edit.
4 |
5 | See https://github.com/tools/godep for more information.
6 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl:
--------------------------------------------------------------------------------
1 | {{.CommentWithoutT "a"}}
2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool {
3 | return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}})
4 | }
5 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/assert/errors.go:
--------------------------------------------------------------------------------
1 | package assert
2 |
3 | import (
4 | "errors"
5 | )
6 |
7 | // AnError is an error instance useful for testing. If the code does not care
8 | // about error specifics, and only needs to return the error for example, this
9 | // error should be used to make the test code more readable.
10 | var AnError = errors.New("assert.AnError general error for testing")
11 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/assert/forward_assertions.go:
--------------------------------------------------------------------------------
1 | package assert
2 |
3 | // Assertions provides assertion methods around the
4 | // TestingT interface.
5 | type Assertions struct {
6 | t TestingT
7 | }
8 |
9 | // New makes a new Assertions object for the specified TestingT.
10 | func New(t TestingT) *Assertions {
11 | return &Assertions{
12 | t: t,
13 | }
14 | }
15 |
16 | //go:generate go run ../_codegen/main.go -output-package=assert -template=assertion_forward.go.tmpl
17 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/doc.go:
--------------------------------------------------------------------------------
1 | // Package testify is a set of packages that provide many tools for testifying that your code will behave as you intend.
2 | //
3 | // testify contains the following packages:
4 | //
5 | // The assert package provides a comprehensive set of assertion functions that tie in to the Go testing system.
6 | //
7 | // The http package contains tools to make it easier to test http activity using the Go testing system.
8 | //
9 | // The mock package provides a system by which it is possible to mock your objects and verify calls are happening as expected.
10 | //
11 | // The suite package provides a basic structure for using structs as testing suites, and methods on those structs as tests. It includes setup/teardown functionality in the way of interfaces.
12 | package testify
13 |
14 | // blank imports help docs.
15 | import (
16 | // assert package
17 | _ "github.com/stretchr/testify/assert"
18 | // http package
19 | _ "github.com/stretchr/testify/http"
20 | // mock package
21 | _ "github.com/stretchr/testify/mock"
22 | )
23 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/http/doc.go:
--------------------------------------------------------------------------------
1 | // Package http DEPRECATED USE net/http/httptest
2 | package http
3 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/http/test_round_tripper.go:
--------------------------------------------------------------------------------
1 | package http
2 |
3 | import (
4 | "github.com/stretchr/testify/mock"
5 | "net/http"
6 | )
7 |
8 | // TestRoundTripper DEPRECATED USE net/http/httptest
9 | type TestRoundTripper struct {
10 | mock.Mock
11 | }
12 |
13 | // RoundTrip DEPRECATED USE net/http/httptest
14 | func (t *TestRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
15 | args := t.Called(req)
16 | return args.Get(0).(*http.Response), args.Error(1)
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/package_test.go:
--------------------------------------------------------------------------------
1 | package testify
2 |
3 | import (
4 | "github.com/stretchr/testify/assert"
5 | "testing"
6 | )
7 |
8 | func TestImports(t *testing.T) {
9 | if assert.Equal(t, 1, 1) != true {
10 | t.Error("Something is wrong.")
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/require/doc.go:
--------------------------------------------------------------------------------
1 | // Package require implements the same assertions as the `assert` package but
2 | // stops test execution when a test fails.
3 | //
4 | // Example Usage
5 | //
6 | // The following is a complete example using require in a standard test function:
7 | // import (
8 | // "testing"
9 | // "github.com/stretchr/testify/require"
10 | // )
11 | //
12 | // func TestSomething(t *testing.T) {
13 | //
14 | // var a string = "Hello"
15 | // var b string = "Hello"
16 | //
17 | // require.Equal(t, a, b, "The two words should be the same.")
18 | //
19 | // }
20 | //
21 | // Assertions
22 | //
23 | // The `require` package have same global functions as in the `assert` package,
24 | // but instead of returning a boolean result they call `t.FailNow()`.
25 | //
26 | // Every assertion function also takes an optional string message as the final argument,
27 | // allowing custom error messages to be appended to the message the assertion method outputs.
28 | package require
29 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/require/forward_requirements.go:
--------------------------------------------------------------------------------
1 | package require
2 |
3 | // Assertions provides assertion methods around the
4 | // TestingT interface.
5 | type Assertions struct {
6 | t TestingT
7 | }
8 |
9 | // New makes a new Assertions object for the specified TestingT.
10 | func New(t TestingT) *Assertions {
11 | return &Assertions{
12 | t: t,
13 | }
14 | }
15 |
16 | //go:generate go run ../_codegen/main.go -output-package=require -template=require_forward.go.tmpl
17 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/require/require.go.tmpl:
--------------------------------------------------------------------------------
1 | {{.Comment}}
2 | func {{.DocInfo.Name}}(t TestingT, {{.Params}}) {
3 | if !assert.{{.DocInfo.Name}}(t, {{.ForwardedParams}}) {
4 | t.FailNow()
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/require/require_forward.go.tmpl:
--------------------------------------------------------------------------------
1 | {{.CommentWithoutT "a"}}
2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) {
3 | {{.DocInfo.Name}}(a.t, {{.ForwardedParams}})
4 | }
5 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/require/requirements.go:
--------------------------------------------------------------------------------
1 | package require
2 |
3 | // TestingT is an interface wrapper around *testing.T
4 | type TestingT interface {
5 | Errorf(format string, args ...interface{})
6 | FailNow()
7 | }
8 |
9 | //go:generate go run ../_codegen/main.go -output-package=require -template=require.go.tmpl
10 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/suite/interfaces.go:
--------------------------------------------------------------------------------
1 | package suite
2 |
3 | import "testing"
4 |
5 | // TestingSuite can store and return the current *testing.T context
6 | // generated by 'go test'.
7 | type TestingSuite interface {
8 | T() *testing.T
9 | SetT(*testing.T)
10 | }
11 |
12 | // SetupAllSuite has a SetupSuite method, which will run before the
13 | // tests in the suite are run.
14 | type SetupAllSuite interface {
15 | SetupSuite()
16 | }
17 |
18 | // SetupTestSuite has a SetupTest method, which will run before each
19 | // test in the suite.
20 | type SetupTestSuite interface {
21 | SetupTest()
22 | }
23 |
24 | // TearDownAllSuite has a TearDownSuite method, which will run after
25 | // all the tests in the suite have been run.
26 | type TearDownAllSuite interface {
27 | TearDownSuite()
28 | }
29 |
30 | // TearDownTestSuite has a TearDownTest method, which will run after
31 | // each test in the suite.
32 | type TearDownTestSuite interface {
33 | TearDownTest()
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/LICENSE:
--------------------------------------------------------------------------------
1 | ISC License
2 |
3 | Copyright (c) 2012-2013 Dave Collins
4 |
5 | Permission to use, copy, modify, and distribute this software for any
6 | purpose with or without fee is hereby granted, provided that the above
7 | copyright notice and this permission notice appear in all copies.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/README.md:
--------------------------------------------------------------------------------
1 | # objx
2 |
3 | * Jump into the [API Documentation](http://godoc.org/github.com/stretchr/objx)
4 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/codegen/array-access.txt:
--------------------------------------------------------------------------------
1 | case []{1}:
2 | a := object.([]{1})
3 | if isSet {
4 | a[index] = value.({1})
5 | } else {
6 | if index >= len(a) {
7 | if panics {
8 | panic(fmt.Sprintf("objx: Index %d is out of range because the []{1} only contains %d items.", index, len(a)))
9 | }
10 | return nil
11 | } else {
12 | return a[index]
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/codegen/types_list.txt:
--------------------------------------------------------------------------------
1 | Interface,interface{},"something",nil,Inter
2 | Map,map[string]interface{},map[string]interface{}{"name":"Tyler"},nil,MSI
3 | ObjxMap,(Map),New(1),New(nil),ObjxMap
4 | Bool,bool,true,false,Bool
5 | String,string,"hello","",Str
6 | Int,int,1,0,Int
7 | Int8,int8,1,0,Int8
8 | Int16,int16,1,0,Int16
9 | Int32,int32,1,0,Int32
10 | Int64,int64,1,0,Int64
11 | Uint,uint,1,0,Uint
12 | Uint8,uint8,1,0,Uint8
13 | Uint16,uint16,1,0,Uint16
14 | Uint32,uint32,1,0,Uint32
15 | Uint64,uint64,1,0,Uint64
16 | Uintptr,uintptr,1,0,Uintptr
17 | Float32,float32,1,0,Float32
18 | Float64,float64,1,0,Float64
19 | Complex64,complex64,1,0,Complex64
20 | Complex128,complex128,1,0,Complex128
21 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/constants.go:
--------------------------------------------------------------------------------
1 | package objx
2 |
3 | const (
4 | // PathSeparator is the character used to separate the elements
5 | // of the keypath.
6 | //
7 | // For example, `location.address.city`
8 | PathSeparator string = "."
9 |
10 | // SignatureSeparator is the character that is used to
11 | // separate the Base64 string from the security signature.
12 | SignatureSeparator = "_"
13 | )
14 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/security.go:
--------------------------------------------------------------------------------
1 | package objx
2 |
3 | import (
4 | "crypto/sha1"
5 | "encoding/hex"
6 | )
7 |
8 | // HashWithKey hashes the specified string using the security
9 | // key.
10 | func HashWithKey(data, key string) string {
11 | hash := sha1.New()
12 | hash.Write([]byte(data + ":" + key))
13 | return hex.EncodeToString(hash.Sum(nil))
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/tests.go:
--------------------------------------------------------------------------------
1 | package objx
2 |
3 | // Has gets whether there is something at the specified selector
4 | // or not.
5 | //
6 | // If m is nil, Has will always return false.
7 | func (m Map) Has(selector string) bool {
8 | if m == nil {
9 | return false
10 | }
11 | return !m.Get(selector).IsNil()
12 | }
13 |
14 | // IsNil gets whether the data is nil or not.
15 | func (v *Value) IsNil() bool {
16 | return v == nil || v.data == nil
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/value.go:
--------------------------------------------------------------------------------
1 | package objx
2 |
3 | // Value provides methods for extracting interface{} data in various
4 | // types.
5 | type Value struct {
6 | // data contains the raw data being managed by this Value
7 | data interface{}
8 | }
9 |
10 | // Data returns the raw data contained by this Value
11 | func (v *Value) Data() interface{} {
12 | return v.data
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/.gitattributes:
--------------------------------------------------------------------------------
1 | # Treat all files in this repo as binary, with no git magic updating
2 | # line endings. Windows users contributing to Go will need to use a
3 | # modern version of git and editors capable of LF line endings.
4 | #
5 | # We'll prevent accidental CRLF line endings from entering the repo
6 | # via the git-review gofmt checks.
7 | #
8 | # See golang.org/issue/9281
9 |
10 | * -text
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/.gitignore:
--------------------------------------------------------------------------------
1 | # Add no patterns to .hgignore except for files generated by the build.
2 | last-change
3 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Go
2 |
3 | Go is an open source project.
4 |
5 | It is the work of hundreds of contributors. We appreciate your help!
6 |
7 |
8 | ## Filing issues
9 |
10 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:
11 |
12 | 1. What version of Go are you using (`go version`)?
13 | 2. What operating system and processor architecture are you using?
14 | 3. What did you do?
15 | 4. What did you expect to see?
16 | 5. What did you see instead?
17 |
18 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
19 | The gophers there will answer or ask you to file an issue if you've tripped over a bug.
20 |
21 | ## Contributing code
22 |
23 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
24 | before sending patches.
25 |
26 | **We do not accept GitHub pull requests**
27 | (we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review).
28 |
29 | Unless otherwise noted, the Go source files are distributed under
30 | the BSD-style license found in the LICENSE file.
31 |
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/README:
--------------------------------------------------------------------------------
1 | This repository holds supplemental Go packages for low-level interactions with the operating system.
2 |
3 | To submit changes to this repository, see http://golang.org/doc/contribute.html.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/codereview.cfg:
--------------------------------------------------------------------------------
1 | issuerepo: golang/go
2 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/plan9/asm.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 | #include "textflag.h"
6 |
7 | TEXT ·use(SB),NOSPLIT,$0
8 | RET
9 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/plan9/asm_plan9_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 | #include "textflag.h"
6 |
7 | //
8 | // System call support for 386, Plan 9
9 | //
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-32
15 | JMP syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-44
18 | JMP syscall·Syscall6(SB)
19 |
20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
21 | JMP syscall·RawSyscall(SB)
22 |
23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
24 | JMP syscall·RawSyscall6(SB)
25 |
26 | TEXT ·seek(SB),NOSPLIT,$0-36
27 | JMP syscall·seek(SB)
28 |
29 | TEXT ·exit(SB),NOSPLIT,$4-4
30 | JMP syscall·exit(SB)
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/plan9/asm_plan9_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 | #include "textflag.h"
6 |
7 | //
8 | // System call support for amd64, Plan 9
9 | //
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-64
15 | JMP syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-88
18 | JMP syscall·Syscall6(SB)
19 |
20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
21 | JMP syscall·RawSyscall(SB)
22 |
23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
24 | JMP syscall·RawSyscall6(SB)
25 |
26 | TEXT ·seek(SB),NOSPLIT,$0-56
27 | JMP syscall·seek(SB)
28 |
29 | TEXT ·exit(SB),NOSPLIT,$8-8
30 | JMP syscall·exit(SB)
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/plan9/env_plan9.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 | // Plan 9 environment variables.
6 |
7 | package plan9
8 |
9 | import (
10 | "syscall"
11 | )
12 |
13 | func Getenv(key string) (value string, found bool) {
14 | return syscall.Getenv(key)
15 | }
16 |
17 | func Setenv(key, value string) error {
18 | return syscall.Setenv(key, value)
19 | }
20 |
21 | func Clearenv() {
22 | syscall.Clearenv()
23 | }
24 |
25 | func Environ() []string {
26 | return syscall.Environ()
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/plan9/env_unset.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build go1.4
6 |
7 | package plan9
8 |
9 | import "syscall"
10 |
11 | func Unsetenv(key string) error {
12 | // This was added in Go 1.4.
13 | return syscall.Unsetenv(key)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # Copyright 2009 The Go Authors. All rights reserved.
3 | # Use of this source code is governed by a BSD-style
4 | # license that can be found in the LICENSE file.
5 |
6 | COMMAND="mksysnum_plan9.sh $@"
7 |
8 | cat <= 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/plan9/syscall_test.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 plan9
6 |
7 | package plan9_test
8 |
9 | import (
10 | "testing"
11 |
12 | "golang.org/x/sys/plan9"
13 | )
14 |
15 | func testSetGetenv(t *testing.T, key, value string) {
16 | err := plan9.Setenv(key, value)
17 | if err != nil {
18 | t.Fatalf("Setenv failed to set %q: %v", value, err)
19 | }
20 | newvalue, found := plan9.Getenv(key)
21 | if !found {
22 | t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value)
23 | }
24 | if newvalue != value {
25 | t.Fatalf("Getenv(%v) = %q; want %q", key, newvalue, value)
26 | }
27 | }
28 |
29 | func TestEnv(t *testing.T) {
30 | testSetGetenv(t, "TESTENV", "AVALUE")
31 | // make sure TESTENV gets set to "", not deleted
32 | testSetGetenv(t, "TESTENV", "")
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/.gitignore:
--------------------------------------------------------------------------------
1 | _obj/
2 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm.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 | TEXT ·use(SB),NOSPLIT,$0
10 | RET
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, Darwin
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, Darwin
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 | // +build arm,darwin
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System call support for ARM, Darwin
12 | //
13 |
14 | // Just jump to package syscall's implementation for all these functions.
15 | // The runtime may know about them.
16 |
17 | TEXT ·Syscall(SB),NOSPLIT,$0-28
18 | B syscall·Syscall(SB)
19 |
20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
21 | B syscall·Syscall6(SB)
22 |
23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
24 | B syscall·Syscall9(SB)
25 |
26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
27 | B syscall·RawSyscall(SB)
28 |
29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
30 | B syscall·RawSyscall6(SB)
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 | // +build arm64,darwin
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System call support for AMD64, Darwin
12 | //
13 |
14 | // Just jump to package syscall's implementation for all these functions.
15 | // The runtime may know about them.
16 |
17 | TEXT ·Syscall(SB),NOSPLIT,$0-56
18 | B syscall·Syscall(SB)
19 |
20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
21 | B syscall·Syscall6(SB)
22 |
23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
24 | B syscall·Syscall9(SB)
25 |
26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
27 | B syscall·RawSyscall(SB)
28 |
29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
30 | B syscall·RawSyscall6(SB)
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, DragonFly
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-64
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-88
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-112
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-64
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-88
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_freebsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for 386, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
23 | JMP syscall·RawSyscall(SB)
24 |
25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
26 | JMP syscall·RawSyscall6(SB)
27 |
28 | TEXT ·socketcall(SB),NOSPLIT,$0-36
29 | JMP syscall·socketcall(SB)
30 |
31 | TEXT ·rawsocketcall(SB),NOSPLIT,$0-36
32 | JMP syscall·rawsocketcall(SB)
33 |
34 | TEXT ·seek(SB),NOSPLIT,$0-28
35 | JMP syscall·seek(SB)
36 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for AMD64, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
23 | JMP syscall·RawSyscall(SB)
24 |
25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
26 | JMP syscall·RawSyscall6(SB)
27 |
28 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16
29 | JMP syscall·gettimeofday(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for arm, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
23 | B syscall·RawSyscall(SB)
24 |
25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
26 | B syscall·RawSyscall6(SB)
27 |
28 | TEXT ·seek(SB),NOSPLIT,$0-32
29 | B syscall·seek(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build arm64
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-56
15 | B syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
18 | B syscall·Syscall6(SB)
19 |
20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
21 | B syscall·RawSyscall(SB)
22 |
23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
24 | B syscall·RawSyscall6(SB)
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build mips64 mips64le
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for mips64, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | JMP syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | JMP syscall·Syscall6(SB)
23 |
24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
25 | JMP syscall·RawSyscall(SB)
26 |
27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
28 | JMP syscall·RawSyscall6(SB)
29 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build ppc64 ppc64le
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for ppc64, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | BR syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | BR syscall·Syscall6(SB)
23 |
24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
25 | BR syscall·RawSyscall(SB)
26 |
27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
28 | BR syscall·RawSyscall6(SB)
29 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_s390x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build s390x
6 | // +build linux
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for s390x, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | BR syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | BR syscall·Syscall6(SB)
23 |
24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
25 | BR syscall·RawSyscall(SB)
26 |
27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
28 | BR syscall·RawSyscall6(SB)
29 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_netbsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_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-64
14 | JMP syscall·sysvicall6(SB)
15 |
16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-64
17 | JMP syscall·rawSysvicall6(SB)
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/bluetooth_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Bluetooth sockets and messages
6 |
7 | package unix
8 |
9 | // Bluetooth Protocols
10 | const (
11 | BTPROTO_L2CAP = 0
12 | BTPROTO_HCI = 1
13 | BTPROTO_SCO = 2
14 | BTPROTO_RFCOMM = 3
15 | BTPROTO_BNEP = 4
16 | BTPROTO_CMTP = 5
17 | BTPROTO_HIDP = 6
18 | BTPROTO_AVDTP = 7
19 | )
20 |
21 | const (
22 | HCI_CHANNEL_RAW = 0
23 | HCI_CHANNEL_USER = 1
24 | HCI_CHANNEL_MONITOR = 2
25 | HCI_CHANNEL_CONTROL = 3
26 | )
27 |
28 | // Socketoption Level
29 | const (
30 | SOL_BLUETOOTH = 0x112
31 | SOL_HCI = 0x0
32 | SOL_L2CAP = 0x6
33 | SOL_RFCOMM = 0x12
34 | SOL_SCO = 0x11
35 | )
36 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/constants.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | const (
10 | R_OK = 0x4
11 | W_OK = 0x2
12 | X_OK = 0x1
13 | )
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/env_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | // Unix environment variables.
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Getenv(key string) (value string, found bool) {
14 | return syscall.Getenv(key)
15 | }
16 |
17 | func Setenv(key, value string) error {
18 | return syscall.Setenv(key, value)
19 | }
20 |
21 | func Clearenv() {
22 | syscall.Clearenv()
23 | }
24 |
25 | func Environ() []string {
26 | return syscall.Environ()
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/env_unset.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build go1.4
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | func Unsetenv(key string) error {
12 | // This was added in Go 1.4.
13 | return syscall.Unsetenv(key)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/export_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | var Itoa = itoa
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/flock.go:
--------------------------------------------------------------------------------
1 | // +build linux darwin freebsd openbsd netbsd dragonfly
2 |
3 | // Copyright 2014 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // +build darwin dragonfly freebsd linux netbsd openbsd
8 |
9 | package unix
10 |
11 | import "unsafe"
12 |
13 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux
14 | // systems by flock_linux_32bit.go to be SYS_FCNTL64.
15 | var fcntl64Syscall uintptr = SYS_FCNTL
16 |
17 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
18 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
19 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
20 | if errno == 0 {
21 | return nil
22 | }
23 | return errno
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/flock_linux_32bit.go:
--------------------------------------------------------------------------------
1 | // +build linux,386 linux,arm
2 |
3 | // Copyright 2014 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package unix
8 |
9 | func init() {
10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's
11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
12 | fcntl64Syscall = SYS_FCNTL64
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/gccgo_c.c:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build gccgo
6 |
7 | #include
8 | #include
9 | #include
10 |
11 | #define _STRINGIFY2_(x) #x
12 | #define _STRINGIFY_(x) _STRINGIFY2_(x)
13 | #define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__)
14 |
15 | // Call syscall from C code because the gccgo support for calling from
16 | // Go to C does not support varargs functions.
17 |
18 | struct ret {
19 | uintptr_t r;
20 | uintptr_t err;
21 | };
22 |
23 | struct ret
24 | gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
25 | {
26 | struct ret r;
27 |
28 | errno = 0;
29 | r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);
30 | r.err = errno;
31 | return r;
32 | }
33 |
34 | // Define the use function in C so that it is not inlined.
35 |
36 | extern void use(void *) __asm__ (GOSYM_PREFIX GOPKGPATH ".use") __attribute__((noinline));
37 |
38 | void
39 | use(void *p __attribute__ ((unused)))
40 | {
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build gccgo,linux,amd64
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | //extern gettimeofday
12 | func realGettimeofday(*Timeval, *byte) int32
13 |
14 | func gettimeofday(tv *Timeval) (err syscall.Errno) {
15 | r := realGettimeofday(tv, nil)
16 | if r < 0 {
17 | return syscall.GetErrno()
18 | }
19 | return 0
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env perl
2 | # Copyright 2009 The Go Authors. All rights reserved.
3 | # Use of this source code is governed by a BSD-style
4 | # license that can be found in the LICENSE file.
5 | #
6 | # Generate system call table for Darwin from sys/syscall.h
7 |
8 | use strict;
9 |
10 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
11 | print STDERR "GOARCH or GOOS not defined in environment\n";
12 | exit 1;
13 | }
14 |
15 | my $command = "mksysnum_darwin.pl " . join(' ', @ARGV);
16 |
17 | print <){
29 | if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){
30 | my $name = $1;
31 | my $num = $2;
32 | $name =~ y/a-z/A-Z/;
33 | print " SYS_$name = $num;"
34 | }
35 | }
36 |
37 | print <= 10 {
20 | buf[i] = byte(val%10 + '0')
21 | i--
22 | val /= 10
23 | }
24 | buf[i] = byte(val + '0')
25 | return string(buf[i:])
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_freebsd_test.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 freebsd
6 |
7 | package unix_test
8 |
9 | import (
10 | "os"
11 | "testing"
12 |
13 | "golang.org/x/sys/unix"
14 | )
15 |
16 | func TestSysctUint64(t *testing.T) {
17 | _, err := unix.SysctlUint64("vm.max_kernel_address")
18 | if err != nil {
19 | if os.Getenv("GO_BUILDER_NAME") == "freebsd-386-gce101" {
20 | t.Skipf("Ignoring known failing test (golang.org/issue/15186). Failed with: %v", err)
21 | }
22 | t.Fatal(err)
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386,netbsd
6 |
7 | package unix
8 |
9 | func Getpagesize() int { return 4096 }
10 |
11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
12 |
13 | func NsecToTimespec(nsec int64) (ts Timespec) {
14 | ts.Sec = int64(nsec / 1e9)
15 | ts.Nsec = int32(nsec % 1e9)
16 | return
17 | }
18 |
19 | func NsecToTimeval(nsec int64) (tv Timeval) {
20 | nsec += 999 // round up to microsecond
21 | tv.Usec = int32(nsec % 1e9 / 1e3)
22 | tv.Sec = int64(nsec / 1e9)
23 | return
24 | }
25 |
26 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
27 | k.Ident = uint32(fd)
28 | k.Filter = uint32(mode)
29 | k.Flags = uint32(flags)
30 | }
31 |
32 | func (iov *Iovec) SetLen(length int) {
33 | iov.Len = uint32(length)
34 | }
35 |
36 | func (msghdr *Msghdr) SetControllen(length int) {
37 | msghdr.Controllen = uint32(length)
38 | }
39 |
40 | func (cmsg *Cmsghdr) SetLen(length int) {
41 | cmsg.Len = uint32(length)
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,netbsd
6 |
7 | package unix
8 |
9 | func Getpagesize() int { return 4096 }
10 |
11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
12 |
13 | func NsecToTimespec(nsec int64) (ts Timespec) {
14 | ts.Sec = int64(nsec / 1e9)
15 | ts.Nsec = int64(nsec % 1e9)
16 | return
17 | }
18 |
19 | func NsecToTimeval(nsec int64) (tv Timeval) {
20 | nsec += 999 // round up to microsecond
21 | tv.Usec = int32(nsec % 1e9 / 1e3)
22 | tv.Sec = int64(nsec / 1e9)
23 | return
24 | }
25 |
26 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
27 | k.Ident = uint64(fd)
28 | k.Filter = uint32(mode)
29 | k.Flags = uint32(flags)
30 | }
31 |
32 | func (iov *Iovec) SetLen(length int) {
33 | iov.Len = uint64(length)
34 | }
35 |
36 | func (msghdr *Msghdr) SetControllen(length int) {
37 | msghdr.Controllen = uint32(length)
38 | }
39 |
40 | func (cmsg *Cmsghdr) SetLen(length int) {
41 | cmsg.Len = uint32(length)
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm,netbsd
6 |
7 | package unix
8 |
9 | func Getpagesize() int { return 4096 }
10 |
11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
12 |
13 | func NsecToTimespec(nsec int64) (ts Timespec) {
14 | ts.Sec = int64(nsec / 1e9)
15 | ts.Nsec = int32(nsec % 1e9)
16 | return
17 | }
18 |
19 | func NsecToTimeval(nsec int64) (tv Timeval) {
20 | nsec += 999 // round up to microsecond
21 | tv.Usec = int32(nsec % 1e9 / 1e3)
22 | tv.Sec = int64(nsec / 1e9)
23 | return
24 | }
25 |
26 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
27 | k.Ident = uint32(fd)
28 | k.Filter = uint32(mode)
29 | k.Flags = uint32(flags)
30 | }
31 |
32 | func (iov *Iovec) SetLen(length int) {
33 | iov.Len = uint32(length)
34 | }
35 |
36 | func (msghdr *Msghdr) SetControllen(length int) {
37 | msghdr.Controllen = uint32(length)
38 | }
39 |
40 | func (cmsg *Cmsghdr) SetLen(length int) {
41 | cmsg.Len = uint32(length)
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_no_getwd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build dragonfly freebsd netbsd openbsd
6 |
7 | package unix
8 |
9 | const ImplementsGetwd = false
10 |
11 | func Getwd() (string, error) { return "", ENOTSUP }
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386,openbsd
6 |
7 | package unix
8 |
9 | func Getpagesize() int { return 4096 }
10 |
11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
12 |
13 | func NsecToTimespec(nsec int64) (ts Timespec) {
14 | ts.Sec = int64(nsec / 1e9)
15 | ts.Nsec = int32(nsec % 1e9)
16 | return
17 | }
18 |
19 | func NsecToTimeval(nsec int64) (tv Timeval) {
20 | nsec += 999 // round up to microsecond
21 | tv.Usec = int32(nsec % 1e9 / 1e3)
22 | tv.Sec = int64(nsec / 1e9)
23 | return
24 | }
25 |
26 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
27 | k.Ident = uint32(fd)
28 | k.Filter = int16(mode)
29 | k.Flags = uint16(flags)
30 | }
31 |
32 | func (iov *Iovec) SetLen(length int) {
33 | iov.Len = uint32(length)
34 | }
35 |
36 | func (msghdr *Msghdr) SetControllen(length int) {
37 | msghdr.Controllen = uint32(length)
38 | }
39 |
40 | func (cmsg *Cmsghdr) SetLen(length int) {
41 | cmsg.Len = uint32(length)
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,openbsd
6 |
7 | package unix
8 |
9 | func Getpagesize() int { return 4096 }
10 |
11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
12 |
13 | func NsecToTimespec(nsec int64) (ts Timespec) {
14 | ts.Sec = nsec / 1e9
15 | ts.Nsec = nsec % 1e9
16 | return
17 | }
18 |
19 | func NsecToTimeval(nsec int64) (tv Timeval) {
20 | nsec += 999 // round up to microsecond
21 | tv.Usec = nsec % 1e9 / 1e3
22 | tv.Sec = nsec / 1e9
23 | return
24 | }
25 |
26 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
27 | k.Ident = uint64(fd)
28 | k.Filter = int16(mode)
29 | k.Flags = uint16(flags)
30 | }
31 |
32 | func (iov *Iovec) SetLen(length int) {
33 | iov.Len = uint64(length)
34 | }
35 |
36 | func (msghdr *Msghdr) SetControllen(length int) {
37 | msghdr.Controllen = uint32(length)
38 | }
39 |
40 | func (cmsg *Cmsghdr) SetLen(length int) {
41 | cmsg.Len = uint32(length)
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,solaris
6 |
7 | package unix
8 |
9 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
10 |
11 | func NsecToTimespec(nsec int64) (ts Timespec) {
12 | ts.Sec = nsec / 1e9
13 | ts.Nsec = nsec % 1e9
14 | return
15 | }
16 |
17 | func NsecToTimeval(nsec int64) (tv Timeval) {
18 | nsec += 999 // round up to microsecond
19 | tv.Usec = nsec % 1e9 / 1e3
20 | tv.Sec = int64(nsec / 1e9)
21 | return
22 | }
23 |
24 | func (iov *Iovec) SetLen(length int) {
25 | iov.Len = uint64(length)
26 | }
27 |
28 | func (cmsg *Cmsghdr) SetLen(length int) {
29 | cmsg.Len = uint32(length)
30 | }
31 |
32 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
33 | // TODO(aram): implement this, see issue 5847.
34 | panic("unimplemented")
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,solaris
6 |
7 | package unix
8 |
9 | // TODO(aram): remove these before Go 1.3.
10 | const (
11 | SYS_EXECVE = 59
12 | SYS_FCNTL = 62
13 | )
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/asm_windows_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //
6 | // System calls for 386, Windows are implemented in runtime/syscall_windows.goc
7 | //
8 |
9 | TEXT ·getprocaddress(SB), 7, $0-8
10 | JMP syscall·getprocaddress(SB)
11 |
12 | TEXT ·loadlibrary(SB), 7, $0-4
13 | JMP syscall·loadlibrary(SB)
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/asm_windows_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //
6 | // System calls for amd64, Windows are implemented in runtime/syscall_windows.goc
7 | //
8 |
9 | TEXT ·getprocaddress(SB), 7, $0-32
10 | JMP syscall·getprocaddress(SB)
11 |
12 | TEXT ·loadlibrary(SB), 7, $0-8
13 | JMP syscall·loadlibrary(SB)
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/env_unset.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows
6 | // +build go1.4
7 |
8 | package windows
9 |
10 | import "syscall"
11 |
12 | func Unsetenv(key string) error {
13 | // This was added in Go 1.4.
14 | return syscall.Unsetenv(key)
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/env_windows.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Windows environment variables.
6 |
7 | package windows
8 |
9 | import "syscall"
10 |
11 | func Getenv(key string) (value string, found bool) {
12 | return syscall.Getenv(key)
13 | }
14 |
15 | func Setenv(key, value string) error {
16 | return syscall.Setenv(key, value)
17 | }
18 |
19 | func Clearenv() {
20 | syscall.Clearenv()
21 | }
22 |
23 | func Environ() []string {
24 | return syscall.Environ()
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/eventlog.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows
6 |
7 | package windows
8 |
9 | const (
10 | EVENTLOG_SUCCESS = 0
11 | EVENTLOG_ERROR_TYPE = 1
12 | EVENTLOG_WARNING_TYPE = 2
13 | EVENTLOG_INFORMATION_TYPE = 4
14 | EVENTLOG_AUDIT_SUCCESS = 8
15 | EVENTLOG_AUDIT_FAILURE = 16
16 | )
17 |
18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW
19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource
20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/mksyscall.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package windows
6 |
7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go
8 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/race.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows,race
6 |
7 | package windows
8 |
9 | import (
10 | "runtime"
11 | "unsafe"
12 | )
13 |
14 | const raceenabled = true
15 |
16 | func raceAcquire(addr unsafe.Pointer) {
17 | runtime.RaceAcquire(addr)
18 | }
19 |
20 | func raceReleaseMerge(addr unsafe.Pointer) {
21 | runtime.RaceReleaseMerge(addr)
22 | }
23 |
24 | func raceReadRange(addr unsafe.Pointer, len int) {
25 | runtime.RaceReadRange(addr, len)
26 | }
27 |
28 | func raceWriteRange(addr unsafe.Pointer, len int) {
29 | runtime.RaceWriteRange(addr, len)
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/race0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows,!race
6 |
7 | package windows
8 |
9 | import (
10 | "unsafe"
11 | )
12 |
13 | const raceenabled = false
14 |
15 | func raceAcquire(addr unsafe.Pointer) {
16 | }
17 |
18 | func raceReleaseMerge(addr unsafe.Pointer) {
19 | }
20 |
21 | func raceReadRange(addr unsafe.Pointer, len int) {
22 | }
23 |
24 | func raceWriteRange(addr unsafe.Pointer, len int) {
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/registry/export_test.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 windows
6 |
7 | package registry
8 |
9 | func (k Key) SetValue(name string, valtype uint32, data []byte) error {
10 | return k.setValue(name, valtype, data)
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/registry/mksyscall.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package registry
6 |
7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go syscall.go
8 |
--------------------------------------------------------------------------------
/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/svc/debug/service.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 debug provides facilities to execute svc.Handler on console.
8 | //
9 | package debug
10 |
11 | import (
12 | "os"
13 | "os/signal"
14 | "syscall"
15 |
16 | "golang.org/x/sys/windows/svc"
17 | )
18 |
19 | // Run executes service name by calling appropriate handler function.
20 | // The process is running on console, unlike real service. Use Ctrl+C to
21 | // send "Stop" command to your service.
22 | func Run(name string, handler svc.Handler) error {
23 | cmds := make(chan svc.ChangeRequest)
24 | changes := make(chan svc.Status)
25 |
26 | sig := make(chan os.Signal)
27 | signal.Notify(sig)
28 |
29 | go func() {
30 | status := svc.Status{State: svc.Stopped}
31 | for {
32 | select {
33 | case <-sig:
34 | cmds <- svc.ChangeRequest{svc.Stop, status}
35 | case status = <-changes:
36 | }
37 | }
38 | }()
39 |
40 | _, errno := handler.Execute([]string{name}, cmds, changes)
41 | if errno != 0 {
42 | return syscall.Errno(errno)
43 | }
44 | return nil
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/svc/event.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 svc
8 |
9 | import (
10 | "errors"
11 |
12 | "golang.org/x/sys/windows"
13 | )
14 |
15 | // event represents auto-reset, initially non-signaled Windows event.
16 | // It is used to communicate between go and asm parts of this package.
17 | type event struct {
18 | h windows.Handle
19 | }
20 |
21 | func newEvent() (*event, error) {
22 | h, err := windows.CreateEvent(nil, 0, 0, nil)
23 | if err != nil {
24 | return nil, err
25 | }
26 | return &event{h: h}, nil
27 | }
28 |
29 | func (e *event) Close() error {
30 | return windows.CloseHandle(e.h)
31 | }
32 |
33 | func (e *event) Set() error {
34 | return windows.SetEvent(e.h)
35 | }
36 |
37 | func (e *event) Wait() error {
38 | s, err := windows.WaitForSingleObject(e.h, windows.INFINITE)
39 | switch s {
40 | case windows.WAIT_OBJECT_0:
41 | break
42 | case windows.WAIT_FAILED:
43 | return err
44 | default:
45 | return errors.New("unexpected result from WaitForSingleObject")
46 | }
47 | return nil
48 | }
49 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/svc/example/beep.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 main
8 |
9 | import (
10 | "syscall"
11 | )
12 |
13 | // BUG(brainman): MessageBeep Windows api is broken on Windows 7,
14 | // so this example does not beep when runs as service on Windows 7.
15 |
16 | var (
17 | beepFunc = syscall.MustLoadDLL("user32.dll").MustFindProc("MessageBeep")
18 | )
19 |
20 | func beep() {
21 | beepFunc.Call(0xffffffff)
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/svc/go12.c:
--------------------------------------------------------------------------------
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 | // +build !go1.3
7 |
8 | // copied from pkg/runtime
9 | typedef unsigned int uint32;
10 | typedef unsigned long long int uint64;
11 | #ifdef _64BIT
12 | typedef uint64 uintptr;
13 | #else
14 | typedef uint32 uintptr;
15 | #endif
16 |
17 | // from sys_386.s or sys_amd64.s
18 | void ·servicemain(void);
19 |
20 | void
21 | ·getServiceMain(uintptr *r)
22 | {
23 | *r = (uintptr)·servicemain;
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/svc/go12.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows
6 | // +build !go1.3
7 |
8 | package svc
9 |
10 | // from go12.c
11 | func getServiceMain(r *uintptr)
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/svc/go13.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows
6 | // +build go1.3
7 |
8 | package svc
9 |
10 | import "unsafe"
11 |
12 | const ptrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ideal const
13 |
14 | // Should be a built-in for unsafe.Pointer?
15 | func add(p unsafe.Pointer, x uintptr) unsafe.Pointer {
16 | return unsafe.Pointer(uintptr(p) + x)
17 | }
18 |
19 | // funcPC returns the entry PC of the function f.
20 | // It assumes that f is a func value. Otherwise the behavior is undefined.
21 | func funcPC(f interface{}) uintptr {
22 | return **(**uintptr)(add(unsafe.Pointer(&f), ptrSize))
23 | }
24 |
25 | // from sys_386.s and sys_amd64.s
26 | func servicectlhandler(ctl uint32) uintptr
27 | func servicemain(argc uint32, argv **uint16)
28 |
29 | func getServiceMain(r *uintptr) {
30 | *r = funcPC(servicemain)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/svc/sys_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows
6 |
7 | // func servicemain(argc uint32, argv **uint16)
8 | TEXT ·servicemain(SB),7,$0
9 | MOVL CX, ·sArgc(SB)
10 | MOVL DX, ·sArgv(SB)
11 |
12 | SUBQ $32, SP // stack for the first 4 syscall params
13 |
14 | MOVQ ·sName(SB), CX
15 | MOVQ $·servicectlhandler(SB), DX
16 | MOVQ ·cRegisterServiceCtrlHandlerW(SB), AX
17 | CALL AX
18 | CMPQ AX, $0
19 | JE exit
20 | MOVQ AX, ·ssHandle(SB)
21 |
22 | MOVQ ·goWaitsH(SB), CX
23 | MOVQ ·cSetEvent(SB), AX
24 | CALL AX
25 |
26 | MOVQ ·cWaitsH(SB), CX
27 | MOVQ $4294967295, DX
28 | MOVQ ·cWaitForSingleObject(SB), AX
29 | CALL AX
30 |
31 | exit:
32 | ADDQ $32, SP
33 | RET
34 |
35 | // I do not know why, but this seems to be the only way to call
36 | // ctlHandlerProc on Windows 7.
37 |
38 | // func servicectlhandler(ctl uint32) uintptr
39 | TEXT ·servicectlhandler(SB),7,$0
40 | MOVQ ·ctlHandlerProc(SB), AX
41 | JMP AX
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/syscall_test.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 windows
6 |
7 | package windows_test
8 |
9 | import (
10 | "testing"
11 |
12 | "golang.org/x/sys/windows"
13 | )
14 |
15 | func testSetGetenv(t *testing.T, key, value string) {
16 | err := windows.Setenv(key, value)
17 | if err != nil {
18 | t.Fatalf("Setenv failed to set %q: %v", value, err)
19 | }
20 | newvalue, found := windows.Getenv(key)
21 | if !found {
22 | t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value)
23 | }
24 | if newvalue != value {
25 | t.Fatalf("Getenv(%v) = %q; want %q", key, newvalue, value)
26 | }
27 | }
28 |
29 | func TestEnv(t *testing.T) {
30 | testSetGetenv(t, "TESTENV", "AVALUE")
31 | // make sure TESTENV gets set to "", not deleted
32 | testSetGetenv(t, "TESTENV", "")
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/ztypes_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/ztypes_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 |
--------------------------------------------------------------------------------