├── .github
├── dependabot.yml
└── workflows
│ ├── codeql-analysis.yml
│ └── go.yml
├── .gitignore
├── LICENSE
├── NOTICE
├── PULL_REQUEST_TEMPLATE.md
├── README.md
├── assets
├── binary
│ ├── Makefile
│ ├── Procfile
│ ├── binary
│ ├── go.mod
│ └── main.go
├── curler
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── config.ru
│ ├── main.rb
│ └── vendor
│ │ └── cache
│ │ ├── base64-0.2.0.gem
│ │ ├── logger-1.6.1.gem
│ │ ├── mustermann-3.0.3.gem
│ │ ├── rack-3.1.16.gem
│ │ ├── rack-protection-4.1.1.gem
│ │ ├── rack-session-2.1.1.gem
│ │ ├── rackup-2.2.1.gem
│ │ ├── ruby2_keywords-0.0.5.gem
│ │ ├── sinatra-4.1.1.gem
│ │ ├── tilt-2.4.0.gem
│ │ └── webrick-1.9.1.gem
└── dotnet_simple
│ ├── .gitignore
│ ├── NetSimple.sln
│ ├── NetSimple
│ ├── Bootstrapper.cs
│ ├── IndexModule.cs
│ ├── NetSimple.csproj
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── PublishProfiles
│ │ │ └── Published.pubxml
│ ├── Web.Debug.config
│ ├── Web.Release.config
│ ├── Web.config
│ └── packages.config
│ └── Published
│ ├── PrecompiledApp.config
│ ├── Web.config
│ ├── bin
│ ├── Nancy.Hosting.Aspnet.dll
│ ├── Nancy.dll
│ └── NetSimple.dll
│ └── packages.config
├── bin
├── compile
├── test
└── test.ps1
├── go.mod
├── go.sum
├── smoke
├── config.go
├── helpers.go
├── isolation_segments
│ ├── init_test.go
│ ├── isolation_segment.go
│ └── v3_helpers.go
├── logging
│ ├── init_test.go
│ └── loggregator_test.go
└── runtime
│ ├── init_test.go
│ └── runtime_test.go
└── vendor
├── github.com
├── cloudfoundry
│ └── cf-test-helpers
│ │ └── v2
│ │ ├── LICENSE
│ │ ├── NOTICE
│ │ ├── cf
│ │ ├── cf.go
│ │ └── push.go
│ │ ├── commandreporter
│ │ └── command_reporter.go
│ │ ├── commandstarter
│ │ └── command_starter.go
│ │ ├── generator
│ │ └── random_name.go
│ │ ├── internal
│ │ ├── cf.go
│ │ ├── redacting_reporter.go
│ │ ├── redactor.go
│ │ ├── reporter.go
│ │ └── starter.go
│ │ ├── silentcommandstarter
│ │ └── silent_command_starter.go
│ │ └── workflowhelpers
│ │ ├── api.go
│ │ ├── as_user.go
│ │ ├── internal
│ │ ├── api.go
│ │ ├── cf_auth.go
│ │ ├── space.go
│ │ └── user.go
│ │ ├── test_suite_setup.go
│ │ └── user_context.go
├── go-logr
│ └── logr
│ │ ├── .golangci.yaml
│ │ ├── CHANGELOG.md
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── SECURITY.md
│ │ ├── context.go
│ │ ├── context_noslog.go
│ │ ├── context_slog.go
│ │ ├── discard.go
│ │ ├── funcr
│ │ ├── funcr.go
│ │ └── slogsink.go
│ │ ├── logr.go
│ │ ├── sloghandler.go
│ │ ├── slogr.go
│ │ └── slogsink.go
├── go-task
│ └── slim-sprig
│ │ └── v3
│ │ ├── .editorconfig
│ │ ├── .gitattributes
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE.txt
│ │ ├── README.md
│ │ ├── Taskfile.yml
│ │ ├── crypto.go
│ │ ├── date.go
│ │ ├── defaults.go
│ │ ├── dict.go
│ │ ├── doc.go
│ │ ├── functions.go
│ │ ├── list.go
│ │ ├── network.go
│ │ ├── numeric.go
│ │ ├── reflect.go
│ │ ├── regex.go
│ │ ├── strings.go
│ │ └── url.go
├── google
│ ├── go-cmp
│ │ ├── LICENSE
│ │ └── cmp
│ │ │ ├── compare.go
│ │ │ ├── export.go
│ │ │ ├── internal
│ │ │ ├── diff
│ │ │ │ ├── debug_disable.go
│ │ │ │ ├── debug_enable.go
│ │ │ │ └── diff.go
│ │ │ ├── flags
│ │ │ │ └── flags.go
│ │ │ ├── function
│ │ │ │ └── func.go
│ │ │ └── value
│ │ │ │ ├── name.go
│ │ │ │ ├── pointer.go
│ │ │ │ └── sort.go
│ │ │ ├── options.go
│ │ │ ├── path.go
│ │ │ ├── report.go
│ │ │ ├── report_compare.go
│ │ │ ├── report_references.go
│ │ │ ├── report_reflect.go
│ │ │ ├── report_slices.go
│ │ │ ├── report_text.go
│ │ │ └── report_value.go
│ └── pprof
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ └── profile
│ │ ├── encode.go
│ │ ├── filter.go
│ │ ├── index.go
│ │ ├── legacy_java_profile.go
│ │ ├── legacy_profile.go
│ │ ├── merge.go
│ │ ├── profile.go
│ │ ├── proto.go
│ │ └── prune.go
└── onsi
│ ├── ginkgo
│ └── v2
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── RELEASING.md
│ │ ├── config
│ │ └── deprecated.go
│ │ ├── core_dsl.go
│ │ ├── decorator_dsl.go
│ │ ├── deprecated_dsl.go
│ │ ├── formatter
│ │ ├── colorable_others.go
│ │ ├── colorable_windows.go
│ │ └── formatter.go
│ │ ├── ginkgo
│ │ ├── build
│ │ │ └── build_command.go
│ │ ├── command
│ │ │ ├── abort.go
│ │ │ ├── command.go
│ │ │ └── program.go
│ │ ├── generators
│ │ │ ├── boostrap_templates.go
│ │ │ ├── bootstrap_command.go
│ │ │ ├── generate_command.go
│ │ │ ├── generate_templates.go
│ │ │ └── generators_common.go
│ │ ├── internal
│ │ │ ├── compile.go
│ │ │ ├── gocovmerge.go
│ │ │ ├── profiles_and_reports.go
│ │ │ ├── run.go
│ │ │ ├── test_suite.go
│ │ │ ├── utils.go
│ │ │ └── verify_version.go
│ │ ├── labels
│ │ │ └── labels_command.go
│ │ ├── main.go
│ │ ├── outline
│ │ │ ├── ginkgo.go
│ │ │ ├── import.go
│ │ │ ├── outline.go
│ │ │ └── outline_command.go
│ │ ├── run
│ │ │ └── run_command.go
│ │ ├── unfocus
│ │ │ └── unfocus_command.go
│ │ └── watch
│ │ │ ├── delta.go
│ │ │ ├── delta_tracker.go
│ │ │ ├── dependencies.go
│ │ │ ├── package_hash.go
│ │ │ ├── package_hashes.go
│ │ │ ├── suite.go
│ │ │ └── watch_command.go
│ │ ├── ginkgo_cli_dependencies.go
│ │ ├── ginkgo_t_dsl.go
│ │ ├── internal
│ │ ├── counter.go
│ │ ├── failer.go
│ │ ├── focus.go
│ │ ├── global
│ │ │ └── init.go
│ │ ├── group.go
│ │ ├── interrupt_handler
│ │ │ ├── interrupt_handler.go
│ │ │ ├── sigquit_swallower_unix.go
│ │ │ └── sigquit_swallower_windows.go
│ │ ├── node.go
│ │ ├── ordering.go
│ │ ├── output_interceptor.go
│ │ ├── output_interceptor_unix.go
│ │ ├── output_interceptor_wasm.go
│ │ ├── output_interceptor_win.go
│ │ ├── parallel_support
│ │ │ ├── client_server.go
│ │ │ ├── http_client.go
│ │ │ ├── http_server.go
│ │ │ ├── rpc_client.go
│ │ │ ├── rpc_server.go
│ │ │ └── server_handler.go
│ │ ├── progress_report.go
│ │ ├── progress_report_bsd.go
│ │ ├── progress_report_unix.go
│ │ ├── progress_report_wasm.go
│ │ ├── progress_report_win.go
│ │ ├── progress_reporter_manager.go
│ │ ├── report_entry.go
│ │ ├── spec.go
│ │ ├── spec_context.go
│ │ ├── suite.go
│ │ ├── testingtproxy
│ │ │ └── testing_t_proxy.go
│ │ ├── tree.go
│ │ └── writer.go
│ │ ├── reporters
│ │ ├── default_reporter.go
│ │ ├── deprecated_reporter.go
│ │ ├── json_report.go
│ │ ├── junit_report.go
│ │ ├── reporter.go
│ │ └── teamcity_report.go
│ │ ├── reporting_dsl.go
│ │ ├── table_dsl.go
│ │ └── types
│ │ ├── code_location.go
│ │ ├── config.go
│ │ ├── deprecated_types.go
│ │ ├── deprecation_support.go
│ │ ├── enum_support.go
│ │ ├── errors.go
│ │ ├── file_filter.go
│ │ ├── flags.go
│ │ ├── label_filter.go
│ │ ├── report_entry.go
│ │ ├── types.go
│ │ └── version.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
│ ├── polling_signal_error.go
│ └── vetoptdesc.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_comparable_to_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_key_of_matcher.go
│ ├── be_nil_matcher.go
│ ├── be_numerically_matcher.go
│ ├── be_sent_matcher.go
│ ├── be_temporally_matcher.go
│ ├── be_true_matcher.go
│ ├── be_zero_matcher.go
│ ├── consist_of.go
│ ├── contain_element_matcher.go
│ ├── contain_elements_matcher.go
│ ├── contain_substring_matcher.go
│ ├── equal_matcher.go
│ ├── have_cap_matcher.go
│ ├── have_each_matcher.go
│ ├── have_exact_elements.go
│ ├── have_existing_field_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
│ ├── internal
│ │ └── miter
│ │ │ ├── type_support_iter.go
│ │ │ └── type_support_noiter.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
│ └── types
│ └── types.go
├── go.uber.org
└── automaxprocs
│ ├── .codecov.yml
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── CODE_OF_CONDUCT.md
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── Makefile
│ ├── README.md
│ ├── automaxprocs.go
│ ├── internal
│ ├── cgroups
│ │ ├── cgroup.go
│ │ ├── cgroups.go
│ │ ├── cgroups2.go
│ │ ├── doc.go
│ │ ├── errors.go
│ │ ├── mountpoint.go
│ │ └── subsys.go
│ └── runtime
│ │ ├── cpu_quota_linux.go
│ │ ├── cpu_quota_unsupported.go
│ │ └── runtime.go
│ └── maxprocs
│ ├── maxprocs.go
│ └── version.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
│ │ ├── iter.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
│ │ ├── auxv.go
│ │ ├── auxv_unsupported.go
│ │ ├── bluetooth_linux.go
│ │ ├── bpxsvc_zos.go
│ │ ├── bpxsvc_zos.s
│ │ ├── 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
│ │ ├── fcntl.go
│ │ ├── fcntl_darwin.go
│ │ ├── fcntl_linux_32bit.go
│ │ ├── fdset.go
│ │ ├── gccgo.go
│ │ ├── gccgo_c.c
│ │ ├── gccgo_linux_amd64.go
│ │ ├── ifreq_linux.go
│ │ ├── ioctl_linux.go
│ │ ├── ioctl_signed.go
│ │ ├── ioctl_unsigned.go
│ │ ├── ioctl_zos.go
│ │ ├── mkall.sh
│ │ ├── mkerrors.sh
│ │ ├── mmap_nomremap.go
│ │ ├── mremap.go
│ │ ├── 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
│ │ ├── sockcmsg_zos.go
│ │ ├── symaddr_zos_s390x.s
│ │ ├── 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
│ │ ├── vgetrandom_linux.go
│ │ ├── vgetrandom_unsupported.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
│ │ ├── zsymaddr_zos_s390x.s
│ │ ├── 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
│ └── tools
│ ├── LICENSE
│ ├── PATENTS
│ ├── cover
│ └── profile.go
│ └── go
│ └── ast
│ ├── edge
│ └── edge.go
│ └── inspector
│ ├── cursor.go
│ ├── inspector.go
│ ├── iter.go
│ ├── typeof.go
│ └── walk.go
├── gopkg.in
└── yaml.v3
│ ├── LICENSE
│ ├── 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
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 |
4 | - package-ecosystem: "github-actions"
5 | directory: "/"
6 | schedule:
7 | interval: "weekly"
8 |
9 | - package-ecosystem: "gomod"
10 | directory: "/"
11 | schedule:
12 | interval: "weekly"
13 |
14 | - package-ecosystem: "bundler"
15 | vendor: true
16 | directory: "/assets/curler"
17 | schedule:
18 | interval: "weekly"
19 |
--------------------------------------------------------------------------------
/.github/workflows/go.yml:
--------------------------------------------------------------------------------
1 | name: Go
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 |
8 | pull_request:
9 | branches:
10 | - main
11 |
12 | jobs:
13 | vet:
14 | runs-on: ubuntu-latest
15 | steps:
16 | - uses: actions/checkout@v4
17 | - uses: actions/setup-go@v5
18 | with:
19 | go-version-file: go.mod
20 | - run: go vet ./...
21 |
22 | lint:
23 | runs-on: ubuntu-latest
24 | steps:
25 | - uses: actions/checkout@v4
26 | - uses: actions/setup-go@v5
27 | with:
28 | go-version-file: go.mod
29 | - uses: golangci/golangci-lint-action@v8.0.0
30 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Binaries for programs and plugins
2 | *.exe
3 | *.exe~
4 | *.dll
5 | *.so
6 | *.dylib
7 |
8 | # Test binary, built with `go test -c`
9 | *.test
10 |
11 | # Output of the go coverage tool, specifically when used with LiteIDE
12 | *.out
13 |
14 | # Go workspace file
15 | go.work
16 |
17 | # IDEs
18 | .idea
19 |
20 | # macOS
21 | .DS_Store
22 |
23 | # Ignore integration test config and output
24 | integration_config.json
25 | results
26 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | cf-smoke-tests
2 |
3 | Copyright (c) 2014-Present CloudFoundry.org Foundation, Inc. All Rights Reserved.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 |
--------------------------------------------------------------------------------
/assets/binary/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: build
2 | build:
3 | CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
4 |
--------------------------------------------------------------------------------
/assets/binary/Procfile:
--------------------------------------------------------------------------------
1 | web: ./binary
2 |
--------------------------------------------------------------------------------
/assets/binary/binary:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cloudfoundry/cf-smoke-tests/31e4df8d29ae3ad9a674b0ef446ca3f5d2ad6698/assets/binary/binary
--------------------------------------------------------------------------------
/assets/binary/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/cloudfoundry/cf-smoke-tests/assets/binary
2 |
3 | go 1.22.0
4 |
--------------------------------------------------------------------------------
/assets/binary/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "net/http"
7 | "os"
8 | "strings"
9 | )
10 |
11 | func main() {
12 | http.HandleFunc("/", hello)
13 | http.HandleFunc("/env", env)
14 | fmt.Println("listening...")
15 | err := http.ListenAndServe(":"+os.Getenv("PORT"), nil)
16 | if err != nil {
17 | panic(err)
18 | }
19 | }
20 |
21 | func hello(res http.ResponseWriter, req *http.Request) {
22 | response := fmt.Sprintf(`Healthy
23 | It just needed to be restarted!
24 | My application metadata: %v
25 | My port: %v
26 | My custom env variable: %v`, os.Getenv("VCAP_APPLICATION"), os.Getenv("PORT"), os.Getenv("CUSTOM_VAR"))
27 | fmt.Fprintln(res, response)
28 | }
29 |
30 | func env(res http.ResponseWriter, req *http.Request) {
31 | envVariables := make(map[string]string)
32 | for _, envKeyValue := range os.Environ() {
33 | keyValue := strings.Split(envKeyValue, "=")
34 | envVariables[keyValue[0]] = keyValue[1]
35 | }
36 | envJsonBytes, err := json.Marshal(envVariables)
37 | if err != nil {
38 | http.Error(res, err.Error(), http.StatusInternalServerError)
39 | }
40 | fmt.Fprintln(res, string(envJsonBytes))
41 | }
42 |
--------------------------------------------------------------------------------
/assets/curler/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gem 'sinatra'
4 | gem 'webrick'
5 | gem 'rackup'
6 |
--------------------------------------------------------------------------------
/assets/curler/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | base64 (0.2.0)
5 | logger (1.6.1)
6 | mustermann (3.0.3)
7 | ruby2_keywords (~> 0.0.1)
8 | rack (3.1.16)
9 | rack-protection (4.1.1)
10 | base64 (>= 0.1.0)
11 | logger (>= 1.6.0)
12 | rack (>= 3.0.0, < 4)
13 | rack-session (2.1.1)
14 | base64 (>= 0.1.0)
15 | rack (>= 3.0.0)
16 | rackup (2.2.1)
17 | rack (>= 3)
18 | ruby2_keywords (0.0.5)
19 | sinatra (4.1.1)
20 | logger (>= 1.6.0)
21 | mustermann (~> 3.0)
22 | rack (>= 3.0.0, < 4)
23 | rack-protection (= 4.1.1)
24 | rack-session (>= 2.0.0, < 3)
25 | tilt (~> 2.0)
26 | tilt (2.4.0)
27 | webrick (1.9.1)
28 |
29 | PLATFORMS
30 | ruby
31 |
32 | DEPENDENCIES
33 | rackup
34 | sinatra
35 | webrick
36 |
37 | BUNDLED WITH
38 | 2.4.10
39 |
--------------------------------------------------------------------------------
/assets/curler/config.ru:
--------------------------------------------------------------------------------
1 | require "./main"
2 | run Sinatra::Application
--------------------------------------------------------------------------------
/assets/curler/main.rb:
--------------------------------------------------------------------------------
1 | require 'sinatra'
2 | require 'open3'
3 | require 'json'
4 |
5 | STDOUT.sync = true
6 | STDERR.sync = true
7 |
8 | get '/put/' do
9 | host = params[:host]
10 | path = params[:path]
11 | port = params[:port]
12 | data = params[:data]
13 |
14 | stdout, stderr, status = Open3.capture3("curl -XPUT -d #{data} #{host}:#{port}#{path}")
15 |
16 | { stdout: stdout, stderr: stderr, return_code: status.exitstatus }.to_json
17 | end
18 |
--------------------------------------------------------------------------------
/assets/curler/vendor/cache/base64-0.2.0.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cloudfoundry/cf-smoke-tests/31e4df8d29ae3ad9a674b0ef446ca3f5d2ad6698/assets/curler/vendor/cache/base64-0.2.0.gem
--------------------------------------------------------------------------------
/assets/curler/vendor/cache/logger-1.6.1.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cloudfoundry/cf-smoke-tests/31e4df8d29ae3ad9a674b0ef446ca3f5d2ad6698/assets/curler/vendor/cache/logger-1.6.1.gem
--------------------------------------------------------------------------------
/assets/curler/vendor/cache/mustermann-3.0.3.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cloudfoundry/cf-smoke-tests/31e4df8d29ae3ad9a674b0ef446ca3f5d2ad6698/assets/curler/vendor/cache/mustermann-3.0.3.gem
--------------------------------------------------------------------------------
/assets/curler/vendor/cache/rack-3.1.16.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cloudfoundry/cf-smoke-tests/31e4df8d29ae3ad9a674b0ef446ca3f5d2ad6698/assets/curler/vendor/cache/rack-3.1.16.gem
--------------------------------------------------------------------------------
/assets/curler/vendor/cache/rack-protection-4.1.1.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cloudfoundry/cf-smoke-tests/31e4df8d29ae3ad9a674b0ef446ca3f5d2ad6698/assets/curler/vendor/cache/rack-protection-4.1.1.gem
--------------------------------------------------------------------------------
/assets/curler/vendor/cache/rack-session-2.1.1.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cloudfoundry/cf-smoke-tests/31e4df8d29ae3ad9a674b0ef446ca3f5d2ad6698/assets/curler/vendor/cache/rack-session-2.1.1.gem
--------------------------------------------------------------------------------
/assets/curler/vendor/cache/rackup-2.2.1.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cloudfoundry/cf-smoke-tests/31e4df8d29ae3ad9a674b0ef446ca3f5d2ad6698/assets/curler/vendor/cache/rackup-2.2.1.gem
--------------------------------------------------------------------------------
/assets/curler/vendor/cache/ruby2_keywords-0.0.5.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cloudfoundry/cf-smoke-tests/31e4df8d29ae3ad9a674b0ef446ca3f5d2ad6698/assets/curler/vendor/cache/ruby2_keywords-0.0.5.gem
--------------------------------------------------------------------------------
/assets/curler/vendor/cache/sinatra-4.1.1.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cloudfoundry/cf-smoke-tests/31e4df8d29ae3ad9a674b0ef446ca3f5d2ad6698/assets/curler/vendor/cache/sinatra-4.1.1.gem
--------------------------------------------------------------------------------
/assets/curler/vendor/cache/tilt-2.4.0.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cloudfoundry/cf-smoke-tests/31e4df8d29ae3ad9a674b0ef446ca3f5d2ad6698/assets/curler/vendor/cache/tilt-2.4.0.gem
--------------------------------------------------------------------------------
/assets/curler/vendor/cache/webrick-1.9.1.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cloudfoundry/cf-smoke-tests/31e4df8d29ae3ad9a674b0ef446ca3f5d2ad6698/assets/curler/vendor/cache/webrick-1.9.1.gem
--------------------------------------------------------------------------------
/assets/dotnet_simple/NetSimple.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.31101.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetSimple", "NetSimple\NetSimple.csproj", "{ED638DD5-E755-4B7A-940D-5C94AB425686}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {ED638DD5-E755-4B7A-940D-5C94AB425686}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {ED638DD5-E755-4B7A-940D-5C94AB425686}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {ED638DD5-E755-4B7A-940D-5C94AB425686}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {ED638DD5-E755-4B7A-940D-5C94AB425686}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/assets/dotnet_simple/NetSimple/Bootstrapper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using System.Threading;
4 | using Nancy;
5 | using Nancy.Bootstrapper;
6 | using Nancy.TinyIoc;
7 |
8 | namespace NetSimple
9 | {
10 | public class Bootstrapper : DefaultNancyBootstrapper
11 | {
12 | protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
13 | {
14 | new Thread(() =>
15 | {
16 | while (true)
17 | {
18 | var unixTimestamp = (Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
19 | Console.WriteLine("Tick: {0}", unixTimestamp);
20 | Thread.Sleep(TimeSpan.FromSeconds(1));
21 | }
22 | }).Start();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/assets/dotnet_simple/NetSimple/IndexModule.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace NetSimple
4 | {
5 | using Nancy;
6 |
7 | public class IndexModule : NancyModule
8 | {
9 | public IndexModule()
10 | {
11 | Get["/"] = x =>
12 | {
13 |
14 | var response = (Response)string.Format(
15 | @"Healthy
16 | It just needed to be restarted!
17 | My application metadata: {0}
18 | My port: {1}
19 | My instance index: {2}
20 | My custom env variable: {3}",
21 | Environment.GetEnvironmentVariable("VCAP_APPLICATION"),
22 | Environment.GetEnvironmentVariable("PORT"),
23 | Environment.GetEnvironmentVariable("CF_INSTANCE_INDEX"),
24 | Environment.GetEnvironmentVariable("CUSTOM_VAR")
25 | );
26 | response.ContentType = "text/plain";
27 | return response;
28 | };
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/assets/dotnet_simple/NetSimple/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("NetSimple")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("NetSimple")]
13 | [assembly: AssemblyCopyright("Copyright © 2013")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("b5ea1a97-cb45-45e8-9e62-b5d2660cca4f")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/assets/dotnet_simple/NetSimple/Properties/PublishProfiles/Published.pubxml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | FileSystem
9 | Debug
10 | Any CPU
11 |
12 | True
13 | False
14 | Z:\workspace\cf-smoke-tests\assets\dotnet_simple\Published
15 | False
16 | True
17 | True
18 | False
19 | DonotMerge
20 |
21 |
--------------------------------------------------------------------------------
/assets/dotnet_simple/NetSimple/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
29 |
30 |
--------------------------------------------------------------------------------
/assets/dotnet_simple/NetSimple/Web.Release.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
30 |
31 |
--------------------------------------------------------------------------------
/assets/dotnet_simple/NetSimple/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/assets/dotnet_simple/NetSimple/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/assets/dotnet_simple/Published/PrecompiledApp.config:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/dotnet_simple/Published/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/assets/dotnet_simple/Published/bin/Nancy.Hosting.Aspnet.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cloudfoundry/cf-smoke-tests/31e4df8d29ae3ad9a674b0ef446ca3f5d2ad6698/assets/dotnet_simple/Published/bin/Nancy.Hosting.Aspnet.dll
--------------------------------------------------------------------------------
/assets/dotnet_simple/Published/bin/Nancy.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cloudfoundry/cf-smoke-tests/31e4df8d29ae3ad9a674b0ef446ca3f5d2ad6698/assets/dotnet_simple/Published/bin/Nancy.dll
--------------------------------------------------------------------------------
/assets/dotnet_simple/Published/bin/NetSimple.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cloudfoundry/cf-smoke-tests/31e4df8d29ae3ad9a674b0ef446ca3f5d2ad6698/assets/dotnet_simple/Published/bin/NetSimple.dll
--------------------------------------------------------------------------------
/assets/dotnet_simple/Published/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/bin/compile:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | set -e -x
4 |
5 | if ! which go 2>/dev/null; then
6 | echo "Go is not installed."
7 | exit 1
8 | fi
9 |
10 | local_gopath=$PWD/Godeps/_workspace
11 |
12 | mkdir -p $local_gopath/bin
13 |
14 | export GOPATH=$local_gopath:$GOPATH
15 | export PATH=$local_gopath/bin:$PATH
16 |
17 | echo "Compiling smoke"
18 | go test -v -c ./smoke/
19 | rm -f smoke.test
20 | echo "Compiling ./..."
21 | go build -v ./...
22 |
--------------------------------------------------------------------------------
/bin/test:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | # pre-requisites
6 | if ! command -v go >/dev/null 2>&1 ; then
7 | echo "Go is not installed."
8 | exit 1
9 | fi
10 |
11 | # variables
12 | SMOKE_TESTS_ROOT="$(dirname "${BASH_SOURCE[0]}")/.."
13 |
14 | # run smoke tests
15 | pushd "${SMOKE_TESTS_ROOT}" > /dev/null
16 | go run github.com/onsi/ginkgo/v2/ginkgo -r --succinct --poll-progress-after=300s "$@"
17 | popd > /dev/null
18 |
--------------------------------------------------------------------------------
/bin/test.ps1:
--------------------------------------------------------------------------------
1 | $ErrorActionPreference = "Stop";
2 | trap { $host.SetShouldExit(1) }
3 |
4 | where.exe go
5 | if ($LASTEXITCODE -ne 0) {
6 | echo "Go is not installed."
7 | exit 1
8 | }
9 |
10 | if (-not (Test-Path env:GOPATH)) {
11 | echo "GOPATH not specified"
12 | exit 1
13 | }
14 |
15 | $env:PATH="$env:GOPATH\bin;$env:PATH"
16 |
17 | go.exe install github.com\onsi\ginkgo\v2\ginkgo
18 |
19 | ginkgo.exe -r --succinct --poll-progress-after=300s $args
20 | exit $LASTEXITCODE
21 |
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/cloudfoundry/cf-smoke-tests
2 |
3 | go 1.23.0
4 |
5 | require (
6 | github.com/cloudfoundry/cf-test-helpers/v2 v2.12.0
7 | github.com/onsi/ginkgo/v2 v2.23.4
8 | github.com/onsi/gomega v1.37.0
9 | )
10 |
11 | require (
12 | github.com/go-logr/logr v1.4.3 // indirect
13 | github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
14 | github.com/google/go-cmp v0.7.0 // indirect
15 | github.com/google/pprof v0.0.0-20250602020802-c6617b811d0e // indirect
16 | go.uber.org/automaxprocs v1.6.0 // indirect
17 | golang.org/x/net v0.41.0 // indirect
18 | golang.org/x/sys v0.33.0 // indirect
19 | golang.org/x/text v0.26.0 // indirect
20 | golang.org/x/tools v0.34.0 // indirect
21 | gopkg.in/yaml.v3 v3.0.1 // indirect
22 | )
23 |
--------------------------------------------------------------------------------
/smoke/helpers.go:
--------------------------------------------------------------------------------
1 | package smoke
2 |
3 | import (
4 | "time"
5 |
6 | "github.com/cloudfoundry/cf-test-helpers/v2/cf"
7 |
8 | . "github.com/onsi/ginkgo/v2" //nolint:staticcheck
9 | . "github.com/onsi/gomega" //nolint:staticcheck
10 | . "github.com/onsi/gomega/gexec" //nolint:staticcheck
11 | )
12 |
13 | const (
14 | SimpleBinaryAppBitsPath = "../../assets/binary"
15 | SimpleDotnetAppBitsPath = "../../assets/dotnet_simple/Published"
16 | )
17 |
18 | func SkipIfNotWindows(testConfig *Config) {
19 | if !testConfig.EnableWindowsTests {
20 | Skip("Windows tests are disabled")
21 | }
22 | }
23 |
24 | func AppReport(appName string, timeout time.Duration) {
25 | Eventually(cf.Cf("app", appName, "--guid"), timeout).Should(Exit())
26 | Eventually(cf.Cf("logs", appName, "--recent"), timeout).Should(Exit())
27 | }
28 |
29 | func Logs(useLogCache bool, appName string) *Session {
30 | if useLogCache {
31 | return cf.Cf("tail", appName, "--lines", "125")
32 | }
33 | return cf.Cf("logs", "--recent", appName)
34 | }
35 |
--------------------------------------------------------------------------------
/smoke/isolation_segments/init_test.go:
--------------------------------------------------------------------------------
1 | package isolation_segments
2 |
3 | import (
4 | "fmt"
5 | "os"
6 | "path/filepath"
7 | "testing"
8 |
9 | "github.com/cloudfoundry/cf-smoke-tests/smoke"
10 | "github.com/cloudfoundry/cf-test-helpers/v2/workflowhelpers"
11 |
12 | . "github.com/onsi/ginkgo/v2"
13 | . "github.com/onsi/gomega"
14 | )
15 |
16 | func TestSmokeTests(t *testing.T) {
17 | RegisterFailHandler(Fail)
18 |
19 | testConfig = smoke.GetConfig()
20 | testSetup = workflowhelpers.NewSmokeTestSuiteSetup(testConfig)
21 |
22 | SynchronizedBeforeSuite(
23 | func() []byte {
24 | return nil
25 | },
26 | func(data []byte) {
27 | testSetup.Setup()
28 | },
29 | )
30 |
31 | SynchronizedAfterSuite(
32 | func() {
33 | testSetup.Teardown()
34 | },
35 | func() {},
36 | )
37 |
38 | _, rc := GinkgoConfiguration()
39 |
40 | if testConfig.ArtifactsDirectory != "" {
41 | err := os.Setenv("CF_TRACE", traceLogFilePath(testConfig))
42 | Expect(err).NotTo(HaveOccurred())
43 | rc.JUnitReport = jUnitReportFilePath(testConfig)
44 | }
45 |
46 | RunSpecs(t, "CF-Isolation-Segment-Smoke-Tests", rc)
47 | }
48 |
49 | func traceLogFilePath(testConfig *smoke.Config) string {
50 | return filepath.Join(testConfig.ArtifactsDirectory, fmt.Sprintf("CF-TRACE-%s-%d.txt", testConfig.SuiteName, GinkgoParallelProcess()))
51 | }
52 |
53 | func jUnitReportFilePath(testConfig *smoke.Config) string {
54 | return filepath.Join(testConfig.ArtifactsDirectory, fmt.Sprintf("junit-%s-%d.xml", testConfig.SuiteName, GinkgoParallelProcess()))
55 | }
56 |
--------------------------------------------------------------------------------
/smoke/logging/init_test.go:
--------------------------------------------------------------------------------
1 | package logging
2 |
3 | import (
4 | "fmt"
5 | "os"
6 | "path/filepath"
7 | "testing"
8 |
9 | "github.com/cloudfoundry/cf-smoke-tests/smoke"
10 | "github.com/cloudfoundry/cf-test-helpers/v2/workflowhelpers"
11 |
12 | . "github.com/onsi/ginkgo/v2"
13 | . "github.com/onsi/gomega"
14 | )
15 |
16 | func TestSmokeTests(t *testing.T) {
17 | RegisterFailHandler(Fail)
18 |
19 | testConfig := smoke.GetConfig()
20 | testSetup := workflowhelpers.NewSmokeTestSuiteSetup(testConfig)
21 |
22 | SynchronizedBeforeSuite(func() []byte {
23 | return nil
24 | }, func(data []byte) {
25 | testSetup.Setup()
26 | })
27 |
28 | SynchronizedAfterSuite(func() {
29 | testSetup.Teardown()
30 | }, func() {})
31 |
32 | _, rc := GinkgoConfiguration()
33 |
34 | if testConfig.ArtifactsDirectory != "" {
35 | err := os.Setenv("CF_TRACE", traceLogFilePath(testConfig))
36 | Expect(err).ToNot(HaveOccurred())
37 | rc.JUnitReport = jUnitReportFilePath(testConfig)
38 | }
39 |
40 | RunSpecs(t, "CF-Logging-Smoke-Tests", rc)
41 | }
42 |
43 | func traceLogFilePath(testConfig *smoke.Config) string {
44 | return filepath.Join(testConfig.ArtifactsDirectory, fmt.Sprintf("CF-TRACE-%s-%d.txt", testConfig.SuiteName, GinkgoParallelProcess()))
45 | }
46 |
47 | func jUnitReportFilePath(testConfig *smoke.Config) string {
48 | return filepath.Join(testConfig.ArtifactsDirectory, fmt.Sprintf("junit-%s-%d.xml", testConfig.SuiteName, GinkgoParallelProcess()))
49 | }
50 |
--------------------------------------------------------------------------------
/smoke/runtime/init_test.go:
--------------------------------------------------------------------------------
1 | package runtime
2 |
3 | import (
4 | "fmt"
5 | "os"
6 | "path/filepath"
7 | "testing"
8 |
9 | "github.com/cloudfoundry/cf-smoke-tests/smoke"
10 | "github.com/cloudfoundry/cf-test-helpers/v2/workflowhelpers"
11 |
12 | . "github.com/onsi/ginkgo/v2"
13 | . "github.com/onsi/gomega"
14 | )
15 |
16 | func TestSmokeTests(t *testing.T) {
17 | RegisterFailHandler(Fail)
18 |
19 | testConfig := smoke.GetConfig()
20 | testSetup := workflowhelpers.NewSmokeTestSuiteSetup(testConfig)
21 |
22 | SynchronizedBeforeSuite(func() []byte {
23 | return nil
24 | }, func(data []byte) {
25 | testSetup.Setup()
26 | })
27 |
28 | SynchronizedAfterSuite(func() {
29 | testSetup.Teardown()
30 | }, func() {})
31 |
32 | _, rc := GinkgoConfiguration()
33 |
34 | if testConfig.ArtifactsDirectory != "" {
35 | err := os.Setenv("CF_TRACE", traceLogFilePath(testConfig))
36 | Expect(err).ToNot(HaveOccurred())
37 | rc.JUnitReport = jUnitReportFilePath(testConfig)
38 | }
39 |
40 | RunSpecs(t, "CF-Runtime-Smoke-Tests", rc)
41 | }
42 |
43 | func traceLogFilePath(testConfig *smoke.Config) string {
44 | return filepath.Join(testConfig.ArtifactsDirectory, fmt.Sprintf("CF-TRACE-%s-%d.txt", testConfig.SuiteName, GinkgoParallelProcess()))
45 | }
46 |
47 | func jUnitReportFilePath(testConfig *smoke.Config) string {
48 | return filepath.Join(testConfig.ArtifactsDirectory, fmt.Sprintf("junit-%s-%d.xml", testConfig.SuiteName, GinkgoParallelProcess()))
49 | }
50 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudfoundry/cf-test-helpers/v2/NOTICE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2015-Present CloudFoundry.org Foundation, Inc. All Rights Reserved.
2 |
3 | This project contains software that is Copyright (c) 2013-2015 Pivotal Software, Inc.
4 |
5 | This project is licensed to you under the Apache License, Version 2.0 (the "License").
6 | You may not use this project except in compliance with the License.
7 |
8 | This project may include a number of subcomponents with separate copyright notices
9 | and license terms. Your use of these subcomponents is subject to the terms and
10 | conditions of the subcomponent's license, as noted in the LICENSE file.
11 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudfoundry/cf-test-helpers/v2/commandreporter/command_reporter.go:
--------------------------------------------------------------------------------
1 | package commandreporter
2 |
3 | import (
4 | "fmt"
5 | "io"
6 | "os/exec"
7 | "strings"
8 | "time"
9 |
10 | "github.com/onsi/ginkgo/v2"
11 | )
12 |
13 | const timeFormat = "2006-01-02 15:04:05.00 (MST)"
14 |
15 | type CommandReporter struct {
16 | Writer io.Writer
17 | }
18 |
19 | func NewCommandReporter(writers ...io.Writer) *CommandReporter {
20 | var writer io.Writer
21 | switch len(writers) {
22 | case 0:
23 | writer = ginkgo.GinkgoWriter
24 | case 1:
25 | writer = writers[0]
26 | default:
27 | panic("NewCommandReporter should only take one writer")
28 | }
29 |
30 | return &CommandReporter{
31 | Writer: writer,
32 | }
33 | }
34 |
35 | func (r *CommandReporter) Report(startTime time.Time, cmd *exec.Cmd) {
36 | startColor := ""
37 | endColor := ""
38 | _, reporterConfig := ginkgo.GinkgoConfiguration()
39 | if !reporterConfig.NoColor {
40 | startColor = "\x1b[32m"
41 | endColor = "\x1b[0m"
42 | }
43 |
44 | fmt.Fprintf(
45 | r.Writer,
46 | "\n%s[%s]> %s %s\n",
47 | startColor,
48 | startTime.UTC().Format(timeFormat),
49 | strings.Join(cmd.Args, " "),
50 | endColor,
51 | )
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudfoundry/cf-test-helpers/v2/commandstarter/command_starter.go:
--------------------------------------------------------------------------------
1 | package commandstarter
2 |
3 | import (
4 | "io"
5 | "os/exec"
6 | "time"
7 |
8 | "github.com/cloudfoundry/cf-test-helpers/v2/internal"
9 | "github.com/onsi/ginkgo/v2"
10 | "github.com/onsi/gomega/gexec"
11 | )
12 |
13 | type CommandStarter struct {
14 | stdin io.Reader
15 | }
16 |
17 | func NewCommandStarter() *CommandStarter {
18 | return &CommandStarter{}
19 | }
20 |
21 | func NewCommandStarterWithStdin(stdin io.Reader) *CommandStarter {
22 | return &CommandStarter{
23 | stdin: stdin,
24 | }
25 | }
26 |
27 | func (r *CommandStarter) Start(reporter internal.Reporter, executable string, args ...string) (*gexec.Session, error) {
28 | cmd := exec.Command(executable, args...)
29 | cmd.Stdin = r.stdin
30 | reporter.Report(time.Now(), cmd)
31 |
32 | return gexec.Start(cmd, ginkgo.GinkgoWriter, ginkgo.GinkgoWriter)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudfoundry/cf-test-helpers/v2/generator/random_name.go:
--------------------------------------------------------------------------------
1 | package generator
2 |
3 | import (
4 | "crypto/rand"
5 | "fmt"
6 | "strconv"
7 |
8 | . "github.com/onsi/ginkgo/v2"
9 | )
10 |
11 | func randomName() string {
12 | b := make([]byte, 8)
13 | _, err := rand.Read(b)
14 | if err != nil {
15 | panic(err)
16 | }
17 |
18 | return fmt.Sprintf("%x", b)
19 | }
20 |
21 | func PrefixedRandomName(prefixName, resourceName string) string {
22 | return prefixName + "-" + strconv.Itoa(GinkgoParallelProcess()) + "-" + resourceName + "-" + randomName()
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudfoundry/cf-test-helpers/v2/internal/cf.go:
--------------------------------------------------------------------------------
1 | package internal
2 |
3 | import (
4 | "github.com/cloudfoundry/cf-test-helpers/v2/commandreporter"
5 | "github.com/onsi/gomega/gexec"
6 | )
7 |
8 | func Cf(cmdStarter Starter, args ...string) *gexec.Session {
9 | return CfWithCustomReporter(cmdStarter, commandreporter.NewCommandReporter(), args...)
10 | }
11 |
12 | func CfWithCustomReporter(cmdStarter Starter, reporter Reporter, args ...string) *gexec.Session {
13 | request, err := cmdStarter.Start(reporter, "cf", args...)
14 | if err != nil {
15 | panic(err)
16 | }
17 |
18 | return request
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudfoundry/cf-test-helpers/v2/internal/redacting_reporter.go:
--------------------------------------------------------------------------------
1 | package internal
2 |
3 | import (
4 | "fmt"
5 | "os/exec"
6 | "strings"
7 | "time"
8 |
9 | "github.com/onsi/ginkgo/v2"
10 |
11 | "io"
12 | )
13 |
14 | const timeFormat string = "2006-01-02 15:04:05.00 (MST)"
15 |
16 | type RedactingReporter struct {
17 | writer io.Writer
18 | redactor Redactor
19 | }
20 |
21 | var _ Reporter = new(RedactingReporter)
22 |
23 | func NewRedactingReporter(writer io.Writer, redactor Redactor) *RedactingReporter {
24 | return &RedactingReporter{
25 | writer: writer,
26 | redactor: redactor,
27 | }
28 | }
29 |
30 | func (r *RedactingReporter) Report(startTime time.Time, cmd *exec.Cmd) {
31 | startColor := ""
32 | endColor := ""
33 | _, reporterConfig := ginkgo.GinkgoConfiguration()
34 | if !reporterConfig.NoColor {
35 | startColor = "\x1b[32m"
36 | endColor = "\x1b[0m"
37 | }
38 | fmt.Fprintf(
39 | r.writer,
40 | "\n%s[%s]> %s %s\n",
41 | startColor,
42 | startTime.UTC().Format(timeFormat),
43 | r.redactor.Redact(strings.Join(cmd.Args, " ")),
44 | endColor,
45 | )
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudfoundry/cf-test-helpers/v2/internal/redactor.go:
--------------------------------------------------------------------------------
1 | package internal
2 |
3 | import "strings"
4 |
5 | type Redactor interface {
6 | Redact(toRedact string) string
7 | }
8 |
9 | type redactor struct {
10 | redactees []string
11 | }
12 |
13 | func NewRedactor(redactees ...string) Redactor {
14 | return &redactor{
15 | redactees: redactees,
16 | }
17 | }
18 |
19 | func (r *redactor) Redact(toRedact string) string {
20 | for _, r := range r.redactees {
21 | toRedact = strings.Replace(toRedact, r, "[REDACTED]", -1)
22 | }
23 |
24 | return toRedact
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudfoundry/cf-test-helpers/v2/internal/reporter.go:
--------------------------------------------------------------------------------
1 | package internal
2 |
3 | import (
4 | "os/exec"
5 | "time"
6 | )
7 |
8 | type Reporter interface {
9 | Report(time.Time, *exec.Cmd)
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudfoundry/cf-test-helpers/v2/internal/starter.go:
--------------------------------------------------------------------------------
1 | package internal
2 |
3 | import "github.com/onsi/gomega/gexec"
4 |
5 | type Starter interface {
6 | Start(Reporter, string, ...string) (*gexec.Session, error)
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudfoundry/cf-test-helpers/v2/silentcommandstarter/silent_command_starter.go:
--------------------------------------------------------------------------------
1 | package silentcommandstarter
2 |
3 | import (
4 | "os/exec"
5 | "time"
6 |
7 | "github.com/cloudfoundry/cf-test-helpers/v2/internal"
8 | "github.com/onsi/ginkgo/v2"
9 | "github.com/onsi/gomega/gexec"
10 | )
11 |
12 | type CommandStarter struct {
13 | }
14 |
15 | func NewCommandStarter() *CommandStarter {
16 | return &CommandStarter{}
17 | }
18 |
19 | func (r *CommandStarter) Start(reporter internal.Reporter, executable string, args ...string) (*gexec.Session, error) {
20 | cmd := exec.Command(executable, args...)
21 | reporter.Report(time.Now(), cmd)
22 |
23 | _, err := ginkgo.GinkgoWriter.Write([]byte("SILENCING COMMAND OUTPUT"))
24 | if err != nil {
25 | return nil, err
26 | }
27 |
28 | return gexec.Start(cmd, nil, nil)
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudfoundry/cf-test-helpers/v2/workflowhelpers/api.go:
--------------------------------------------------------------------------------
1 | package workflowhelpers
2 |
3 | import (
4 | "time"
5 |
6 | "github.com/cloudfoundry/cf-test-helpers/v2/commandstarter"
7 | "github.com/cloudfoundry/cf-test-helpers/v2/workflowhelpers/internal"
8 | )
9 |
10 | type GenericResource struct {
11 | Metadata struct {
12 | Guid string `json:"guid"`
13 | } `json:"metadata"`
14 | }
15 |
16 | type QueryResponse struct {
17 | Resources []GenericResource `struct:"resources"`
18 | }
19 |
20 | var ApiRequest = func(method, endpoint string, response interface{}, timeout time.Duration, data ...string) {
21 | internal.ApiRequest(commandstarter.NewCommandStarter(), method, endpoint, response, timeout, data...)
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudfoundry/cf-test-helpers/v2/workflowhelpers/as_user.go:
--------------------------------------------------------------------------------
1 | package workflowhelpers
2 |
3 | import (
4 | "time"
5 | )
6 |
7 | type userContext interface {
8 | SetCfHomeDir() (string, string)
9 | UnsetCfHomeDir(string, string)
10 | Login()
11 | Logout()
12 | TargetSpace()
13 | }
14 |
15 | func AsUser(uc userContext, timeout time.Duration, actions func()) {
16 | originalCfHomeDir, currentCfHomeDir := uc.SetCfHomeDir()
17 | uc.Login()
18 | defer func() {
19 | uc.Logout()
20 | uc.UnsetCfHomeDir(originalCfHomeDir, currentCfHomeDir)
21 | }()
22 |
23 | uc.TargetSpace()
24 | actions()
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudfoundry/cf-test-helpers/v2/workflowhelpers/internal/api.go:
--------------------------------------------------------------------------------
1 | package internal
2 |
3 | import (
4 | "encoding/json"
5 | "strings"
6 | "time"
7 |
8 | "github.com/cloudfoundry/cf-test-helpers/v2/commandreporter"
9 | "github.com/cloudfoundry/cf-test-helpers/v2/internal"
10 | . "github.com/onsi/gomega"
11 | . "github.com/onsi/gomega/gexec"
12 | )
13 |
14 | func ApiRequest(cmdStarter internal.Starter, method, endpoint string, response interface{}, timeout time.Duration, data ...string) {
15 | args := []string{
16 | "curl",
17 | endpoint,
18 | "-X", method,
19 | }
20 |
21 | dataArg := strings.Join(data, "")
22 | if len(dataArg) > 0 {
23 | args = append(args, "-d", dataArg)
24 | }
25 |
26 | reporter := commandreporter.NewCommandReporter()
27 | request, err := cmdStarter.Start(reporter, "cf", args...)
28 | ExpectWithOffset(2, err).NotTo(HaveOccurred())
29 |
30 | request.Wait(timeout)
31 | ExpectWithOffset(2, request).To(Exit(0))
32 |
33 | if response != nil {
34 | err := json.Unmarshal(request.Out.Contents(), response)
35 | ExpectWithOffset(2, err).ToNot(HaveOccurred())
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/github.com/go-logr/logr/.golangci.yaml:
--------------------------------------------------------------------------------
1 | version: "2"
2 |
3 | run:
4 | timeout: 1m
5 | tests: true
6 |
7 | linters:
8 | default: none
9 | enable: # please keep this alphabetized
10 | - asasalint
11 | - asciicheck
12 | - copyloopvar
13 | - dupl
14 | - errcheck
15 | - forcetypeassert
16 | - goconst
17 | - gocritic
18 | - govet
19 | - ineffassign
20 | - misspell
21 | - musttag
22 | - revive
23 | - staticcheck
24 | - unused
25 |
26 | issues:
27 | max-issues-per-linter: 0
28 | max-same-issues: 10
29 |
--------------------------------------------------------------------------------
/vendor/github.com/go-logr/logr/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # CHANGELOG
2 |
3 | ## v1.0.0-rc1
4 |
5 | This is the first logged release. Major changes (including breaking changes)
6 | have occurred since earlier tags.
7 |
--------------------------------------------------------------------------------
/vendor/github.com/go-logr/logr/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | Logr is open to pull-requests, provided they fit within the intended scope of
4 | the project. Specifically, this library aims to be VERY small and minimalist,
5 | with no external dependencies.
6 |
7 | ## Compatibility
8 |
9 | This project intends to follow [semantic versioning](http://semver.org) and
10 | is very strict about compatibility. Any proposed changes MUST follow those
11 | rules.
12 |
13 | ## Performance
14 |
15 | As a logging library, logr must be as light-weight as possible. Any proposed
16 | code change must include results of running the [benchmark](./benchmark)
17 | before and after the change.
18 |
--------------------------------------------------------------------------------
/vendor/github.com/go-logr/logr/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | If you have discovered a security vulnerability in this project, please report it
4 | privately. **Do not disclose it as a public issue.** This gives us time to work with you
5 | to fix the issue before public exposure, reducing the chance that the exploit will be
6 | used before a patch is released.
7 |
8 | You may submit the report in the following ways:
9 |
10 | - send an email to go-logr-security@googlegroups.com
11 | - send us a [private vulnerability report](https://github.com/go-logr/logr/security/advisories/new)
12 |
13 | Please provide the following information in your report:
14 |
15 | - A description of the vulnerability and its impact
16 | - How to reproduce the issue
17 |
18 | We ask that you give us 90 days to work on a fix before public exposure.
19 |
--------------------------------------------------------------------------------
/vendor/github.com/go-logr/logr/context.go:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2023 The logr Authors.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 |
17 | package logr
18 |
19 | // contextKey is how we find Loggers in a context.Context. With Go < 1.21,
20 | // the value is always a Logger value. With Go >= 1.21, the value can be a
21 | // Logger value or a slog.Logger pointer.
22 | type contextKey struct{}
23 |
24 | // notFoundError exists to carry an IsNotFound method.
25 | type notFoundError struct{}
26 |
27 | func (notFoundError) Error() string {
28 | return "no logr.Logger was present"
29 | }
30 |
31 | func (notFoundError) IsNotFound() bool {
32 | return true
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/github.com/go-logr/logr/discard.go:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2020 The logr Authors.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 |
17 | package logr
18 |
19 | // Discard returns a Logger that discards all messages logged to it. It can be
20 | // used whenever the caller is not interested in the logs. Logger instances
21 | // produced by this function always compare as equal.
22 | func Discard() Logger {
23 | return New(nil)
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/github.com/go-task/slim-sprig/v3/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 |
3 | root = true
4 |
5 | [*]
6 | insert_final_newline = true
7 | charset = utf-8
8 | trim_trailing_whitespace = true
9 | indent_style = tab
10 | indent_size = 8
11 |
12 | [*.{md,yml,yaml,json}]
13 | indent_style = space
14 | indent_size = 2
15 |
--------------------------------------------------------------------------------
/vendor/github.com/go-task/slim-sprig/v3/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 |
--------------------------------------------------------------------------------
/vendor/github.com/go-task/slim-sprig/v3/.gitignore:
--------------------------------------------------------------------------------
1 | vendor/
2 | /.glide
3 |
--------------------------------------------------------------------------------
/vendor/github.com/go-task/slim-sprig/v3/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (C) 2013-2020 Masterminds
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/github.com/go-task/slim-sprig/v3/Taskfile.yml:
--------------------------------------------------------------------------------
1 | # https://taskfile.dev
2 |
3 | version: '3'
4 |
5 | tasks:
6 | default:
7 | cmds:
8 | - task: test
9 |
10 | test:
11 | cmds:
12 | - go test -v .
13 |
--------------------------------------------------------------------------------
/vendor/github.com/go-task/slim-sprig/v3/crypto.go:
--------------------------------------------------------------------------------
1 | package sprig
2 |
3 | import (
4 | "crypto/sha1"
5 | "crypto/sha256"
6 | "encoding/hex"
7 | "fmt"
8 | "hash/adler32"
9 | )
10 |
11 | func sha256sum(input string) string {
12 | hash := sha256.Sum256([]byte(input))
13 | return hex.EncodeToString(hash[:])
14 | }
15 |
16 | func sha1sum(input string) string {
17 | hash := sha1.Sum([]byte(input))
18 | return hex.EncodeToString(hash[:])
19 | }
20 |
21 | func adler32sum(input string) string {
22 | hash := adler32.Checksum([]byte(input))
23 | return fmt.Sprintf("%d", hash)
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/github.com/go-task/slim-sprig/v3/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | Package sprig provides template functions for Go.
3 |
4 | This package contains a number of utility functions for working with data
5 | inside of Go `html/template` and `text/template` files.
6 |
7 | To add these functions, use the `template.Funcs()` method:
8 |
9 | t := templates.New("foo").Funcs(sprig.FuncMap())
10 |
11 | Note that you should add the function map before you parse any template files.
12 |
13 | In several cases, Sprig reverses the order of arguments from the way they
14 | appear in the standard library. This is to make it easier to pipe
15 | arguments into functions.
16 |
17 | See http://masterminds.github.io/sprig/ for more detailed documentation on each of the available functions.
18 | */
19 | package sprig
20 |
--------------------------------------------------------------------------------
/vendor/github.com/go-task/slim-sprig/v3/network.go:
--------------------------------------------------------------------------------
1 | package sprig
2 |
3 | import (
4 | "math/rand"
5 | "net"
6 | )
7 |
8 | func getHostByName(name string) string {
9 | addrs, _ := net.LookupHost(name)
10 | //TODO: add error handing when release v3 comes out
11 | return addrs[rand.Intn(len(addrs))]
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/github.com/go-task/slim-sprig/v3/reflect.go:
--------------------------------------------------------------------------------
1 | package sprig
2 |
3 | import (
4 | "fmt"
5 | "reflect"
6 | )
7 |
8 | // typeIs returns true if the src is the type named in target.
9 | func typeIs(target string, src interface{}) bool {
10 | return target == typeOf(src)
11 | }
12 |
13 | func typeIsLike(target string, src interface{}) bool {
14 | t := typeOf(src)
15 | return target == t || "*"+target == t
16 | }
17 |
18 | func typeOf(src interface{}) string {
19 | return fmt.Sprintf("%T", src)
20 | }
21 |
22 | func kindIs(target string, src interface{}) bool {
23 | return target == kindOf(src)
24 | }
25 |
26 | func kindOf(src interface{}) string {
27 | return reflect.ValueOf(src).Kind().String()
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/github.com/google/go-cmp/cmp/export.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017, The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cmp
6 |
7 | import (
8 | "reflect"
9 | "unsafe"
10 | )
11 |
12 | // retrieveUnexportedField uses unsafe to forcibly retrieve any field from
13 | // a struct such that the value has read-write permissions.
14 | //
15 | // The parent struct, v, must be addressable, while f must be a StructField
16 | // describing the field to retrieve. If addr is false,
17 | // then the returned value will be shallowed copied to be non-addressable.
18 | func retrieveUnexportedField(v reflect.Value, f reflect.StructField, addr bool) reflect.Value {
19 | ve := reflect.NewAt(f.Type, unsafe.Pointer(uintptr(unsafe.Pointer(v.UnsafeAddr()))+f.Offset)).Elem()
20 | if !addr {
21 | // A field is addressable if and only if the struct is addressable.
22 | // If the original parent value was not addressable, shallow copy the
23 | // value to make it non-addressable to avoid leaking an implementation
24 | // detail of how forcibly exporting a field works.
25 | if ve.Kind() == reflect.Interface && ve.IsNil() {
26 | return reflect.Zero(f.Type)
27 | }
28 | return reflect.ValueOf(ve.Interface()).Convert(f.Type)
29 | }
30 | return ve
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.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 !cmp_debug
6 | // +build !cmp_debug
7 |
8 | package diff
9 |
10 | var debug debugger
11 |
12 | type debugger struct{}
13 |
14 | func (debugger) Begin(_, _ int, f EqualFunc, _, _ *EditScript) EqualFunc {
15 | return f
16 | }
17 | func (debugger) Update() {}
18 | func (debugger) Finish() {}
19 |
--------------------------------------------------------------------------------
/vendor/github.com/google/go-cmp/cmp/internal/flags/flags.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 flags
6 |
7 | // Deterministic controls whether the output of Diff should be deterministic.
8 | // This is only used for testing.
9 | var Deterministic bool
10 |
--------------------------------------------------------------------------------
/vendor/github.com/google/go-cmp/cmp/internal/value/pointer.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 value
6 |
7 | import (
8 | "reflect"
9 | "unsafe"
10 | )
11 |
12 | // Pointer is an opaque typed pointer and is guaranteed to be comparable.
13 | type Pointer struct {
14 | p unsafe.Pointer
15 | t reflect.Type
16 | }
17 |
18 | // PointerOf returns a Pointer from v, which must be a
19 | // reflect.Ptr, reflect.Slice, or reflect.Map.
20 | func PointerOf(v reflect.Value) Pointer {
21 | // The proper representation of a pointer is unsafe.Pointer,
22 | // which is necessary if the GC ever uses a moving collector.
23 | return Pointer{unsafe.Pointer(v.Pointer()), v.Type()}
24 | }
25 |
26 | // IsNil reports whether the pointer is nil.
27 | func (p Pointer) IsNil() bool {
28 | return p.p == nil
29 | }
30 |
31 | // Uintptr returns the pointer as a uintptr.
32 | func (p Pointer) Uintptr() uintptr {
33 | return uintptr(p.p)
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/github.com/google/pprof/AUTHORS:
--------------------------------------------------------------------------------
1 | # This is the official list of pprof authors for copyright purposes.
2 | # This file is distinct from the CONTRIBUTORS files.
3 | # See the latter for an explanation.
4 | # Names should be added to this file as:
5 | # Name or Organization
6 | # The email address is not required for organizations.
7 | Google Inc.
--------------------------------------------------------------------------------
/vendor/github.com/google/pprof/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # People who have agreed to one of the CLAs and can contribute patches.
2 | # The AUTHORS file lists the copyright holders; this file
3 | # lists people. For example, Google employees are listed here
4 | # but not in AUTHORS, because Google holds the copyright.
5 | #
6 | # https://developers.google.com/open-source/cla/individual
7 | # https://developers.google.com/open-source/cla/corporate
8 | #
9 | # Names should be added to this file as:
10 | # Name
11 | Raul Silvera
12 | Tipp Moseley
13 | Hyoun Kyu Cho
14 | Martin Spier
15 | Taco de Wolff
16 | Andrew Hunter
17 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | TODO
3 | tmp/**/*
4 | *.coverprofile
5 | .vscode
6 | .idea/
7 | *.log
8 | *.test
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/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 | - Run `make` or:
10 | - Install ginkgo locally via `go install ./...`
11 | - Make sure all the tests succeed via `ginkgo -r -p`
12 | - Vet your changes via `go vet ./...`
13 | - Update the documentation. Ginkgo uses `godoc` comments and documentation in `docs/index.md`. You can run `bundle && bundle exec jekyll serve` in the `docs` directory to preview your changes.
14 |
15 | Thanks for supporting Ginkgo!
16 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/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/v2/Makefile:
--------------------------------------------------------------------------------
1 | # default task since it's first
2 | .PHONY: all
3 | all: vet test
4 |
5 | .PHONY: test
6 | test:
7 | go run github.com/onsi/ginkgo/v2/ginkgo -r -p -randomize-all -keep-going
8 |
9 | .PHONY: vet
10 | vet:
11 | go vet ./...
12 |
13 | .PHONY: update-deps
14 | update-deps:
15 | go get -u ./...
16 | go mod tidy
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/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
5 | ```bash
6 | LAST_VERSION=$(git tag --sort=version:refname | tail -n1)
7 | CHANGES=$(git log --pretty=format:'- %s [%h]' HEAD...$LAST_VERSION)
8 | echo -e "## NEXT\n\n$CHANGES\n\n### Features\n\n### Fixes\n\n### Maintenance\n\n$(cat CHANGELOG.md)" > CHANGELOG.md
9 | ```
10 | to update the changelog
11 | - Categorize the changes into
12 | - Breaking Changes (requires a major version)
13 | - New Features (minor version)
14 | - Fixes (fix version)
15 | - Maintenance (which in general should not be mentioned in `CHANGELOG.md` as they have no user impact)
16 | 1. Update `VERSION` in `types/version.go`
17 | 1. Commit, push, and release:
18 | ```
19 | git commit -m "vM.m.p"
20 | git push
21 | gh release create "vM.m.p"
22 | git fetch --tags origin master
23 | ```
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/ginkgo/command/abort.go:
--------------------------------------------------------------------------------
1 | package command
2 |
3 | import "fmt"
4 |
5 | type AbortDetails struct {
6 | ExitCode int
7 | Error error
8 | EmitUsage bool
9 | }
10 |
11 | func Abort(details AbortDetails) {
12 | panic(details)
13 | }
14 |
15 | func AbortGracefullyWith(format string, args ...any) {
16 | Abort(AbortDetails{
17 | ExitCode: 0,
18 | Error: fmt.Errorf(format, args...),
19 | EmitUsage: false,
20 | })
21 | }
22 |
23 | func AbortWith(format string, args ...any) {
24 | Abort(AbortDetails{
25 | ExitCode: 1,
26 | Error: fmt.Errorf(format, args...),
27 | EmitUsage: false,
28 | })
29 | }
30 |
31 | func AbortWithUsage(format string, args ...any) {
32 | Abort(AbortDetails{
33 | ExitCode: 1,
34 | Error: fmt.Errorf(format, args...),
35 | EmitUsage: true,
36 | })
37 | }
38 |
39 | func AbortIfError(preamble string, err error) {
40 | if err != nil {
41 | Abort(AbortDetails{
42 | ExitCode: 1,
43 | Error: fmt.Errorf("%s\n%s", preamble, err.Error()),
44 | EmitUsage: false,
45 | })
46 | }
47 | }
48 |
49 | func AbortIfErrors(preamble string, errors []error) {
50 | if len(errors) > 0 {
51 | out := ""
52 | for _, err := range errors {
53 | out += err.Error()
54 | }
55 | Abort(AbortDetails{
56 | ExitCode: 1,
57 | Error: fmt.Errorf("%s\n%s", preamble, out),
58 | EmitUsage: false,
59 | })
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/boostrap_templates.go:
--------------------------------------------------------------------------------
1 | package generators
2 |
3 | var bootstrapText = `package {{.Package}}
4 |
5 | import (
6 | "testing"
7 |
8 | {{.GinkgoImport}}
9 | {{.GomegaImport}}
10 | )
11 |
12 | func Test{{.FormattedName}}(t *testing.T) {
13 | {{.GomegaPackage}}RegisterFailHandler({{.GinkgoPackage}}Fail)
14 | {{.GinkgoPackage}}RunSpecs(t, "{{.FormattedName}} Suite")
15 | }
16 | `
17 |
18 | var agoutiBootstrapText = `package {{.Package}}
19 |
20 | import (
21 | "testing"
22 |
23 | {{.GinkgoImport}}
24 | {{.GomegaImport}}
25 | "github.com/sclevine/agouti"
26 | )
27 |
28 | func Test{{.FormattedName}}(t *testing.T) {
29 | {{.GomegaPackage}}RegisterFailHandler({{.GinkgoPackage}}Fail)
30 | {{.GinkgoPackage}}RunSpecs(t, "{{.FormattedName}} Suite")
31 | }
32 |
33 | var agoutiDriver *agouti.WebDriver
34 |
35 | var _ = {{.GinkgoPackage}}BeforeSuite(func() {
36 | // Choose a WebDriver:
37 |
38 | agoutiDriver = agouti.PhantomJS()
39 | // agoutiDriver = agouti.Selenium()
40 | // agoutiDriver = agouti.ChromeDriver()
41 |
42 | {{.GomegaPackage}}Expect(agoutiDriver.Start()).To({{.GomegaPackage}}Succeed())
43 | })
44 |
45 | var _ = {{.GinkgoPackage}}AfterSuite(func() {
46 | {{.GomegaPackage}}Expect(agoutiDriver.Stop()).To({{.GomegaPackage}}Succeed())
47 | })
48 | `
49 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generate_templates.go:
--------------------------------------------------------------------------------
1 | package generators
2 |
3 | var specText = `{{.BuildTags}}
4 | package {{.Package}}
5 |
6 | import (
7 | {{.GinkgoImport}}
8 | {{.GomegaImport}}
9 |
10 | {{if .ImportPackage}}"{{.PackageImportPath}}"{{end}}
11 | )
12 |
13 | var _ = {{.GinkgoPackage}}Describe("{{.Subject}}", func() {
14 |
15 | })
16 | `
17 |
18 | var agoutiSpecText = `{{.BuildTags}}
19 | package {{.Package}}
20 |
21 | import (
22 | {{.GinkgoImport}}
23 | {{.GomegaImport}}
24 | "github.com/sclevine/agouti"
25 | . "github.com/sclevine/agouti/matchers"
26 |
27 | {{if .ImportPackage}}"{{.PackageImportPath}}"{{end}}
28 | )
29 |
30 | var _ = {{.GinkgoPackage}}Describe("{{.Subject}}", func() {
31 | var page *agouti.Page
32 |
33 | {{.GinkgoPackage}}BeforeEach(func() {
34 | var err error
35 | page, err = agoutiDriver.NewPage()
36 | {{.GomegaPackage}}Expect(err).NotTo({{.GomegaPackage}}HaveOccurred())
37 | })
38 |
39 | {{.GinkgoPackage}}AfterEach(func() {
40 | {{.GomegaPackage}}Expect(page.Destroy()).To({{.GomegaPackage}}Succeed())
41 | })
42 | })
43 | `
44 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/delta.go:
--------------------------------------------------------------------------------
1 | package watch
2 |
3 | import "sort"
4 |
5 | type Delta struct {
6 | ModifiedPackages []string
7 |
8 | NewSuites []*Suite
9 | RemovedSuites []*Suite
10 | modifiedSuites []*Suite
11 | }
12 |
13 | type DescendingByDelta []*Suite
14 |
15 | func (a DescendingByDelta) Len() int { return len(a) }
16 | func (a DescendingByDelta) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
17 | func (a DescendingByDelta) Less(i, j int) bool { return a[i].Delta() > a[j].Delta() }
18 |
19 | func (d Delta) ModifiedSuites() []*Suite {
20 | sort.Sort(DescendingByDelta(d.modifiedSuites))
21 | return d.modifiedSuites
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/ginkgo_cli_dependencies.go:
--------------------------------------------------------------------------------
1 | //go:build ginkgoclidependencies
2 | // +build ginkgoclidependencies
3 |
4 | package ginkgo
5 |
6 | import (
7 | _ "github.com/onsi/ginkgo/v2/ginkgo"
8 | )
9 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/internal/counter.go:
--------------------------------------------------------------------------------
1 | package internal
2 |
3 | func MakeIncrementingIndexCounter() func() (int, error) {
4 | idx := -1
5 | return func() (int, error) {
6 | idx += 1
7 | return idx, nil
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/internal/global/init.go:
--------------------------------------------------------------------------------
1 | package global
2 |
3 | import (
4 | "github.com/onsi/ginkgo/v2/internal"
5 | )
6 |
7 | var Suite *internal.Suite
8 | var Failer *internal.Failer
9 | var backupSuite *internal.Suite
10 |
11 | func init() {
12 | InitializeGlobals()
13 | }
14 |
15 | func InitializeGlobals() {
16 | Failer = internal.NewFailer()
17 | Suite = internal.NewSuite()
18 | }
19 |
20 | func PushClone() error {
21 | var err error
22 | backupSuite, err = Suite.Clone()
23 | return err
24 | }
25 |
26 | func PopClone() {
27 | Suite = backupSuite
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/sigquit_swallower_unix.go:
--------------------------------------------------------------------------------
1 | //go:build freebsd || openbsd || netbsd || dragonfly || darwin || linux || solaris
2 | // +build freebsd openbsd netbsd dragonfly darwin linux solaris
3 |
4 | package interrupt_handler
5 |
6 | import (
7 | "os"
8 | "os/signal"
9 | "syscall"
10 | )
11 |
12 | func SwallowSigQuit() {
13 | c := make(chan os.Signal, 1024)
14 | signal.Notify(c, syscall.SIGQUIT)
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/sigquit_swallower_windows.go:
--------------------------------------------------------------------------------
1 | //go:build windows
2 | // +build windows
3 |
4 | package interrupt_handler
5 |
6 | func SwallowSigQuit() {
7 | //noop
8 | }
9 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_wasm.go:
--------------------------------------------------------------------------------
1 | //go:build wasm
2 |
3 | package internal
4 |
5 | func NewOutputInterceptor() OutputInterceptor {
6 | return &NoopOutputInterceptor{}
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_win.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package internal
4 |
5 | func NewOutputInterceptor() OutputInterceptor {
6 | return NewOSGlobalReassigningOutputInterceptor()
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_bsd.go:
--------------------------------------------------------------------------------
1 | //go:build freebsd || openbsd || netbsd || darwin || dragonfly
2 | // +build freebsd openbsd netbsd darwin dragonfly
3 |
4 | package internal
5 |
6 | import (
7 | "os"
8 | "syscall"
9 | )
10 |
11 | var PROGRESS_SIGNALS = []os.Signal{syscall.SIGINFO, syscall.SIGUSR1}
12 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_unix.go:
--------------------------------------------------------------------------------
1 | //go:build linux || solaris
2 | // +build linux solaris
3 |
4 | package internal
5 |
6 | import (
7 | "os"
8 | "syscall"
9 | )
10 |
11 | var PROGRESS_SIGNALS = []os.Signal{syscall.SIGUSR1}
12 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_wasm.go:
--------------------------------------------------------------------------------
1 | //go:build wasm
2 |
3 | package internal
4 |
5 | import (
6 | "os"
7 | "syscall"
8 | )
9 |
10 | var PROGRESS_SIGNALS = []os.Signal{syscall.SIGUSR1}
11 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_win.go:
--------------------------------------------------------------------------------
1 | //go:build windows
2 | // +build windows
3 |
4 | package internal
5 |
6 | import "os"
7 |
8 | var PROGRESS_SIGNALS = []os.Signal{}
9 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/internal/report_entry.go:
--------------------------------------------------------------------------------
1 | package internal
2 |
3 | import (
4 | "time"
5 |
6 | "github.com/onsi/ginkgo/v2/types"
7 | )
8 |
9 | type ReportEntry = types.ReportEntry
10 |
11 | func NewReportEntry(name string, cl types.CodeLocation, args ...any) (ReportEntry, error) {
12 | out := ReportEntry{
13 | Visibility: types.ReportEntryVisibilityAlways,
14 | Name: name,
15 | Location: cl,
16 | Time: time.Now(),
17 | }
18 | var didSetValue = false
19 | for _, arg := range args {
20 | switch x := arg.(type) {
21 | case types.ReportEntryVisibility:
22 | out.Visibility = x
23 | case types.CodeLocation:
24 | out.Location = x
25 | case Offset:
26 | out.Location = types.NewCodeLocation(2 + int(x))
27 | case time.Time:
28 | out.Time = x
29 | default:
30 | if didSetValue {
31 | return ReportEntry{}, types.GinkgoErrors.TooManyReportEntryValues(out.Location, arg)
32 | }
33 | out.Value = types.WrapEntryValue(arg)
34 | didSetValue = true
35 | }
36 | }
37 |
38 | return out, nil
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/reporters/reporter.go:
--------------------------------------------------------------------------------
1 | package reporters
2 |
3 | import (
4 | "github.com/onsi/ginkgo/v2/types"
5 | )
6 |
7 | type Reporter interface {
8 | SuiteWillBegin(report types.Report)
9 | WillRun(report types.SpecReport)
10 | DidRun(report types.SpecReport)
11 | SuiteDidEnd(report types.Report)
12 |
13 | //Timeline emission
14 | EmitFailure(state types.SpecState, failure types.Failure)
15 | EmitProgressReport(progressReport types.ProgressReport)
16 | EmitReportEntry(entry types.ReportEntry)
17 | EmitSpecEvent(event types.SpecEvent)
18 | }
19 |
20 | type NoopReporter struct{}
21 |
22 | func (n NoopReporter) SuiteWillBegin(report types.Report) {}
23 | func (n NoopReporter) WillRun(report types.SpecReport) {}
24 | func (n NoopReporter) DidRun(report types.SpecReport) {}
25 | func (n NoopReporter) SuiteDidEnd(report types.Report) {}
26 | func (n NoopReporter) EmitFailure(state types.SpecState, failure types.Failure) {}
27 | func (n NoopReporter) EmitProgressReport(progressReport types.ProgressReport) {}
28 | func (n NoopReporter) EmitReportEntry(entry types.ReportEntry) {}
29 | func (n NoopReporter) EmitSpecEvent(event types.SpecEvent) {}
30 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/types/enum_support.go:
--------------------------------------------------------------------------------
1 | package types
2 |
3 | import "encoding/json"
4 |
5 | type EnumSupport struct {
6 | toString map[uint]string
7 | toEnum map[string]uint
8 | maxEnum uint
9 | }
10 |
11 | func NewEnumSupport(toString map[uint]string) EnumSupport {
12 | toEnum, maxEnum := map[string]uint{}, uint(0)
13 | for k, v := range toString {
14 | toEnum[v] = k
15 | if maxEnum < k {
16 | maxEnum = k
17 | }
18 | }
19 | return EnumSupport{toString: toString, toEnum: toEnum, maxEnum: maxEnum}
20 | }
21 |
22 | func (es EnumSupport) String(e uint) string {
23 | if e > es.maxEnum {
24 | return es.toString[0]
25 | }
26 | return es.toString[e]
27 | }
28 |
29 | func (es EnumSupport) UnmarshJSON(b []byte) (uint, error) {
30 | var dec string
31 | if err := json.Unmarshal(b, &dec); err != nil {
32 | return 0, err
33 | }
34 | out := es.toEnum[dec] // if we miss we get 0 which is what we want anyway
35 | return out, nil
36 | }
37 |
38 | func (es EnumSupport) MarshJSON(e uint) ([]byte, error) {
39 | if e == 0 || e > es.maxEnum {
40 | return json.Marshal(nil)
41 | }
42 | return json.Marshal(es.toString[e])
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/ginkgo/v2/types/version.go:
--------------------------------------------------------------------------------
1 | package types
2 |
3 | const VERSION = "2.23.4"
4 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/gomega/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | *.test
3 | .
4 | .idea
5 | gomega.iml
6 | TODO
7 | .vscode
--------------------------------------------------------------------------------
/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 | 
2 |
3 | [](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
5 | ```bash
6 | LAST_VERSION=$(git tag --sort=version:refname | tail -n1)
7 | CHANGES=$(git log --pretty=format:'- %s [%h]' HEAD...$LAST_VERSION)
8 | echo -e "## NEXT\n\n$CHANGES\n\n### Features\n\n### Fixes\n\n### Maintenance\n\n$(cat CHANGELOG.md)" > CHANGELOG.md
9 | ```
10 | to update the changelog
11 | - Categorize the changes into
12 | - Breaking Changes (requires a major version)
13 | - New Features (minor version)
14 | - Fixes (fix version)
15 | - Maintenance (which in general should not be mentioned in `CHANGELOG.md` as they have no user impact)
16 | 1. Update GOMEGA_VERSION in `gomega_dsl.go`
17 | 1. Commit, push, and release:
18 | ```
19 | git commit -m "vM.m.p"
20 | git push
21 | gh release create "vM.m.p"
22 | git fetch --tags origin master
23 | ```
--------------------------------------------------------------------------------
/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/internal/vetoptdesc.go:
--------------------------------------------------------------------------------
1 | package internal
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/onsi/gomega/types"
7 | )
8 |
9 | // vetOptionalDescription vets the optional description args: if it finds any
10 | // Gomega matcher at the beginning it panics. This allows for rendering Gomega
11 | // matchers as part of an optional Description, as long as they're not in the
12 | // first slot.
13 | func vetOptionalDescription(assertion string, optionalDescription ...any) {
14 | if len(optionalDescription) == 0 {
15 | return
16 | }
17 | if _, isGomegaMatcher := optionalDescription[0].(types.GomegaMatcher); isGomegaMatcher {
18 | panic(fmt.Sprintf("%s has a GomegaMatcher as the first element of optionalDescription.\n\t"+
19 | "Do you mean to use And/Or/SatisfyAll/SatisfyAny to combine multiple matchers?",
20 | assertion))
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/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 any
14 | }
15 |
16 | func (matcher *AssignableToTypeOfMatcher) Match(actual any) (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 any) 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 any) 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 any
28 | err error
29 | }
30 |
31 | func (matcher *BeADirectoryMatcher) Match(actual any) (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 any) (message string) {
51 | return format.Message(actual, fmt.Sprintf("to be a directory: %s", matcher.err))
52 | }
53 |
54 | func (matcher *BeADirectoryMatcher) NegatedFailureMessage(actual any) (message string) {
55 | return format.Message(actual, "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 any
28 | err error
29 | }
30 |
31 | func (matcher *BeARegularFileMatcher) Match(actual any) (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 any) (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 any) (message string) {
55 | return format.Message(actual, "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 any
14 | }
15 |
16 | func (matcher *BeAnExistingFileMatcher) Match(actual any) (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 any) (message string) {
35 | return format.Message(actual, "to exist")
36 | }
37 |
38 | func (matcher *BeAnExistingFileMatcher) NegatedFailureMessage(actual any) (message string) {
39 | return format.Message(actual, "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 any) (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 any) (message string) {
43 | return format.Message(actual, "to be closed")
44 | }
45 |
46 | func (matcher *BeClosedMatcher) NegatedFailureMessage(actual any) (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 []any
14 | }
15 |
16 | func (matcher *BeElementOfMatcher) Match(actual any) (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 any) (message string) {
38 | return format.Message(actual, "to be an element of", presentable(matcher.Elements))
39 | }
40 |
41 | func (matcher *BeElementOfMatcher) NegatedFailureMessage(actual any) (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 | "reflect"
8 |
9 | "github.com/onsi/gomega/format"
10 | "github.com/onsi/gomega/matchers/internal/miter"
11 | )
12 |
13 | type BeEmptyMatcher struct {
14 | }
15 |
16 | func (matcher *BeEmptyMatcher) Match(actual any) (success bool, err error) {
17 | // short-circuit the iterator case, as we only need to see the first
18 | // element, if any.
19 | if miter.IsIter(actual) {
20 | var length int
21 | if miter.IsSeq2(actual) {
22 | miter.IterateKV(actual, func(k, v reflect.Value) bool { length++; return false })
23 | } else {
24 | miter.IterateV(actual, func(v reflect.Value) bool { length++; return false })
25 | }
26 | return length == 0, nil
27 | }
28 |
29 | length, ok := lengthOf(actual)
30 | if !ok {
31 | return false, fmt.Errorf("BeEmpty matcher expects a string/array/map/channel/slice/iterator. Got:\n%s", format.Object(actual, 1))
32 | }
33 |
34 | return length == 0, nil
35 | }
36 |
37 | func (matcher *BeEmptyMatcher) FailureMessage(actual any) (message string) {
38 | return format.Message(actual, "to be empty")
39 | }
40 |
41 | func (matcher *BeEmptyMatcher) NegatedFailureMessage(actual any) (message string) {
42 | return format.Message(actual, "not to be empty")
43 | }
44 |
--------------------------------------------------------------------------------
/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 any
14 | }
15 |
16 | func (matcher *BeEquivalentToMatcher) Match(actual any) (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 any) (message string) {
31 | return format.Message(actual, "to be equivalent to", matcher.Expected)
32 | }
33 |
34 | func (matcher *BeEquivalentToMatcher) NegatedFailureMessage(actual any) (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 | Reason string
13 | }
14 |
15 | func (matcher *BeFalseMatcher) Match(actual any) (success bool, err error) {
16 | if !isBool(actual) {
17 | return false, fmt.Errorf("Expected a boolean. Got:\n%s", format.Object(actual, 1))
18 | }
19 |
20 | return actual == false, nil
21 | }
22 |
23 | func (matcher *BeFalseMatcher) FailureMessage(actual any) (message string) {
24 | if matcher.Reason == "" {
25 | return format.Message(actual, "to be false")
26 | } else {
27 | return matcher.Reason
28 | }
29 | }
30 |
31 | func (matcher *BeFalseMatcher) NegatedFailureMessage(actual any) (message string) {
32 | if matcher.Reason == "" {
33 | return format.Message(actual, "not to be false")
34 | } else {
35 | return fmt.Sprintf(`Expected not false but got false\nNegation of "%s" failed`, matcher.Reason)
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/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 any
14 | }
15 |
16 | func (matcher *BeIdenticalToMatcher) Match(actual any) (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 any) string {
34 | return format.Message(actual, "to be identical to", matcher.Expected)
35 | }
36 |
37 | func (matcher *BeIdenticalToMatcher) NegatedFailureMessage(actual any) string {
38 | return format.Message(actual, "not to be identical to", matcher.Expected)
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/github.com/onsi/gomega/matchers/be_key_of_matcher.go:
--------------------------------------------------------------------------------
1 | package matchers
2 |
3 | import (
4 | "fmt"
5 | "reflect"
6 |
7 | "github.com/onsi/gomega/format"
8 | )
9 |
10 | type BeKeyOfMatcher struct {
11 | Map any
12 | }
13 |
14 | func (matcher *BeKeyOfMatcher) Match(actual any) (success bool, err error) {
15 | if !isMap(matcher.Map) {
16 | return false, fmt.Errorf("BeKeyOf matcher needs expected to be a map type")
17 | }
18 |
19 | if reflect.TypeOf(actual) == nil {
20 | return false, fmt.Errorf("BeKeyOf matcher expects actual to be typed")
21 | }
22 |
23 | var lastError error
24 | for _, key := range reflect.ValueOf(matcher.Map).MapKeys() {
25 | matcher := &EqualMatcher{Expected: key.Interface()}
26 | success, err := matcher.Match(actual)
27 | if err != nil {
28 | lastError = err
29 | continue
30 | }
31 | if success {
32 | return true, nil
33 | }
34 | }
35 |
36 | return false, lastError
37 | }
38 |
39 | func (matcher *BeKeyOfMatcher) FailureMessage(actual any) (message string) {
40 | return format.Message(actual, "to be a key of", presentable(valuesOf(matcher.Map)))
41 | }
42 |
43 | func (matcher *BeKeyOfMatcher) NegatedFailureMessage(actual any) (message string) {
44 | return format.Message(actual, "not to be a key of", presentable(valuesOf(matcher.Map)))
45 | }
46 |
--------------------------------------------------------------------------------
/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 any) (success bool, err error) {
11 | return isNil(actual), nil
12 | }
13 |
14 | func (matcher *BeNilMatcher) FailureMessage(actual any) (message string) {
15 | return format.Message(actual, "to be nil")
16 | }
17 |
18 | func (matcher *BeNilMatcher) NegatedFailureMessage(actual any) (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 | Reason string
13 | }
14 |
15 | func (matcher *BeTrueMatcher) Match(actual any) (success bool, err error) {
16 | if !isBool(actual) {
17 | return false, fmt.Errorf("Expected a boolean. Got:\n%s", format.Object(actual, 1))
18 | }
19 |
20 | return actual.(bool), nil
21 | }
22 |
23 | func (matcher *BeTrueMatcher) FailureMessage(actual any) (message string) {
24 | if matcher.Reason == "" {
25 | return format.Message(actual, "to be true")
26 | } else {
27 | return matcher.Reason
28 | }
29 | }
30 |
31 | func (matcher *BeTrueMatcher) NegatedFailureMessage(actual any) (message string) {
32 | if matcher.Reason == "" {
33 | return format.Message(actual, "not to be true")
34 | } else {
35 | return fmt.Sprintf(`Expected not true but got true\nNegation of "%s" failed`, matcher.Reason)
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/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 any) (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 any) (message string) {
23 | return format.Message(actual, "to be zero-valued")
24 | }
25 |
26 | func (matcher *BeZeroMatcher) NegatedFailureMessage(actual any) (message string) {
27 | return format.Message(actual, "not to be zero-valued")
28 | }
29 |
--------------------------------------------------------------------------------
/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 []any
15 | }
16 |
17 | func (matcher *ContainSubstringMatcher) Match(actual any) (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 any) (message string) {
35 | return format.Message(actual, "to contain substring", matcher.stringToMatch())
36 | }
37 |
38 | func (matcher *ContainSubstringMatcher) NegatedFailureMessage(actual any) (message string) {
39 | return format.Message(actual, "not to contain substring", matcher.stringToMatch())
40 | }
41 |
--------------------------------------------------------------------------------
/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 any) (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 any) (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 any) (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_existing_field_matcher.go:
--------------------------------------------------------------------------------
1 | package matchers
2 |
3 | import (
4 | "errors"
5 | "fmt"
6 |
7 | "github.com/onsi/gomega/format"
8 | )
9 |
10 | type HaveExistingFieldMatcher struct {
11 | Field string
12 | }
13 |
14 | func (matcher *HaveExistingFieldMatcher) Match(actual any) (success bool, err error) {
15 | // we don't care about the field's actual value, just about any error in
16 | // trying to find the field (or method).
17 | _, err = extractField(actual, matcher.Field, "HaveExistingField")
18 | if err == nil {
19 | return true, nil
20 | }
21 | var mferr missingFieldError
22 | if errors.As(err, &mferr) {
23 | // missing field errors aren't errors in this context, but instead
24 | // unsuccessful matches.
25 | return false, nil
26 | }
27 | return false, err
28 | }
29 |
30 | func (matcher *HaveExistingFieldMatcher) FailureMessage(actual any) (message string) {
31 | return fmt.Sprintf("Expected\n%s\nto have field '%s'", format.Object(actual, 1), matcher.Field)
32 | }
33 |
34 | func (matcher *HaveExistingFieldMatcher) NegatedFailureMessage(actual any) (message string) {
35 | return fmt.Sprintf("Expected\n%s\nnot to have field '%s'", format.Object(actual, 1), matcher.Field)
36 | }
37 |
--------------------------------------------------------------------------------
/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 any) (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/iterator. Got:\n%s", format.Object(actual, 1))
17 | }
18 |
19 | return length == matcher.Count, nil
20 | }
21 |
22 | func (matcher *HaveLenMatcher) FailureMessage(actual any) (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 any) (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 any) (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 any) (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 any) (message string) {
34 | return fmt.Sprintf("Unexpected error:\n%s\n%s", format.Object(actual, 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 []any
12 | }
13 |
14 | func (matcher *HavePrefixMatcher) Match(actual any) (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 any) (message string) {
31 | return format.Message(actual, "to have prefix", matcher.prefix())
32 | }
33 |
34 | func (matcher *HavePrefixMatcher) NegatedFailureMessage(actual any) (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 []any
12 | }
13 |
14 | func (matcher *HaveSuffixMatcher) Match(actual any) (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 any) (message string) {
31 | return format.Message(actual, "to have suffix", matcher.suffix())
32 | }
33 |
34 | func (matcher *HaveSuffixMatcher) NegatedFailureMessage(actual any) (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 []any
13 | }
14 |
15 | func (matcher *MatchRegexpMatcher) Match(actual any) (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 any) (message string) {
30 | return format.Message(actual, "to match regular expression", matcher.regexp())
31 | }
32 |
33 | func (matcher *MatchRegexpMatcher) NegatedFailureMessage(actual any) (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 any) (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 any) (message string) {
20 | return m.Matcher.NegatedFailureMessage(actual) // works beautifully
21 | }
22 |
23 | func (m *NotMatcher) NegatedFailureMessage(actual any) (message string) {
24 | return m.Matcher.FailureMessage(actual) // works beautifully
25 | }
26 |
27 | func (m *NotMatcher) MatchMayChangeInTheFuture(actual any) 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 | "errors"
5 | "fmt"
6 |
7 | "github.com/onsi/gomega/format"
8 | )
9 |
10 | type formattedGomegaError interface {
11 | FormattedGomegaError() string
12 | }
13 |
14 | type SucceedMatcher struct {
15 | }
16 |
17 | func (matcher *SucceedMatcher) Match(actual any) (success bool, err error) {
18 | // is purely nil?
19 | if actual == nil {
20 | return true, nil
21 | }
22 |
23 | // must be an 'error' type
24 | if !isError(actual) {
25 | return false, fmt.Errorf("Expected an error-type. Got:\n%s", format.Object(actual, 1))
26 | }
27 |
28 | // must be nil (or a pointer to a nil)
29 | return isNil(actual), nil
30 | }
31 |
32 | func (matcher *SucceedMatcher) FailureMessage(actual any) (message string) {
33 | var fgErr formattedGomegaError
34 | if errors.As(actual.(error), &fgErr) {
35 | return fgErr.FormattedGomegaError()
36 | }
37 | return fmt.Sprintf("Expected success, but got an error:\n%s", format.Object(actual, 1))
38 | }
39 |
40 | func (matcher *SucceedMatcher) NegatedFailureMessage(actual any) (message string) {
41 | return "Expected failure, but got no error."
42 | }
43 |
--------------------------------------------------------------------------------
/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 any
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/go.uber.org/automaxprocs/.codecov.yml:
--------------------------------------------------------------------------------
1 | coverage:
2 | range: 80..100
3 | round: down
4 | precision: 2
5 |
6 | status:
7 | project: # measuring the overall project coverage
8 | default: # context, you can create multiple ones with custom titles
9 | enabled: yes # must be yes|true to enable this status
10 | target: 90% # specify the target coverage for each commit status
11 | # option: "auto" (must increase from parent commit or pull request base)
12 | # option: "X%" a static target percentage to hit
13 | if_not_found: success # if parent is not found report status as success, error, or failure
14 | if_ci_failed: error # if ci fails report status as success, error, or failure
15 |
--------------------------------------------------------------------------------
/vendor/go.uber.org/automaxprocs/.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 | vendor
10 |
11 | # Architecture specific extensions/prefixes
12 | *.[568vq]
13 | [568vq].out
14 |
15 | *.cgo1.go
16 | *.cgo2.c
17 | _cgo_defun.c
18 | _cgo_gotypes.go
19 | _cgo_export.*
20 |
21 | _testmain.go
22 |
23 | *.exe
24 | *.test
25 | *.prof
26 | *.pprof
27 | *.out
28 | *.log
29 | coverage.txt
30 |
31 | /bin
32 | cover.out
33 | cover.html
34 |
--------------------------------------------------------------------------------
/vendor/go.uber.org/automaxprocs/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | ## v1.6.0 (2024-07-24)
4 |
5 | - Add RoundQuotaFunc option that allows configuration of rounding
6 | behavior for floating point CPU quota.
7 |
8 | ## v1.5.3 (2023-07-19)
9 |
10 | - Fix mountinfo parsing when super options have fields with spaces.
11 | - Fix division by zero while parsing cgroups.
12 |
13 | ## v1.5.2 (2023-03-16)
14 |
15 | - Support child control cgroups
16 | - Fix file descriptor leak
17 | - Update dependencies
18 |
19 | ## v1.5.1 (2022-04-06)
20 |
21 | - Fix cgroups v2 mountpoint detection.
22 |
23 | ## v1.5.0 (2022-04-05)
24 |
25 | - Add support for cgroups v2.
26 |
27 | Thanks to @emadolsky for their contribution to this release.
28 |
29 | ## v1.4.0 (2021-02-01)
30 |
31 | - Support colons in cgroup names.
32 | - Remove linters from runtime dependencies.
33 |
34 | ## v1.3.0 (2020-01-23)
35 |
36 | - Migrate to Go modules.
37 |
38 | ## v1.2.0 (2018-02-22)
39 |
40 | - Fixed quota clamping to always round down rather than up; Rather than
41 | guaranteeing constant throttling at saturation, instead assume that the
42 | fractional CPU was added as a hedge for factors outside of Go's scheduler.
43 |
44 | ## v1.1.0 (2017-11-10)
45 |
46 | - Log the new value of `GOMAXPROCS` rather than the current value.
47 | - Make logs more explicit about whether `GOMAXPROCS` was modified or not.
48 | - Allow customization of the minimum `GOMAXPROCS`, and modify default from 2 to 1.
49 |
50 | ## v1.0.0 (2017-08-09)
51 |
52 | - Initial release.
53 |
--------------------------------------------------------------------------------
/vendor/go.uber.org/automaxprocs/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2017 Uber Technologies, Inc.
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
--------------------------------------------------------------------------------
/vendor/go.uber.org/automaxprocs/Makefile:
--------------------------------------------------------------------------------
1 | export GOBIN ?= $(shell pwd)/bin
2 |
3 | GO_FILES := $(shell \
4 | find . '(' -path '*/.*' -o -path './vendor' ')' -prune \
5 | -o -name '*.go' -print | cut -b3-)
6 |
7 | GOLINT = $(GOBIN)/golint
8 | STATICCHECK = $(GOBIN)/staticcheck
9 |
10 | .PHONY: build
11 | build:
12 | go build ./...
13 |
14 | .PHONY: install
15 | install:
16 | go mod download
17 |
18 | .PHONY: test
19 | test:
20 | go test -race ./...
21 |
22 | .PHONY: cover
23 | cover:
24 | go test -coverprofile=cover.out -covermode=atomic -coverpkg=./... ./...
25 | go tool cover -html=cover.out -o cover.html
26 |
27 | $(GOLINT): tools/go.mod
28 | cd tools && go install golang.org/x/lint/golint
29 |
30 | $(STATICCHECK): tools/go.mod
31 | cd tools && go install honnef.co/go/tools/cmd/staticcheck@2023.1.2
32 |
33 | .PHONY: lint
34 | lint: $(GOLINT) $(STATICCHECK)
35 | @rm -rf lint.log
36 | @echo "Checking gofmt"
37 | @gofmt -d -s $(GO_FILES) 2>&1 | tee lint.log
38 | @echo "Checking go vet"
39 | @go vet ./... 2>&1 | tee -a lint.log
40 | @echo "Checking golint"
41 | @$(GOLINT) ./... | tee -a lint.log
42 | @echo "Checking staticcheck"
43 | @$(STATICCHECK) ./... 2>&1 | tee -a lint.log
44 | @echo "Checking for license headers..."
45 | @./.build/check_license.sh | tee -a lint.log
46 | @[ ! -s lint.log ]
47 |
--------------------------------------------------------------------------------
/vendor/go.uber.org/automaxprocs/automaxprocs.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Uber Technologies, Inc.
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | // Package automaxprocs automatically sets GOMAXPROCS to match the Linux
22 | // container CPU quota, if any.
23 | package automaxprocs // import "go.uber.org/automaxprocs"
24 |
25 | import (
26 | "log"
27 |
28 | "go.uber.org/automaxprocs/maxprocs"
29 | )
30 |
31 | func init() {
32 | maxprocs.Set(maxprocs.Logger(log.Printf))
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/go.uber.org/automaxprocs/internal/cgroups/doc.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Uber Technologies, Inc.
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | // Package cgroups provides utilities to access Linux control group (CGroups)
22 | // parameters (CPU quota, for example) for a given process.
23 | package cgroups
24 |
--------------------------------------------------------------------------------
/vendor/go.uber.org/automaxprocs/maxprocs/version.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Uber Technologies, Inc.
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | package maxprocs
22 |
23 | // Version is the current package version.
24 | const Version = "1.6.0"
25 |
--------------------------------------------------------------------------------
/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/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
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | type Signal = syscall.Signal
12 | type Errno = syscall.Errno
13 | type SysProcAttr = syscall.SysProcAttr
14 |
--------------------------------------------------------------------------------
/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 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go
11 | //
12 |
13 | TEXT ·syscall6(SB),NOSPLIT,$0-88
14 | JMP syscall·syscall6(SB)
15 |
16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88
17 | JMP syscall·rawSyscall6(SB)
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_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 |
7 | #include "textflag.h"
8 |
9 | // System call support for 386 BSD
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-28
15 | JMP syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
18 | JMP syscall·Syscall6(SB)
19 |
20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
21 | JMP syscall·Syscall9(SB)
22 |
23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
24 | JMP syscall·RawSyscall(SB)
25 |
26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
27 | JMP syscall·RawSyscall6(SB)
28 |
--------------------------------------------------------------------------------
/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 |
7 | #include "textflag.h"
8 |
9 | // System call support for AMD64 BSD
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-56
15 | JMP syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
18 | JMP syscall·Syscall6(SB)
19 |
20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
21 | JMP syscall·Syscall9(SB)
22 |
23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
24 | JMP syscall·RawSyscall(SB)
25 |
26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
27 | JMP syscall·RawSyscall6(SB)
28 |
--------------------------------------------------------------------------------
/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 |
7 | #include "textflag.h"
8 |
9 | // System call support for ARM BSD
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-28
15 | B syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
18 | B syscall·Syscall6(SB)
19 |
20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
21 | B syscall·Syscall9(SB)
22 |
23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
24 | B syscall·RawSyscall(SB)
25 |
26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
27 | B syscall·RawSyscall6(SB)
28 |
--------------------------------------------------------------------------------
/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 |
7 | #include "textflag.h"
8 |
9 | // System call support for ARM64 BSD
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-56
15 | JMP syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
18 | JMP syscall·Syscall6(SB)
19 |
20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
21 | JMP syscall·Syscall9(SB)
22 |
23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
24 | JMP syscall·RawSyscall(SB)
25 |
26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
27 | JMP syscall·RawSyscall6(SB)
28 |
--------------------------------------------------------------------------------
/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 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ppc64, BSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_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 |
7 | #include "textflag.h"
8 |
9 | // System call support for RISCV64 BSD
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-56
15 | JMP syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
18 | JMP syscall·Syscall6(SB)
19 |
20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
21 | JMP syscall·Syscall9(SB)
22 |
23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
24 | JMP syscall·RawSyscall(SB)
25 |
26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
27 | JMP syscall·RawSyscall6(SB)
28 |
--------------------------------------------------------------------------------
/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 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for AMD64, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
23 | CALL runtime·entersyscall(SB)
24 | MOVQ a1+8(FP), DI
25 | MOVQ a2+16(FP), SI
26 | MOVQ a3+24(FP), DX
27 | MOVQ $0, R10
28 | MOVQ $0, R8
29 | MOVQ $0, R9
30 | MOVQ trap+0(FP), AX // syscall entry
31 | SYSCALL
32 | MOVQ AX, r1+32(FP)
33 | MOVQ DX, r2+40(FP)
34 | CALL runtime·exitsyscall(SB)
35 | RET
36 |
37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
38 | JMP syscall·RawSyscall(SB)
39 |
40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
41 | JMP syscall·RawSyscall6(SB)
42 |
43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
44 | MOVQ a1+8(FP), DI
45 | MOVQ a2+16(FP), SI
46 | MOVQ a3+24(FP), DX
47 | MOVQ $0, R10
48 | MOVQ $0, R8
49 | MOVQ $0, R9
50 | MOVQ trap+0(FP), AX // syscall entry
51 | SYSCALL
52 | MOVQ AX, r1+32(FP)
53 | MOVQ DX, r2+40(FP)
54 | RET
55 |
56 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16
57 | JMP syscall·gettimeofday(SB)
58 |
--------------------------------------------------------------------------------
/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 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for arm, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
23 | BL runtime·entersyscall(SB)
24 | MOVW trap+0(FP), R7
25 | MOVW a1+4(FP), R0
26 | MOVW a2+8(FP), R1
27 | MOVW a3+12(FP), R2
28 | MOVW $0, R3
29 | MOVW $0, R4
30 | MOVW $0, R5
31 | SWI $0
32 | MOVW R0, r1+16(FP)
33 | MOVW $0, R0
34 | MOVW R0, r2+20(FP)
35 | BL runtime·exitsyscall(SB)
36 | RET
37 |
38 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
39 | B syscall·RawSyscall(SB)
40 |
41 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
42 | B syscall·RawSyscall6(SB)
43 |
44 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
45 | MOVW trap+0(FP), R7 // syscall entry
46 | MOVW a1+4(FP), R0
47 | MOVW a2+8(FP), R1
48 | MOVW a3+12(FP), R2
49 | SWI $0
50 | MOVW R0, r1+16(FP)
51 | MOVW $0, R0
52 | MOVW R0, r2+20(FP)
53 | RET
54 |
55 | TEXT ·seek(SB),NOSPLIT,$0-28
56 | B syscall·seek(SB)
57 |
--------------------------------------------------------------------------------
/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 |
7 | #include "textflag.h"
8 |
9 | // Just jump to package syscall's implementation for all these functions.
10 | // The runtime may know about them.
11 |
12 | TEXT ·Syscall(SB),NOSPLIT,$0-56
13 | B syscall·Syscall(SB)
14 |
15 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
16 | B syscall·Syscall6(SB)
17 |
18 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
19 | BL runtime·entersyscall(SB)
20 | MOVD a1+8(FP), R0
21 | MOVD a2+16(FP), R1
22 | MOVD a3+24(FP), R2
23 | MOVD $0, R3
24 | MOVD $0, R4
25 | MOVD $0, R5
26 | MOVD trap+0(FP), R8 // syscall entry
27 | SVC
28 | MOVD R0, r1+32(FP) // r1
29 | MOVD R1, r2+40(FP) // r2
30 | BL runtime·exitsyscall(SB)
31 | RET
32 |
33 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
34 | B syscall·RawSyscall(SB)
35 |
36 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
37 | B syscall·RawSyscall6(SB)
38 |
39 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
40 | MOVD a1+8(FP), R0
41 | MOVD a2+16(FP), R1
42 | MOVD a3+24(FP), R2
43 | MOVD $0, R3
44 | MOVD $0, R4
45 | MOVD $0, R5
46 | MOVD trap+0(FP), R8 // syscall entry
47 | SVC
48 | MOVD R0, r1+32(FP)
49 | MOVD R1, r2+40(FP)
50 | RET
51 |
--------------------------------------------------------------------------------
/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 |
7 | #include "textflag.h"
8 |
9 |
10 | // Just jump to package syscall's implementation for all these functions.
11 | // The runtime may know about them.
12 |
13 | TEXT ·Syscall(SB),NOSPLIT,$0-56
14 | JMP syscall·Syscall(SB)
15 |
16 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
17 | JMP syscall·Syscall6(SB)
18 |
19 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
20 | JAL runtime·entersyscall(SB)
21 | MOVV a1+8(FP), R4
22 | MOVV a2+16(FP), R5
23 | MOVV a3+24(FP), R6
24 | MOVV R0, R7
25 | MOVV R0, R8
26 | MOVV R0, R9
27 | MOVV trap+0(FP), R11 // syscall entry
28 | SYSCALL
29 | MOVV R4, r1+32(FP)
30 | MOVV R0, r2+40(FP) // r2 is not used. Always set to 0
31 | JAL runtime·exitsyscall(SB)
32 | RET
33 |
34 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
35 | JMP syscall·RawSyscall(SB)
36 |
37 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
38 | JMP syscall·RawSyscall6(SB)
39 |
40 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
41 | MOVV a1+8(FP), R4
42 | MOVV a2+16(FP), R5
43 | MOVV a3+24(FP), R6
44 | MOVV R0, R7
45 | MOVV R0, R8
46 | MOVV R0, R9
47 | MOVV trap+0(FP), R11 // syscall entry
48 | SYSCALL
49 | MOVV R4, r1+32(FP)
50 | MOVV R0, r2+40(FP) // r2 is not used. Always set to 0
51 | RET
52 |
--------------------------------------------------------------------------------
/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 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for mips64, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·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), R2 // syscall entry
31 | SYSCALL
32 | MOVV R2, r1+32(FP)
33 | MOVV R3, r2+40(FP)
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), R2 // syscall entry
51 | SYSCALL
52 | MOVV R2, r1+32(FP)
53 | MOVV R3, r2+40(FP)
54 | RET
55 |
--------------------------------------------------------------------------------
/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 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for mips, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
26 | JAL runtime·entersyscall(SB)
27 | MOVW a1+4(FP), R4
28 | MOVW a2+8(FP), R5
29 | MOVW a3+12(FP), R6
30 | MOVW R0, R7
31 | MOVW trap+0(FP), R2 // syscall entry
32 | SYSCALL
33 | MOVW R2, r1+16(FP) // r1
34 | MOVW R3, r2+20(FP) // r2
35 | JAL runtime·exitsyscall(SB)
36 | RET
37 |
38 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
39 | JMP syscall·RawSyscall(SB)
40 |
41 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
42 | JMP syscall·RawSyscall6(SB)
43 |
44 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
45 | MOVW a1+4(FP), R4
46 | MOVW a2+8(FP), R5
47 | MOVW a3+12(FP), R6
48 | MOVW trap+0(FP), R2 // syscall entry
49 | SYSCALL
50 | MOVW R2, r1+16(FP)
51 | MOVW R3, r2+20(FP)
52 | RET
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && (ppc64 || ppc64le) && gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for ppc64, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
17 | BL runtime·entersyscall(SB)
18 | MOVD a1+8(FP), R3
19 | MOVD a2+16(FP), R4
20 | MOVD a3+24(FP), R5
21 | MOVD R0, R6
22 | MOVD R0, R7
23 | MOVD R0, R8
24 | MOVD trap+0(FP), R9 // syscall entry
25 | SYSCALL R9
26 | MOVD R3, r1+32(FP)
27 | MOVD R4, r2+40(FP)
28 | BL runtime·exitsyscall(SB)
29 | RET
30 |
31 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
32 | MOVD a1+8(FP), R3
33 | MOVD a2+16(FP), R4
34 | MOVD a3+24(FP), R5
35 | MOVD R0, R6
36 | MOVD R0, R7
37 | MOVD R0, R8
38 | MOVD trap+0(FP), R9 // syscall entry
39 | SYSCALL R9
40 | MOVD R3, r1+32(FP)
41 | MOVD R4, r2+40(FP)
42 | RET
43 |
--------------------------------------------------------------------------------
/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 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for linux/riscv64.
11 | //
12 | // Where available, just jump to package syscall's implementation of
13 | // these functions.
14 |
15 | TEXT ·Syscall(SB),NOSPLIT,$0-56
16 | JMP syscall·Syscall(SB)
17 |
18 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
19 | JMP syscall·Syscall6(SB)
20 |
21 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
22 | CALL runtime·entersyscall(SB)
23 | MOV a1+8(FP), A0
24 | MOV a2+16(FP), A1
25 | MOV a3+24(FP), A2
26 | MOV trap+0(FP), A7 // syscall entry
27 | ECALL
28 | MOV A0, r1+32(FP) // r1
29 | MOV A1, r2+40(FP) // r2
30 | CALL runtime·exitsyscall(SB)
31 | RET
32 |
33 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
34 | JMP syscall·RawSyscall(SB)
35 |
36 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
37 | JMP syscall·RawSyscall6(SB)
38 |
39 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
40 | MOV a1+8(FP), A0
41 | MOV a2+16(FP), A1
42 | MOV a3+24(FP), A2
43 | MOV trap+0(FP), A7 // syscall entry
44 | ECALL
45 | MOV A0, r1+32(FP)
46 | MOV A1, r2+40(FP)
47 | RET
48 |
--------------------------------------------------------------------------------
/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 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for s390x, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | BR syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | BR syscall·Syscall6(SB)
21 |
22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
23 | BL runtime·entersyscall(SB)
24 | MOVD a1+8(FP), R2
25 | MOVD a2+16(FP), R3
26 | MOVD a3+24(FP), R4
27 | MOVD $0, R5
28 | MOVD $0, R6
29 | MOVD $0, R7
30 | MOVD trap+0(FP), R1 // syscall entry
31 | SYSCALL
32 | MOVD R2, r1+32(FP)
33 | MOVD R3, r2+40(FP)
34 | BL runtime·exitsyscall(SB)
35 | RET
36 |
37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
38 | BR syscall·RawSyscall(SB)
39 |
40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
41 | BR syscall·RawSyscall6(SB)
42 |
43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
44 | MOVD a1+8(FP), R2
45 | MOVD a2+16(FP), R3
46 | MOVD a3+24(FP), R4
47 | MOVD $0, R5
48 | MOVD $0, R6
49 | MOVD $0, R7
50 | MOVD trap+0(FP), R1 // syscall entry
51 | SYSCALL
52 | MOVD R2, r1+32(FP)
53 | MOVD R3, r2+40(FP)
54 | RET
55 |
--------------------------------------------------------------------------------
/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 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for mips64, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go
11 | //
12 |
13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88
14 | JMP syscall·sysvicall6(SB)
15 |
16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88
17 | JMP syscall·rawSysvicall6(SB)
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/auxv.go:
--------------------------------------------------------------------------------
1 | // Copyright 2025 The Go Authors. All rights reserved.
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 go1.21 && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos)
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | //go:linkname runtime_getAuxv runtime.getAuxv
15 | func runtime_getAuxv() []uintptr
16 |
17 | // Auxv returns the ELF auxiliary vector as a sequence of key/value pairs.
18 | // The returned slice is always a fresh copy, owned by the caller.
19 | // It returns an error on non-ELF platforms, or if the auxiliary vector cannot be accessed,
20 | // which happens in some locked-down environments and build modes.
21 | func Auxv() ([][2]uintptr, error) {
22 | vec := runtime_getAuxv()
23 | vecLen := len(vec)
24 |
25 | if vecLen == 0 {
26 | return nil, syscall.ENOENT
27 | }
28 |
29 | if vecLen%2 != 0 {
30 | return nil, syscall.EINVAL
31 | }
32 |
33 | result := make([]uintptr, vecLen)
34 | copy(result, vec)
35 | return unsafe.Slice((*[2]uintptr)(unsafe.Pointer(&result[0])), vecLen/2), nil
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/auxv_unsupported.go:
--------------------------------------------------------------------------------
1 | // Copyright 2025 The Go Authors. All rights reserved.
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 !go1.21 && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos)
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | func Auxv() ([][2]uintptr, error) {
12 | return nil, syscall.ENOTSUP
13 | }
14 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | const (
10 | R_OK = 0x4
11 | W_OK = 0x2
12 | X_OK = 0x1
13 | )
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_aix_ppc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix && ppc
6 |
7 | // Functions to access/create device major and minor numbers matching the
8 | // encoding used by AIX.
9 |
10 | package unix
11 |
12 | // Major returns the major component of a Linux device number.
13 | func Major(dev uint64) uint32 {
14 | return uint32((dev >> 16) & 0xffff)
15 | }
16 |
17 | // Minor returns the minor component of a Linux device number.
18 | func Minor(dev uint64) uint32 {
19 | return uint32(dev & 0xffff)
20 | }
21 |
22 | // Mkdev returns a Linux device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | return uint64(((major) << 16) | (minor))
26 | }
27 |
--------------------------------------------------------------------------------
/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 |
7 | // Functions to access/create device major and minor numbers matching the
8 | // encoding used AIX.
9 |
10 | package unix
11 |
12 | // Major returns the major component of a Linux device number.
13 | func Major(dev uint64) uint32 {
14 | return uint32((dev & 0x3fffffff00000000) >> 32)
15 | }
16 |
17 | // Minor returns the minor component of a Linux device number.
18 | func Minor(dev uint64) uint32 {
19 | return uint32((dev & 0x00000000ffffffff) >> 0)
20 | }
21 |
22 | // Mkdev returns a Linux device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | var DEVNO64 uint64
26 | DEVNO64 = 0x8000000000000000
27 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64)
28 | }
29 |
--------------------------------------------------------------------------------
/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 |
7 | // Functions to access/create device major and minor numbers matching the
8 | // encoding used by z/OS.
9 | //
10 | // The information below is extracted and adapted from macros.
11 |
12 | package unix
13 |
14 | // Major returns the major component of a z/OS device number.
15 | func Major(dev uint64) uint32 {
16 | return uint32((dev >> 16) & 0x0000FFFF)
17 | }
18 |
19 | // Minor returns the minor component of a z/OS device number.
20 | func Minor(dev uint64) uint32 {
21 | return uint32(dev & 0x0000FFFF)
22 | }
23 |
24 | // Mkdev returns a z/OS device number generated from the given major and minor
25 | // components.
26 | func Mkdev(major, minor uint32) uint64 {
27 | return (uint64(major) << 16) | uint64(minor)
28 | }
29 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | const isBigEndian = true
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/endian_little.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh
6 |
7 | package unix
8 |
9 | const isBigEndian = false
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/env_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6 |
7 | // Unix environment variables.
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Getenv(key string) (value string, found bool) {
14 | return syscall.Getenv(key)
15 | }
16 |
17 | func Setenv(key, value string) error {
18 | return syscall.Setenv(key, value)
19 | }
20 |
21 | func Clearenv() {
22 | syscall.Clearenv()
23 | }
24 |
25 | func Environ() []string {
26 | return syscall.Environ()
27 | }
28 |
29 | func Unsetenv(key string) error {
30 | return syscall.Unsetenv(key)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fcntl.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build dragonfly || freebsd || linux || netbsd
6 |
7 | package unix
8 |
9 | import "unsafe"
10 |
11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux
12 | // systems by fcntl_linux_32bit.go to be SYS_FCNTL64.
13 | var fcntl64Syscall uintptr = SYS_FCNTL
14 |
15 | func fcntl(fd int, cmd, arg int) (int, error) {
16 | valptr, _, errno := Syscall(fcntl64Syscall, uintptr(fd), uintptr(cmd), uintptr(arg))
17 | var err error
18 | if errno != 0 {
19 | err = errno
20 | }
21 | return int(valptr), err
22 | }
23 |
24 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
25 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
26 | return fcntl(int(fd), cmd, arg)
27 | }
28 |
29 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
30 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
31 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
32 | if errno == 0 {
33 | return nil
34 | }
35 | return errno
36 | }
37 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | func init() {
10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's
11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
12 | fcntl64Syscall = SYS_FCNTL64
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/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 |
7 | package unix
8 |
9 | // Set adds fd to the set fds.
10 | func (fds *FdSet) Set(fd int) {
11 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS))
12 | }
13 |
14 | // Clear removes fd from the set fds.
15 | func (fds *FdSet) Clear(fd int) {
16 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS))
17 | }
18 |
19 | // IsSet returns whether fd is in the set fds.
20 | func (fds *FdSet) IsSet(fd int) bool {
21 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0
22 | }
23 |
24 | // Zero clears the set fds.
25 | func (fds *FdSet) Zero() {
26 | for i := range fds.Bits {
27 | fds.Bits[i] = 0
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | //extern gettimeofday
12 | func realGettimeofday(*Timeval, *byte) int32
13 |
14 | func gettimeofday(tv *Timeval) (err syscall.Errno) {
15 | r := realGettimeofday(tv, nil)
16 | if r < 0 {
17 | return syscall.GetErrno()
18 | }
19 | return 0
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/mmap_nomremap.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 The Go Authors. All rights reserved.
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 || openbsd || solaris || zos
6 |
7 | package unix
8 |
9 | var mapper = &mmapper{
10 | active: make(map[*byte][]byte),
11 | mmap: mmap,
12 | munmap: munmap,
13 | }
14 |
--------------------------------------------------------------------------------
/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 || zos
6 |
7 | // For Unix, get the pagesize from the runtime.
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Getpagesize() int {
14 | return syscall.Getpagesize()
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/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 |
7 | package unix
8 |
9 | func ptrace(request int, pid int, addr uintptr, data uintptr) error {
10 | return ptrace1(request, pid, addr, data)
11 | }
12 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
10 | return ENOTSUP
11 | }
12 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | import (
10 | "runtime"
11 | "unsafe"
12 | )
13 |
14 | const raceenabled = true
15 |
16 | func raceAcquire(addr unsafe.Pointer) {
17 | runtime.RaceAcquire(addr)
18 | }
19 |
20 | func raceReleaseMerge(addr unsafe.Pointer) {
21 | runtime.RaceReleaseMerge(addr)
22 | }
23 |
24 | func raceReadRange(addr unsafe.Pointer, len int) {
25 | runtime.RaceReadRange(addr, len)
26 | }
27 |
28 | func raceWriteRange(addr unsafe.Pointer, len int) {
29 | runtime.RaceWriteRange(addr, len)
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/race0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos
6 |
7 | package unix
8 |
9 | import (
10 | "unsafe"
11 | )
12 |
13 | const raceenabled = false
14 |
15 | func raceAcquire(addr unsafe.Pointer) {
16 | }
17 |
18 | func raceReleaseMerge(addr unsafe.Pointer) {
19 | }
20 |
21 | func raceReadRange(addr unsafe.Pointer, len int) {
22 | }
23 |
24 | func raceWriteRange(addr unsafe.Pointer, len int) {
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/readdirent_getdents.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd
6 |
7 | package unix
8 |
9 | // ReadDirent reads directory entries from fd and writes them into buf.
10 | func ReadDirent(fd int, buf []byte) (n int, err error) {
11 | return Getdents(fd, buf)
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build darwin || zos
6 |
7 | package unix
8 |
9 | import "unsafe"
10 |
11 | // ReadDirent reads directory entries from fd and writes them into buf.
12 | func ReadDirent(fd int, buf []byte) (n int, err error) {
13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil.
14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the
15 | // actual system call is getdirentries64, 64 is a good guess.
16 | // TODO(rsc): Can we use a single global basep for all calls?
17 | var base = (*uintptr)(unsafe.Pointer(new(uint64)))
18 | return Getdirentries(fd, buf, base)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/sockcmsg_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 |
7 | package unix
8 |
9 | import (
10 | "runtime"
11 | )
12 |
13 | // Round the length of a raw sockaddr up to align it properly.
14 | func cmsgAlignOf(salen int) int {
15 | salign := SizeofPtr
16 |
17 | // dragonfly needs to check ABI version at runtime, see cmsgAlignOf in
18 | // sockcmsg_dragonfly.go
19 | switch runtime.GOOS {
20 | case "aix":
21 | // There is no alignment on AIX.
22 | salign = 1
23 | case "darwin", "ios", "illumos", "solaris":
24 | // NOTE: It seems like 64-bit Darwin, Illumos and Solaris
25 | // kernels still require 32-bit aligned access to network
26 | // subsystem.
27 | if SizeofPtr == 8 {
28 | salign = 4
29 | }
30 | case "netbsd", "openbsd":
31 | // NetBSD and OpenBSD armv7 require 64-bit alignment.
32 | if runtime.GOARCH == "arm" {
33 | salign = 8
34 | }
35 | // NetBSD aarch64 requires 128-bit alignment.
36 | if runtime.GOOS == "netbsd" && runtime.GOARCH == "arm64" {
37 | salign = 16
38 | }
39 | case "zos":
40 | // z/OS socket macros use [32-bit] sizeof(int) alignment,
41 | // not pointer width.
42 | salign = SizeofInt
43 | }
44 |
45 | return (salen + salign - 1) & ^(salign - 1)
46 | }
47 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
10 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
11 |
12 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: int32(sec), Usec: int32(usec)}
20 | }
21 |
22 | func (iov *Iovec) SetLen(length int) {
23 | iov.Len = uint32(length)
24 | }
25 |
26 | func (msghdr *Msghdr) SetControllen(length int) {
27 | msghdr.Controllen = uint32(length)
28 | }
29 |
30 | func (msghdr *Msghdr) SetIovlen(length int) {
31 | msghdr.Iovlen = int32(length)
32 | }
33 |
34 | func (cmsg *Cmsghdr) SetLen(length int) {
35 | cmsg.Len = uint32(length)
36 | }
37 |
38 | func Fstat(fd int, stat *Stat_t) error {
39 | return fstat(fd, stat)
40 | }
41 |
42 | func Fstatat(dirfd int, path string, stat *Stat_t, flags int) error {
43 | return fstatat(dirfd, path, stat, flags)
44 | }
45 |
46 | func Lstat(path string, stat *Stat_t) error {
47 | return lstat(path, stat)
48 | }
49 |
50 | func Stat(path string, statptr *Stat_t) error {
51 | return stat(path, statptr)
52 | }
53 |
--------------------------------------------------------------------------------
/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
6 |
7 | package unix
8 |
9 | import _ "unsafe"
10 |
11 | // Implemented in the runtime package (runtime/sys_darwin.go)
12 | func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
13 | func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
14 | func syscall_syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
15 | func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // 32-bit only
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 | func syscall_syscallPtr(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
19 |
20 | //go:linkname syscall_syscall syscall.syscall
21 | //go:linkname syscall_syscall6 syscall.syscall6
22 | //go:linkname syscall_syscall6X syscall.syscall6X
23 | //go:linkname syscall_syscall9 syscall.syscall9
24 | //go:linkname syscall_rawSyscall syscall.rawSyscall
25 | //go:linkname syscall_rawSyscall6 syscall.rawSyscall6
26 | //go:linkname syscall_syscallPtr syscall.syscallPtr
27 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: nsec}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: usec}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint64(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint64(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (msghdr *Msghdr) SetIovlen(length int) {
37 | msghdr.Iovlen = int32(length)
38 | }
39 |
40 | func (cmsg *Cmsghdr) SetLen(length int) {
41 | cmsg.Len = uint32(length)
42 | }
43 |
44 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
45 | var writtenOut uint64 = 0
46 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
47 |
48 | written = int(writtenOut)
49 |
50 | if e1 != 0 {
51 | err = e1
52 | }
53 | return
54 | }
55 |
56 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
57 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | /*
10 | #include
11 | int ioctl(int, unsigned long int, uintptr_t);
12 | */
13 | import "C"
14 | import "unsafe"
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 |
24 | func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
25 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg)))
26 | if r0 == -1 && er != nil {
27 | err = er
28 | }
29 | return
30 | }
31 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | const (
10 | TIOCGETA = 0x62251713
11 | )
12 |
13 | type Winsize struct {
14 | Row uint16
15 | Col uint16
16 | Xpixel uint16
17 | Ypixel uint16
18 | }
19 |
20 | type Termios struct {
21 | Iflag uint32
22 | Oflag uint32
23 | Cflag uint32
24 | Lflag uint32
25 | Cc [20]uint8
26 | Ispeed int32
27 | Ospeed int32
28 | }
29 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH
10 | // values.
11 |
12 | //sys Alarm(seconds uint) (remaining uint, err error)
13 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | //go:noescape
12 | func gettimeofday(tv *Timeval) (err syscall.Errno)
13 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail.
10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
11 |
12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't
13 | // fail.
14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && gc && 386
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | // Underlying system call writes to newoffset via pointer.
12 | // Implemented in assembly to avoid allocation.
13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
14 |
15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_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 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | // Underlying system call writes to newoffset via pointer.
12 | // Implemented in assembly to avoid allocation.
13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
14 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
15 | var newoffset int64
16 | offsetLow := uint32(offset & 0xffffffff)
17 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
19 | return newoffset, err
20 | }
21 |
22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
24 | return int(fd), err
25 | }
26 |
27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
29 | return int(fd), err
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && gccgo && arm
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
15 | var newoffset int64
16 | offsetLow := uint32(offset & 0xffffffff)
17 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
19 | return newoffset, err
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build 386 && netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/386 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/arm the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | import _ "unsafe"
10 |
11 | // Implemented in the runtime package (runtime/sys_openbsd3.go)
12 | func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
13 | func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
14 | func syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 uintptr) (r1, r2 uintptr, err Errno)
15 | func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
16 | func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
17 |
18 | //go:linkname syscall_syscall syscall.syscall
19 | //go:linkname syscall_syscall6 syscall.syscall6
20 | //go:linkname syscall_syscall10 syscall.syscall10
21 | //go:linkname syscall_rawSyscall syscall.rawSyscall
22 | //go:linkname syscall_rawSyscall6 syscall.rawSyscall6
23 |
24 | func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) {
25 | return syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, 0)
26 | }
27 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/ppc64 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/riscv64 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func (iov *Iovec) SetLen(length int) {
18 | iov.Len = uint64(length)
19 | }
20 |
21 | func (msghdr *Msghdr) SetIovlen(length int) {
22 | msghdr.Iovlen = int32(length)
23 | }
24 |
25 | func (cmsg *Cmsghdr) SetLen(length int) {
26 | cmsg.Len = uint32(length)
27 | }
28 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
12 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
13 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
14 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
15 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
12 | return syscall.Syscall(trap, a1, a2, a3)
13 | }
14 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
15 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6)
16 | }
17 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
18 | return syscall.RawSyscall(trap, a1, a2, a3)
19 | }
20 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
21 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6)
22 | }
23 |
--------------------------------------------------------------------------------
/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 |
7 | package unix
8 |
9 | import "runtime"
10 |
11 | // SysvShmCtl performs control operations on the shared memory segment
12 | // specified by id.
13 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
14 | if runtime.GOARCH == "arm" ||
15 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" {
16 | cmd |= ipc_64
17 | }
18 |
19 | return shmctl(id, cmd, desc)
20 | }
21 |
--------------------------------------------------------------------------------
/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) || zos
6 |
7 | package unix
8 |
9 | // SysvShmCtl performs control operations on the shared memory segment
10 | // specified by id.
11 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
12 | return shmctl(id, cmd, desc)
13 | }
14 |
--------------------------------------------------------------------------------
/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 "fmt"
8 |
9 | // Unveil implements the unveil syscall.
10 | // For more information see unveil(2).
11 | // Note that the special case of blocking further
12 | // unveil calls is handled by UnveilBlock.
13 | func Unveil(path string, flags string) error {
14 | if err := supportsUnveil(); err != nil {
15 | return err
16 | }
17 | pathPtr, err := BytePtrFromString(path)
18 | if err != nil {
19 | return err
20 | }
21 | flagsPtr, err := BytePtrFromString(flags)
22 | if err != nil {
23 | return err
24 | }
25 | return unveil(pathPtr, flagsPtr)
26 | }
27 |
28 | // UnveilBlock blocks future unveil calls.
29 | // For more information see unveil(2).
30 | func UnveilBlock() error {
31 | if err := supportsUnveil(); err != nil {
32 | return err
33 | }
34 | return unveil(nil, nil)
35 | }
36 |
37 | // supportsUnveil checks for availability of the unveil(2) system call based
38 | // on the running OpenBSD version.
39 | func supportsUnveil() error {
40 | maj, min, err := majmin()
41 | if err != nil {
42 | return err
43 | }
44 |
45 | // unveil is not available before 6.4
46 | if maj < 6 || (maj == 6 && min <= 3) {
47 | return fmt.Errorf("cannot call Unveil on OpenBSD %d.%d", maj, min)
48 | }
49 |
50 | return nil
51 | }
52 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/vgetrandom_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2024 The Go Authors. All rights reserved.
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 && go1.24
6 |
7 | package unix
8 |
9 | import _ "unsafe"
10 |
11 | //go:linkname vgetrandom runtime.vgetrandom
12 | //go:noescape
13 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool)
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go:
--------------------------------------------------------------------------------
1 | // Copyright 2024 The Go Authors. All rights reserved.
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 || !go1.24
6 |
7 | package unix
8 |
9 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool) {
10 | return -1, false
11 | }
12 |
--------------------------------------------------------------------------------
/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 |
5 | package unix
6 |
7 | import "unsafe"
8 |
9 | // PtraceRegsArm is the registers used by arm binaries.
10 | type PtraceRegsArm struct {
11 | Uregs [18]uint32
12 | }
13 |
14 | // PtraceGetRegsArm fetches the registers used by arm binaries.
15 | func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error {
16 | return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
17 | }
18 |
19 | // PtraceSetRegsArm sets the registers used by arm binaries.
20 | func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error {
21 | return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
22 | }
23 |
24 | // PtraceRegsArm64 is the registers used by arm64 binaries.
25 | type PtraceRegsArm64 struct {
26 | Regs [31]uint64
27 | Sp uint64
28 | Pc uint64
29 | Pstate uint64
30 | }
31 |
32 | // PtraceGetRegsArm64 fetches the registers used by arm64 binaries.
33 | func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {
34 | return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
35 | }
36 |
37 | // PtraceSetRegsArm64 sets the registers used by arm64 binaries.
38 | func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
39 | return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
40 | }
41 |
--------------------------------------------------------------------------------
/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 ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), 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 ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))
17 | }
18 |
--------------------------------------------------------------------------------
/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/golang.org/x/tools/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/yaml.v3/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 |
--------------------------------------------------------------------------------