├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── check ├── check.go ├── check_suite_test.go ├── check_test.go └── cmd │ └── main.go ├── ci ├── dev-build-pipeline.yml ├── pipeline.yml └── tasks │ ├── build.sh │ ├── build.yml │ ├── prepare.sh │ ├── prepare.yml │ ├── runTests.sh │ └── runTests.yml ├── example ├── demo-pipeline-attachments.yml ├── demo-pipeline-dynamic-recipients.yml ├── demo-pipeline-empty-body.yml ├── demo-pipeline-onfailure.yml ├── demo-pipeline-text.yml ├── demo-pipeline.yml └── vars-template.yml ├── go.mod ├── go.sum ├── in ├── cmd │ └── main.go ├── in.go ├── in_suite_test.go └── in_test.go ├── out ├── cmd │ └── main.go ├── fakes │ └── fake_mail.go ├── fakes_for_test.go ├── mail.go ├── mail_test.go ├── out.go ├── out_suite_test.go ├── out_test.go ├── sender.go ├── smtp_login_auth.go ├── smtp_login_auth_test.go ├── test_certs │ ├── rootCA.key │ ├── rootCA.pem │ ├── rootCA.srl │ ├── server.crt │ └── server.key └── types.go └── vendor ├── bitbucket.org └── chrj │ └── smtpd │ ├── .hgignore │ ├── LICENSE │ ├── README.md │ ├── address.go │ ├── envelope.go │ ├── protocol.go │ ├── smtpd.go │ └── wrap.go ├── github.com ├── domodwyer │ └── mailyak │ │ └── v3 │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── .pre-commit-config.yaml │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── attachments.go │ │ ├── mailyak.go │ │ ├── mime.go │ │ ├── package.go │ │ ├── sender.go │ │ ├── sender_explicit_tls.go │ │ ├── sender_starttls.go │ │ ├── setters.go │ │ ├── splitter.go │ │ └── writer.go ├── fsnotify │ └── fsnotify │ │ ├── .editorconfig │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── fen.go │ │ ├── fsnotify.go │ │ ├── inotify.go │ │ ├── inotify_poller.go │ │ ├── kqueue.go │ │ ├── open_mode_bsd.go │ │ ├── open_mode_darwin.go │ │ └── windows.go ├── nxadm │ └── tail │ │ ├── .gitignore │ │ ├── CHANGES.md │ │ ├── Dockerfile │ │ ├── LICENSE │ │ ├── README.md │ │ ├── ratelimiter │ │ ├── Licence │ │ ├── leakybucket.go │ │ ├── memory.go │ │ └── storage.go │ │ ├── tail.go │ │ ├── tail_posix.go │ │ ├── tail_windows.go │ │ ├── util │ │ └── util.go │ │ ├── watch │ │ ├── filechanges.go │ │ ├── inotify.go │ │ ├── inotify_tracker.go │ │ ├── polling.go │ │ └── watch.go │ │ └── winfile │ │ └── winfile.go ├── onsi │ ├── ginkgo │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── RELEASING.md │ │ ├── config │ │ │ └── config.go │ │ ├── formatter │ │ │ └── formatter.go │ │ ├── ginkgo_dsl.go │ │ ├── internal │ │ │ ├── codelocation │ │ │ │ └── code_location.go │ │ │ ├── containernode │ │ │ │ └── container_node.go │ │ │ ├── failer │ │ │ │ └── failer.go │ │ │ ├── global │ │ │ │ └── init.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 │ │ │ │ ├── spec.go │ │ │ │ └── specs.go │ │ │ ├── spec_iterator │ │ │ │ ├── index_computer.go │ │ │ │ ├── parallel_spec_iterator.go │ │ │ │ ├── serial_spec_iterator.go │ │ │ │ ├── sharded_parallel_spec_iterator.go │ │ │ │ └── spec_iterator.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 │ │ │ │ └── support │ │ │ │ │ ├── go-colorable │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── colorable_others.go │ │ │ │ │ ├── colorable_windows.go │ │ │ │ │ └── noncolorable.go │ │ │ │ │ └── go-isatty │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── isatty_appengine.go │ │ │ │ │ ├── isatty_bsd.go │ │ │ │ │ ├── isatty_linux.go │ │ │ │ │ ├── isatty_solaris.go │ │ │ │ │ └── isatty_windows.go │ │ │ └── teamcity_reporter.go │ │ └── types │ │ │ ├── code_location.go │ │ │ ├── deprecation_support.go │ │ │ ├── synchronization.go │ │ │ └── types.go │ └── gomega │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── RELEASING.md │ │ ├── format │ │ └── format.go │ │ ├── gbytes │ │ ├── buffer.go │ │ ├── io_wrappers.go │ │ └── say_matcher.go │ │ ├── gexec │ │ ├── build.go │ │ ├── exit_matcher.go │ │ ├── prefixed_writer.go │ │ └── session.go │ │ ├── gomega_dsl.go │ │ ├── internal │ │ ├── assertion.go │ │ ├── async_assertion.go │ │ ├── duration_bundle.go │ │ ├── gomega.go │ │ └── gutil │ │ │ ├── post_ioutil.go │ │ │ └── using_ioutil.go │ │ ├── matchers.go │ │ ├── matchers │ │ ├── and.go │ │ ├── assignable_to_type_of_matcher.go │ │ ├── attributes_slice.go │ │ ├── be_a_directory.go │ │ ├── be_a_regular_file.go │ │ ├── be_an_existing_file.go │ │ ├── be_closed_matcher.go │ │ ├── be_element_of_matcher.go │ │ ├── be_empty_matcher.go │ │ ├── be_equivalent_to_matcher.go │ │ ├── be_false_matcher.go │ │ ├── be_identical_to.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_elements_matcher.go │ │ ├── contain_substring_matcher.go │ │ ├── equal_matcher.go │ │ ├── have_cap_matcher.go │ │ ├── have_each_matcher.go │ │ ├── have_field.go │ │ ├── have_http_body_matcher.go │ │ ├── have_http_header_with_value_matcher.go │ │ ├── have_http_status_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 │ │ ├── have_value.go │ │ ├── match_error_matcher.go │ │ ├── match_json_matcher.go │ │ ├── match_regexp_matcher.go │ │ ├── match_xml_matcher.go │ │ ├── match_yaml_matcher.go │ │ ├── not.go │ │ ├── or.go │ │ ├── panic_matcher.go │ │ ├── receive_matcher.go │ │ ├── satisfy_matcher.go │ │ ├── semi_structured_data_support.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 │ │ ├── tools │ │ └── types │ │ └── types.go └── pkg │ └── errors │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── appveyor.yml │ ├── errors.go │ └── stack.go ├── golang.org └── x │ ├── net │ ├── LICENSE │ ├── PATENTS │ └── html │ │ ├── atom │ │ ├── atom.go │ │ └── table.go │ │ ├── charset │ │ └── charset.go │ │ ├── const.go │ │ ├── doc.go │ │ ├── doctype.go │ │ ├── entity.go │ │ ├── escape.go │ │ ├── foreign.go │ │ ├── node.go │ │ ├── parse.go │ │ ├── render.go │ │ └── token.go │ ├── sys │ ├── LICENSE │ ├── PATENTS │ └── unix │ │ ├── .gitignore │ │ ├── README.md │ │ ├── affinity_linux.go │ │ ├── aliases.go │ │ ├── asm_aix_ppc64.s │ │ ├── asm_bsd_386.s │ │ ├── asm_bsd_amd64.s │ │ ├── asm_bsd_arm.s │ │ ├── asm_bsd_arm64.s │ │ ├── asm_bsd_ppc64.s │ │ ├── asm_bsd_riscv64.s │ │ ├── asm_linux_386.s │ │ ├── asm_linux_amd64.s │ │ ├── asm_linux_arm.s │ │ ├── asm_linux_arm64.s │ │ ├── asm_linux_loong64.s │ │ ├── asm_linux_mips64x.s │ │ ├── asm_linux_mipsx.s │ │ ├── asm_linux_ppc64x.s │ │ ├── asm_linux_riscv64.s │ │ ├── asm_linux_s390x.s │ │ ├── asm_openbsd_mips64.s │ │ ├── asm_solaris_amd64.s │ │ ├── asm_zos_s390x.s │ │ ├── bluetooth_linux.go │ │ ├── cap_freebsd.go │ │ ├── constants.go │ │ ├── dev_aix_ppc.go │ │ ├── dev_aix_ppc64.go │ │ ├── dev_darwin.go │ │ ├── dev_dragonfly.go │ │ ├── dev_freebsd.go │ │ ├── dev_linux.go │ │ ├── dev_netbsd.go │ │ ├── dev_openbsd.go │ │ ├── dev_zos.go │ │ ├── dirent.go │ │ ├── endian_big.go │ │ ├── endian_little.go │ │ ├── env_unix.go │ │ ├── epoll_zos.go │ │ ├── fcntl.go │ │ ├── fcntl_darwin.go │ │ ├── fcntl_linux_32bit.go │ │ ├── fdset.go │ │ ├── fstatfs_zos.go │ │ ├── gccgo.go │ │ ├── gccgo_c.c │ │ ├── gccgo_linux_amd64.go │ │ ├── ifreq_linux.go │ │ ├── ioctl.go │ │ ├── ioctl_linux.go │ │ ├── ioctl_zos.go │ │ ├── mkall.sh │ │ ├── mkerrors.sh │ │ ├── pagesize_unix.go │ │ ├── pledge_openbsd.go │ │ ├── ptrace_darwin.go │ │ ├── ptrace_ios.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── readdirent_getdents.go │ │ ├── readdirent_getdirentries.go │ │ ├── sockcmsg_dragonfly.go │ │ ├── sockcmsg_linux.go │ │ ├── sockcmsg_unix.go │ │ ├── sockcmsg_unix_other.go │ │ ├── syscall.go │ │ ├── syscall_aix.go │ │ ├── syscall_aix_ppc.go │ │ ├── syscall_aix_ppc64.go │ │ ├── syscall_bsd.go │ │ ├── syscall_darwin.go │ │ ├── syscall_darwin_amd64.go │ │ ├── syscall_darwin_arm64.go │ │ ├── syscall_darwin_libSystem.go │ │ ├── syscall_dragonfly.go │ │ ├── syscall_dragonfly_amd64.go │ │ ├── syscall_freebsd.go │ │ ├── syscall_freebsd_386.go │ │ ├── syscall_freebsd_amd64.go │ │ ├── syscall_freebsd_arm.go │ │ ├── syscall_freebsd_arm64.go │ │ ├── syscall_freebsd_riscv64.go │ │ ├── syscall_hurd.go │ │ ├── syscall_hurd_386.go │ │ ├── syscall_illumos.go │ │ ├── syscall_linux.go │ │ ├── syscall_linux_386.go │ │ ├── syscall_linux_alarm.go │ │ ├── syscall_linux_amd64.go │ │ ├── syscall_linux_amd64_gc.go │ │ ├── syscall_linux_arm.go │ │ ├── syscall_linux_arm64.go │ │ ├── syscall_linux_gc.go │ │ ├── syscall_linux_gc_386.go │ │ ├── syscall_linux_gc_arm.go │ │ ├── syscall_linux_gccgo_386.go │ │ ├── syscall_linux_gccgo_arm.go │ │ ├── syscall_linux_loong64.go │ │ ├── syscall_linux_mips64x.go │ │ ├── syscall_linux_mipsx.go │ │ ├── syscall_linux_ppc.go │ │ ├── syscall_linux_ppc64x.go │ │ ├── syscall_linux_riscv64.go │ │ ├── syscall_linux_s390x.go │ │ ├── syscall_linux_sparc64.go │ │ ├── syscall_netbsd.go │ │ ├── syscall_netbsd_386.go │ │ ├── syscall_netbsd_amd64.go │ │ ├── syscall_netbsd_arm.go │ │ ├── syscall_netbsd_arm64.go │ │ ├── syscall_openbsd.go │ │ ├── syscall_openbsd_386.go │ │ ├── syscall_openbsd_amd64.go │ │ ├── syscall_openbsd_arm.go │ │ ├── syscall_openbsd_arm64.go │ │ ├── syscall_openbsd_libc.go │ │ ├── syscall_openbsd_mips64.go │ │ ├── syscall_openbsd_ppc64.go │ │ ├── syscall_openbsd_riscv64.go │ │ ├── syscall_solaris.go │ │ ├── syscall_solaris_amd64.go │ │ ├── syscall_unix.go │ │ ├── syscall_unix_gc.go │ │ ├── syscall_unix_gc_ppc64x.go │ │ ├── syscall_zos_s390x.go │ │ ├── sysvshm_linux.go │ │ ├── sysvshm_unix.go │ │ ├── sysvshm_unix_other.go │ │ ├── timestruct.go │ │ ├── unveil_openbsd.go │ │ ├── xattr_bsd.go │ │ ├── zerrors_aix_ppc.go │ │ ├── zerrors_aix_ppc64.go │ │ ├── zerrors_darwin_amd64.go │ │ ├── zerrors_darwin_arm64.go │ │ ├── zerrors_dragonfly_amd64.go │ │ ├── zerrors_freebsd_386.go │ │ ├── zerrors_freebsd_amd64.go │ │ ├── zerrors_freebsd_arm.go │ │ ├── zerrors_freebsd_arm64.go │ │ ├── zerrors_freebsd_riscv64.go │ │ ├── zerrors_linux.go │ │ ├── zerrors_linux_386.go │ │ ├── zerrors_linux_amd64.go │ │ ├── zerrors_linux_arm.go │ │ ├── zerrors_linux_arm64.go │ │ ├── zerrors_linux_loong64.go │ │ ├── zerrors_linux_mips.go │ │ ├── zerrors_linux_mips64.go │ │ ├── zerrors_linux_mips64le.go │ │ ├── zerrors_linux_mipsle.go │ │ ├── zerrors_linux_ppc.go │ │ ├── zerrors_linux_ppc64.go │ │ ├── zerrors_linux_ppc64le.go │ │ ├── zerrors_linux_riscv64.go │ │ ├── zerrors_linux_s390x.go │ │ ├── zerrors_linux_sparc64.go │ │ ├── zerrors_netbsd_386.go │ │ ├── zerrors_netbsd_amd64.go │ │ ├── zerrors_netbsd_arm.go │ │ ├── zerrors_netbsd_arm64.go │ │ ├── zerrors_openbsd_386.go │ │ ├── zerrors_openbsd_amd64.go │ │ ├── zerrors_openbsd_arm.go │ │ ├── zerrors_openbsd_arm64.go │ │ ├── zerrors_openbsd_mips64.go │ │ ├── zerrors_openbsd_ppc64.go │ │ ├── zerrors_openbsd_riscv64.go │ │ ├── zerrors_solaris_amd64.go │ │ ├── zerrors_zos_s390x.go │ │ ├── zptrace_armnn_linux.go │ │ ├── zptrace_linux_arm64.go │ │ ├── zptrace_mipsnn_linux.go │ │ ├── zptrace_mipsnnle_linux.go │ │ ├── zptrace_x86_linux.go │ │ ├── zsyscall_aix_ppc.go │ │ ├── zsyscall_aix_ppc64.go │ │ ├── zsyscall_aix_ppc64_gc.go │ │ ├── zsyscall_aix_ppc64_gccgo.go │ │ ├── zsyscall_darwin_amd64.go │ │ ├── zsyscall_darwin_amd64.s │ │ ├── zsyscall_darwin_arm64.go │ │ ├── zsyscall_darwin_arm64.s │ │ ├── zsyscall_dragonfly_amd64.go │ │ ├── zsyscall_freebsd_386.go │ │ ├── zsyscall_freebsd_amd64.go │ │ ├── zsyscall_freebsd_arm.go │ │ ├── zsyscall_freebsd_arm64.go │ │ ├── zsyscall_freebsd_riscv64.go │ │ ├── zsyscall_illumos_amd64.go │ │ ├── zsyscall_linux.go │ │ ├── zsyscall_linux_386.go │ │ ├── zsyscall_linux_amd64.go │ │ ├── zsyscall_linux_arm.go │ │ ├── zsyscall_linux_arm64.go │ │ ├── zsyscall_linux_loong64.go │ │ ├── zsyscall_linux_mips.go │ │ ├── zsyscall_linux_mips64.go │ │ ├── zsyscall_linux_mips64le.go │ │ ├── zsyscall_linux_mipsle.go │ │ ├── zsyscall_linux_ppc.go │ │ ├── zsyscall_linux_ppc64.go │ │ ├── zsyscall_linux_ppc64le.go │ │ ├── zsyscall_linux_riscv64.go │ │ ├── zsyscall_linux_s390x.go │ │ ├── zsyscall_linux_sparc64.go │ │ ├── zsyscall_netbsd_386.go │ │ ├── zsyscall_netbsd_amd64.go │ │ ├── zsyscall_netbsd_arm.go │ │ ├── zsyscall_netbsd_arm64.go │ │ ├── zsyscall_openbsd_386.go │ │ ├── zsyscall_openbsd_386.s │ │ ├── zsyscall_openbsd_amd64.go │ │ ├── zsyscall_openbsd_amd64.s │ │ ├── zsyscall_openbsd_arm.go │ │ ├── zsyscall_openbsd_arm.s │ │ ├── zsyscall_openbsd_arm64.go │ │ ├── zsyscall_openbsd_arm64.s │ │ ├── zsyscall_openbsd_mips64.go │ │ ├── zsyscall_openbsd_mips64.s │ │ ├── zsyscall_openbsd_ppc64.go │ │ ├── zsyscall_openbsd_ppc64.s │ │ ├── zsyscall_openbsd_riscv64.go │ │ ├── zsyscall_openbsd_riscv64.s │ │ ├── zsyscall_solaris_amd64.go │ │ ├── zsyscall_zos_s390x.go │ │ ├── zsysctl_openbsd_386.go │ │ ├── zsysctl_openbsd_amd64.go │ │ ├── zsysctl_openbsd_arm.go │ │ ├── zsysctl_openbsd_arm64.go │ │ ├── zsysctl_openbsd_mips64.go │ │ ├── zsysctl_openbsd_ppc64.go │ │ ├── zsysctl_openbsd_riscv64.go │ │ ├── zsysnum_darwin_amd64.go │ │ ├── zsysnum_darwin_arm64.go │ │ ├── zsysnum_dragonfly_amd64.go │ │ ├── zsysnum_freebsd_386.go │ │ ├── zsysnum_freebsd_amd64.go │ │ ├── zsysnum_freebsd_arm.go │ │ ├── zsysnum_freebsd_arm64.go │ │ ├── zsysnum_freebsd_riscv64.go │ │ ├── zsysnum_linux_386.go │ │ ├── zsysnum_linux_amd64.go │ │ ├── zsysnum_linux_arm.go │ │ ├── zsysnum_linux_arm64.go │ │ ├── zsysnum_linux_loong64.go │ │ ├── zsysnum_linux_mips.go │ │ ├── zsysnum_linux_mips64.go │ │ ├── zsysnum_linux_mips64le.go │ │ ├── zsysnum_linux_mipsle.go │ │ ├── zsysnum_linux_ppc.go │ │ ├── zsysnum_linux_ppc64.go │ │ ├── zsysnum_linux_ppc64le.go │ │ ├── zsysnum_linux_riscv64.go │ │ ├── zsysnum_linux_s390x.go │ │ ├── zsysnum_linux_sparc64.go │ │ ├── zsysnum_netbsd_386.go │ │ ├── zsysnum_netbsd_amd64.go │ │ ├── zsysnum_netbsd_arm.go │ │ ├── zsysnum_netbsd_arm64.go │ │ ├── zsysnum_openbsd_386.go │ │ ├── zsysnum_openbsd_amd64.go │ │ ├── zsysnum_openbsd_arm.go │ │ ├── zsysnum_openbsd_arm64.go │ │ ├── zsysnum_openbsd_mips64.go │ │ ├── zsysnum_openbsd_ppc64.go │ │ ├── zsysnum_openbsd_riscv64.go │ │ ├── zsysnum_zos_s390x.go │ │ ├── ztypes_aix_ppc.go │ │ ├── ztypes_aix_ppc64.go │ │ ├── ztypes_darwin_amd64.go │ │ ├── ztypes_darwin_arm64.go │ │ ├── ztypes_dragonfly_amd64.go │ │ ├── ztypes_freebsd_386.go │ │ ├── ztypes_freebsd_amd64.go │ │ ├── ztypes_freebsd_arm.go │ │ ├── ztypes_freebsd_arm64.go │ │ ├── ztypes_freebsd_riscv64.go │ │ ├── ztypes_linux.go │ │ ├── ztypes_linux_386.go │ │ ├── ztypes_linux_amd64.go │ │ ├── ztypes_linux_arm.go │ │ ├── ztypes_linux_arm64.go │ │ ├── ztypes_linux_loong64.go │ │ ├── ztypes_linux_mips.go │ │ ├── ztypes_linux_mips64.go │ │ ├── ztypes_linux_mips64le.go │ │ ├── ztypes_linux_mipsle.go │ │ ├── ztypes_linux_ppc.go │ │ ├── ztypes_linux_ppc64.go │ │ ├── ztypes_linux_ppc64le.go │ │ ├── ztypes_linux_riscv64.go │ │ ├── ztypes_linux_s390x.go │ │ ├── ztypes_linux_sparc64.go │ │ ├── ztypes_netbsd_386.go │ │ ├── ztypes_netbsd_amd64.go │ │ ├── ztypes_netbsd_arm.go │ │ ├── ztypes_netbsd_arm64.go │ │ ├── ztypes_openbsd_386.go │ │ ├── ztypes_openbsd_amd64.go │ │ ├── ztypes_openbsd_arm.go │ │ ├── ztypes_openbsd_arm64.go │ │ ├── ztypes_openbsd_mips64.go │ │ ├── ztypes_openbsd_ppc64.go │ │ ├── ztypes_openbsd_riscv64.go │ │ ├── ztypes_solaris_amd64.go │ │ └── ztypes_zos_s390x.go │ └── text │ ├── LICENSE │ ├── PATENTS │ ├── encoding │ ├── charmap │ │ ├── charmap.go │ │ └── tables.go │ ├── encoding.go │ ├── htmlindex │ │ ├── htmlindex.go │ │ ├── map.go │ │ └── tables.go │ ├── internal │ │ ├── identifier │ │ │ ├── identifier.go │ │ │ └── mib.go │ │ └── internal.go │ ├── japanese │ │ ├── all.go │ │ ├── eucjp.go │ │ ├── iso2022jp.go │ │ ├── shiftjis.go │ │ └── tables.go │ ├── korean │ │ ├── euckr.go │ │ └── tables.go │ ├── simplifiedchinese │ │ ├── all.go │ │ ├── gbk.go │ │ ├── hzgb2312.go │ │ └── tables.go │ ├── traditionalchinese │ │ ├── big5.go │ │ └── tables.go │ └── unicode │ │ ├── override.go │ │ └── unicode.go │ ├── internal │ ├── language │ │ ├── common.go │ │ ├── compact.go │ │ ├── compact │ │ │ ├── compact.go │ │ │ ├── language.go │ │ │ ├── parents.go │ │ │ ├── tables.go │ │ │ └── tags.go │ │ ├── compose.go │ │ ├── coverage.go │ │ ├── language.go │ │ ├── lookup.go │ │ ├── match.go │ │ ├── parse.go │ │ ├── tables.go │ │ └── tags.go │ ├── tag │ │ └── tag.go │ └── utf8internal │ │ └── utf8internal.go │ ├── language │ ├── coverage.go │ ├── doc.go │ ├── language.go │ ├── match.go │ ├── parse.go │ ├── tables.go │ └── tags.go │ ├── runes │ ├── cond.go │ └── runes.go │ └── transform │ └── transform.go ├── gopkg.in ├── tomb.v1 │ ├── LICENSE │ ├── README.md │ └── tomb.go └── yaml.v2 │ ├── .travis.yml │ ├── LICENSE │ ├── LICENSE.libyaml │ ├── NOTICE │ ├── README.md │ ├── apic.go │ ├── decode.go │ ├── emitterc.go │ ├── encode.go │ ├── parserc.go │ ├── readerc.go │ ├── resolve.go │ ├── scannerc.go │ ├── sorter.go │ ├── writerc.go │ ├── yaml.go │ ├── yamlh.go │ └── yamlprivateh.go └── modules.txt /.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | vars.yml 3 | integration 4 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM harbor-repo.vmware.com/dockerhub-proxy-cache/progrium/busybox:latest 2 | 3 | ADD https://curl.haxx.se/ca/cacert.pem /etc/ssl/certs/ca-certificates.crt 4 | ADD bin /opt/resource 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 pivotal-cf 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /check/check.go: -------------------------------------------------------------------------------- 1 | package check 2 | 3 | //Execute - provides check capability 4 | func Execute() (string, error) { 5 | return "[]", nil 6 | } 7 | -------------------------------------------------------------------------------- /check/check_suite_test.go: -------------------------------------------------------------------------------- 1 | package check_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestCheck(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Check Suite") 13 | } 14 | -------------------------------------------------------------------------------- /check/check_test.go: -------------------------------------------------------------------------------- 1 | package check_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | . "github.com/onsi/gomega/gexec" 7 | "github.com/pivotal-cf/email-resource/check" 8 | ) 9 | 10 | var _ = Describe("Check", func() { 11 | AfterEach(func() { 12 | CleanupBuildArtifacts() 13 | }) 14 | 15 | It("should compile", func() { 16 | _, err := Build("github.com/pivotal-cf/email-resource/check/cmd") 17 | Ω(err).ShouldNot(HaveOccurred()) 18 | }) 19 | 20 | It("should output an empty JSON list", func() { 21 | output, err := check.Execute() 22 | Expect(err).ShouldNot(HaveOccurred()) 23 | Expect(output).Should(MatchJSON("[]")) 24 | }) 25 | }) 26 | -------------------------------------------------------------------------------- /check/cmd/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/pivotal-cf/email-resource/check" 7 | ) 8 | 9 | func main() { 10 | output, err := check.Execute() 11 | if err != nil { 12 | panic(err) 13 | } 14 | fmt.Println(output) 15 | } 16 | -------------------------------------------------------------------------------- /ci/dev-build-pipeline.yml: -------------------------------------------------------------------------------- 1 | resources: 2 | - name: source 3 | type: git 4 | source: 5 | uri: git@github.com:pivotal-cf/email-resource.git 6 | branch: ((dev-build-branch)) 7 | private_key: ((git-ssh-key)) 8 | 9 | - name: docker-registry 10 | type: docker-image 11 | source: 12 | repository: ((docker-repository)) 13 | username: ((docker-registry-username)) 14 | password: ((docker-registry-password)) 15 | tag: ((docker-dev-build-tag)) 16 | 17 | jobs: 18 | - name: test-and-build 19 | plan: 20 | - in_parallel: 21 | - get: source 22 | trigger: true 23 | - task: test 24 | file: source/ci/tasks/runTests.yml 25 | - task: build 26 | file: source/ci/tasks/build.yml 27 | params: 28 | DEV: true 29 | - put: docker-registry 30 | params: 31 | build: compiled-output 32 | -------------------------------------------------------------------------------- /ci/tasks/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | mkdir ~/.ssh/ && touch ~/.ssh/known_hosts 4 | ssh-keyscan github.com >>~/.ssh/known_hosts 5 | 6 | export GOPATH=$PWD/go 7 | export PATH=$GOPATH/bin:$PATH 8 | OUTPUT_DIR=$PWD/compiled-output 9 | SOURCE_DIR=$PWD/source 10 | go install github.com/xchapter7x/versioning@latest 11 | cp source/Dockerfile ${OUTPUT_DIR}/. 12 | cd ${SOURCE_DIR} 13 | if [ -d ".git" ]; then 14 | if ${DEV}; then 15 | ts=$(date +"%Y%m%M%S%N") 16 | DRAFT_VERSION="dev-${ts}" 17 | else 18 | DRAFT_VERSION=`versioning bump_patch`-`git rev-parse HEAD` 19 | fi 20 | else 21 | DRAFT_VERSION="v0.0.0-local" 22 | fi 23 | echo "next version should be: ${DRAFT_VERSION}" 24 | 25 | go mod download 26 | go build -o ${OUTPUT_DIR}/bin/check ./check/cmd 27 | go build -o ${OUTPUT_DIR}/bin/in ./in/cmd 28 | go build -o ${OUTPUT_DIR}/bin/out -ldflags "-X main.VERSION=${DRAFT_VERSION}" ./out/cmd 29 | echo ${DRAFT_VERSION} > ${OUTPUT_DIR}/name 30 | echo ${DRAFT_VERSION} > ${OUTPUT_DIR}/tag 31 | -------------------------------------------------------------------------------- /ci/tasks/build.yml: -------------------------------------------------------------------------------- 1 | platform: linux 2 | image_resource: 3 | type: docker-image 4 | source: 5 | repository: harbor-repo.vmware.com/dockerhub-proxy-cache/library/golang 6 | tag: 1.17.13 7 | run: 8 | path: source/ci/tasks/build.sh 9 | params: 10 | DEV: false 11 | inputs: 12 | - name: source 13 | outputs: 14 | - name: compiled-output 15 | -------------------------------------------------------------------------------- /ci/tasks/prepare.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | cp source/Dockerfile output/. 3 | mkdir -p output/bin 4 | cp releases/in output/bin/. 5 | cp releases/out output/bin/. 6 | cp releases/check output/bin/. 7 | chmod +x output/bin/* 8 | cp releases/version output/. 9 | -------------------------------------------------------------------------------- /ci/tasks/prepare.yml: -------------------------------------------------------------------------------- 1 | platform: linux 2 | image_resource: 3 | type: docker-image 4 | source: 5 | repository: harbor-repo.vmware.com/dockerhub-proxy-cache/library/ubuntu 6 | tag: latest 7 | run: 8 | path: source/ci/tasks/prepare.sh 9 | 10 | inputs: 11 | - name: source 12 | - name: releases 13 | outputs: 14 | - name: output 15 | -------------------------------------------------------------------------------- /ci/tasks/runTests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | mkdir ~/.ssh/ && touch ~/.ssh/known_hosts 4 | ssh-keyscan github.com >>~/.ssh/known_hosts 5 | 6 | cd source 7 | go version 8 | go test ./... -v 9 | -------------------------------------------------------------------------------- /ci/tasks/runTests.yml: -------------------------------------------------------------------------------- 1 | platform: linux 2 | image_resource: 3 | type: docker-image 4 | source: 5 | repository: harbor-repo.vmware.com/dockerhub-proxy-cache/library/golang 6 | tag: 1.17.13 7 | run: 8 | path: source/ci/tasks/runTests.sh 9 | inputs: 10 | - name: source 11 | -------------------------------------------------------------------------------- /example/demo-pipeline-attachments.yml: -------------------------------------------------------------------------------- 1 | resource_types: 2 | - name: email 3 | type: docker-image 4 | source: 5 | repository: pcfseceng/email-resource 6 | tag: {{docker-tag}} 7 | 8 | resources: 9 | - name: send-an-email 10 | type: email 11 | source: 12 | smtp: 13 | host: {{smtp-host}} 14 | port: {{smtp-port}} 15 | username: {{smtp-username}} 16 | password: {{smtp-password}} 17 | host_origin: {{smtp-host-origin}} 18 | from: {{email-from}} 19 | to: [{{email-to}}] 20 | 21 | jobs: 22 | - name: send-email 23 | plan: 24 | - task: prep-email 25 | config: 26 | platform: linux 27 | image_resource: 28 | type: docker-image 29 | source: 30 | repository: concourse/buildroot 31 | tag: git 32 | run: 33 | path: sh 34 | args: 35 | - -exc 36 | - | 37 | echo -e "Cheers!\n\n" > email-out/build.log 38 | outputs: 39 | - name: email-out 40 | - put: send-an-email 41 | params: 42 | subject_text: "Testing Attachments" 43 | body_text: "See Build Log" 44 | attachment_globs: ["email-out/*.log"] 45 | -------------------------------------------------------------------------------- /example/demo-pipeline-empty-body.yml: -------------------------------------------------------------------------------- 1 | resource_types: 2 | - name: email 3 | type: docker-image 4 | source: 5 | repository: pcfseceng/email-resource 6 | tag: {{docker-tag}} 7 | 8 | resources: 9 | - name: send-an-email 10 | type: email 11 | source: 12 | smtp: 13 | host: {{smtp-host}} 14 | port: {{smtp-port}} 15 | username: {{smtp-username}} 16 | password: {{smtp-password}} 17 | from: {{email-from}} 18 | to: [ {{email-to}} ] 19 | 20 | jobs: 21 | - name: send-email 22 | plan: 23 | - task: prep-email 24 | config: 25 | platform: linux 26 | image_resource: 27 | type: docker-image 28 | source: 29 | repository: concourse/buildroot 30 | tag: git 31 | params: 32 | OUTPUT_SUBJECT_FILE_NAME: generated-subject 33 | run: 34 | path: sh 35 | args: 36 | - -exc 37 | - | 38 | # ensure you esape the ${BUILD_ID} variable with leading \ 39 | echo -e "Email resource demo on $(date): build \${BUILD_ID}" > email-out/${OUTPUT_SUBJECT_FILE_NAME} 40 | outputs: 41 | - name: email-out 42 | - put: send-an-email 43 | params: 44 | subject: email-out/generated-subject 45 | -------------------------------------------------------------------------------- /example/demo-pipeline-onfailure.yml: -------------------------------------------------------------------------------- 1 | resource_types: 2 | - name: email 3 | type: docker-image 4 | source: 5 | repository: pcfseceng/email-resource 6 | tag: ((docker-tag)) 7 | 8 | resources: 9 | - name: send-an-email 10 | type: email 11 | source: 12 | smtp: 13 | host: ((smtp-host)) 14 | port: ((smtp-port)) 15 | username: ((smtp-username)) 16 | password: ((smtp-password)) 17 | from: ((email-from)) 18 | to: ((email-to)) 19 | 20 | jobs: 21 | - name: always-fail 22 | plan: 23 | - task: just-exit 24 | config: 25 | platform: linux 26 | image_resource: 27 | type: docker-image 28 | source: 29 | repository: alpine 30 | tag: latest 31 | run: 32 | path: sh 33 | args: 34 | - -c 35 | - | 36 | exit 1 37 | on_failure: 38 | put: send-an-email 39 | params: 40 | subject_text: "Email resource: build ${BUILD_ID} failed!" 41 | body_text: | 42 | Oh no! 43 | 44 | Build ID: ${BUILD_ID} 45 | Build Name: ${BUILD_NAME} 46 | Build Job Name: ${BUILD_JOB_NAME} 47 | Build Pipeline Name: ${BUILD_PIPELINE_NAME} 48 | ATC External URL: ${ATC_EXTERNAL_URL} 49 | -------------------------------------------------------------------------------- /example/demo-pipeline-text.yml: -------------------------------------------------------------------------------- 1 | resource_types: 2 | - name: email 3 | type: docker-image 4 | source: 5 | repository: pcfseceng/email-resource 6 | tag: {{docker-tag}} 7 | 8 | resources: 9 | - name: send-an-email 10 | type: email 11 | source: 12 | smtp: 13 | host: {{smtp-host}} 14 | port: {{smtp-port}} 15 | username: {{smtp-username}} 16 | password: {{smtp-password}} 17 | from: {{email-from}} 18 | to: [ {{email-to}} ] 19 | 20 | jobs: 21 | - name: send-email 22 | plan: 23 | - put: send-an-email 24 | params: 25 | subject_text: "Email resource: build ${BUILD_ID}" 26 | body_text: | 27 | Cheers! 28 | 29 | Build ID: ${BUILD_ID} 30 | Build Name: ${BUILD_NAME} 31 | Build Job Name: ${BUILD_JOB_NAME} 32 | Build Pipeline Name: ${BUILD_PIPELINE_NAME} 33 | ATC External URL: ${ATC_EXTERNAL_URL} 34 | -------------------------------------------------------------------------------- /example/vars-template.yml: -------------------------------------------------------------------------------- 1 | smtp-host: 2 | smtp-port: 3 | smtp-username: 4 | smtp-password: 5 | email-from: 6 | email-to: 7 | docker-tag: latest 8 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/pivotal-cf/email-resource 2 | 3 | go 1.20 4 | 5 | require ( 6 | bitbucket.org/chrj/smtpd v0.0.0-20170817182725-9ddcdbda0f7a 7 | github.com/domodwyer/mailyak/v3 v3.3.4 8 | github.com/onsi/ginkgo v1.16.5 9 | github.com/onsi/gomega v1.19.0 10 | github.com/pkg/errors v0.8.1 11 | ) 12 | 13 | require ( 14 | github.com/fsnotify/fsnotify v1.4.9 // indirect 15 | github.com/nxadm/tail v1.4.8 // indirect 16 | golang.org/x/net v0.7.0 // indirect 17 | golang.org/x/sys v0.5.0 // indirect 18 | golang.org/x/text v0.7.0 // indirect 19 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect 20 | gopkg.in/yaml.v2 v2.4.0 // indirect 21 | ) 22 | -------------------------------------------------------------------------------- /in/cmd/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | "os" 7 | 8 | "github.com/pivotal-cf/email-resource/in" 9 | ) 10 | 11 | func main() { 12 | indata, err := ioutil.ReadAll(os.Stdin) 13 | if err != nil { 14 | fmt.Fprintln(os.Stderr, err.Error()) 15 | os.Exit(1) 16 | } 17 | output, err := in.Execute(indata) 18 | if err != nil { 19 | fmt.Fprintln(os.Stderr, err.Error()) 20 | os.Exit(1) 21 | } 22 | fmt.Println(output) 23 | } 24 | -------------------------------------------------------------------------------- /in/in.go: -------------------------------------------------------------------------------- 1 | package in 2 | 3 | import ( 4 | "encoding/json" 5 | "errors" 6 | ) 7 | 8 | //Execute - provides in capability 9 | func Execute(input []byte) (string, error) { 10 | var outdata struct { 11 | Version interface{} `json:"version"` 12 | } 13 | 14 | err := json.Unmarshal(input, &outdata) 15 | if err != nil { 16 | return "", err 17 | } 18 | if outdata.Version == nil { 19 | return "", errors.New("missing version") 20 | } 21 | outbytes, err := json.Marshal(outdata) 22 | return string(outbytes), err 23 | } 24 | -------------------------------------------------------------------------------- /in/in_suite_test.go: -------------------------------------------------------------------------------- 1 | package in_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestIn(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "In Suite") 13 | } 14 | -------------------------------------------------------------------------------- /in/in_test.go: -------------------------------------------------------------------------------- 1 | package in_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | . "github.com/onsi/gomega/gexec" 7 | "github.com/pivotal-cf/email-resource/in" 8 | ) 9 | 10 | var _ = Describe("In", func() { 11 | AfterEach(func() { 12 | CleanupBuildArtifacts() 13 | }) 14 | 15 | It("should compile", func() { 16 | _, err := Build("github.com/pivotal-cf/email-resource/in/cmd") 17 | Ω(err).ShouldNot(HaveOccurred()) 18 | }) 19 | 20 | Context("when the version is given on input", func() { 21 | It("should output the version that it was given", func() { 22 | inputData := ` 23 | { 24 | "source": { 25 | "a-key": "some data", 26 | "another-key": "some more data" 27 | }, 28 | "version": { "ref": "61cebf" } 29 | } 30 | ` 31 | output, err := in.Execute([]byte(inputData)) 32 | Ω(err).ShouldNot(HaveOccurred()) 33 | Expect(output).To(MatchJSON(`{"version": { "ref": "61cebf" }}`)) 34 | }) 35 | }) 36 | 37 | Context("when the version is not given on input", func() { 38 | It("should return an error", func() { 39 | output, err := in.Execute([]byte(`{ "missing" : "the version" }`)) 40 | Ω(err).Should(HaveOccurred()) 41 | Expect(err.Error()).Should(Equal("missing version")) 42 | Expect(output).To(BeEmpty()) 43 | }) 44 | }) 45 | 46 | Context("when bad json given on input", func() { 47 | It("should return an error", func() { 48 | output, err := in.Execute([]byte(``)) 49 | Ω(err).Should(HaveOccurred()) 50 | Expect(err.Error()).Should(Equal("unexpected end of JSON input")) 51 | Expect(output).To(BeEmpty()) 52 | }) 53 | }) 54 | 55 | }) 56 | -------------------------------------------------------------------------------- /out/cmd/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | "os" 7 | 8 | "github.com/pivotal-cf/email-resource/out" 9 | ) 10 | 11 | var ( 12 | //VERSION - 13 | VERSION string 14 | ) 15 | 16 | func main() { 17 | sourceRoot := os.Args[1] 18 | inbytes, err := ioutil.ReadAll(os.Stdin) 19 | if err != nil { 20 | fmt.Fprintln(os.Stderr, fmt.Sprintf("%s - Error reading stdin - %s", VERSION, err.Error())) 21 | os.Exit(1) 22 | } 23 | output, err := out.Execute(sourceRoot, VERSION, inbytes) 24 | if err != nil { 25 | fmt.Fprintln(os.Stderr, fmt.Sprintf("%s - Error during execute - %s", VERSION, err.Error())) 26 | os.Exit(1) 27 | } 28 | fmt.Println(output) 29 | } 30 | -------------------------------------------------------------------------------- /out/fakes_for_test.go: -------------------------------------------------------------------------------- 1 | package out_test 2 | 3 | import ( 4 | "crypto/tls" 5 | "net" 6 | 7 | "bitbucket.org/chrj/smtpd" 8 | ) 9 | 10 | type FakeSMTPServer struct { 11 | listener net.Listener 12 | server *smtpd.Server 13 | Deliveries []smtpd.Envelope 14 | Host string 15 | Port string 16 | } 17 | 18 | func newFakeSMPTServer(tlsConfig *tls.Config) *FakeSMTPServer { 19 | return &FakeSMTPServer{ 20 | server: &smtpd.Server{ 21 | Hostname: "127.0.0.1:0", 22 | TLSConfig: tlsConfig, 23 | }, 24 | Deliveries: make([]smtpd.Envelope, 0), 25 | } 26 | } 27 | 28 | func NewFakeSMTPServer() *FakeSMTPServer { 29 | return newFakeSMPTServer(nil) 30 | } 31 | 32 | func NewFakeSMTPServerWithCustomCert(crt string, key string) *FakeSMTPServer { 33 | cert, err := tls.LoadX509KeyPair(crt, key) 34 | if err != nil { 35 | panic(err) 36 | } 37 | config := &tls.Config{Certificates: []tls.Certificate{cert}} 38 | 39 | return newFakeSMPTServer(config) 40 | } 41 | 42 | func (s *FakeSMTPServer) Boot() { 43 | var err error 44 | s.listener, err = net.Listen("tcp", "127.0.0.1:0") 45 | if err != nil { 46 | panic(err) 47 | } 48 | 49 | s.server.Handler = func(peer smtpd.Peer, env smtpd.Envelope) error { 50 | s.Deliveries = append(s.Deliveries, env) 51 | return nil 52 | } 53 | 54 | go s.server.Serve(s.listener) 55 | 56 | addr := s.listener.Addr().String() 57 | host, port, err := net.SplitHostPort(addr) 58 | if err != nil { 59 | panic(err) 60 | } 61 | s.Host = host 62 | s.Port = port 63 | } 64 | 65 | func (s *FakeSMTPServer) Close() { 66 | s.listener.Close() 67 | } 68 | -------------------------------------------------------------------------------- /out/mail_test.go: -------------------------------------------------------------------------------- 1 | package out_test 2 | 3 | import ( 4 | "bytes" 5 | 6 | "github.com/domodwyer/mailyak/v3" 7 | "github.com/pivotal-cf/email-resource/out" 8 | "github.com/pivotal-cf/email-resource/out/fakes" 9 | 10 | . "github.com/onsi/ginkgo" 11 | . "github.com/onsi/gomega" 12 | ) 13 | 14 | var _ = Describe("Sender", func() { 15 | Context("Adding Headers", func() { 16 | var mailfake *fakes.FakeMail 17 | var mailCreator out.MailCreator 18 | BeforeEach(func() { 19 | mailfake = &fakes.FakeMail{} 20 | mailfake.PlainReturns(&mailyak.BodyPart{}) 21 | mailfake.HTMLReturns(&mailyak.BodyPart{}) 22 | mailfake.MimeBufReturns(&bytes.Buffer{}, nil) 23 | mailCreator.Mail = mailfake 24 | }) 25 | It("Will not add mime and content type headers", func() { 26 | mailCreator.AddHeader("MIME-version", "1.0") 27 | mailCreator.AddHeader("Content-Type", "text/html; charset=\"UTF-8\"") 28 | _, err := mailCreator.Compose() 29 | Expect(err).ShouldNot(HaveOccurred()) 30 | Expect(mailfake.AddHeaderCallCount()).Should(Equal(0)) 31 | }) 32 | 33 | It("Will use HTML body part if header is found", func() { 34 | mailCreator.AddHeader("Content-Type", "text/html; charset=\"UTF-8\"") 35 | _, err := mailCreator.Compose() 36 | Expect(err).ShouldNot(HaveOccurred()) 37 | Expect(mailfake.AddHeaderCallCount()).Should(Equal(0)) 38 | Expect(mailfake.PlainCallCount()).Should(Equal(0)) 39 | Expect(mailfake.HTMLCallCount()).Should(Equal(1)) 40 | }) 41 | }) 42 | }) 43 | -------------------------------------------------------------------------------- /out/out_suite_test.go: -------------------------------------------------------------------------------- 1 | package out_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestOut(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Out Suite") 13 | TestEmail_SendSuccessful(t) 14 | TestStart(t) 15 | TestNext(t) 16 | } 17 | -------------------------------------------------------------------------------- /out/smtp_login_auth.go: -------------------------------------------------------------------------------- 1 | package out 2 | 3 | import ( 4 | "errors" 5 | "net/smtp" 6 | ) 7 | 8 | type loginAuth struct { 9 | username, password string 10 | } 11 | 12 | func LoginAuth(username, password string) smtp.Auth { 13 | return &loginAuth{username, password} 14 | } 15 | 16 | func (a *loginAuth) Start(server *smtp.ServerInfo) (string, []byte, error) { 17 | return "LOGIN", []byte{}, nil 18 | } 19 | 20 | func (a *loginAuth) Next(fromServer []byte, more bool) ([]byte, error) { 21 | if more { 22 | switch string(fromServer) { 23 | case "Username:": 24 | return []byte(a.username), nil 25 | case "Password:": 26 | return []byte(a.password), nil 27 | default: 28 | return nil, errors.New("Unkown fromServer") 29 | } 30 | } 31 | return nil, nil 32 | } 33 | -------------------------------------------------------------------------------- /out/test_certs/rootCA.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDtzCCAp+gAwIBAgIJAPQJtr1uiBPBMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV 3 | BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX 4 | aWRnaXRzIFB0eSBMdGQwIBcNMTcwODIyMTQyMTIyWhgPMjI5MTA2MDYxNDIxMjJa 5 | MEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJ 6 | bnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw 7 | ggEKAoIBAQCn6eBmEXUHYgpui+ktupmuVTazp+S+IyKlB7B3bNBrw3rptKYOeNGP 8 | oHx1bJyb4CW3i5TBqLlTuAWZ8hccBvlgpsiGn61VM76fwaJ2SRENRHxhlz8akIAA 9 | YAM7c1OZ4hliDv9W7pg4knJ1conu0yfFE+dhg4NalfpBD+s40ExPjCHIbKmHp1Ap 10 | aJX8yHS01OkJmM111fUK3G38GpUGvmrh+oxMhz8GVtM3EbYYWnPiKnUOUVEiN+bK 11 | UfMsUIj7DmeAEMZ7RrGsa8ggAgIll6RYNp9e428OnuSV1Exilk7PWI5l8PzWz/jb 12 | rI/L7rTR5dAH6+EWjKwqC243u8rOJwCfAgMBAAGjgacwgaQwHQYDVR0OBBYEFE4E 13 | aoD4dONi5Pl2FJBxJQIexc4yMHUGA1UdIwRuMGyAFE4EaoD4dONi5Pl2FJBxJQIe 14 | xc4yoUmkRzBFMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8G 15 | A1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkggkA9Am2vW6IE8EwDAYDVR0T 16 | BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEARWrGQgRlLJTBss5Q37c6Lz1qJj4g 17 | svO45WIYhAqcMEyMjZWwbwUQ/bgu1vnx4GMRGY19r0rioH6i9ZHPX9+aGXvGHYfF 18 | 76bAPHxc+EvkjOUjnpQVf3d5P8eTnFVknkOApfBA9Fcew6nWlhrUfLHSZzTOdBzO 19 | UiciEQsfyPIWPypGqiDKJaFwkrlbP9ujv0RVlCfFIquiToIx93Mir5uZo3QhHpkL 20 | pG3p12oUh+k+XPU5Pmp/So0OHMOIwPEhbQV3X+dY+XzJta4kM9ADHLedynrDfgLw 21 | GuxVypqbJ7ezqjg0O6AbaQOS5aJjMeUcMe5itmsvBY+zqUwQNis7raP4fQ== 22 | -----END CERTIFICATE----- 23 | -------------------------------------------------------------------------------- /out/test_certs/rootCA.srl: -------------------------------------------------------------------------------- 1 | 99F759FD59254A8A 2 | -------------------------------------------------------------------------------- /out/test_certs/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDDjCCAfagAwIBAgIJAJn3Wf1ZJUqKMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV 3 | BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX 4 | aWRnaXRzIFB0eSBMdGQwIBcNMTcwODIyMTQyMTIyWhgPMzAxNjEyMjMxNDIxMjJa 5 | MDExCzAJBgNVBAYTAkRFMQ4wDAYDVQQKEwVFTUFJTDESMBAGA1UEAxMJMTI3LjAu 6 | MC4xMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuhX6GzCXuismHGnS 7 | /8lxRKp1wsOX6pEQ6s8R/AM1Rzxm7yvD1G8R6k00LAwTBiB+sMgdQfXa6SYUUhWP 8 | ZXsjxFFlydLTBtOKNRQiydKGuFcudQFQzZrR1wsgaChBxsDiKPvrwKhXPx7S80/u 9 | tP4gPNLu18ybaSg8BwTdE6/WUFIIs427o4KlpfOE7Cmt8jIEE0UuEBKIK46sQcVb 10 | uy6zkZrI68N00bv72maJ5qHjfPRyHkrenT9wzuj4QRHSwmroFTR0WqUohjZYVepH 11 | xRH3AIVKfq8y+LiUBnOGhOBCmdX4fKYFfMJ9vjDj9Q2UZc/jbmkLhgC0fCteA4GH 12 | Y9f41QIDAQABoxMwETAPBgNVHREECDAGhwR/AAABMA0GCSqGSIb3DQEBBQUAA4IB 13 | AQAy5TwYxKv7npLdUF+9SnWjk6UnwsXP+yCxE7wlatgDdAEs2JmWuGA79uYQ7dbC 14 | vfOGsxhDX9WBaeWWDcY3P6yvVf9X2OA4emAkv5XVPWCyWGtFv+Uw58PNaDRfGMQ0 15 | rmyZ2xV1EzoG9aj+U/D3c9qDes3TCj/SSOgntqFvTzlryYzQv73V5K/iSoDxMiK0 16 | m21GON3DLi9J5W67PfVHuADJl5N/N0nKX2QtvG+fzPL4QjRDoOwXYPwNZ66TUdhP 17 | q8/CxNp3eGhQ2QueqbyBVqMlkhQNwg/OwXYyWqSO25bRDUJISfuHFdvQYCx6C6GR 18 | 2Z+2WEIzqTe1f6baVHCBE0DD 19 | -----END CERTIFICATE----- 20 | -------------------------------------------------------------------------------- /vendor/bitbucket.org/chrj/smtpd/.hgignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | 3 | *.orig 4 | -------------------------------------------------------------------------------- /vendor/bitbucket.org/chrj/smtpd/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Christian Joergensen (christian@technobabble.dk) 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /vendor/bitbucket.org/chrj/smtpd/README.md: -------------------------------------------------------------------------------- 1 | Go smtpd [![GoDoc](https://godoc.org/bitbucket.org/chrj/smtpd?status.png)](https://godoc.org/bitbucket.org/chrj/smtpd) 2 | ======== 3 | 4 | Package smtpd implements an SMTP server in golang. 5 | 6 | Moved to Github 7 | --------------- 8 | 9 | I have moved development to [Github](https://github.com/chrj/smtpd) where future development will take place. -------------------------------------------------------------------------------- /vendor/bitbucket.org/chrj/smtpd/address.go: -------------------------------------------------------------------------------- 1 | package smtpd 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | ) 7 | 8 | func parseAddress(src string) (string, error) { 9 | 10 | if len(src) == 0 || src[0] != '<' || src[len(src)-1] != '>' { 11 | return "", fmt.Errorf("Ill-formatted e-mail address: %s", src) 12 | } 13 | 14 | if strings.Count(src, "@") > 1 { 15 | return "", fmt.Errorf("Ill-formatted e-mail address: %s", src) 16 | } 17 | 18 | return src[1 : len(src)-1], nil 19 | } 20 | -------------------------------------------------------------------------------- /vendor/bitbucket.org/chrj/smtpd/envelope.go: -------------------------------------------------------------------------------- 1 | package smtpd 2 | 3 | import ( 4 | "crypto/tls" 5 | "fmt" 6 | "strings" 7 | "time" 8 | ) 9 | 10 | // Envelope holds a message 11 | type Envelope struct { 12 | Sender string 13 | Recipients []string 14 | Data []byte 15 | } 16 | 17 | // AddReceivedLine prepends a Received header to the Data 18 | func (env *Envelope) AddReceivedLine(peer Peer) { 19 | 20 | tlsDetails := "" 21 | 22 | tlsVersions := map[uint16]string{ 23 | tls.VersionSSL30: "SSL3.0", 24 | tls.VersionTLS10: "TLS1.0", 25 | tls.VersionTLS11: "TLS1.1", 26 | tls.VersionTLS12: "TLS1.2", 27 | } 28 | 29 | if peer.TLS != nil { 30 | tlsDetails = fmt.Sprintf( 31 | "\r\n\t(version=%s cipher=0x%x);", 32 | tlsVersions[peer.TLS.Version], 33 | peer.TLS.CipherSuite, 34 | ) 35 | } 36 | 37 | line := wrap([]byte(fmt.Sprintf( 38 | "Received: from %s [%s] by %s with %s;%s\r\n\t%s\r\n", 39 | peer.HeloName, 40 | strings.Split(peer.Addr.String(), ":")[0], 41 | peer.ServerName, 42 | peer.Protocol, 43 | tlsDetails, 44 | time.Now().Format("Mon Jan 2 15:04:05 -0700 2006"), 45 | ))) 46 | 47 | env.Data = append(env.Data, line...) 48 | 49 | // Move the new Received line up front 50 | 51 | copy(env.Data[len(line):], env.Data[0:len(env.Data)-len(line)]) 52 | copy(env.Data, line) 53 | 54 | } 55 | -------------------------------------------------------------------------------- /vendor/bitbucket.org/chrj/smtpd/wrap.go: -------------------------------------------------------------------------------- 1 | package smtpd 2 | 3 | // Wrap a byte slice paragraph for use in SMTP header 4 | func wrap(sl []byte) []byte { 5 | length := 0 6 | for i := 0; i < len(sl); i++ { 7 | if length > 76 && sl[i] == ' ' { 8 | sl = append(sl, 0, 0) 9 | copy(sl[i+2:], sl[i:]) 10 | sl[i] = '\r' 11 | sl[i+1] = '\n' 12 | sl[i+2] = '\t' 13 | i += 2 14 | length = 0 15 | } 16 | if sl[i] == '\n' { 17 | length = 0 18 | } 19 | length++ 20 | } 21 | return sl 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/domodwyer/mailyak/v3/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | *.pid 26 | -------------------------------------------------------------------------------- /vendor/github.com/domodwyer/mailyak/v3/.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # When running in CI, the "manual" stage is run. 2 | 3 | repos: 4 | - repo: https://github.com/pre-commit/pre-commit-hooks 5 | rev: v2.5.0 6 | hooks: 7 | - id: check-executables-have-shebangs 8 | stages: [commit, manual] 9 | exclude: ^vendor/ 10 | 11 | - id: check-json 12 | stages: [commit, manual] 13 | 14 | - id: check-yaml 15 | stages: [commit, manual] 16 | 17 | - id: check-merge-conflict 18 | stages: [commit, manual] 19 | 20 | - id: mixed-line-ending 21 | args: ["--fix=no"] 22 | stages: [commit, manual] 23 | 24 | - id: no-commit-to-branch 25 | args: ["--branch", "master", "--branch", "development"] 26 | stages: [commit] 27 | 28 | - repo: https://github.com/domodwyer/pre-commit 29 | rev: v3.0.1 30 | hooks: 31 | - id: go-test 32 | stages: [commit, manual] 33 | types: [go] 34 | args: ["-timeout=30s"] 35 | 36 | - id: go-goimports 37 | stages: [commit] 38 | types: [go] 39 | 40 | - id: go-golangci-lint 41 | args: [--new-from-rev=origin/master] 42 | stages: [commit, push] 43 | types: [go] 44 | 45 | - id: todo-tags 46 | stages: [push, manual] 47 | types: [go] 48 | args: ["--tag=#"] 49 | 50 | - id: todo-branch-tags 51 | stages: [post-checkout] 52 | args: ["#[0-9]+"] -------------------------------------------------------------------------------- /vendor/github.com/domodwyer/mailyak/v3/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.x" 5 | - 1.8 6 | - 1.9 7 | - "1.10.x" -------------------------------------------------------------------------------- /vendor/github.com/domodwyer/mailyak/v3/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Dom Dwyer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/domodwyer/mailyak/v3/package.go: -------------------------------------------------------------------------------- 1 | // Package mailyak provides a simple interface for generating MIME compliant 2 | // emails, and optionally sending them over SMTP. 3 | // 4 | // Both plain-text and HTML email body content is supported, and their types 5 | // implement io.Writer allowing easy composition directly from templating 6 | // engines, etc. 7 | // 8 | // Attachments are fully supported including inline attachments, with anything 9 | // that implements io.Reader suitable as a source (like files on disk, in-memory 10 | // buffers, etc). 11 | // 12 | // The raw MIME content can be retrieved using MimeBuf(), typically used with an 13 | // API service such as Amazon SES that does not require using an SMTP interface. 14 | // 15 | // MailYak supports both plain-text SMTP (which is automatically upgraded to a 16 | // secure connection with STARTTLS if supported by the SMTP server) and explicit 17 | // TLS connections. 18 | package mailyak 19 | -------------------------------------------------------------------------------- /vendor/github.com/domodwyer/mailyak/v3/sender_starttls.go: -------------------------------------------------------------------------------- 1 | package mailyak 2 | 3 | import ( 4 | "bytes" 5 | "net" 6 | ) 7 | 8 | // senderWithStartTLS connects to the remote SMTP server, upgrades the 9 | // connection using STARTTLS if available, and sends the email. 10 | type senderWithStartTLS struct { 11 | hostAndPort string 12 | hostname string 13 | buf *bytes.Buffer 14 | } 15 | 16 | func (s *senderWithStartTLS) Send(m sendableMail) error { 17 | conn, err := net.Dial("tcp", s.hostAndPort) 18 | if err != nil { 19 | return err 20 | } 21 | defer func() { _ = conn.Close() }() 22 | 23 | return smtpExchange(m, conn, s.hostname, true) 24 | } 25 | 26 | func newSenderWithStartTLS(hostAndPort string) *senderWithStartTLS { 27 | hostName, _, err := net.SplitHostPort(hostAndPort) 28 | if err != nil { 29 | // Really this should be an error, but we can't return it from the New() 30 | // constructor without breaking compatability. Fortunately by the time 31 | // it gets to the dial() the user will get a pretty clear error as this 32 | // hostAndPort value is almost certainly invalid. 33 | // 34 | // This hostname must be split from the port so the correct value is 35 | // used when performing the SMTP AUTH as the Go SMTP implementation 36 | // refuses to send credentials over non-localhost plaintext connections, 37 | // and including the port messes this check up (and is probably the 38 | // wrong thing to be sending anyway). 39 | hostName = hostAndPort 40 | } 41 | 42 | return &senderWithStartTLS{ 43 | hostAndPort: hostAndPort, 44 | hostname: hostName, 45 | buf: &bytes.Buffer{}, 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /vendor/github.com/domodwyer/mailyak/v3/writer.go: -------------------------------------------------------------------------------- 1 | package mailyak 2 | 3 | import "bytes" 4 | 5 | // BodyPart is a buffer holding the contents of an email MIME part. 6 | type BodyPart struct{ bytes.Buffer } 7 | 8 | // Set accepts a string s as the contents of a BodyPart, replacing any existing 9 | // data. 10 | func (w *BodyPart) Set(s string) { 11 | w.Reset() 12 | w.WriteString(s) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*.go] 4 | indent_style = tab 5 | indent_size = 4 6 | insert_final_newline = true 7 | 8 | [*.{yml,yaml}] 9 | indent_style = space 10 | indent_size = 2 11 | insert_final_newline = true 12 | trim_trailing_whitespace = true 13 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/.gitattributes: -------------------------------------------------------------------------------- 1 | go.sum linguist-generated 2 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/.gitignore: -------------------------------------------------------------------------------- 1 | # Setup a Global .gitignore for OS and editor generated files: 2 | # https://help.github.com/articles/ignoring-files 3 | # git config --global core.excludesfile ~/.gitignore_global 4 | 5 | .vagrant 6 | *.sublime-project 7 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - "stable" 6 | - "1.11.x" 7 | - "1.10.x" 8 | - "1.9.x" 9 | 10 | matrix: 11 | include: 12 | - go: "stable" 13 | env: GOLINT=true 14 | allow_failures: 15 | - go: tip 16 | fast_finish: true 17 | 18 | 19 | before_install: 20 | - if [ ! -z "${GOLINT}" ]; then go get -u golang.org/x/lint/golint; fi 21 | 22 | script: 23 | - go test --race ./... 24 | 25 | after_script: 26 | - test -z "$(gofmt -s -l -w . | tee /dev/stderr)" 27 | - if [ ! -z "${GOLINT}" ]; then echo running golint; golint --set_exit_status ./...; else echo skipping golint; fi 28 | - go vet ./... 29 | 30 | os: 31 | - linux 32 | - osx 33 | - windows 34 | 35 | notifications: 36 | email: false 37 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/fen.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 solaris 6 | 7 | package fsnotify 8 | 9 | import ( 10 | "errors" 11 | ) 12 | 13 | // Watcher watches a set of files, delivering events to a channel. 14 | type Watcher struct { 15 | Events chan Event 16 | Errors chan error 17 | } 18 | 19 | // NewWatcher establishes a new watcher with the underlying OS and begins waiting for events. 20 | func NewWatcher() (*Watcher, error) { 21 | return nil, errors.New("FEN based watcher not yet supported for fsnotify\n") 22 | } 23 | 24 | // Close removes all watches and closes the events channel. 25 | func (w *Watcher) Close() error { 26 | return nil 27 | } 28 | 29 | // Add starts watching the named file or directory (non-recursively). 30 | func (w *Watcher) Add(name string) error { 31 | return nil 32 | } 33 | 34 | // Remove stops watching the the named file or directory (non-recursively). 35 | func (w *Watcher) Remove(name string) error { 36 | return nil 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build freebsd openbsd netbsd dragonfly 6 | 7 | package fsnotify 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const openMode = unix.O_NONBLOCK | unix.O_RDONLY | unix.O_CLOEXEC 12 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin 6 | 7 | package fsnotify 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | // note: this constant is not defined on BSD 12 | const openMode = unix.O_EVTONLY | unix.O_CLOEXEC 13 | -------------------------------------------------------------------------------- /vendor/github.com/nxadm/tail/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .test/ 3 | examples/_* -------------------------------------------------------------------------------- /vendor/github.com/nxadm/tail/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang 2 | 3 | RUN mkdir -p $GOPATH/src/github.com/nxadm/tail/ 4 | ADD . $GOPATH/src/github.com/nxadm/tail/ 5 | 6 | # expecting to fetch dependencies successfully. 7 | RUN go get -v github.com/nxadm/tail 8 | 9 | # expecting to run the test successfully. 10 | RUN go test -v github.com/nxadm/tail 11 | 12 | # expecting to install successfully 13 | RUN go install -v github.com/nxadm/tail 14 | RUN go install -v github.com/nxadm/tail/cmd/gotail 15 | 16 | RUN $GOPATH/bin/gotail -h || true 17 | 18 | ENV PATH $GOPATH/bin:$PATH 19 | CMD ["gotail"] 20 | -------------------------------------------------------------------------------- /vendor/github.com/nxadm/tail/LICENSE: -------------------------------------------------------------------------------- 1 | # The MIT License (MIT) 2 | 3 | # © Copyright 2015 Hewlett Packard Enterprise Development LP 4 | Copyright (c) 2014 ActiveState 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/nxadm/tail/ratelimiter/Licence: -------------------------------------------------------------------------------- 1 | Copyright (C) 2013 99designs 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /vendor/github.com/nxadm/tail/ratelimiter/memory.go: -------------------------------------------------------------------------------- 1 | package ratelimiter 2 | 3 | import ( 4 | "errors" 5 | "time" 6 | ) 7 | 8 | const ( 9 | GC_SIZE int = 100 10 | GC_PERIOD time.Duration = 60 * time.Second 11 | ) 12 | 13 | type Memory struct { 14 | store map[string]LeakyBucket 15 | lastGCCollected time.Time 16 | } 17 | 18 | func NewMemory() *Memory { 19 | m := new(Memory) 20 | m.store = make(map[string]LeakyBucket) 21 | m.lastGCCollected = time.Now() 22 | return m 23 | } 24 | 25 | func (m *Memory) GetBucketFor(key string) (*LeakyBucket, error) { 26 | 27 | bucket, ok := m.store[key] 28 | if !ok { 29 | return nil, errors.New("miss") 30 | } 31 | 32 | return &bucket, nil 33 | } 34 | 35 | func (m *Memory) SetBucketFor(key string, bucket LeakyBucket) error { 36 | 37 | if len(m.store) > GC_SIZE { 38 | m.GarbageCollect() 39 | } 40 | 41 | m.store[key] = bucket 42 | 43 | return nil 44 | } 45 | 46 | func (m *Memory) GarbageCollect() { 47 | now := time.Now() 48 | 49 | // rate limit GC to once per minute 50 | if now.Unix() >= m.lastGCCollected.Add(GC_PERIOD).Unix() { 51 | for key, bucket := range m.store { 52 | // if the bucket is drained, then GC 53 | if bucket.DrainedAt().Unix() < now.Unix() { 54 | delete(m.store, key) 55 | } 56 | } 57 | 58 | m.lastGCCollected = now 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /vendor/github.com/nxadm/tail/ratelimiter/storage.go: -------------------------------------------------------------------------------- 1 | package ratelimiter 2 | 3 | type Storage interface { 4 | GetBucketFor(string) (*LeakyBucket, error) 5 | SetBucketFor(string, LeakyBucket) error 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/nxadm/tail/tail_posix.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail 2 | // +build !windows 3 | 4 | package tail 5 | 6 | import ( 7 | "os" 8 | ) 9 | 10 | // Deprecated: this function is only useful internally and, as such, 11 | // it will be removed from the API in a future major release. 12 | // 13 | // OpenFile proxies a os.Open call for a file so it can be correctly tailed 14 | // on POSIX and non-POSIX OSes like MS Windows. 15 | func OpenFile(name string) (file *os.File, err error) { 16 | return os.Open(name) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/nxadm/tail/tail_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail 2 | // +build windows 3 | 4 | package tail 5 | 6 | import ( 7 | "os" 8 | 9 | "github.com/nxadm/tail/winfile" 10 | ) 11 | 12 | // Deprecated: this function is only useful internally and, as such, 13 | // it will be removed from the API in a future major release. 14 | // 15 | // OpenFile proxies a os.Open call for a file so it can be correctly tailed 16 | // on POSIX and non-POSIX OSes like MS Windows. 17 | func OpenFile(name string) (file *os.File, err error) { 18 | return winfile.OpenFile(name, os.O_RDONLY, 0) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/nxadm/tail/util/util.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail 2 | // Copyright (c) 2015 HPE Software Inc. All rights reserved. 3 | // Copyright (c) 2013 ActiveState Software Inc. All rights reserved. 4 | 5 | package util 6 | 7 | import ( 8 | "fmt" 9 | "log" 10 | "os" 11 | "runtime/debug" 12 | ) 13 | 14 | type Logger struct { 15 | *log.Logger 16 | } 17 | 18 | var LOGGER = &Logger{log.New(os.Stderr, "", log.LstdFlags)} 19 | 20 | // fatal is like panic except it displays only the current goroutine's stack. 21 | func Fatal(format string, v ...interface{}) { 22 | // https://github.com/nxadm/log/blob/master/log.go#L45 23 | LOGGER.Output(2, fmt.Sprintf("FATAL -- "+format, v...)+"\n"+string(debug.Stack())) 24 | os.Exit(1) 25 | } 26 | 27 | // partitionString partitions the string into chunks of given size, 28 | // with the last chunk of variable size. 29 | func PartitionString(s string, chunkSize int) []string { 30 | if chunkSize <= 0 { 31 | panic("invalid chunkSize") 32 | } 33 | length := len(s) 34 | chunks := 1 + length/chunkSize 35 | start := 0 36 | end := chunkSize 37 | parts := make([]string, 0, chunks) 38 | for { 39 | if end > length { 40 | end = length 41 | } 42 | parts = append(parts, s[start:end]) 43 | if end == length { 44 | break 45 | } 46 | start, end = end, end+chunkSize 47 | } 48 | return parts 49 | } 50 | -------------------------------------------------------------------------------- /vendor/github.com/nxadm/tail/watch/filechanges.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail 2 | package watch 3 | 4 | type FileChanges struct { 5 | Modified chan bool // Channel to get notified of modifications 6 | Truncated chan bool // Channel to get notified of truncations 7 | Deleted chan bool // Channel to get notified of deletions/renames 8 | } 9 | 10 | func NewFileChanges() *FileChanges { 11 | return &FileChanges{ 12 | make(chan bool, 1), make(chan bool, 1), make(chan bool, 1)} 13 | } 14 | 15 | func (fc *FileChanges) NotifyModified() { 16 | sendOnlyIfEmpty(fc.Modified) 17 | } 18 | 19 | func (fc *FileChanges) NotifyTruncated() { 20 | sendOnlyIfEmpty(fc.Truncated) 21 | } 22 | 23 | func (fc *FileChanges) NotifyDeleted() { 24 | sendOnlyIfEmpty(fc.Deleted) 25 | } 26 | 27 | // sendOnlyIfEmpty sends on a bool channel only if the channel has no 28 | // backlog to be read by other goroutines. This concurrency pattern 29 | // can be used to notify other goroutines if and only if they are 30 | // looking for it (i.e., subsequent notifications can be compressed 31 | // into one). 32 | func sendOnlyIfEmpty(ch chan bool) { 33 | select { 34 | case ch <- true: 35 | default: 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/nxadm/tail/watch/watch.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail 2 | // Copyright (c) 2015 HPE Software Inc. All rights reserved. 3 | // Copyright (c) 2013 ActiveState Software Inc. All rights reserved. 4 | 5 | package watch 6 | 7 | import "gopkg.in/tomb.v1" 8 | 9 | // FileWatcher monitors file-level events. 10 | type FileWatcher interface { 11 | // BlockUntilExists blocks until the file comes into existence. 12 | BlockUntilExists(*tomb.Tomb) error 13 | 14 | // ChangeEvents reports on changes to a file, be it modification, 15 | // deletion, renames or truncations. Returned FileChanges group of 16 | // channels will be closed, thus become unusable, after a deletion 17 | // or truncation event. 18 | // In order to properly report truncations, ChangeEvents requires 19 | // the caller to pass their current offset in the file. 20 | ChangeEvents(*tomb.Tomb, int64) (*FileChanges, error) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | TODO 3 | tmp/**/* 4 | *.coverprofile 5 | .vscode 6 | .idea/ 7 | *.log 8 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | - 1.16.x 5 | - 1.15.x 6 | 7 | cache: 8 | directories: 9 | - $GOPATH/pkg/mod 10 | 11 | # allow internal package imports, necessary for forked repositories 12 | go_import_path: github.com/onsi/ginkgo 13 | 14 | install: 15 | - GO111MODULE="off" go get -v -t ./... 16 | - GO111MODULE="off" go get golang.org/x/tools/cmd/cover 17 | - GO111MODULE="off" go get github.com/onsi/gomega 18 | - GO111MODULE="off" go install github.com/onsi/ginkgo/ginkgo 19 | - export PATH=$GOPATH/bin:$PATH 20 | 21 | script: 22 | - GO111MODULE="on" go mod tidy && git diff --exit-code go.mod go.sum 23 | - go vet 24 | - ginkgo -r --randomizeAllSpecs --randomizeSuites --race --trace 25 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Ginkgo 2 | 3 | Your contributions to Ginkgo are essential for its long-term maintenance and improvement. 4 | 5 | - Please **open an issue first** - describe what problem you are trying to solve and give the community a forum for input and feedback ahead of investing time in writing code! 6 | - Ensure adequate test coverage: 7 | - When adding to the Ginkgo library, add unit and/or integration tests (under the `integration` folder). 8 | - When adding to the Ginkgo CLI, note that there are very few unit tests. Please add an integration test. 9 | - Update the documentation. Ginko uses `godoc` comments and documentation on the `gh-pages` branch. 10 | If relevant, please submit a docs PR to that branch alongside your code PR. 11 | 12 | Thanks for supporting Ginkgo! 13 | 14 | ## Setup 15 | 16 | Fork the repo, then: 17 | 18 | ``` 19 | go get github.com/onsi/ginkgo 20 | go get github.com/onsi/gomega/... 21 | cd $GOPATH/src/github.com/onsi/ginkgo 22 | git remote add fork git@github.com:/ginkgo.git 23 | 24 | ginkgo -r -p # ensure tests are green 25 | go vet ./... # ensure linter is happy 26 | ``` 27 | 28 | ## Making the PR 29 | - go to a new branch `git checkout -b my-feature` 30 | - make your changes 31 | - run tests and linter again (see above) 32 | - `git push fork` 33 | - open PR 🎉 34 | -------------------------------------------------------------------------------- /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/onsi/ginkgo/RELEASING.md: -------------------------------------------------------------------------------- 1 | A Ginkgo release is a tagged git sha and a GitHub release. To cut a release: 2 | 3 | 1. Ensure CHANGELOG.md is up to date. 4 | - Use `git log --pretty=format:'- %s [%h]' HEAD...vX.X.X` to list all the commits since the last release 5 | - Categorize the changes into 6 | - Breaking Changes (requires a major version) 7 | - New Features (minor version) 8 | - Fixes (fix version) 9 | - Maintenance (which in general should not be mentioned in `CHANGELOG.md` as they have no user impact) 10 | 1. Update `VERSION` in `config/config.go` 11 | 1. Commit, push, and release: 12 | ``` 13 | git commit -m "vM.m.p" 14 | git push 15 | gh release create "vM.m.p" 16 | git fetch --tags origin master 17 | ``` -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/internal/global/init.go: -------------------------------------------------------------------------------- 1 | package global 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/onsi/ginkgo/internal/failer" 7 | "github.com/onsi/ginkgo/internal/suite" 8 | ) 9 | 10 | const DefaultTimeout = time.Duration(1 * time.Second) 11 | 12 | var Suite *suite.Suite 13 | var Failer *failer.Failer 14 | 15 | func init() { 16 | InitializeGlobals() 17 | } 18 | 19 | func InitializeGlobals() { 20 | Failer = failer.New() 21 | Suite = suite.New(Failer) 22 | } 23 | -------------------------------------------------------------------------------- /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/onsi/ginkgo/internal/leafnodes/it_node.go: -------------------------------------------------------------------------------- 1 | package leafnodes 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/onsi/ginkgo/internal/failer" 7 | "github.com/onsi/ginkgo/types" 8 | ) 9 | 10 | type ItNode struct { 11 | runner *runner 12 | 13 | flag types.FlagType 14 | text string 15 | } 16 | 17 | func NewItNode(text string, body interface{}, flag types.FlagType, codeLocation types.CodeLocation, timeout time.Duration, failer *failer.Failer, componentIndex int) *ItNode { 18 | return &ItNode{ 19 | runner: newRunner(body, codeLocation, timeout, failer, types.SpecComponentTypeIt, componentIndex), 20 | flag: flag, 21 | text: text, 22 | } 23 | } 24 | 25 | func (node *ItNode) Run() (outcome types.SpecState, failure types.SpecFailure) { 26 | return node.runner.run() 27 | } 28 | 29 | func (node *ItNode) Type() types.SpecComponentType { 30 | return types.SpecComponentTypeIt 31 | } 32 | 33 | func (node *ItNode) Text() string { 34 | return node.text 35 | } 36 | 37 | func (node *ItNode) Flag() types.FlagType { 38 | return node.flag 39 | } 40 | 41 | func (node *ItNode) CodeLocation() types.CodeLocation { 42 | return node.runner.codeLocation 43 | } 44 | 45 | func (node *ItNode) Samples() int { 46 | return 1 47 | } 48 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor.go: -------------------------------------------------------------------------------- 1 | package remote 2 | 3 | import "os" 4 | 5 | /* 6 | The OutputInterceptor is used by the ForwardingReporter to 7 | intercept and capture all stdin and stderr output during a test run. 8 | */ 9 | type OutputInterceptor interface { 10 | StartInterceptingOutput() error 11 | StopInterceptingAndReturnOutput() (string, error) 12 | StreamTo(*os.File) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_win.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package remote 4 | 5 | import ( 6 | "errors" 7 | "os" 8 | ) 9 | 10 | func NewOutputInterceptor() OutputInterceptor { 11 | return &outputInterceptor{} 12 | } 13 | 14 | type outputInterceptor struct { 15 | intercepting bool 16 | } 17 | 18 | func (interceptor *outputInterceptor) StartInterceptingOutput() error { 19 | if interceptor.intercepting { 20 | return errors.New("Already intercepting output!") 21 | } 22 | interceptor.intercepting = true 23 | 24 | // not working on windows... 25 | 26 | return nil 27 | } 28 | 29 | func (interceptor *outputInterceptor) StopInterceptingAndReturnOutput() (string, error) { 30 | // not working on windows... 31 | interceptor.intercepting = false 32 | 33 | return "", nil 34 | } 35 | 36 | func (interceptor *outputInterceptor) StreamTo(*os.File) {} 37 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/internal/spec_iterator/parallel_spec_iterator.go: -------------------------------------------------------------------------------- 1 | package spec_iterator 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "net/http" 7 | 8 | "github.com/onsi/ginkgo/internal/spec" 9 | ) 10 | 11 | type ParallelIterator struct { 12 | specs []*spec.Spec 13 | host string 14 | client *http.Client 15 | } 16 | 17 | func NewParallelIterator(specs []*spec.Spec, host string) *ParallelIterator { 18 | return &ParallelIterator{ 19 | specs: specs, 20 | host: host, 21 | client: &http.Client{}, 22 | } 23 | } 24 | 25 | func (s *ParallelIterator) Next() (*spec.Spec, error) { 26 | resp, err := s.client.Get(s.host + "/counter") 27 | if err != nil { 28 | return nil, err 29 | } 30 | defer resp.Body.Close() 31 | 32 | if resp.StatusCode != http.StatusOK { 33 | return nil, fmt.Errorf("unexpected status code %d", resp.StatusCode) 34 | } 35 | 36 | var counter Counter 37 | err = json.NewDecoder(resp.Body).Decode(&counter) 38 | if err != nil { 39 | return nil, err 40 | } 41 | 42 | if counter.Index >= len(s.specs) { 43 | return nil, ErrClosed 44 | } 45 | 46 | return s.specs[counter.Index], nil 47 | } 48 | 49 | func (s *ParallelIterator) NumberOfSpecsPriorToIteration() int { 50 | return len(s.specs) 51 | } 52 | 53 | func (s *ParallelIterator) NumberOfSpecsToProcessIfKnown() (int, bool) { 54 | return -1, false 55 | } 56 | 57 | func (s *ParallelIterator) NumberOfSpecsThatWillBeRunIfKnown() (int, bool) { 58 | return -1, false 59 | } 60 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/internal/spec_iterator/serial_spec_iterator.go: -------------------------------------------------------------------------------- 1 | package spec_iterator 2 | 3 | import ( 4 | "github.com/onsi/ginkgo/internal/spec" 5 | ) 6 | 7 | type SerialIterator struct { 8 | specs []*spec.Spec 9 | index int 10 | } 11 | 12 | func NewSerialIterator(specs []*spec.Spec) *SerialIterator { 13 | return &SerialIterator{ 14 | specs: specs, 15 | index: 0, 16 | } 17 | } 18 | 19 | func (s *SerialIterator) Next() (*spec.Spec, error) { 20 | if s.index >= len(s.specs) { 21 | return nil, ErrClosed 22 | } 23 | 24 | spec := s.specs[s.index] 25 | s.index += 1 26 | return spec, nil 27 | } 28 | 29 | func (s *SerialIterator) NumberOfSpecsPriorToIteration() int { 30 | return len(s.specs) 31 | } 32 | 33 | func (s *SerialIterator) NumberOfSpecsToProcessIfKnown() (int, bool) { 34 | return len(s.specs), true 35 | } 36 | 37 | func (s *SerialIterator) NumberOfSpecsThatWillBeRunIfKnown() (int, bool) { 38 | count := 0 39 | for _, s := range s.specs { 40 | if !s.Skipped() && !s.Pending() { 41 | count += 1 42 | } 43 | } 44 | return count, true 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/internal/spec_iterator/sharded_parallel_spec_iterator.go: -------------------------------------------------------------------------------- 1 | package spec_iterator 2 | 3 | import "github.com/onsi/ginkgo/internal/spec" 4 | 5 | type ShardedParallelIterator struct { 6 | specs []*spec.Spec 7 | index int 8 | maxIndex int 9 | } 10 | 11 | func NewShardedParallelIterator(specs []*spec.Spec, total int, node int) *ShardedParallelIterator { 12 | startIndex, count := ParallelizedIndexRange(len(specs), total, node) 13 | 14 | return &ShardedParallelIterator{ 15 | specs: specs, 16 | index: startIndex, 17 | maxIndex: startIndex + count, 18 | } 19 | } 20 | 21 | func (s *ShardedParallelIterator) Next() (*spec.Spec, error) { 22 | if s.index >= s.maxIndex { 23 | return nil, ErrClosed 24 | } 25 | 26 | spec := s.specs[s.index] 27 | s.index += 1 28 | return spec, nil 29 | } 30 | 31 | func (s *ShardedParallelIterator) NumberOfSpecsPriorToIteration() int { 32 | return len(s.specs) 33 | } 34 | 35 | func (s *ShardedParallelIterator) NumberOfSpecsToProcessIfKnown() (int, bool) { 36 | return s.maxIndex - s.index, true 37 | } 38 | 39 | func (s *ShardedParallelIterator) NumberOfSpecsThatWillBeRunIfKnown() (int, bool) { 40 | count := 0 41 | for i := s.index; i < s.maxIndex; i += 1 { 42 | if !s.specs[i].Skipped() && !s.specs[i].Pending() { 43 | count += 1 44 | } 45 | } 46 | return count, true 47 | } 48 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/internal/spec_iterator/spec_iterator.go: -------------------------------------------------------------------------------- 1 | package spec_iterator 2 | 3 | import ( 4 | "errors" 5 | 6 | "github.com/onsi/ginkgo/internal/spec" 7 | ) 8 | 9 | var ErrClosed = errors.New("no more specs to run") 10 | 11 | type SpecIterator interface { 12 | Next() (*spec.Spec, error) 13 | NumberOfSpecsPriorToIteration() int 14 | NumberOfSpecsToProcessIfKnown() (int, bool) 15 | NumberOfSpecsThatWillBeRunIfKnown() (int, bool) 16 | } 17 | 18 | type Counter struct { 19 | Index int `json:"index"` 20 | } 21 | -------------------------------------------------------------------------------- /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/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) Bytes() []byte { 30 | writer.EventStream = append(writer.EventStream, "BYTES") 31 | return nil 32 | } 33 | 34 | func (writer *FakeGinkgoWriter) Write(data []byte) (n int, err error) { 35 | return 0, nil 36 | } 37 | -------------------------------------------------------------------------------- /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/onsi/ginkgo/reporters/stenographer/support/go-colorable/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Yasuhiro Matsumoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/README.md: -------------------------------------------------------------------------------- 1 | # go-colorable 2 | 3 | Colorable writer for windows. 4 | 5 | For example, most of logger packages doesn't show colors on windows. (I know we can do it with ansicon. But I don't want.) 6 | This package is possible to handle escape sequence for ansi color on windows. 7 | 8 | ## Too Bad! 9 | 10 | ![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/bad.png) 11 | 12 | 13 | ## So Good! 14 | 15 | ![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/good.png) 16 | 17 | ## Usage 18 | 19 | ```go 20 | logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true}) 21 | logrus.SetOutput(colorable.NewColorableStdout()) 22 | 23 | logrus.Info("succeeded") 24 | logrus.Warn("not correct") 25 | logrus.Error("something error") 26 | logrus.Fatal("panic") 27 | ``` 28 | 29 | You can compile above code on non-windows OSs. 30 | 31 | ## Installation 32 | 33 | ``` 34 | $ go get github.com/mattn/go-colorable 35 | ``` 36 | 37 | # License 38 | 39 | MIT 40 | 41 | # Author 42 | 43 | Yasuhiro Matsumoto (a.k.a mattn) 44 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/colorable_others.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package colorable 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | func NewColorable(file *os.File) io.Writer { 11 | if file == nil { 12 | panic("nil passed instead of *os.File to NewColorable()") 13 | } 14 | 15 | return file 16 | } 17 | 18 | func NewColorableStdout() io.Writer { 19 | return os.Stdout 20 | } 21 | 22 | func NewColorableStderr() io.Writer { 23 | return os.Stderr 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/noncolorable.go: -------------------------------------------------------------------------------- 1 | package colorable 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | "io" 7 | ) 8 | 9 | type NonColorable struct { 10 | out io.Writer 11 | lastbuf bytes.Buffer 12 | } 13 | 14 | func NewNonColorable(w io.Writer) io.Writer { 15 | return &NonColorable{out: w} 16 | } 17 | 18 | func (w *NonColorable) Write(data []byte) (n int, err error) { 19 | er := bytes.NewBuffer(data) 20 | loop: 21 | for { 22 | c1, _, err := er.ReadRune() 23 | if err != nil { 24 | break loop 25 | } 26 | if c1 != 0x1b { 27 | fmt.Fprint(w.out, string(c1)) 28 | continue 29 | } 30 | c2, _, err := er.ReadRune() 31 | if err != nil { 32 | w.lastbuf.WriteRune(c1) 33 | break loop 34 | } 35 | if c2 != 0x5b { 36 | w.lastbuf.WriteRune(c1) 37 | w.lastbuf.WriteRune(c2) 38 | continue 39 | } 40 | 41 | var buf bytes.Buffer 42 | for { 43 | c, _, err := er.ReadRune() 44 | if err != nil { 45 | w.lastbuf.WriteRune(c1) 46 | w.lastbuf.WriteRune(c2) 47 | w.lastbuf.Write(buf.Bytes()) 48 | break loop 49 | } 50 | if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' { 51 | break 52 | } 53 | buf.Write([]byte(string(c))) 54 | } 55 | } 56 | return len(data) - w.lastbuf.Len(), nil 57 | } 58 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) Yasuhiro MATSUMOTO 2 | 3 | MIT License (Expat) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/README.md: -------------------------------------------------------------------------------- 1 | # go-isatty 2 | 3 | isatty for golang 4 | 5 | ## Usage 6 | 7 | ```go 8 | package main 9 | 10 | import ( 11 | "fmt" 12 | "github.com/mattn/go-isatty" 13 | "os" 14 | ) 15 | 16 | func main() { 17 | if isatty.IsTerminal(os.Stdout.Fd()) { 18 | fmt.Println("Is Terminal") 19 | } else { 20 | fmt.Println("Is Not Terminal") 21 | } 22 | } 23 | ``` 24 | 25 | ## Installation 26 | 27 | ``` 28 | $ go get github.com/mattn/go-isatty 29 | ``` 30 | 31 | # License 32 | 33 | MIT 34 | 35 | # Author 36 | 37 | Yasuhiro Matsumoto (a.k.a mattn) 38 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/doc.go: -------------------------------------------------------------------------------- 1 | // Package isatty implements interface to isatty 2 | package isatty 3 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package isatty 4 | 5 | // IsTerminal returns true if the file descriptor is terminal which 6 | // is always false on on appengine classic which is a sandboxed PaaS. 7 | func IsTerminal(fd uintptr) bool { 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | const ioctlReadTermios = syscall.TIOCGETA 12 | 13 | // IsTerminal return true if the file descriptor is terminal. 14 | func IsTerminal(fd uintptr) bool { 15 | var termios syscall.Termios 16 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 17 | return err == 0 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | const ioctlReadTermios = syscall.TCGETS 12 | 13 | // IsTerminal return true if the file descriptor is terminal. 14 | func IsTerminal(fd uintptr) bool { 15 | var termios syscall.Termios 16 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 17 | return err == 0 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | // see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c 12 | func IsTerminal(fd uintptr) bool { 13 | var termio unix.Termio 14 | err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio) 15 | return err == nil 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | var kernel32 = syscall.NewLazyDLL("kernel32.dll") 12 | var procGetConsoleMode = kernel32.NewProc("GetConsoleMode") 13 | 14 | // IsTerminal return true if the file descriptor is terminal. 15 | func IsTerminal(fd uintptr) bool { 16 | var st uint32 17 | r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, fd, uintptr(unsafe.Pointer(&st)), 0) 18 | return r != 0 && e == 0 19 | } 20 | -------------------------------------------------------------------------------- /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/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/onsi/gomega/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.test 3 | . 4 | .idea 5 | gomega.iml 6 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Gomega 2 | 3 | Your contributions to Gomega are essential for its long-term maintenance and improvement. To make a contribution: 4 | 5 | - Please **open an issue first** - describe what problem you are trying to solve and give the community a forum for input and feedback ahead of investing time in writing code! 6 | - Ensure adequate test coverage: 7 | - Make sure to add appropriate unit tests 8 | - Please run all tests locally (`ginkgo -r -p`) and make sure they go green before submitting the PR 9 | - Please run following linter locally `go vet ./...` and make sure output does not contain any warnings 10 | - Update the documentation. In addition to standard `godoc` comments Gomega has extensive documentation on the `gh-pages` branch. If relevant, please submit a docs PR to that branch alongside your code PR. 11 | 12 | If you're a committer, check out RELEASING.md to learn how to cut a release. 13 | 14 | Thanks for supporting Gomega! 15 | -------------------------------------------------------------------------------- /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/onsi/gomega/README.md: -------------------------------------------------------------------------------- 1 | ![Gomega: Ginkgo's Preferred Matcher Library](http://onsi.github.io/gomega/images/gomega.png) 2 | 3 | [![test](https://github.com/onsi/gomega/actions/workflows/test.yml/badge.svg)](https://github.com/onsi/gomega/actions/workflows/test.yml) 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 | If you have a question, comment, bug report, feature request, etc. please open a GitHub issue. 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 | ## Community Matchers 14 | 15 | A collection of community matchers is available on the [wiki](https://github.com/onsi/gomega/wiki). 16 | 17 | ## License 18 | 19 | Gomega is MIT-Licensed 20 | 21 | The `ConsistOf` matcher uses [goraph](https://github.com/amitkgupta/goraph) which is embedded in the source to simplify distribution. goraph has an MIT license. 22 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/RELEASING.md: -------------------------------------------------------------------------------- 1 | A Gomega release is a tagged sha and a GitHub release. To cut a release: 2 | 3 | 1. Ensure CHANGELOG.md is up to date. 4 | - Use `git log --pretty=format:'- %s [%h]' HEAD...vX.X.X` to list all the commits since the last release 5 | - Categorize the changes into 6 | - Breaking Changes (requires a major version) 7 | - New Features (minor version) 8 | - Fixes (fix version) 9 | - Maintenance (which in general should not be mentioned in `CHANGELOG.md` as they have no user impact) 10 | 1. Update GOMEGA_VERSION in `gomega_dsl.go` 11 | 1. Commit, push, and release: 12 | ``` 13 | git commit -m "vM.m.p" 14 | git push 15 | gh release create "vM.m.p" 16 | git fetch --tags origin master 17 | ``` -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/gexec/prefixed_writer.go: -------------------------------------------------------------------------------- 1 | // untested sections: 1 2 | 3 | package gexec 4 | 5 | import ( 6 | "io" 7 | "sync" 8 | ) 9 | 10 | /* 11 | PrefixedWriter wraps an io.Writer, emitting the passed in prefix at the beginning of each new line. 12 | This can be useful when running multiple gexec.Sessions concurrently - you can prefix the log output of each 13 | session by passing in a PrefixedWriter: 14 | 15 | gexec.Start(cmd, NewPrefixedWriter("[my-cmd] ", GinkgoWriter), NewPrefixedWriter("[my-cmd] ", GinkgoWriter)) 16 | */ 17 | type PrefixedWriter struct { 18 | prefix []byte 19 | writer io.Writer 20 | lock *sync.Mutex 21 | atStartOfLine bool 22 | } 23 | 24 | func NewPrefixedWriter(prefix string, writer io.Writer) *PrefixedWriter { 25 | return &PrefixedWriter{ 26 | prefix: []byte(prefix), 27 | writer: writer, 28 | lock: &sync.Mutex{}, 29 | atStartOfLine: true, 30 | } 31 | } 32 | 33 | func (w *PrefixedWriter) Write(b []byte) (int, error) { 34 | w.lock.Lock() 35 | defer w.lock.Unlock() 36 | 37 | toWrite := []byte{} 38 | 39 | for _, c := range b { 40 | if w.atStartOfLine { 41 | toWrite = append(toWrite, w.prefix...) 42 | } 43 | 44 | toWrite = append(toWrite, c) 45 | 46 | w.atStartOfLine = c == '\n' 47 | } 48 | 49 | _, err := w.writer.Write(toWrite) 50 | if err != nil { 51 | return 0, err 52 | } 53 | 54 | return len(b), nil 55 | } 56 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/internal/gutil/post_ioutil.go: -------------------------------------------------------------------------------- 1 | //go:build go1.16 2 | // +build go1.16 3 | 4 | // Package gutil is a replacement for ioutil, which should not be used in new 5 | // code as of Go 1.16. With Go 1.16 and higher, this implementation 6 | // uses the ioutil replacement functions in "io" and "os" with some 7 | // Gomega specifics. This means that we should not get deprecation warnings 8 | // for ioutil when they are added. 9 | package gutil 10 | 11 | import ( 12 | "io" 13 | "os" 14 | ) 15 | 16 | func NopCloser(r io.Reader) io.ReadCloser { 17 | return io.NopCloser(r) 18 | } 19 | 20 | func ReadAll(r io.Reader) ([]byte, error) { 21 | return io.ReadAll(r) 22 | } 23 | 24 | func ReadDir(dirname string) ([]string, error) { 25 | entries, err := os.ReadDir(dirname) 26 | if err != nil { 27 | return nil, err 28 | } 29 | 30 | var names []string 31 | for _, entry := range entries { 32 | names = append(names, entry.Name()) 33 | } 34 | 35 | return names, nil 36 | } 37 | 38 | func ReadFile(filename string) ([]byte, error) { 39 | return os.ReadFile(filename) 40 | } 41 | 42 | func MkdirTemp(dir, pattern string) (string, error) { 43 | return os.MkdirTemp(dir, pattern) 44 | } 45 | 46 | func WriteFile(filename string, data []byte) error { 47 | return os.WriteFile(filename, data, 0644) 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/internal/gutil/using_ioutil.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.16 2 | // +build !go1.16 3 | 4 | // Package gutil is a replacement for ioutil, which should not be used in new 5 | // code as of Go 1.16. With Go 1.15 and lower, this implementation 6 | // uses the ioutil functions, meaning that although Gomega is not officially 7 | // supported on these versions, it is still likely to work. 8 | package gutil 9 | 10 | import ( 11 | "io" 12 | "io/ioutil" 13 | ) 14 | 15 | func NopCloser(r io.Reader) io.ReadCloser { 16 | return ioutil.NopCloser(r) 17 | } 18 | 19 | func ReadAll(r io.Reader) ([]byte, error) { 20 | return ioutil.ReadAll(r) 21 | } 22 | 23 | func ReadDir(dirname string) ([]string, error) { 24 | files, err := ioutil.ReadDir(dirname) 25 | if err != nil { 26 | return nil, err 27 | } 28 | 29 | var names []string 30 | for _, file := range files { 31 | names = append(names, file.Name()) 32 | } 33 | 34 | return names, nil 35 | } 36 | 37 | func ReadFile(filename string) ([]byte, error) { 38 | return ioutil.ReadFile(filename) 39 | } 40 | 41 | func MkdirTemp(dir, pattern string) (string, error) { 42 | return ioutil.TempDir(dir, pattern) 43 | } 44 | 45 | func WriteFile(filename string, data []byte) error { 46 | return ioutil.WriteFile(filename, data, 0644) 47 | } 48 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher.go: -------------------------------------------------------------------------------- 1 | // untested sections: 2 2 | 3 | package matchers 4 | 5 | import ( 6 | "fmt" 7 | "reflect" 8 | 9 | "github.com/onsi/gomega/format" 10 | ) 11 | 12 | type AssignableToTypeOfMatcher struct { 13 | Expected interface{} 14 | } 15 | 16 | func (matcher *AssignableToTypeOfMatcher) Match(actual interface{}) (success bool, err error) { 17 | if actual == nil && matcher.Expected == nil { 18 | 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.") 19 | } else if matcher.Expected == nil { 20 | return false, fmt.Errorf("Refusing to compare type to .\nBe explicit and use BeNil() instead. This is to avoid mistakes where both sides of an assertion are erroneously uninitialized.") 21 | } else if actual == nil { 22 | return false, nil 23 | } 24 | 25 | actualType := reflect.TypeOf(actual) 26 | expectedType := reflect.TypeOf(matcher.Expected) 27 | 28 | return actualType.AssignableTo(expectedType), nil 29 | } 30 | 31 | func (matcher *AssignableToTypeOfMatcher) FailureMessage(actual interface{}) string { 32 | return format.Message(actual, fmt.Sprintf("to be assignable to the type: %T", matcher.Expected)) 33 | } 34 | 35 | func (matcher *AssignableToTypeOfMatcher) NegatedFailureMessage(actual interface{}) string { 36 | return format.Message(actual, fmt.Sprintf("not to be assignable to the type: %T", matcher.Expected)) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/attributes_slice.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "encoding/xml" 5 | "strings" 6 | ) 7 | 8 | type attributesSlice []xml.Attr 9 | 10 | func (attrs attributesSlice) Len() int { return len(attrs) } 11 | func (attrs attributesSlice) Less(i, j int) bool { 12 | return strings.Compare(attrs[i].Name.Local, attrs[j].Name.Local) == -1 13 | } 14 | func (attrs attributesSlice) Swap(i, j int) { attrs[i], attrs[j] = attrs[j], attrs[i] } 15 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/be_a_directory.go: -------------------------------------------------------------------------------- 1 | // untested sections: 5 2 | 3 | package matchers 4 | 5 | import ( 6 | "fmt" 7 | "os" 8 | 9 | "github.com/onsi/gomega/format" 10 | ) 11 | 12 | type notADirectoryError struct { 13 | os.FileInfo 14 | } 15 | 16 | func (t notADirectoryError) Error() string { 17 | fileInfo := os.FileInfo(t) 18 | switch { 19 | case fileInfo.Mode().IsRegular(): 20 | return "file is a regular file" 21 | default: 22 | return fmt.Sprintf("file mode is: %s", fileInfo.Mode().String()) 23 | } 24 | } 25 | 26 | type BeADirectoryMatcher struct { 27 | expected interface{} 28 | err error 29 | } 30 | 31 | func (matcher *BeADirectoryMatcher) Match(actual interface{}) (success bool, err error) { 32 | actualFilename, ok := actual.(string) 33 | if !ok { 34 | return false, fmt.Errorf("BeADirectoryMatcher matcher expects a file path") 35 | } 36 | 37 | fileInfo, err := os.Stat(actualFilename) 38 | if err != nil { 39 | matcher.err = err 40 | return false, nil 41 | } 42 | 43 | if !fileInfo.Mode().IsDir() { 44 | matcher.err = notADirectoryError{fileInfo} 45 | return false, nil 46 | } 47 | return true, nil 48 | } 49 | 50 | func (matcher *BeADirectoryMatcher) FailureMessage(actual interface{}) (message string) { 51 | return format.Message(actual, fmt.Sprintf("to be a directory: %s", matcher.err)) 52 | } 53 | 54 | func (matcher *BeADirectoryMatcher) NegatedFailureMessage(actual interface{}) (message string) { 55 | return format.Message(actual, fmt.Sprintf("not be a directory")) 56 | } 57 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/be_a_regular_file.go: -------------------------------------------------------------------------------- 1 | // untested sections: 5 2 | 3 | package matchers 4 | 5 | import ( 6 | "fmt" 7 | "os" 8 | 9 | "github.com/onsi/gomega/format" 10 | ) 11 | 12 | type notARegularFileError struct { 13 | os.FileInfo 14 | } 15 | 16 | func (t notARegularFileError) Error() string { 17 | fileInfo := os.FileInfo(t) 18 | switch { 19 | case fileInfo.IsDir(): 20 | return "file is a directory" 21 | default: 22 | return fmt.Sprintf("file mode is: %s", fileInfo.Mode().String()) 23 | } 24 | } 25 | 26 | type BeARegularFileMatcher struct { 27 | expected interface{} 28 | err error 29 | } 30 | 31 | func (matcher *BeARegularFileMatcher) Match(actual interface{}) (success bool, err error) { 32 | actualFilename, ok := actual.(string) 33 | if !ok { 34 | return false, fmt.Errorf("BeARegularFileMatcher matcher expects a file path") 35 | } 36 | 37 | fileInfo, err := os.Stat(actualFilename) 38 | if err != nil { 39 | matcher.err = err 40 | return false, nil 41 | } 42 | 43 | if !fileInfo.Mode().IsRegular() { 44 | matcher.err = notARegularFileError{fileInfo} 45 | return false, nil 46 | } 47 | return true, nil 48 | } 49 | 50 | func (matcher *BeARegularFileMatcher) FailureMessage(actual interface{}) (message string) { 51 | return format.Message(actual, fmt.Sprintf("to be a regular file: %s", matcher.err)) 52 | } 53 | 54 | func (matcher *BeARegularFileMatcher) NegatedFailureMessage(actual interface{}) (message string) { 55 | return format.Message(actual, fmt.Sprintf("not be a regular file")) 56 | } 57 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/be_an_existing_file.go: -------------------------------------------------------------------------------- 1 | // untested sections: 3 2 | 3 | package matchers 4 | 5 | import ( 6 | "fmt" 7 | "os" 8 | 9 | "github.com/onsi/gomega/format" 10 | ) 11 | 12 | type BeAnExistingFileMatcher struct { 13 | expected interface{} 14 | } 15 | 16 | func (matcher *BeAnExistingFileMatcher) Match(actual interface{}) (success bool, err error) { 17 | actualFilename, ok := actual.(string) 18 | if !ok { 19 | return false, fmt.Errorf("BeAnExistingFileMatcher matcher expects a file path") 20 | } 21 | 22 | if _, err = os.Stat(actualFilename); err != nil { 23 | switch { 24 | case os.IsNotExist(err): 25 | return false, nil 26 | default: 27 | return false, err 28 | } 29 | } 30 | 31 | return true, nil 32 | } 33 | 34 | func (matcher *BeAnExistingFileMatcher) FailureMessage(actual interface{}) (message string) { 35 | return format.Message(actual, fmt.Sprintf("to exist")) 36 | } 37 | 38 | func (matcher *BeAnExistingFileMatcher) NegatedFailureMessage(actual interface{}) (message string) { 39 | return format.Message(actual, fmt.Sprintf("not to exist")) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go: -------------------------------------------------------------------------------- 1 | // untested sections: 2 2 | 3 | package matchers 4 | 5 | import ( 6 | "fmt" 7 | "reflect" 8 | 9 | "github.com/onsi/gomega/format" 10 | ) 11 | 12 | type BeClosedMatcher struct { 13 | } 14 | 15 | func (matcher *BeClosedMatcher) Match(actual interface{}) (success bool, err error) { 16 | if !isChan(actual) { 17 | return false, fmt.Errorf("BeClosed matcher expects a channel. Got:\n%s", format.Object(actual, 1)) 18 | } 19 | 20 | channelType := reflect.TypeOf(actual) 21 | channelValue := reflect.ValueOf(actual) 22 | 23 | if channelType.ChanDir() == reflect.SendDir { 24 | return false, fmt.Errorf("BeClosed matcher cannot determine if a send-only channel is closed or open. Got:\n%s", format.Object(actual, 1)) 25 | } 26 | 27 | winnerIndex, _, open := reflect.Select([]reflect.SelectCase{ 28 | {Dir: reflect.SelectRecv, Chan: channelValue}, 29 | {Dir: reflect.SelectDefault}, 30 | }) 31 | 32 | var closed bool 33 | if winnerIndex == 0 { 34 | closed = !open 35 | } else if winnerIndex == 1 { 36 | closed = false 37 | } 38 | 39 | return closed, nil 40 | } 41 | 42 | func (matcher *BeClosedMatcher) FailureMessage(actual interface{}) (message string) { 43 | return format.Message(actual, "to be closed") 44 | } 45 | 46 | func (matcher *BeClosedMatcher) NegatedFailureMessage(actual interface{}) (message string) { 47 | return format.Message(actual, "to be open") 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/be_element_of_matcher.go: -------------------------------------------------------------------------------- 1 | // untested sections: 1 2 | 3 | package matchers 4 | 5 | import ( 6 | "fmt" 7 | "reflect" 8 | 9 | "github.com/onsi/gomega/format" 10 | ) 11 | 12 | type BeElementOfMatcher struct { 13 | Elements []interface{} 14 | } 15 | 16 | func (matcher *BeElementOfMatcher) Match(actual interface{}) (success bool, err error) { 17 | if reflect.TypeOf(actual) == nil { 18 | return false, fmt.Errorf("BeElement matcher expects actual to be typed") 19 | } 20 | 21 | var lastError error 22 | for _, m := range flatten(matcher.Elements) { 23 | matcher := &EqualMatcher{Expected: m} 24 | success, err := matcher.Match(actual) 25 | if err != nil { 26 | lastError = err 27 | continue 28 | } 29 | if success { 30 | return true, nil 31 | } 32 | } 33 | 34 | return false, lastError 35 | } 36 | 37 | func (matcher *BeElementOfMatcher) FailureMessage(actual interface{}) (message string) { 38 | return format.Message(actual, "to be an element of", presentable(matcher.Elements)) 39 | } 40 | 41 | func (matcher *BeElementOfMatcher) NegatedFailureMessage(actual interface{}) (message string) { 42 | return format.Message(actual, "not to be an element of", presentable(matcher.Elements)) 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go: -------------------------------------------------------------------------------- 1 | // untested sections: 2 2 | 3 | package matchers 4 | 5 | import ( 6 | "fmt" 7 | 8 | "github.com/onsi/gomega/format" 9 | ) 10 | 11 | type BeEmptyMatcher struct { 12 | } 13 | 14 | func (matcher *BeEmptyMatcher) Match(actual interface{}) (success bool, err error) { 15 | length, ok := lengthOf(actual) 16 | if !ok { 17 | return false, fmt.Errorf("BeEmpty matcher expects a string/array/map/channel/slice. Got:\n%s", format.Object(actual, 1)) 18 | } 19 | 20 | return length == 0, nil 21 | } 22 | 23 | func (matcher *BeEmptyMatcher) FailureMessage(actual interface{}) (message string) { 24 | return format.Message(actual, "to be empty") 25 | } 26 | 27 | func (matcher *BeEmptyMatcher) NegatedFailureMessage(actual interface{}) (message string) { 28 | return format.Message(actual, "not to be empty") 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher.go: -------------------------------------------------------------------------------- 1 | // untested sections: 2 2 | 3 | package matchers 4 | 5 | import ( 6 | "fmt" 7 | "reflect" 8 | 9 | "github.com/onsi/gomega/format" 10 | ) 11 | 12 | type BeEquivalentToMatcher struct { 13 | Expected interface{} 14 | } 15 | 16 | func (matcher *BeEquivalentToMatcher) Match(actual interface{}) (success bool, err error) { 17 | if actual == nil && matcher.Expected == nil { 18 | return false, fmt.Errorf("Both actual and expected must not be nil.") 19 | } 20 | 21 | convertedActual := actual 22 | 23 | if actual != nil && matcher.Expected != nil && reflect.TypeOf(actual).ConvertibleTo(reflect.TypeOf(matcher.Expected)) { 24 | convertedActual = reflect.ValueOf(actual).Convert(reflect.TypeOf(matcher.Expected)).Interface() 25 | } 26 | 27 | return reflect.DeepEqual(convertedActual, matcher.Expected), nil 28 | } 29 | 30 | func (matcher *BeEquivalentToMatcher) FailureMessage(actual interface{}) (message string) { 31 | return format.Message(actual, "to be equivalent to", matcher.Expected) 32 | } 33 | 34 | func (matcher *BeEquivalentToMatcher) NegatedFailureMessage(actual interface{}) (message string) { 35 | return format.Message(actual, "not to be equivalent to", matcher.Expected) 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/be_false_matcher.go: -------------------------------------------------------------------------------- 1 | // untested sections: 2 2 | 3 | package matchers 4 | 5 | import ( 6 | "fmt" 7 | 8 | "github.com/onsi/gomega/format" 9 | ) 10 | 11 | type BeFalseMatcher struct { 12 | } 13 | 14 | func (matcher *BeFalseMatcher) Match(actual interface{}) (success bool, err error) { 15 | if !isBool(actual) { 16 | return false, fmt.Errorf("Expected a boolean. Got:\n%s", format.Object(actual, 1)) 17 | } 18 | 19 | return actual == false, nil 20 | } 21 | 22 | func (matcher *BeFalseMatcher) FailureMessage(actual interface{}) (message string) { 23 | return format.Message(actual, "to be false") 24 | } 25 | 26 | func (matcher *BeFalseMatcher) NegatedFailureMessage(actual interface{}) (message string) { 27 | return format.Message(actual, "not to be false") 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/be_identical_to.go: -------------------------------------------------------------------------------- 1 | // untested sections: 2 2 | 3 | package matchers 4 | 5 | import ( 6 | "fmt" 7 | "runtime" 8 | 9 | "github.com/onsi/gomega/format" 10 | ) 11 | 12 | type BeIdenticalToMatcher struct { 13 | Expected interface{} 14 | } 15 | 16 | func (matcher *BeIdenticalToMatcher) Match(actual interface{}) (success bool, matchErr error) { 17 | if actual == nil && matcher.Expected == nil { 18 | 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.") 19 | } 20 | 21 | defer func() { 22 | if r := recover(); r != nil { 23 | if _, ok := r.(runtime.Error); ok { 24 | success = false 25 | matchErr = nil 26 | } 27 | } 28 | }() 29 | 30 | return actual == matcher.Expected, nil 31 | } 32 | 33 | func (matcher *BeIdenticalToMatcher) FailureMessage(actual interface{}) string { 34 | return format.Message(actual, "to be identical to", matcher.Expected) 35 | } 36 | 37 | func (matcher *BeIdenticalToMatcher) NegatedFailureMessage(actual interface{}) string { 38 | return format.Message(actual, "not to be identical to", matcher.Expected) 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go: -------------------------------------------------------------------------------- 1 | // untested sections: 2 2 | 3 | package matchers 4 | 5 | import "github.com/onsi/gomega/format" 6 | 7 | type BeNilMatcher struct { 8 | } 9 | 10 | func (matcher *BeNilMatcher) Match(actual interface{}) (success bool, err error) { 11 | return isNil(actual), nil 12 | } 13 | 14 | func (matcher *BeNilMatcher) FailureMessage(actual interface{}) (message string) { 15 | return format.Message(actual, "to be nil") 16 | } 17 | 18 | func (matcher *BeNilMatcher) NegatedFailureMessage(actual interface{}) (message string) { 19 | return format.Message(actual, "not to be nil") 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/be_true_matcher.go: -------------------------------------------------------------------------------- 1 | // untested sections: 2 2 | 3 | package matchers 4 | 5 | import ( 6 | "fmt" 7 | 8 | "github.com/onsi/gomega/format" 9 | ) 10 | 11 | type BeTrueMatcher struct { 12 | } 13 | 14 | func (matcher *BeTrueMatcher) Match(actual interface{}) (success bool, err error) { 15 | if !isBool(actual) { 16 | return false, fmt.Errorf("Expected a boolean. Got:\n%s", format.Object(actual, 1)) 17 | } 18 | 19 | return actual.(bool), nil 20 | } 21 | 22 | func (matcher *BeTrueMatcher) FailureMessage(actual interface{}) (message string) { 23 | return format.Message(actual, "to be true") 24 | } 25 | 26 | func (matcher *BeTrueMatcher) NegatedFailureMessage(actual interface{}) (message string) { 27 | return format.Message(actual, "not to be true") 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "reflect" 5 | 6 | "github.com/onsi/gomega/format" 7 | ) 8 | 9 | type BeZeroMatcher struct { 10 | } 11 | 12 | func (matcher *BeZeroMatcher) Match(actual interface{}) (success bool, err error) { 13 | if actual == nil { 14 | return true, nil 15 | } 16 | zeroValue := reflect.Zero(reflect.TypeOf(actual)).Interface() 17 | 18 | return reflect.DeepEqual(zeroValue, actual), nil 19 | 20 | } 21 | 22 | func (matcher *BeZeroMatcher) FailureMessage(actual interface{}) (message string) { 23 | return format.Message(actual, "to be zero-valued") 24 | } 25 | 26 | func (matcher *BeZeroMatcher) NegatedFailureMessage(actual interface{}) (message string) { 27 | return format.Message(actual, "not to be zero-valued") 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/contain_elements_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/onsi/gomega/format" 7 | "github.com/onsi/gomega/matchers/support/goraph/bipartitegraph" 8 | ) 9 | 10 | type ContainElementsMatcher struct { 11 | Elements []interface{} 12 | missingElements []interface{} 13 | } 14 | 15 | func (matcher *ContainElementsMatcher) Match(actual interface{}) (success bool, err error) { 16 | if !isArrayOrSlice(actual) && !isMap(actual) { 17 | return false, fmt.Errorf("ContainElements matcher expects an array/slice/map. Got:\n%s", format.Object(actual, 1)) 18 | } 19 | 20 | matchers := matchers(matcher.Elements) 21 | bipartiteGraph, err := bipartitegraph.NewBipartiteGraph(valuesOf(actual), matchers, neighbours) 22 | if err != nil { 23 | return false, err 24 | } 25 | 26 | edges := bipartiteGraph.LargestMatching() 27 | if len(edges) == len(matchers) { 28 | return true, nil 29 | } 30 | 31 | _, missingMatchers := bipartiteGraph.FreeLeftRight(edges) 32 | matcher.missingElements = equalMatchersToElements(missingMatchers) 33 | 34 | return false, nil 35 | } 36 | 37 | func (matcher *ContainElementsMatcher) FailureMessage(actual interface{}) (message string) { 38 | message = format.Message(actual, "to contain elements", presentable(matcher.Elements)) 39 | return appendMissingElements(message, matcher.missingElements) 40 | } 41 | 42 | func (matcher *ContainElementsMatcher) NegatedFailureMessage(actual interface{}) (message string) { 43 | return format.Message(actual, "not to contain elements", presentable(matcher.Elements)) 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/contain_substring_matcher.go: -------------------------------------------------------------------------------- 1 | // untested sections: 2 2 | 3 | package matchers 4 | 5 | import ( 6 | "fmt" 7 | "strings" 8 | 9 | "github.com/onsi/gomega/format" 10 | ) 11 | 12 | type ContainSubstringMatcher struct { 13 | Substr string 14 | Args []interface{} 15 | } 16 | 17 | func (matcher *ContainSubstringMatcher) Match(actual interface{}) (success bool, err error) { 18 | actualString, ok := toString(actual) 19 | if !ok { 20 | return false, fmt.Errorf("ContainSubstring matcher requires a string or stringer. Got:\n%s", format.Object(actual, 1)) 21 | } 22 | 23 | return strings.Contains(actualString, matcher.stringToMatch()), nil 24 | } 25 | 26 | func (matcher *ContainSubstringMatcher) stringToMatch() string { 27 | stringToMatch := matcher.Substr 28 | if len(matcher.Args) > 0 { 29 | stringToMatch = fmt.Sprintf(matcher.Substr, matcher.Args...) 30 | } 31 | return stringToMatch 32 | } 33 | 34 | func (matcher *ContainSubstringMatcher) FailureMessage(actual interface{}) (message string) { 35 | return format.Message(actual, "to contain substring", matcher.stringToMatch()) 36 | } 37 | 38 | func (matcher *ContainSubstringMatcher) NegatedFailureMessage(actual interface{}) (message string) { 39 | return format.Message(actual, "not to contain substring", matcher.stringToMatch()) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/equal_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | "reflect" 7 | 8 | "github.com/onsi/gomega/format" 9 | ) 10 | 11 | type EqualMatcher struct { 12 | Expected interface{} 13 | } 14 | 15 | func (matcher *EqualMatcher) Match(actual interface{}) (success bool, err error) { 16 | if actual == nil && matcher.Expected == nil { 17 | 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.") 18 | } 19 | // Shortcut for byte slices. 20 | // Comparing long byte slices with reflect.DeepEqual is very slow, 21 | // so use bytes.Equal if actual and expected are both byte slices. 22 | if actualByteSlice, ok := actual.([]byte); ok { 23 | if expectedByteSlice, ok := matcher.Expected.([]byte); ok { 24 | return bytes.Equal(actualByteSlice, expectedByteSlice), nil 25 | } 26 | } 27 | return reflect.DeepEqual(actual, matcher.Expected), nil 28 | } 29 | 30 | func (matcher *EqualMatcher) FailureMessage(actual interface{}) (message string) { 31 | actualString, actualOK := actual.(string) 32 | expectedString, expectedOK := matcher.Expected.(string) 33 | if actualOK && expectedOK { 34 | return format.MessageWithDiff(actualString, "to equal", expectedString) 35 | } 36 | 37 | return format.Message(actual, "to equal", matcher.Expected) 38 | } 39 | 40 | func (matcher *EqualMatcher) NegatedFailureMessage(actual interface{}) (message string) { 41 | return format.Message(actual, "not to equal", matcher.Expected) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/have_cap_matcher.go: -------------------------------------------------------------------------------- 1 | // untested sections: 2 2 | 3 | package matchers 4 | 5 | import ( 6 | "fmt" 7 | 8 | "github.com/onsi/gomega/format" 9 | ) 10 | 11 | type HaveCapMatcher struct { 12 | Count int 13 | } 14 | 15 | func (matcher *HaveCapMatcher) Match(actual interface{}) (success bool, err error) { 16 | length, ok := capOf(actual) 17 | if !ok { 18 | return false, fmt.Errorf("HaveCap matcher expects a array/channel/slice. Got:\n%s", format.Object(actual, 1)) 19 | } 20 | 21 | return length == matcher.Count, nil 22 | } 23 | 24 | func (matcher *HaveCapMatcher) FailureMessage(actual interface{}) (message string) { 25 | return fmt.Sprintf("Expected\n%s\nto have capacity %d", format.Object(actual, 1), matcher.Count) 26 | } 27 | 28 | func (matcher *HaveCapMatcher) NegatedFailureMessage(actual interface{}) (message string) { 29 | return fmt.Sprintf("Expected\n%s\nnot to have capacity %d", format.Object(actual, 1), matcher.Count) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/have_len_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/onsi/gomega/format" 7 | ) 8 | 9 | type HaveLenMatcher struct { 10 | Count int 11 | } 12 | 13 | func (matcher *HaveLenMatcher) Match(actual interface{}) (success bool, err error) { 14 | length, ok := lengthOf(actual) 15 | if !ok { 16 | return false, fmt.Errorf("HaveLen matcher expects a string/array/map/channel/slice. Got:\n%s", format.Object(actual, 1)) 17 | } 18 | 19 | return length == matcher.Count, nil 20 | } 21 | 22 | func (matcher *HaveLenMatcher) FailureMessage(actual interface{}) (message string) { 23 | return fmt.Sprintf("Expected\n%s\nto have length %d", format.Object(actual, 1), matcher.Count) 24 | } 25 | 26 | func (matcher *HaveLenMatcher) NegatedFailureMessage(actual interface{}) (message string) { 27 | return fmt.Sprintf("Expected\n%s\nnot to have length %d", format.Object(actual, 1), matcher.Count) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go: -------------------------------------------------------------------------------- 1 | // untested sections: 2 2 | 3 | package matchers 4 | 5 | import ( 6 | "fmt" 7 | 8 | "github.com/onsi/gomega/format" 9 | ) 10 | 11 | type HaveOccurredMatcher struct { 12 | } 13 | 14 | func (matcher *HaveOccurredMatcher) Match(actual interface{}) (success bool, err error) { 15 | // is purely nil? 16 | if actual == nil { 17 | return false, nil 18 | } 19 | 20 | // must be an 'error' type 21 | if !isError(actual) { 22 | return false, fmt.Errorf("Expected an error-type. Got:\n%s", format.Object(actual, 1)) 23 | } 24 | 25 | // must be non-nil (or a pointer to a non-nil) 26 | return !isNil(actual), nil 27 | } 28 | 29 | func (matcher *HaveOccurredMatcher) FailureMessage(actual interface{}) (message string) { 30 | return fmt.Sprintf("Expected an error to have occurred. Got:\n%s", format.Object(actual, 1)) 31 | } 32 | 33 | func (matcher *HaveOccurredMatcher) NegatedFailureMessage(actual interface{}) (message string) { 34 | return fmt.Sprintf("Unexpected error:\n%s\n%s\n%s", format.Object(actual, 1), format.IndentString(actual.(error).Error(), 1), "occurred") 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/onsi/gomega/format" 7 | ) 8 | 9 | type HavePrefixMatcher struct { 10 | Prefix string 11 | Args []interface{} 12 | } 13 | 14 | func (matcher *HavePrefixMatcher) Match(actual interface{}) (success bool, err error) { 15 | actualString, ok := toString(actual) 16 | if !ok { 17 | return false, fmt.Errorf("HavePrefix matcher requires a string or stringer. Got:\n%s", format.Object(actual, 1)) 18 | } 19 | prefix := matcher.prefix() 20 | return len(actualString) >= len(prefix) && actualString[0:len(prefix)] == prefix, nil 21 | } 22 | 23 | func (matcher *HavePrefixMatcher) prefix() string { 24 | if len(matcher.Args) > 0 { 25 | return fmt.Sprintf(matcher.Prefix, matcher.Args...) 26 | } 27 | return matcher.Prefix 28 | } 29 | 30 | func (matcher *HavePrefixMatcher) FailureMessage(actual interface{}) (message string) { 31 | return format.Message(actual, "to have prefix", matcher.prefix()) 32 | } 33 | 34 | func (matcher *HavePrefixMatcher) NegatedFailureMessage(actual interface{}) (message string) { 35 | return format.Message(actual, "not to have prefix", matcher.prefix()) 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/have_suffix_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/onsi/gomega/format" 7 | ) 8 | 9 | type HaveSuffixMatcher struct { 10 | Suffix string 11 | Args []interface{} 12 | } 13 | 14 | func (matcher *HaveSuffixMatcher) Match(actual interface{}) (success bool, err error) { 15 | actualString, ok := toString(actual) 16 | if !ok { 17 | return false, fmt.Errorf("HaveSuffix matcher requires a string or stringer. Got:\n%s", format.Object(actual, 1)) 18 | } 19 | suffix := matcher.suffix() 20 | return len(actualString) >= len(suffix) && actualString[len(actualString)-len(suffix):] == suffix, nil 21 | } 22 | 23 | func (matcher *HaveSuffixMatcher) suffix() string { 24 | if len(matcher.Args) > 0 { 25 | return fmt.Sprintf(matcher.Suffix, matcher.Args...) 26 | } 27 | return matcher.Suffix 28 | } 29 | 30 | func (matcher *HaveSuffixMatcher) FailureMessage(actual interface{}) (message string) { 31 | return format.Message(actual, "to have suffix", matcher.suffix()) 32 | } 33 | 34 | func (matcher *HaveSuffixMatcher) NegatedFailureMessage(actual interface{}) (message string) { 35 | return format.Message(actual, "not to have suffix", matcher.suffix()) 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/match_regexp_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "fmt" 5 | "regexp" 6 | 7 | "github.com/onsi/gomega/format" 8 | ) 9 | 10 | type MatchRegexpMatcher struct { 11 | Regexp string 12 | Args []interface{} 13 | } 14 | 15 | func (matcher *MatchRegexpMatcher) Match(actual interface{}) (success bool, err error) { 16 | actualString, ok := toString(actual) 17 | if !ok { 18 | return false, fmt.Errorf("RegExp matcher requires a string or stringer.\nGot:%s", format.Object(actual, 1)) 19 | } 20 | 21 | match, err := regexp.Match(matcher.regexp(), []byte(actualString)) 22 | if err != nil { 23 | return false, fmt.Errorf("RegExp match failed to compile with error:\n\t%s", err.Error()) 24 | } 25 | 26 | return match, nil 27 | } 28 | 29 | func (matcher *MatchRegexpMatcher) FailureMessage(actual interface{}) (message string) { 30 | return format.Message(actual, "to match regular expression", matcher.regexp()) 31 | } 32 | 33 | func (matcher *MatchRegexpMatcher) NegatedFailureMessage(actual interface{}) (message string) { 34 | return format.Message(actual, "not to match regular expression", matcher.regexp()) 35 | } 36 | 37 | func (matcher *MatchRegexpMatcher) regexp() string { 38 | re := matcher.Regexp 39 | if len(matcher.Args) > 0 { 40 | re = fmt.Sprintf(matcher.Regexp, matcher.Args...) 41 | } 42 | return re 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/not.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "github.com/onsi/gomega/types" 5 | ) 6 | 7 | type NotMatcher struct { 8 | Matcher types.GomegaMatcher 9 | } 10 | 11 | func (m *NotMatcher) Match(actual interface{}) (bool, error) { 12 | success, err := m.Matcher.Match(actual) 13 | if err != nil { 14 | return false, err 15 | } 16 | return !success, nil 17 | } 18 | 19 | func (m *NotMatcher) FailureMessage(actual interface{}) (message string) { 20 | return m.Matcher.NegatedFailureMessage(actual) // works beautifully 21 | } 22 | 23 | func (m *NotMatcher) NegatedFailureMessage(actual interface{}) (message string) { 24 | return m.Matcher.FailureMessage(actual) // works beautifully 25 | } 26 | 27 | func (m *NotMatcher) MatchMayChangeInTheFuture(actual interface{}) bool { 28 | return types.MatchMayChangeInTheFuture(m.Matcher, actual) // just return m.Matcher's value 29 | } 30 | -------------------------------------------------------------------------------- /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 | // is purely nil? 14 | if actual == nil { 15 | return true, nil 16 | } 17 | 18 | // must be an 'error' type 19 | if !isError(actual) { 20 | return false, fmt.Errorf("Expected an error-type. Got:\n%s", format.Object(actual, 1)) 21 | } 22 | 23 | // must be nil (or a pointer to a nil) 24 | return isNil(actual), nil 25 | } 26 | 27 | func (matcher *SucceedMatcher) FailureMessage(actual interface{}) (message string) { 28 | return fmt.Sprintf("Expected success, but got an error:\n%s\n%s", format.Object(actual, 1), format.IndentString(actual.(error).Error(), 1)) 29 | } 30 | 31 | func (matcher *SucceedMatcher) NegatedFailureMessage(actual interface{}) (message string) { 32 | return "Expected failure, but got no error." 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/support/goraph/edge/edge.go: -------------------------------------------------------------------------------- 1 | package edge 2 | 3 | import . "github.com/onsi/gomega/matchers/support/goraph/node" 4 | 5 | type Edge struct { 6 | Node1 int 7 | Node2 int 8 | } 9 | 10 | type EdgeSet []Edge 11 | 12 | func (ec EdgeSet) Free(node Node) bool { 13 | for _, e := range ec { 14 | if e.Node1 == node.ID || e.Node2 == node.ID { 15 | return false 16 | } 17 | } 18 | 19 | return true 20 | } 21 | 22 | func (ec EdgeSet) Contains(edge Edge) bool { 23 | for _, e := range ec { 24 | if e == edge { 25 | return true 26 | } 27 | } 28 | 29 | return false 30 | } 31 | 32 | func (ec EdgeSet) FindByNodes(node1, node2 Node) (Edge, bool) { 33 | for _, e := range ec { 34 | if (e.Node1 == node1.ID && e.Node2 == node2.ID) || (e.Node1 == node2.ID && e.Node2 == node1.ID) { 35 | return e, true 36 | } 37 | } 38 | 39 | return Edge{}, false 40 | } 41 | 42 | func (ec EdgeSet) SymmetricDifference(ec2 EdgeSet) EdgeSet { 43 | edgesToInclude := make(map[Edge]bool) 44 | 45 | for _, e := range ec { 46 | edgesToInclude[e] = true 47 | } 48 | 49 | for _, e := range ec2 { 50 | edgesToInclude[e] = !edgesToInclude[e] 51 | } 52 | 53 | result := EdgeSet{} 54 | for e, include := range edgesToInclude { 55 | if include { 56 | result = append(result, e) 57 | } 58 | } 59 | 60 | return result 61 | } 62 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/matchers/support/goraph/node/node.go: -------------------------------------------------------------------------------- 1 | package node 2 | 3 | type Node struct { 4 | ID int 5 | Value interface{} 6 | } 7 | 8 | type NodeOrderedSet []Node 9 | -------------------------------------------------------------------------------- /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/onsi/gomega/tools: -------------------------------------------------------------------------------- 1 | //go:build tools 2 | // +build tools 3 | 4 | package main 5 | 6 | import ( 7 | _ "github.com/onsi/ginkgo/v2/ginkgo" 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/pkg/errors 3 | go: 4 | - 1.4.x 5 | - 1.5.x 6 | - 1.6.x 7 | - 1.7.x 8 | - 1.8.x 9 | - 1.9.x 10 | - 1.10.x 11 | - 1.11.x 12 | - tip 13 | 14 | script: 15 | - go test -v ./... 16 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Dave Cheney 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) && go1.9 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | // +build go1.9 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | type Signal = syscall.Signal 14 | type Errno = syscall.Errno 15 | type SysProcAttr = syscall.SysProcAttr 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 12 | // 13 | 14 | TEXT ·syscall6(SB),NOSPLIT,$0-88 15 | JMP syscall·syscall6(SB) 16 | 17 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 18 | JMP syscall·rawSyscall6(SB) 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | // +build freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for 386 BSD 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_bsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc 6 | // +build darwin dragonfly freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for AMD64 BSD 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_bsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | // +build freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for ARM BSD 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_bsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | // +build darwin freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for ARM64 BSD 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_bsd_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | // +build darwin freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System call support for ppc64, BSD 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 ·Syscall9(SB),NOSPLIT,$0-104 25 | JMP syscall·Syscall9(SB) 26 | 27 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 28 | JMP syscall·RawSyscall(SB) 29 | 30 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 31 | JMP syscall·RawSyscall6(SB) 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | // +build darwin freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for RISCV64 BSD 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_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 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System calls for AMD64, Linux 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 | JMP syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | JMP syscall·Syscall6(SB) 22 | 23 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 24 | CALL runtime·entersyscall(SB) 25 | MOVQ a1+8(FP), DI 26 | MOVQ a2+16(FP), SI 27 | MOVQ a3+24(FP), DX 28 | MOVQ $0, R10 29 | MOVQ $0, R8 30 | MOVQ $0, R9 31 | MOVQ trap+0(FP), AX // syscall entry 32 | SYSCALL 33 | MOVQ AX, r1+32(FP) 34 | MOVQ DX, r2+40(FP) 35 | CALL runtime·exitsyscall(SB) 36 | RET 37 | 38 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 39 | JMP syscall·RawSyscall(SB) 40 | 41 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 42 | JMP syscall·RawSyscall6(SB) 43 | 44 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 45 | MOVQ a1+8(FP), DI 46 | MOVQ a2+16(FP), SI 47 | MOVQ a3+24(FP), DX 48 | MOVQ $0, R10 49 | MOVQ $0, R8 50 | MOVQ $0, R9 51 | MOVQ trap+0(FP), AX // syscall entry 52 | SYSCALL 53 | MOVQ AX, r1+32(FP) 54 | MOVQ DX, r2+40(FP) 55 | RET 56 | 57 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16 58 | JMP syscall·gettimeofday(SB) 59 | -------------------------------------------------------------------------------- /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 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System calls for arm, Linux 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 ·SyscallNoError(SB),NOSPLIT,$0-24 24 | BL runtime·entersyscall(SB) 25 | MOVW trap+0(FP), R7 26 | MOVW a1+4(FP), R0 27 | MOVW a2+8(FP), R1 28 | MOVW a3+12(FP), R2 29 | MOVW $0, R3 30 | MOVW $0, R4 31 | MOVW $0, R5 32 | SWI $0 33 | MOVW R0, r1+16(FP) 34 | MOVW $0, R0 35 | MOVW R0, r2+20(FP) 36 | BL runtime·exitsyscall(SB) 37 | RET 38 | 39 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 40 | B syscall·RawSyscall(SB) 41 | 42 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 43 | B syscall·RawSyscall6(SB) 44 | 45 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 46 | MOVW trap+0(FP), R7 // syscall entry 47 | MOVW a1+4(FP), R0 48 | MOVW a2+8(FP), R1 49 | MOVW a3+12(FP), R2 50 | SWI $0 51 | MOVW R0, r1+16(FP) 52 | MOVW $0, R0 53 | MOVW R0, r2+20(FP) 54 | RET 55 | 56 | TEXT ·seek(SB),NOSPLIT,$0-28 57 | B syscall·seek(SB) 58 | -------------------------------------------------------------------------------- /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 | //go:build linux && arm64 && gc 6 | // +build linux 7 | // +build arm64 8 | // +build gc 9 | 10 | #include "textflag.h" 11 | 12 | // Just jump to package syscall's implementation for all these functions. 13 | // The runtime may know about them. 14 | 15 | TEXT ·Syscall(SB),NOSPLIT,$0-56 16 | B syscall·Syscall(SB) 17 | 18 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 19 | B syscall·Syscall6(SB) 20 | 21 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 22 | BL runtime·entersyscall(SB) 23 | MOVD a1+8(FP), R0 24 | MOVD a2+16(FP), R1 25 | MOVD a3+24(FP), R2 26 | MOVD $0, R3 27 | MOVD $0, R4 28 | MOVD $0, R5 29 | MOVD trap+0(FP), R8 // syscall entry 30 | SVC 31 | MOVD R0, r1+32(FP) // r1 32 | MOVD R1, r2+40(FP) // r2 33 | BL runtime·exitsyscall(SB) 34 | RET 35 | 36 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 37 | B syscall·RawSyscall(SB) 38 | 39 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 40 | B syscall·RawSyscall6(SB) 41 | 42 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 43 | MOVD a1+8(FP), R0 44 | MOVD a2+16(FP), R1 45 | MOVD a3+24(FP), R2 46 | MOVD $0, R3 47 | MOVD $0, R4 48 | MOVD $0, R5 49 | MOVD trap+0(FP), R8 // syscall entry 50 | SVC 51 | MOVD R0, r1+32(FP) 52 | MOVD R1, r2+40(FP) 53 | RET 54 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_loong64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && loong64 && gc 6 | // +build linux 7 | // +build loong64 8 | // +build gc 9 | 10 | #include "textflag.h" 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 ·SyscallNoError(SB),NOSPLIT,$0-48 23 | JAL runtime·entersyscall(SB) 24 | MOVV a1+8(FP), R4 25 | MOVV a2+16(FP), R5 26 | MOVV a3+24(FP), R6 27 | MOVV R0, R7 28 | MOVV R0, R8 29 | MOVV R0, R9 30 | MOVV trap+0(FP), R11 // syscall entry 31 | SYSCALL 32 | MOVV R4, r1+32(FP) 33 | MOVV R0, r2+40(FP) // r2 is not used. Always set to 0 34 | JAL runtime·exitsyscall(SB) 35 | RET 36 | 37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 38 | JMP syscall·RawSyscall(SB) 39 | 40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 41 | JMP syscall·RawSyscall6(SB) 42 | 43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 44 | MOVV a1+8(FP), R4 45 | MOVV a2+16(FP), R5 46 | MOVV a3+24(FP), R6 47 | MOVV R0, R7 48 | MOVV R0, R8 49 | MOVV R0, R9 50 | MOVV trap+0(FP), R11 // syscall entry 51 | SYSCALL 52 | MOVV R4, r1+32(FP) 53 | MOVV R0, r2+40(FP) // r2 is not used. Always set to 0 54 | RET 55 | -------------------------------------------------------------------------------- /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 | //go:build linux && (mips64 || mips64le) && gc 6 | // +build linux 7 | // +build mips64 mips64le 8 | // +build gc 9 | 10 | #include "textflag.h" 11 | 12 | // 13 | // System calls for mips64, Linux 14 | // 15 | 16 | // Just jump to package syscall's implementation for all these functions. 17 | // The runtime may know about them. 18 | 19 | TEXT ·Syscall(SB),NOSPLIT,$0-56 20 | JMP syscall·Syscall(SB) 21 | 22 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 23 | JMP syscall·Syscall6(SB) 24 | 25 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 26 | JAL runtime·entersyscall(SB) 27 | MOVV a1+8(FP), R4 28 | MOVV a2+16(FP), R5 29 | MOVV a3+24(FP), R6 30 | MOVV R0, R7 31 | MOVV R0, R8 32 | MOVV R0, R9 33 | MOVV trap+0(FP), R2 // syscall entry 34 | SYSCALL 35 | MOVV R2, r1+32(FP) 36 | MOVV R3, r2+40(FP) 37 | JAL runtime·exitsyscall(SB) 38 | RET 39 | 40 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 41 | JMP syscall·RawSyscall(SB) 42 | 43 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 44 | JMP syscall·RawSyscall6(SB) 45 | 46 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 47 | MOVV a1+8(FP), R4 48 | MOVV a2+16(FP), R5 49 | MOVV a3+24(FP), R6 50 | MOVV R0, R7 51 | MOVV R0, R8 52 | MOVV R0, R9 53 | MOVV trap+0(FP), R2 // syscall entry 54 | SYSCALL 55 | MOVV R2, r1+32(FP) 56 | MOVV R3, r2+40(FP) 57 | RET 58 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_mipsx.s: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (mips || mipsle) && gc 6 | // +build linux 7 | // +build mips mipsle 8 | // +build gc 9 | 10 | #include "textflag.h" 11 | 12 | // 13 | // System calls for mips, Linux 14 | // 15 | 16 | // Just jump to package syscall's implementation for all these functions. 17 | // The runtime may know about them. 18 | 19 | TEXT ·Syscall(SB),NOSPLIT,$0-28 20 | JMP syscall·Syscall(SB) 21 | 22 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 23 | JMP syscall·Syscall6(SB) 24 | 25 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 26 | JMP syscall·Syscall9(SB) 27 | 28 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24 29 | JAL runtime·entersyscall(SB) 30 | MOVW a1+4(FP), R4 31 | MOVW a2+8(FP), R5 32 | MOVW a3+12(FP), R6 33 | MOVW R0, R7 34 | MOVW trap+0(FP), R2 // syscall entry 35 | SYSCALL 36 | MOVW R2, r1+16(FP) // r1 37 | MOVW R3, r2+20(FP) // r2 38 | JAL runtime·exitsyscall(SB) 39 | RET 40 | 41 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 42 | JMP syscall·RawSyscall(SB) 43 | 44 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 45 | JMP syscall·RawSyscall6(SB) 46 | 47 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 48 | MOVW a1+4(FP), R4 49 | MOVW a2+8(FP), R5 50 | MOVW a3+12(FP), R6 51 | MOVW trap+0(FP), R2 // syscall entry 52 | SYSCALL 53 | MOVW R2, r1+16(FP) 54 | MOVW R3, r2+20(FP) 55 | RET 56 | -------------------------------------------------------------------------------- /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 | //go:build linux && (ppc64 || ppc64le) && gc 6 | // +build linux 7 | // +build ppc64 ppc64le 8 | // +build gc 9 | 10 | #include "textflag.h" 11 | 12 | // 13 | // System calls for ppc64, Linux 14 | // 15 | 16 | // Just jump to package syscall's implementation for all these functions. 17 | // The runtime may know about them. 18 | 19 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 20 | BL runtime·entersyscall(SB) 21 | MOVD a1+8(FP), R3 22 | MOVD a2+16(FP), R4 23 | MOVD a3+24(FP), R5 24 | MOVD R0, R6 25 | MOVD R0, R7 26 | MOVD R0, R8 27 | MOVD trap+0(FP), R9 // syscall entry 28 | SYSCALL R9 29 | MOVD R3, r1+32(FP) 30 | MOVD R4, r2+40(FP) 31 | BL runtime·exitsyscall(SB) 32 | RET 33 | 34 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 35 | MOVD a1+8(FP), R3 36 | MOVD a2+16(FP), R4 37 | MOVD a3+24(FP), R5 38 | MOVD R0, R6 39 | MOVD R0, R7 40 | MOVD R0, R8 41 | MOVD trap+0(FP), R9 // syscall entry 42 | SYSCALL R9 43 | MOVD R3, r1+32(FP) 44 | MOVD R4, r2+40(FP) 45 | RET 46 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_riscv64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build riscv64 && gc 6 | // +build riscv64 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for linux/riscv64. 13 | // 14 | // Where available, just jump to package syscall's implementation of 15 | // these functions. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | JMP syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | JMP syscall·Syscall6(SB) 22 | 23 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 24 | CALL runtime·entersyscall(SB) 25 | MOV a1+8(FP), A0 26 | MOV a2+16(FP), A1 27 | MOV a3+24(FP), A2 28 | MOV trap+0(FP), A7 // syscall entry 29 | ECALL 30 | MOV A0, r1+32(FP) // r1 31 | MOV A1, r2+40(FP) // r2 32 | CALL runtime·exitsyscall(SB) 33 | RET 34 | 35 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 36 | JMP syscall·RawSyscall(SB) 37 | 38 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 39 | JMP syscall·RawSyscall6(SB) 40 | 41 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 42 | MOV a1+8(FP), A0 43 | MOV a2+16(FP), A1 44 | MOV a3+24(FP), A2 45 | MOV trap+0(FP), A7 // syscall entry 46 | ECALL 47 | MOV A0, r1+32(FP) 48 | MOV A1, r2+40(FP) 49 | RET 50 | -------------------------------------------------------------------------------- /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 | //go:build linux && s390x && gc 6 | // +build linux 7 | // +build s390x 8 | // +build gc 9 | 10 | #include "textflag.h" 11 | 12 | // 13 | // System calls for s390x, Linux 14 | // 15 | 16 | // Just jump to package syscall's implementation for all these functions. 17 | // The runtime may know about them. 18 | 19 | TEXT ·Syscall(SB),NOSPLIT,$0-56 20 | BR syscall·Syscall(SB) 21 | 22 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 23 | BR syscall·Syscall6(SB) 24 | 25 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 26 | BL runtime·entersyscall(SB) 27 | MOVD a1+8(FP), R2 28 | MOVD a2+16(FP), R3 29 | MOVD a3+24(FP), R4 30 | MOVD $0, R5 31 | MOVD $0, R6 32 | MOVD $0, R7 33 | MOVD trap+0(FP), R1 // syscall entry 34 | SYSCALL 35 | MOVD R2, r1+32(FP) 36 | MOVD R3, r2+40(FP) 37 | BL runtime·exitsyscall(SB) 38 | RET 39 | 40 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 41 | BR syscall·RawSyscall(SB) 42 | 43 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 44 | BR syscall·RawSyscall6(SB) 45 | 46 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 47 | MOVD a1+8(FP), R2 48 | MOVD a2+16(FP), R3 49 | MOVD a3+24(FP), R4 50 | MOVD $0, R5 51 | MOVD $0, R6 52 | MOVD $0, R7 53 | MOVD trap+0(FP), R1 // syscall entry 54 | SYSCALL 55 | MOVD R2, r1+32(FP) 56 | MOVD R3, r2+40(FP) 57 | RET 58 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for mips64, OpenBSD 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 | JMP syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | JMP syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | JMP syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | JMP syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | JMP syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /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 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 12 | // 13 | 14 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 15 | JMP syscall·sysvicall6(SB) 16 | 17 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 18 | JMP syscall·rawSysvicall6(SB) 19 | -------------------------------------------------------------------------------- /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 | HCI_CHANNEL_LOGGING = 4 27 | ) 28 | 29 | // Socketoption Level 30 | const ( 31 | SOL_BLUETOOTH = 0x112 32 | SOL_HCI = 0x0 33 | SOL_L2CAP = 0x6 34 | SOL_RFCOMM = 0x12 35 | SOL_SCO = 0x11 36 | ) 37 | -------------------------------------------------------------------------------- /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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | 8 | package unix 9 | 10 | const ( 11 | R_OK = 0x4 12 | W_OK = 0x2 13 | X_OK = 0x1 14 | ) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc 6 | // +build aix,ppc 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used by AIX. 10 | 11 | package unix 12 | 13 | // Major returns the major component of a Linux device number. 14 | func Major(dev uint64) uint32 { 15 | return uint32((dev >> 16) & 0xffff) 16 | } 17 | 18 | // Minor returns the minor component of a Linux device number. 19 | func Minor(dev uint64) uint32 { 20 | return uint32(dev & 0xffff) 21 | } 22 | 23 | // Mkdev returns a Linux device number generated from the given major and minor 24 | // components. 25 | func Mkdev(major, minor uint32) uint64 { 26 | return uint64(((major) << 16) | (minor)) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc64 6 | // +build aix,ppc64 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used AIX. 10 | 11 | package unix 12 | 13 | // Major returns the major component of a Linux device number. 14 | func Major(dev uint64) uint32 { 15 | return uint32((dev & 0x3fffffff00000000) >> 32) 16 | } 17 | 18 | // Minor returns the minor component of a Linux device number. 19 | func Minor(dev uint64) uint32 { 20 | return uint32((dev & 0x00000000ffffffff) >> 0) 21 | } 22 | 23 | // Mkdev returns a Linux device number generated from the given major and minor 24 | // components. 25 | func Mkdev(major, minor uint32) uint64 { 26 | var DEVNO64 uint64 27 | DEVNO64 = 0x8000000000000000 28 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Dragonfly's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a DragonFlyBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a DragonFlyBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_freebsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in FreeBSD's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a FreeBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a FreeBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a FreeBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_zos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build zos && s390x 6 | // +build zos,s390x 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used by z/OS. 10 | // 11 | // The information below is extracted and adapted from macros. 12 | 13 | package unix 14 | 15 | // Major returns the major component of a z/OS device number. 16 | func Major(dev uint64) uint32 { 17 | return uint32((dev >> 16) & 0x0000FFFF) 18 | } 19 | 20 | // Minor returns the minor component of a z/OS device number. 21 | func Minor(dev uint64) uint32 { 22 | return uint32(dev & 0x0000FFFF) 23 | } 24 | 25 | // Mkdev returns a z/OS device number generated from the given major and minor 26 | // components. 27 | func Mkdev(major, minor uint32) uint64 { 28 | return (uint64(major) << 16) | uint64(minor) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | // +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64 7 | 8 | package unix 9 | 10 | const isBigEndian = true 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh 6 | // +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh 7 | 8 | package unix 9 | 10 | const isBigEndian = false 11 | -------------------------------------------------------------------------------- /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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | 8 | // Unix environment variables. 9 | 10 | package unix 11 | 12 | import "syscall" 13 | 14 | func Getenv(key string) (value string, found bool) { 15 | return syscall.Getenv(key) 16 | } 17 | 18 | func Setenv(key, value string) error { 19 | return syscall.Setenv(key, value) 20 | } 21 | 22 | func Clearenv() { 23 | syscall.Clearenv() 24 | } 25 | 26 | func Environ() []string { 27 | return syscall.Environ() 28 | } 29 | 30 | func Unsetenv(key string) error { 31 | return syscall.Unsetenv(key) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build dragonfly || freebsd || linux || netbsd || openbsd 6 | // +build dragonfly freebsd linux netbsd openbsd 7 | 8 | package unix 9 | 10 | import "unsafe" 11 | 12 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 13 | // systems by fcntl_linux_32bit.go to be SYS_FCNTL64. 14 | var fcntl64Syscall uintptr = SYS_FCNTL 15 | 16 | func fcntl(fd int, cmd, arg int) (int, error) { 17 | valptr, _, errno := Syscall(fcntl64Syscall, uintptr(fd), uintptr(cmd), uintptr(arg)) 18 | var err error 19 | if errno != 0 { 20 | err = errno 21 | } 22 | return int(valptr), err 23 | } 24 | 25 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 26 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 27 | return fcntl(int(fd), cmd, arg) 28 | } 29 | 30 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 31 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 32 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 33 | if errno == 0 { 34 | return nil 35 | } 36 | return errno 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 11 | return fcntl(int(fd), cmd, arg) 12 | } 13 | 14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) 17 | return err 18 | } 19 | 20 | // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command. 21 | func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error { 22 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore)))) 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.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 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) 6 | // +build linux,386 linux,arm linux,mips linux,mipsle linux,ppc 7 | 8 | package unix 9 | 10 | func init() { 11 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 12 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 13 | fcntl64Syscall = SYS_FCNTL64 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fdset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | 8 | package unix 9 | 10 | // Set adds fd to the set fds. 11 | func (fds *FdSet) Set(fd int) { 12 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS)) 13 | } 14 | 15 | // Clear removes fd from the set fds. 16 | func (fds *FdSet) Clear(fd int) { 17 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS)) 18 | } 19 | 20 | // IsSet returns whether fd is in the set fds. 21 | func (fds *FdSet) IsSet(fd int) bool { 22 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0 23 | } 24 | 25 | // Zero clears the set fds. 26 | func (fds *FdSet) Zero() { 27 | for i := range fds.Bits { 28 | fds.Bits[i] = 0 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /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 | //go:build gccgo && linux && amd64 6 | // +build gccgo,linux,amd64 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //extern gettimeofday 13 | func realGettimeofday(*Timeval, *byte) int32 14 | 15 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 16 | r := realGettimeofday(tv, nil) 17 | if r < 0 { 18 | return syscall.GetErrno() 19 | } 20 | return 0 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 7 | 8 | // For Unix, get the pagesize from the runtime. 9 | 10 | package unix 11 | 12 | import "syscall" 13 | 14 | func Getpagesize() int { 15 | return syscall.Getpagesize() 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && !ios 6 | // +build darwin,!ios 7 | 8 | package unix 9 | 10 | func ptrace(request int, pid int, addr uintptr, data uintptr) error { 11 | return ptrace1(request, pid, addr, data) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_ios.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ios 6 | // +build ios 7 | 8 | package unix 9 | 10 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 11 | return ENOTSUP 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && race) || (linux && race) || (freebsd && race) 6 | // +build darwin,race linux,race freebsd,race 7 | 8 | package unix 9 | 10 | import ( 11 | "runtime" 12 | "unsafe" 13 | ) 14 | 15 | const raceenabled = true 16 | 17 | func raceAcquire(addr unsafe.Pointer) { 18 | runtime.RaceAcquire(addr) 19 | } 20 | 21 | func raceReleaseMerge(addr unsafe.Pointer) { 22 | runtime.RaceReleaseMerge(addr) 23 | } 24 | 25 | func raceReadRange(addr unsafe.Pointer, len int) { 26 | runtime.RaceReadRange(addr, len) 27 | } 28 | 29 | func raceWriteRange(addr unsafe.Pointer, len int) { 30 | runtime.RaceWriteRange(addr, len) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos 6 | // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly zos 7 | 8 | package unix 9 | 10 | import ( 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = false 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | } 18 | 19 | func raceReleaseMerge(addr unsafe.Pointer) { 20 | } 21 | 22 | func raceReadRange(addr unsafe.Pointer, len int) { 23 | } 24 | 25 | func raceWriteRange(addr unsafe.Pointer, len int) { 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd 6 | // +build aix dragonfly freebsd linux netbsd openbsd 7 | 8 | package unix 9 | 10 | // ReadDirent reads directory entries from fd and writes them into buf. 11 | func ReadDirent(fd int, buf []byte) (n int, err error) { 12 | return Getdents(fd, buf) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdirentries.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin 6 | // +build darwin 7 | 8 | package unix 9 | 10 | import "unsafe" 11 | 12 | // ReadDirent reads directory entries from fd and writes them into buf. 13 | func ReadDirent(fd int, buf []byte) (n int, err error) { 14 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 15 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 16 | // actual system call is getdirentries64, 64 is a good guess. 17 | // TODO(rsc): Can we use a single global basep for all calls? 18 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 19 | return Getdirentries(fd, buf, base) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | // Round the length of a raw sockaddr up to align it properly. 8 | func cmsgAlignOf(salen int) int { 9 | salign := SizeofPtr 10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { 11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires 12 | // 32-bit aligned access to network subsystem. 13 | salign = 4 14 | } 15 | return (salen + salign - 1) & ^(salign - 1) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin freebsd linux netbsd openbsd solaris zos 7 | 8 | package unix 9 | 10 | import ( 11 | "runtime" 12 | ) 13 | 14 | // Round the length of a raw sockaddr up to align it properly. 15 | func cmsgAlignOf(salen int) int { 16 | salign := SizeofPtr 17 | 18 | // dragonfly needs to check ABI version at runtime, see cmsgAlignOf in 19 | // sockcmsg_dragonfly.go 20 | switch runtime.GOOS { 21 | case "aix": 22 | // There is no alignment on AIX. 23 | salign = 1 24 | case "darwin", "ios", "illumos", "solaris": 25 | // NOTE: It seems like 64-bit Darwin, Illumos and Solaris 26 | // kernels still require 32-bit aligned access to network 27 | // subsystem. 28 | if SizeofPtr == 8 { 29 | salign = 4 30 | } 31 | case "netbsd", "openbsd": 32 | // NetBSD and OpenBSD armv7 require 64-bit alignment. 33 | if runtime.GOARCH == "arm" { 34 | salign = 8 35 | } 36 | // NetBSD aarch64 requires 128-bit alignment. 37 | if runtime.GOOS == "netbsd" && runtime.GOARCH == "arm64" { 38 | salign = 16 39 | } 40 | case "zos": 41 | // z/OS socket macros use [32-bit] sizeof(int) alignment, 42 | // not pointer width. 43 | salign = SizeofInt 44 | } 45 | 46 | return (salen + salign - 1) & ^(salign - 1) 47 | } 48 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc 6 | // +build aix,ppc 7 | 8 | package unix 9 | 10 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64 11 | //sysnb Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64 12 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64 13 | 14 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) 15 | 16 | func setTimespec(sec, nsec int64) Timespec { 17 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)} 18 | } 19 | 20 | func setTimeval(sec, usec int64) Timeval { 21 | return Timeval{Sec: int32(sec), Usec: int32(usec)} 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint32(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = int32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | func Fstat(fd int, stat *Stat_t) error { 41 | return fstat(fd, stat) 42 | } 43 | 44 | func Fstatat(dirfd int, path string, stat *Stat_t, flags int) error { 45 | return fstatat(dirfd, path, stat, flags) 46 | } 47 | 48 | func Lstat(path string, stat *Stat_t) error { 49 | return lstat(path, stat) 50 | } 51 | 52 | func Stat(path string, statptr *Stat_t) error { 53 | return stat(path, statptr) 54 | } 55 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && go1.12 6 | // +build darwin,go1.12 7 | 8 | package unix 9 | 10 | import _ "unsafe" 11 | 12 | // Implemented in the runtime package (runtime/sys_darwin.go) 13 | func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 14 | func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 15 | func syscall_syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 16 | func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // 32-bit only 17 | func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 18 | func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 19 | func syscall_syscallPtr(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 20 | 21 | //go:linkname syscall_syscall syscall.syscall 22 | //go:linkname syscall_syscall6 syscall.syscall6 23 | //go:linkname syscall_syscall6X syscall.syscall6X 24 | //go:linkname syscall_syscall9 syscall.syscall9 25 | //go:linkname syscall_rawSyscall syscall.rawSyscall 26 | //go:linkname syscall_rawSyscall6 syscall.rawSyscall6 27 | //go:linkname syscall_syscallPtr syscall.syscallPtr 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && dragonfly 6 | // +build amd64,dragonfly 7 | 8 | package unix 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | func setTimespec(sec, nsec int64) Timespec { 16 | return Timespec{Sec: sec, Nsec: nsec} 17 | } 18 | 19 | func setTimeval(sec, usec int64) Timeval { 20 | return Timeval{Sec: sec, Usec: usec} 21 | } 22 | 23 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 24 | k.Ident = uint64(fd) 25 | k.Filter = int16(mode) 26 | k.Flags = uint16(flags) 27 | } 28 | 29 | func (iov *Iovec) SetLen(length int) { 30 | iov.Len = uint64(length) 31 | } 32 | 33 | func (msghdr *Msghdr) SetControllen(length int) { 34 | msghdr.Controllen = uint32(length) 35 | } 36 | 37 | func (msghdr *Msghdr) SetIovlen(length int) { 38 | msghdr.Iovlen = int32(length) 39 | } 40 | 41 | func (cmsg *Cmsghdr) SetLen(length int) { 42 | cmsg.Len = uint32(length) 43 | } 44 | 45 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 46 | var writtenOut uint64 = 0 47 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0) 48 | 49 | written = int(writtenOut) 50 | 51 | if e1 != 0 { 52 | err = e1 53 | } 54 | return 55 | } 56 | 57 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) 58 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build hurd 6 | // +build hurd 7 | 8 | package unix 9 | 10 | /* 11 | #include 12 | int ioctl(int, unsigned long int, uintptr_t); 13 | */ 14 | import "C" 15 | 16 | func ioctl(fd int, req uint, arg uintptr) (err error) { 17 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) 18 | if r0 == -1 && er != nil { 19 | err = er 20 | } 21 | return 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && hurd 6 | // +build 386,hurd 7 | 8 | package unix 9 | 10 | const ( 11 | TIOCGETA = 0x62251713 12 | ) 13 | 14 | type Winsize struct { 15 | Row uint16 16 | Col uint16 17 | Xpixel uint16 18 | Ypixel uint16 19 | } 20 | 21 | type Termios struct { 22 | Iflag uint32 23 | Oflag uint32 24 | Cflag uint32 25 | Lflag uint32 26 | Cc [20]uint8 27 | Ispeed int32 28 | Ospeed int32 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_alarm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64) 6 | // +build linux 7 | // +build 386 amd64 mips mipsle mips64 mipsle ppc64 ppc64le ppc s390x sparc64 8 | 9 | package unix 10 | 11 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH 12 | // values. 13 | 14 | //sys Alarm(seconds uint) (remaining uint, err error) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && linux && gc 6 | // +build amd64,linux,gc 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc 6 | // +build linux,gc 7 | 8 | package unix 9 | 10 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 11 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 12 | 13 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 14 | // fail. 15 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc && 386 6 | // +build linux,gc,386 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | // Underlying system call writes to newoffset via pointer. 13 | // Implemented in assembly to avoid allocation. 14 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 15 | 16 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.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 | //go:build arm && gc && linux 6 | // +build arm,gc,linux 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | // Underlying system call writes to newoffset via pointer. 13 | // Implemented in assembly to avoid allocation. 14 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && 386 6 | // +build linux,gccgo,386 7 | 8 | package unix 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 16 | var newoffset int64 17 | offsetLow := uint32(offset & 0xffffffff) 18 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 19 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 20 | return newoffset, err 21 | } 22 | 23 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 24 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 25 | return int(fd), err 26 | } 27 | 28 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 29 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 30 | return int(fd), err 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && arm 6 | // +build linux,gccgo,arm 7 | 8 | package unix 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 16 | var newoffset int64 17 | offsetLow := uint32(offset & 0xffffffff) 18 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 19 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 20 | return newoffset, err 21 | } 22 | -------------------------------------------------------------------------------- /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 | //go:build 386 && netbsd 6 | // +build 386,netbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: int32(nsec)} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: int32(usec)} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint32(fd) 20 | k.Filter = uint32(mode) 21 | k.Flags = uint32(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint32(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = int32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | -------------------------------------------------------------------------------- /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 | //go:build amd64 && netbsd 6 | // +build amd64,netbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: nsec} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: int32(usec)} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint64(fd) 20 | k.Filter = uint32(mode) 21 | k.Flags = uint32(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = int32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | -------------------------------------------------------------------------------- /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 | //go:build arm && netbsd 6 | // +build arm,netbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: int32(nsec)} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: int32(usec)} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint32(fd) 20 | k.Filter = uint32(mode) 21 | k.Flags = uint32(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint32(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = int32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm64 && netbsd 6 | // +build arm64,netbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: nsec} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: int32(usec)} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint64(fd) 20 | k.Filter = uint32(mode) 21 | k.Flags = uint32(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = int32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | -------------------------------------------------------------------------------- /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 | //go:build 386 && openbsd 6 | // +build 386,openbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: int32(nsec)} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: int32(usec)} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint32(fd) 20 | k.Filter = int16(mode) 21 | k.Flags = uint16(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint32(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 41 | // of openbsd/386 the syscall is called sysctl instead of __sysctl. 42 | const SYS___SYSCTL = SYS_SYSCTL 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 | //go:build amd64 && openbsd 6 | // +build amd64,openbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: nsec} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: usec} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint64(fd) 20 | k.Filter = int16(mode) 21 | k.Flags = uint16(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 41 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 42 | const SYS___SYSCTL = SYS_SYSCTL 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && openbsd 6 | // +build arm,openbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: int32(nsec)} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: int32(usec)} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint32(fd) 20 | k.Filter = int16(mode) 21 | k.Flags = uint16(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint32(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 41 | // of openbsd/arm the syscall is called sysctl instead of __sysctl. 42 | const SYS___SYSCTL = SYS_SYSCTL 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm64 && openbsd 6 | // +build arm64,openbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: nsec} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: usec} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint64(fd) 20 | k.Filter = int16(mode) 21 | k.Flags = uint16(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 41 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 42 | const SYS___SYSCTL = SYS_SYSCTL 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build openbsd 6 | // +build openbsd 7 | 8 | package unix 9 | 10 | import _ "unsafe" 11 | 12 | // Implemented in the runtime package (runtime/sys_openbsd3.go) 13 | func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 14 | func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 15 | func syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 uintptr) (r1, r2 uintptr, err Errno) 16 | func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 17 | func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 18 | 19 | //go:linkname syscall_syscall syscall.syscall 20 | //go:linkname syscall_syscall6 syscall.syscall6 21 | //go:linkname syscall_syscall10 syscall.syscall10 22 | //go:linkname syscall_rawSyscall syscall.rawSyscall 23 | //go:linkname syscall_rawSyscall6 syscall.rawSyscall6 24 | 25 | func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) { 26 | return syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, 0) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | func setTimespec(sec, nsec int64) Timespec { 8 | return Timespec{Sec: sec, Nsec: nsec} 9 | } 10 | 11 | func setTimeval(sec, usec int64) Timeval { 12 | return Timeval{Sec: sec, Usec: usec} 13 | } 14 | 15 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 16 | k.Ident = uint64(fd) 17 | k.Filter = int16(mode) 18 | k.Flags = uint16(flags) 19 | } 20 | 21 | func (iov *Iovec) SetLen(length int) { 22 | iov.Len = uint64(length) 23 | } 24 | 25 | func (msghdr *Msghdr) SetControllen(length int) { 26 | msghdr.Controllen = uint32(length) 27 | } 28 | 29 | func (msghdr *Msghdr) SetIovlen(length int) { 30 | msghdr.Iovlen = uint32(length) 31 | } 32 | 33 | func (cmsg *Cmsghdr) SetLen(length int) { 34 | cmsg.Len = uint32(length) 35 | } 36 | 37 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 38 | // of OpenBSD the syscall is called sysctl instead of __sysctl. 39 | const SYS___SYSCTL = SYS_SYSCTL 40 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ppc64 && openbsd 6 | // +build ppc64,openbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: nsec} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: usec} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint64(fd) 20 | k.Filter = int16(mode) 21 | k.Flags = uint16(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 41 | // of openbsd/ppc64 the syscall is called sysctl instead of __sysctl. 42 | const SYS___SYSCTL = SYS_SYSCTL 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build riscv64 && openbsd 6 | // +build riscv64,openbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: nsec} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: usec} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint64(fd) 20 | k.Filter = int16(mode) 21 | k.Flags = uint16(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 41 | // of openbsd/riscv64 the syscall is called sysctl instead of __sysctl. 42 | const SYS___SYSCTL = SYS_SYSCTL 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 | //go:build amd64 && solaris 6 | // +build amd64,solaris 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: nsec} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: usec} 16 | } 17 | 18 | func (iov *Iovec) SetLen(length int) { 19 | iov.Len = uint64(length) 20 | } 21 | 22 | func (msghdr *Msghdr) SetIovlen(length int) { 23 | msghdr.Iovlen = int32(length) 24 | } 25 | 26 | func (cmsg *Cmsghdr) SetLen(length int) { 27 | cmsg.Len = uint32(length) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc 6 | // +build darwin dragonfly freebsd linux,!ppc64,!ppc64le netbsd openbsd solaris 7 | // +build gc 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (ppc64le || ppc64) && gc 6 | // +build linux 7 | // +build ppc64le ppc64 8 | // +build gc 9 | 10 | package unix 11 | 12 | import "syscall" 13 | 14 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 15 | return syscall.Syscall(trap, a1, a2, a3) 16 | } 17 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 18 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) 19 | } 20 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 21 | return syscall.RawSyscall(trap, a1, a2, a3) 22 | } 23 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 24 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux 6 | // +build linux 7 | 8 | package unix 9 | 10 | import "runtime" 11 | 12 | // SysvShmCtl performs control operations on the shared memory segment 13 | // specified by id. 14 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 15 | if runtime.GOARCH == "arm" || 16 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" { 17 | cmd |= ipc_64 18 | } 19 | 20 | return shmctl(id, cmd, desc) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && !ios 6 | // +build darwin,!ios 7 | 8 | package unix 9 | 10 | // SysvShmCtl performs control operations on the shared memory segment 11 | // specified by id. 12 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 13 | return shmctl(id, cmd, desc) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/unveil_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import ( 8 | "syscall" 9 | "unsafe" 10 | ) 11 | 12 | // Unveil implements the unveil syscall. 13 | // For more information see unveil(2). 14 | // Note that the special case of blocking further 15 | // unveil calls is handled by UnveilBlock. 16 | func Unveil(path string, flags string) error { 17 | pathPtr, err := syscall.BytePtrFromString(path) 18 | if err != nil { 19 | return err 20 | } 21 | flagsPtr, err := syscall.BytePtrFromString(flags) 22 | if err != nil { 23 | return err 24 | } 25 | _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(unsafe.Pointer(pathPtr)), uintptr(unsafe.Pointer(flagsPtr)), 0) 26 | if e != 0 { 27 | return e 28 | } 29 | return nil 30 | } 31 | 32 | // UnveilBlock blocks future unveil calls. 33 | // For more information see unveil(2). 34 | func UnveilBlock() error { 35 | // Both pointers must be nil. 36 | var pathUnsafe, flagsUnsafe unsafe.Pointer 37 | _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(pathUnsafe), uintptr(flagsUnsafe), 0) 38 | if e != 0 { 39 | return e 40 | } 41 | return nil 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtracePair("arm", "arm64"). DO NOT EDIT. 2 | 3 | //go:build linux && (arm || arm64) 4 | // +build linux 5 | // +build arm arm64 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // PtraceRegsArm is the registers used by arm binaries. 12 | type PtraceRegsArm struct { 13 | Uregs [18]uint32 14 | } 15 | 16 | // PtraceGetRegsArm fetches the registers used by arm binaries. 17 | func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error { 18 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) 19 | } 20 | 21 | // PtraceSetRegsArm sets the registers used by arm binaries. 22 | func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error { 23 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) 24 | } 25 | 26 | // PtraceRegsArm64 is the registers used by arm64 binaries. 27 | type PtraceRegsArm64 struct { 28 | Regs [31]uint64 29 | Sp uint64 30 | Pc uint64 31 | Pstate uint64 32 | } 33 | 34 | // PtraceGetRegsArm64 fetches the registers used by arm64 binaries. 35 | func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error { 36 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) 37 | } 38 | 39 | // PtraceSetRegsArm64 sets the registers used by arm64 binaries. 40 | func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error { 41 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. 2 | 3 | package unix 4 | 5 | import "unsafe" 6 | 7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. 8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { 9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} 10 | return ptrace(PTRACE_GETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) 11 | } 12 | 13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries. 14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { 15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} 16 | return ptrace(PTRACE_SETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/encoding/japanese/all.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package japanese 6 | 7 | import ( 8 | "golang.org/x/text/encoding" 9 | ) 10 | 11 | // All is a list of all defined encodings in this package. 12 | var All = []encoding.Encoding{EUCJP, ISO2022JP, ShiftJIS} 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/encoding/simplifiedchinese/all.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package simplifiedchinese 6 | 7 | import ( 8 | "golang.org/x/text/encoding" 9 | ) 10 | 11 | // All is a list of all defined encodings in this package. 12 | var All = []encoding.Encoding{GB18030, GBK, HZGB2312} 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/language/common.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | package language 4 | 5 | // This file contains code common to the maketables.go and the package code. 6 | 7 | // AliasType is the type of an alias in AliasMap. 8 | type AliasType int8 9 | 10 | const ( 11 | Deprecated AliasType = iota 12 | Macro 13 | Legacy 14 | 15 | AliasTypeUnknown AliasType = -1 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/language/compact.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package language 6 | 7 | // CompactCoreInfo is a compact integer with the three core tags encoded. 8 | type CompactCoreInfo uint32 9 | 10 | // GetCompactCore generates a uint32 value that is guaranteed to be unique for 11 | // different language, region, and script values. 12 | func GetCompactCore(t Tag) (cci CompactCoreInfo, ok bool) { 13 | if t.LangID > langNoIndexOffset { 14 | return 0, false 15 | } 16 | cci |= CompactCoreInfo(t.LangID) << (8 + 12) 17 | cci |= CompactCoreInfo(t.ScriptID) << 12 18 | cci |= CompactCoreInfo(t.RegionID) 19 | return cci, true 20 | } 21 | 22 | // Tag generates a tag from c. 23 | func (c CompactCoreInfo) Tag() Tag { 24 | return Tag{ 25 | LangID: Language(c >> 20), 26 | RegionID: Region(c & 0x3ff), 27 | ScriptID: Script(c>>12) & 0xff, 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/language/coverage.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package language 6 | 7 | // BaseLanguages returns the list of all supported base languages. It generates 8 | // the list by traversing the internal structures. 9 | func BaseLanguages() []Language { 10 | base := make([]Language, 0, NumLanguages) 11 | for i := 0; i < langNoIndexOffset; i++ { 12 | // We included "und" already for the value 0. 13 | if i != nonCanonicalUnd { 14 | base = append(base, Language(i)) 15 | } 16 | } 17 | i := langNoIndexOffset 18 | for _, v := range langNoIndex { 19 | for k := 0; k < 8; k++ { 20 | if v&1 == 1 { 21 | base = append(base, Language(i)) 22 | } 23 | v >>= 1 24 | i++ 25 | } 26 | } 27 | return base 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/language/tags.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package language 6 | 7 | // MustParse is like Parse, but panics if the given BCP 47 tag cannot be parsed. 8 | // It simplifies safe initialization of Tag values. 9 | func MustParse(s string) Tag { 10 | t, err := Parse(s) 11 | if err != nil { 12 | panic(err) 13 | } 14 | return t 15 | } 16 | 17 | // MustParseBase is like ParseBase, but panics if the given base cannot be parsed. 18 | // It simplifies safe initialization of Base values. 19 | func MustParseBase(s string) Language { 20 | b, err := ParseBase(s) 21 | if err != nil { 22 | panic(err) 23 | } 24 | return b 25 | } 26 | 27 | // MustParseScript is like ParseScript, but panics if the given script cannot be 28 | // parsed. It simplifies safe initialization of Script values. 29 | func MustParseScript(s string) Script { 30 | scr, err := ParseScript(s) 31 | if err != nil { 32 | panic(err) 33 | } 34 | return scr 35 | } 36 | 37 | // MustParseRegion is like ParseRegion, but panics if the given region cannot be 38 | // parsed. It simplifies safe initialization of Region values. 39 | func MustParseRegion(s string) Region { 40 | r, err := ParseRegion(s) 41 | if err != nil { 42 | panic(err) 43 | } 44 | return r 45 | } 46 | 47 | // Und is the root language. 48 | var Und Tag 49 | -------------------------------------------------------------------------------- /vendor/gopkg.in/tomb.v1/README.md: -------------------------------------------------------------------------------- 1 | Installation and usage 2 | ---------------------- 3 | 4 | See [gopkg.in/tomb.v1](https://gopkg.in/tomb.v1) for documentation and usage details. 5 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.4.x" 5 | - "1.5.x" 6 | - "1.6.x" 7 | - "1.7.x" 8 | - "1.8.x" 9 | - "1.9.x" 10 | - "1.10.x" 11 | - "1.11.x" 12 | - "1.12.x" 13 | - "1.13.x" 14 | - "1.14.x" 15 | - "tip" 16 | 17 | go_import_path: gopkg.in/yaml.v2 18 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/LICENSE.libyaml: -------------------------------------------------------------------------------- 1 | The following files were ported to Go from C files of libyaml, and thus 2 | are still covered by their original copyright and license: 3 | 4 | apic.go 5 | emitterc.go 6 | parserc.go 7 | readerc.go 8 | scannerc.go 9 | writerc.go 10 | yamlh.go 11 | yamlprivateh.go 12 | 13 | Copyright (c) 2006 Kirill Simonov 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of 16 | this software and associated documentation files (the "Software"), to deal in 17 | the Software without restriction, including without limitation the rights to 18 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 19 | of the Software, and to permit persons to whom the Software is furnished to do 20 | so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/writerc.go: -------------------------------------------------------------------------------- 1 | package yaml 2 | 3 | // Set the writer error and return false. 4 | func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { 5 | emitter.error = yaml_WRITER_ERROR 6 | emitter.problem = problem 7 | return false 8 | } 9 | 10 | // Flush the output buffer. 11 | func yaml_emitter_flush(emitter *yaml_emitter_t) bool { 12 | if emitter.write_handler == nil { 13 | panic("write handler not set") 14 | } 15 | 16 | // Check if the buffer is empty. 17 | if emitter.buffer_pos == 0 { 18 | return true 19 | } 20 | 21 | if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { 22 | return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) 23 | } 24 | emitter.buffer_pos = 0 25 | return true 26 | } 27 | --------------------------------------------------------------------------------