├── .cf-extensions ├── .github └── issue_template.md ├── .gitignore ├── EXAMPLES.md ├── LICENSE ├── Makefile ├── NOTICE ├── README.md ├── commands ├── api.go ├── api_test.go ├── bulk_regenerate.go ├── bulk_regenerate_test.go ├── client_credentials_auth_test.go ├── command_flags_matcher_test.go ├── commands.go ├── commands_suite_test.go ├── curl.go ├── curl_test.go ├── delete.go ├── delete_permission.go ├── delete_permission_test.go ├── delete_test.go ├── error_test.go ├── export.go ├── export_test.go ├── find.go ├── find_test.go ├── generate.go ├── generate_test.go ├── get.go ├── get_permission.go ├── get_permission_test.go ├── get_test.go ├── helpers.go ├── import.go ├── import_test.go ├── interpolate.go ├── interpolate_test.go ├── login.go ├── login_test.go ├── logout.go ├── logout_test.go ├── regenerate.go ├── regenerate_test.go ├── set.go ├── set_permission.go ├── set_permission_test.go ├── set_test.go ├── socks5_test.go ├── testdata │ ├── bulk_regenerate_response.json │ ├── delete_response.json │ ├── find_response.json │ ├── generate_response.json │ ├── get_permission_response.json │ ├── get_response.json │ ├── regenerate_response.json │ ├── set_permission_response.json │ └── set_response.json ├── token.go ├── token_test.go ├── version.go └── version_test.go ├── config ├── config.go ├── config_suite_test.go ├── config_test.go ├── config_unix.go ├── config_unix_test.go ├── config_win.go ├── config_win_test.go ├── config_without_secrets.go ├── config_without_secrets_test.go ├── validation.go └── validation_test.go ├── credhub ├── auth │ ├── auth_suite_test.go │ ├── builders.go │ ├── builders_test.go │ ├── example_test.go │ ├── noop.go │ ├── oauth.go │ ├── oauth_test.go │ ├── strategy.go │ └── uaa │ │ ├── client.go │ │ ├── client_test.go │ │ └── uaa_suite_test.go ├── bulk_regenerate.go ├── bulk_regenerate_test.go ├── certificates.go ├── certificates_test.go ├── client.go ├── client_test.go ├── credentials │ ├── credentials_suite_test.go │ ├── generate │ │ └── types.go │ ├── types.go │ ├── types_test.go │ └── values │ │ └── types.go ├── credhub.go ├── credhub_suite_test.go ├── delete.go ├── delete_test.go ├── error.go ├── example_test.go ├── find.go ├── find_test.go ├── fixtures │ ├── auth-tls-ca.pem │ ├── auth-tls-cert.pem │ ├── auth-tls-key.pem │ ├── extra-ca.pem │ ├── server-tls-ca.pem │ ├── server-tls-cert.pem │ └── server-tls-key.pem ├── generate.go ├── generate_test.go ├── get.go ├── get_test.go ├── info.go ├── info_test.go ├── interpolate.go ├── interpolate_test.go ├── mode.go ├── new.go ├── new_test.go ├── options.go ├── permissions.go ├── permissions │ └── types.go ├── permissions_test.go ├── regenerate.go ├── regenerate_test.go ├── request.go ├── request_test.go ├── server │ └── types.go ├── server_version.go ├── server_version_test.go ├── set.go ├── set_test.go ├── socksify.go └── socksify_test.go ├── errors ├── errors.go └── internal_errors.go ├── go.mod ├── go.sum ├── main.go ├── main_suite_test.go ├── main_test.go ├── models ├── credential_bulk_export.go ├── credential_bulk_export_test.go ├── credential_bulk_import.go ├── credential_bulk_import_test.go ├── generation_parameters.go └── models_suite_test.go ├── scratch ├── scripts ├── lint.sh ├── run_tests.sh ├── ship_it.sh └── success_ascii_art.txt ├── staticcheck.conf ├── test ├── auth-tls-ca.pem ├── auth-tls-cert.pem ├── auth-tls-key.pem ├── certificate-chain.json ├── certificate-chain.yml ├── extra-ca.pem ├── generate-certs ├── server-and-auth-stacked-cert.pem ├── server-tls-ca.pem ├── server-tls-cert.pem ├── server-tls-key.pem ├── test_import_file.json ├── test_import_file.yml ├── test_import_file_with_document_end.yml ├── test_import_file_with_document_end_and_spaces.yml ├── test_import_incorrect_format.json ├── test_import_incorrect_format.yml ├── test_import_incorrect_json.json ├── test_import_incorrect_yaml.yml ├── test_import_missing_name.json ├── test_import_missing_name.yml ├── test_import_partial_fail_set.json ├── test_import_partial_fail_set.yml ├── test_import_ssh_type_with_public_key_fingerprint.json ├── test_import_ssh_type_with_public_key_fingerprint.yml ├── test_import_user_type_with_password_hash.json ├── test_import_user_type_with_password_hash.yml ├── test_import_with_int_for_value.json ├── test_import_with_int_for_value.yml └── test_util.go ├── util ├── commands_util.go ├── commands_util_test.go ├── logging.go ├── token.go └── util_suite_test.go ├── vendor ├── github.com │ ├── bmatcuk │ │ └── doublestar │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── doublestar.go │ ├── charlievieth │ │ └── fs │ │ │ ├── LICENSE │ │ │ ├── fs.go │ │ │ ├── fs_unix.go │ │ │ └── fs_windows.go │ ├── cloudfoundry │ │ ├── bosh-cli │ │ │ └── v7 │ │ │ │ ├── LICENSE │ │ │ │ ├── NOTICE │ │ │ │ └── director │ │ │ │ └── template │ │ │ │ ├── multi_vars.go │ │ │ │ ├── static_vars.go │ │ │ │ ├── template.go │ │ │ │ ├── var_file_arg.go │ │ │ │ ├── var_kv.go │ │ │ │ ├── variables.go │ │ │ │ ├── vars_env_arg.go │ │ │ │ └── vars_file_arg.go │ │ ├── bosh-utils │ │ │ ├── LICENSE │ │ │ ├── NOTICE │ │ │ ├── errors │ │ │ │ ├── errors.go │ │ │ │ └── multi_error.go │ │ │ ├── logger │ │ │ │ ├── async.go │ │ │ │ └── logger.go │ │ │ └── system │ │ │ │ ├── cmd_runner_interface.go │ │ │ │ ├── exec_cmd_runner.go │ │ │ │ ├── exec_cmd_runner_unix.go │ │ │ │ ├── exec_cmd_runner_windows.go │ │ │ │ ├── exec_error.go │ │ │ │ ├── exec_process.go │ │ │ │ ├── exec_process_unix.go │ │ │ │ ├── exec_process_windows.go │ │ │ │ ├── file_system_interface.go │ │ │ │ ├── ip_helper.go │ │ │ │ ├── os_file_system.go │ │ │ │ ├── os_file_system_unix.go │ │ │ │ └── os_file_system_windows.go │ │ ├── go-socks5 │ │ │ ├── .gitignore │ │ │ ├── .golangci.yml │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── auth.go │ │ │ ├── credentials.go │ │ │ ├── request.go │ │ │ ├── resolver.go │ │ │ ├── ruleset.go │ │ │ └── socks5.go │ │ └── socks5-proxy │ │ │ ├── .gitignore │ │ │ ├── .golangci.yml │ │ │ ├── LICENSE │ │ │ ├── NOTICE │ │ │ ├── README.md │ │ │ ├── host_key.go │ │ │ ├── socks5_proxy.go │ │ │ ├── ssh_client_config.go │ │ │ └── ssh_test_server.go │ ├── cppforlife │ │ └── go-patch │ │ │ ├── LICENSE │ │ │ └── patch │ │ │ ├── array_index.go │ │ │ ├── array_insertion.go │ │ │ ├── descriptive_op.go │ │ │ ├── diff.go │ │ │ ├── err_op.go │ │ │ ├── errs.go │ │ │ ├── find_op.go │ │ │ ├── op_definition.go │ │ │ ├── ops.go │ │ │ ├── pointer.go │ │ │ ├── remove_op.go │ │ │ ├── replace_op.go │ │ │ ├── test_op.go │ │ │ ├── tokens.go │ │ │ └── tokens_impl.go │ ├── fatih │ │ └── color │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── color.go │ │ │ ├── color_windows.go │ │ │ └── doc.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 │ ├── hashicorp │ │ └── go-version │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── constraint.go │ │ │ ├── version.go │ │ │ └── version_collection.go │ ├── jessevdk │ │ └── go-flags │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── arg.go │ │ │ ├── check_crosscompile.sh │ │ │ ├── closest.go │ │ │ ├── command.go │ │ │ ├── completion.go │ │ │ ├── convert.go │ │ │ ├── error.go │ │ │ ├── flags.go │ │ │ ├── group.go │ │ │ ├── help.go │ │ │ ├── ini.go │ │ │ ├── man.go │ │ │ ├── multitag.go │ │ │ ├── option.go │ │ │ ├── optstyle_other.go │ │ │ ├── optstyle_windows.go │ │ │ ├── parser.go │ │ │ ├── termsize.go │ │ │ ├── termsize_nosysioctl.go │ │ │ └── termsize_windows.go │ ├── mattn │ │ ├── go-colorable │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── colorable_others.go │ │ │ ├── colorable_windows.go │ │ │ ├── go.test.sh │ │ │ └── noncolorable.go │ │ └── go-isatty │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc.go │ │ │ ├── go.test.sh │ │ │ ├── isatty_bsd.go │ │ │ ├── isatty_others.go │ │ │ ├── isatty_plan9.go │ │ │ ├── isatty_solaris.go │ │ │ ├── isatty_tcgets.go │ │ │ └── isatty_windows.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 │ │ │ ├── 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 │ │ ├── ghttp │ │ ├── handlers.go │ │ └── test_server.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 │ │ ├── crypto │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── blowfish │ │ │ ├── block.go │ │ │ ├── cipher.go │ │ │ └── const.go │ │ ├── chacha20 │ │ │ ├── chacha_arm64.go │ │ │ ├── chacha_arm64.s │ │ │ ├── chacha_generic.go │ │ │ ├── chacha_noasm.go │ │ │ ├── chacha_ppc64x.go │ │ │ ├── chacha_ppc64x.s │ │ │ ├── chacha_s390x.go │ │ │ ├── chacha_s390x.s │ │ │ └── xor.go │ │ ├── curve25519 │ │ │ └── curve25519.go │ │ ├── internal │ │ │ ├── alias │ │ │ │ ├── alias.go │ │ │ │ └── alias_purego.go │ │ │ └── poly1305 │ │ │ │ ├── mac_noasm.go │ │ │ │ ├── poly1305.go │ │ │ │ ├── sum_amd64.s │ │ │ │ ├── sum_asm.go │ │ │ │ ├── sum_generic.go │ │ │ │ ├── sum_loong64.s │ │ │ │ ├── sum_ppc64x.s │ │ │ │ ├── sum_s390x.go │ │ │ │ └── sum_s390x.s │ │ └── ssh │ │ │ ├── buffer.go │ │ │ ├── certs.go │ │ │ ├── channel.go │ │ │ ├── cipher.go │ │ │ ├── client.go │ │ │ ├── client_auth.go │ │ │ ├── common.go │ │ │ ├── connection.go │ │ │ ├── doc.go │ │ │ ├── handshake.go │ │ │ ├── internal │ │ │ └── bcrypt_pbkdf │ │ │ │ └── bcrypt_pbkdf.go │ │ │ ├── kex.go │ │ │ ├── keys.go │ │ │ ├── mac.go │ │ │ ├── messages.go │ │ │ ├── mlkem.go │ │ │ ├── mux.go │ │ │ ├── server.go │ │ │ ├── session.go │ │ │ ├── ssh_gss.go │ │ │ ├── streamlocal.go │ │ │ ├── tcpip.go │ │ │ └── transport.go │ │ ├── net │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── context │ │ │ └── context.go │ │ ├── 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 │ │ ├── internal │ │ │ └── socks │ │ │ │ ├── client.go │ │ │ │ └── socks.go │ │ └── proxy │ │ │ ├── dial.go │ │ │ ├── direct.go │ │ │ ├── per_host.go │ │ │ ├── proxy.go │ │ │ └── socks5.go │ │ ├── sys │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── cpu │ │ │ ├── asm_aix_ppc64.s │ │ │ ├── asm_darwin_x86_gc.s │ │ │ ├── byteorder.go │ │ │ ├── cpu.go │ │ │ ├── cpu_aix.go │ │ │ ├── cpu_arm.go │ │ │ ├── cpu_arm64.go │ │ │ ├── cpu_arm64.s │ │ │ ├── cpu_darwin_x86.go │ │ │ ├── cpu_gc_arm64.go │ │ │ ├── cpu_gc_s390x.go │ │ │ ├── cpu_gc_x86.go │ │ │ ├── cpu_gc_x86.s │ │ │ ├── cpu_gccgo_arm64.go │ │ │ ├── cpu_gccgo_s390x.go │ │ │ ├── cpu_gccgo_x86.c │ │ │ ├── cpu_gccgo_x86.go │ │ │ ├── cpu_linux.go │ │ │ ├── cpu_linux_arm.go │ │ │ ├── cpu_linux_arm64.go │ │ │ ├── cpu_linux_loong64.go │ │ │ ├── cpu_linux_mips64x.go │ │ │ ├── cpu_linux_noinit.go │ │ │ ├── cpu_linux_ppc64x.go │ │ │ ├── cpu_linux_riscv64.go │ │ │ ├── cpu_linux_s390x.go │ │ │ ├── cpu_loong64.go │ │ │ ├── cpu_loong64.s │ │ │ ├── cpu_mips64x.go │ │ │ ├── cpu_mipsx.go │ │ │ ├── cpu_netbsd_arm64.go │ │ │ ├── cpu_openbsd_arm64.go │ │ │ ├── cpu_openbsd_arm64.s │ │ │ ├── cpu_other_arm.go │ │ │ ├── cpu_other_arm64.go │ │ │ ├── cpu_other_mips64x.go │ │ │ ├── cpu_other_ppc64x.go │ │ │ ├── cpu_other_riscv64.go │ │ │ ├── cpu_other_x86.go │ │ │ ├── cpu_ppc64x.go │ │ │ ├── cpu_riscv64.go │ │ │ ├── cpu_s390x.go │ │ │ ├── cpu_s390x.s │ │ │ ├── cpu_wasm.go │ │ │ ├── cpu_x86.go │ │ │ ├── cpu_zos.go │ │ │ ├── cpu_zos_s390x.go │ │ │ ├── endian_big.go │ │ │ ├── endian_little.go │ │ │ ├── hwcap_linux.go │ │ │ ├── parse.go │ │ │ ├── proc_cpuinfo_linux.go │ │ │ ├── runtime_auxv.go │ │ │ ├── runtime_auxv_go121.go │ │ │ ├── syscall_aix_gccgo.go │ │ │ ├── syscall_aix_ppc64_gc.go │ │ │ └── syscall_darwin_x86_gc.go │ │ ├── plan9 │ │ │ ├── asm.s │ │ │ ├── asm_plan9_386.s │ │ │ ├── asm_plan9_amd64.s │ │ │ ├── asm_plan9_arm.s │ │ │ ├── const_plan9.go │ │ │ ├── dir_plan9.go │ │ │ ├── env_plan9.go │ │ │ ├── errors_plan9.go │ │ │ ├── mkall.sh │ │ │ ├── mkerrors.sh │ │ │ ├── mksysnum_plan9.sh │ │ │ ├── pwd_go15_plan9.go │ │ │ ├── pwd_plan9.go │ │ │ ├── race.go │ │ │ ├── race0.go │ │ │ ├── str.go │ │ │ ├── syscall.go │ │ │ ├── syscall_plan9.go │ │ │ ├── zsyscall_plan9_386.go │ │ │ ├── zsyscall_plan9_amd64.go │ │ │ ├── zsyscall_plan9_arm.go │ │ │ └── zsysnum_plan9.go │ │ ├── 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 │ │ └── windows │ │ │ ├── aliases.go │ │ │ ├── dll_windows.go │ │ │ ├── env_windows.go │ │ │ ├── eventlog.go │ │ │ ├── exec_windows.go │ │ │ ├── memory_windows.go │ │ │ ├── mkerrors.bash │ │ │ ├── mkknownfolderids.bash │ │ │ ├── mksyscall.go │ │ │ ├── race.go │ │ │ ├── race0.go │ │ │ ├── security_windows.go │ │ │ ├── service.go │ │ │ ├── setupapi_windows.go │ │ │ ├── str.go │ │ │ ├── syscall.go │ │ │ ├── syscall_windows.go │ │ │ ├── types_windows.go │ │ │ ├── types_windows_386.go │ │ │ ├── types_windows_amd64.go │ │ │ ├── types_windows_arm.go │ │ │ ├── types_windows_arm64.go │ │ │ ├── zerrors_windows.go │ │ │ ├── zknownfolderids_windows.go │ │ │ └── zsyscall_windows.go │ │ ├── term │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── README.md │ │ ├── codereview.cfg │ │ ├── term.go │ │ ├── term_plan9.go │ │ ├── term_unix.go │ │ ├── term_unix_bsd.go │ │ ├── term_unix_other.go │ │ ├── term_unsupported.go │ │ ├── term_windows.go │ │ └── terminal.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 │ │ │ └── inspector │ │ │ ├── inspector.go │ │ │ ├── iter.go │ │ │ ├── typeof.go │ │ │ └── walk.go │ │ └── internal │ │ └── astutil │ │ └── edge │ │ └── edge.go ├── google.golang.org │ └── protobuf │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── encoding │ │ ├── prototext │ │ │ ├── decode.go │ │ │ ├── doc.go │ │ │ └── encode.go │ │ └── protowire │ │ │ └── wire.go │ │ ├── internal │ │ ├── descfmt │ │ │ └── stringer.go │ │ ├── descopts │ │ │ └── options.go │ │ ├── detrand │ │ │ └── rand.go │ │ ├── editiondefaults │ │ │ ├── defaults.go │ │ │ └── editions_defaults.binpb │ │ ├── encoding │ │ │ ├── defval │ │ │ │ └── default.go │ │ │ ├── messageset │ │ │ │ └── messageset.go │ │ │ ├── tag │ │ │ │ └── tag.go │ │ │ └── text │ │ │ │ ├── decode.go │ │ │ │ ├── decode_number.go │ │ │ │ ├── decode_string.go │ │ │ │ ├── decode_token.go │ │ │ │ ├── doc.go │ │ │ │ └── encode.go │ │ ├── errors │ │ │ └── errors.go │ │ ├── filedesc │ │ │ ├── build.go │ │ │ ├── desc.go │ │ │ ├── desc_init.go │ │ │ ├── desc_lazy.go │ │ │ ├── desc_list.go │ │ │ ├── desc_list_gen.go │ │ │ ├── editions.go │ │ │ └── placeholder.go │ │ ├── filetype │ │ │ └── build.go │ │ ├── flags │ │ │ ├── flags.go │ │ │ ├── proto_legacy_disable.go │ │ │ └── proto_legacy_enable.go │ │ ├── genid │ │ │ ├── any_gen.go │ │ │ ├── api_gen.go │ │ │ ├── descriptor_gen.go │ │ │ ├── doc.go │ │ │ ├── duration_gen.go │ │ │ ├── empty_gen.go │ │ │ ├── field_mask_gen.go │ │ │ ├── go_features_gen.go │ │ │ ├── goname.go │ │ │ ├── map_entry.go │ │ │ ├── name.go │ │ │ ├── source_context_gen.go │ │ │ ├── struct_gen.go │ │ │ ├── timestamp_gen.go │ │ │ ├── type_gen.go │ │ │ ├── wrappers.go │ │ │ └── wrappers_gen.go │ │ ├── impl │ │ │ ├── api_export.go │ │ │ ├── api_export_opaque.go │ │ │ ├── bitmap.go │ │ │ ├── bitmap_race.go │ │ │ ├── checkinit.go │ │ │ ├── codec_extension.go │ │ │ ├── codec_field.go │ │ │ ├── codec_field_opaque.go │ │ │ ├── codec_gen.go │ │ │ ├── codec_map.go │ │ │ ├── codec_message.go │ │ │ ├── codec_message_opaque.go │ │ │ ├── codec_messageset.go │ │ │ ├── codec_tables.go │ │ │ ├── codec_unsafe.go │ │ │ ├── convert.go │ │ │ ├── convert_list.go │ │ │ ├── convert_map.go │ │ │ ├── decode.go │ │ │ ├── encode.go │ │ │ ├── enum.go │ │ │ ├── equal.go │ │ │ ├── extension.go │ │ │ ├── lazy.go │ │ │ ├── legacy_enum.go │ │ │ ├── legacy_export.go │ │ │ ├── legacy_extension.go │ │ │ ├── legacy_file.go │ │ │ ├── legacy_message.go │ │ │ ├── merge.go │ │ │ ├── merge_gen.go │ │ │ ├── message.go │ │ │ ├── message_opaque.go │ │ │ ├── message_opaque_gen.go │ │ │ ├── message_reflect.go │ │ │ ├── message_reflect_field.go │ │ │ ├── message_reflect_field_gen.go │ │ │ ├── message_reflect_gen.go │ │ │ ├── pointer_unsafe.go │ │ │ ├── pointer_unsafe_opaque.go │ │ │ ├── presence.go │ │ │ └── validate.go │ │ ├── order │ │ │ ├── order.go │ │ │ └── range.go │ │ ├── pragma │ │ │ └── pragma.go │ │ ├── protolazy │ │ │ ├── bufferreader.go │ │ │ ├── lazy.go │ │ │ └── pointer_unsafe.go │ │ ├── set │ │ │ └── ints.go │ │ ├── strs │ │ │ ├── strings.go │ │ │ └── strings_unsafe.go │ │ └── version │ │ │ └── version.go │ │ ├── proto │ │ ├── checkinit.go │ │ ├── decode.go │ │ ├── decode_gen.go │ │ ├── doc.go │ │ ├── encode.go │ │ ├── encode_gen.go │ │ ├── equal.go │ │ ├── extension.go │ │ ├── merge.go │ │ ├── messageset.go │ │ ├── proto.go │ │ ├── proto_methods.go │ │ ├── proto_reflect.go │ │ ├── reset.go │ │ ├── size.go │ │ ├── size_gen.go │ │ ├── wrapperopaque.go │ │ └── wrappers.go │ │ ├── protoadapt │ │ └── convert.go │ │ ├── reflect │ │ ├── protoreflect │ │ │ ├── methods.go │ │ │ ├── proto.go │ │ │ ├── source.go │ │ │ ├── source_gen.go │ │ │ ├── type.go │ │ │ ├── value.go │ │ │ ├── value_equal.go │ │ │ ├── value_union.go │ │ │ └── value_unsafe.go │ │ └── protoregistry │ │ │ └── registry.go │ │ └── runtime │ │ ├── protoiface │ │ ├── legacy.go │ │ └── methods.go │ │ └── protoimpl │ │ ├── impl.go │ │ └── version.go ├── gopkg.in │ ├── yaml.v2 │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── LICENSE.libyaml │ │ ├── NOTICE │ │ ├── README.md │ │ ├── apic.go │ │ ├── decode.go │ │ ├── emitterc.go │ │ ├── encode.go │ │ ├── parserc.go │ │ ├── readerc.go │ │ ├── resolve.go │ │ ├── scannerc.go │ │ ├── sorter.go │ │ ├── writerc.go │ │ ├── yaml.go │ │ ├── yamlh.go │ │ └── yamlprivateh.go │ └── 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 └── version └── version.go /.cf-extensions: -------------------------------------------------------------------------------- 1 | --- 2 | description: CredHub CLI provides a command line interface and go client for CredHub servers. 3 | lead_company: Pivotal 4 | contact_email: djahner@pivotal.io 5 | tracker_url: https://www.pivotaltracker.com/n/projects/1977341 6 | proposal_url: https://github.com/cloudfoundry-incubator/credhub/blob/master/docs/product-summary.md 7 | proposed_date: '2017-02-20T12:00:00.000Z' 8 | logo_url: https://raw.githubusercontent.com/cloudfoundry-incubator/credhub/master/docs/images/logo.png 9 | icon_url: https://raw.githubusercontent.com/cloudfoundry-incubator/credhub/master/docs/images/icon.png 10 | -------------------------------------------------------------------------------- /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | What version of the credhub server you are using? 2 | 3 | 4 | What version of the credhub cli you are using? 5 | 6 | 7 | If you were attempting to accomplish a task, what was it you were attempting to do? 8 | 9 | 10 | What did you expect to happen? 11 | 12 | 13 | What was the actual behavior? 14 | 15 | 16 | Please confirm where necessary: 17 | * [ ] I have included a log output 18 | * [ ] My log includes an error message 19 | * [ ] I have included steps for reproduction 20 | 21 | If you are a PCF customer with an Operation Manager (PCF Ops Manager) please direct your questions to support (https://support.pivotal.io/) 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | credhub-cli 3 | *.iml 4 | *.pem 5 | *.crt 6 | *.key 7 | .idea 8 | tmp 9 | !test/*.pem 10 | !credhub/fixtures/*.pem 11 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all build ci clean dependencies format ginkgo test 2 | 3 | ifeq ($(GOOS),windows) 4 | DEST = build/credhub.exe 5 | else 6 | DEST = build/credhub 7 | endif 8 | 9 | ifndef VERSION 10 | VERSION = dev 11 | endif 12 | 13 | all: test clean build 14 | 15 | clean: 16 | rm -rf build 17 | 18 | format: 19 | go fmt . 20 | 21 | ginkgo: 22 | go run -mod=mod github.com/onsi/ginkgo/v2/ginkgo -r --randomize-suites --randomize-all --race -p 2>&1 23 | 24 | test: format ginkgo 25 | 26 | ci: ginkgo 27 | 28 | build: 29 | mkdir -p build 30 | CGO_ENABLED=0 go build -o $(DEST) -ldflags "-X code.cloudfoundry.org/credhub-cli/version.Version=${VERSION}" 31 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | credhub-cli 2 | 3 | Copyright (c) 2016-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 | -------------------------------------------------------------------------------- /commands/bulk_regenerate.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | type BulkRegenerateCommand struct { 4 | SignedBy string `required:"yes" long:"signed-by" description:"Selects the credential whose children should recursively be regenerated"` 5 | OutputJSON bool `short:"j" long:"output-json" description:"Return response in JSON format"` 6 | ClientCommand 7 | } 8 | 9 | func (c *BulkRegenerateCommand) Execute([]string) error { 10 | credentials, err := c.client.BulkRegenerate(c.SignedBy) 11 | if err != nil { 12 | return err 13 | } 14 | 15 | formatOutput(c.OutputJSON, credentials) 16 | 17 | return nil 18 | } 19 | -------------------------------------------------------------------------------- /commands/delete_permission.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | type DeletePermissionCommand struct { 8 | Actor string `short:"a" long:"actor" required:"yes" description:"Name of the actor to grant permissions for"` 9 | Path string `short:"p" long:"path" required:"yes" description:"Name of path to grant permissions for"` 10 | ClientCommand 11 | } 12 | 13 | func (c *DeletePermissionCommand) DeletePermission(uuid string) error { 14 | 15 | permission, err := c.client.DeletePermission(uuid) 16 | if err != nil { 17 | return err 18 | } 19 | 20 | formatOutput(false, permission) 21 | return nil 22 | } 23 | 24 | func (c *DeletePermissionCommand) Execute([]string) error { 25 | serverVersion, _ := c.client.ServerVersion() 26 | isOlderVersion := serverVersion.Segments()[0] < 2 27 | if isOlderVersion { 28 | return fmt.Errorf("credhub server version <2.0 not supported") 29 | } 30 | 31 | permission, err := c.client.GetPermissionByPathActor(c.Path, c.Actor) 32 | if err != nil { 33 | return err 34 | } 35 | return c.DeletePermission(permission.UUID) 36 | } 37 | -------------------------------------------------------------------------------- /commands/error_test.go: -------------------------------------------------------------------------------- 1 | package commands_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo/v2" 5 | . "github.com/onsi/gomega" 6 | . "github.com/onsi/gomega/gexec" 7 | ) 8 | 9 | var _ = Describe("Errors", func() { 10 | It("prints newline after error messages", func() { 11 | session := runCommand("bogus-command") 12 | 13 | Eventually(session).Should(Exit(1)) 14 | Eventually(session.Err.Contents()).Should(MatchRegexp("\n$")) 15 | }) 16 | }) 17 | -------------------------------------------------------------------------------- /commands/get_permission.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | type GetPermissionCommand struct { 8 | Actor string `short:"a" long:"actor" required:"yes" description:"Name of the actor to grant permissions for"` 9 | Path string `short:"p" long:"path" required:"yes" description:"Name of path to grant permissions for"` 10 | OutputJSON bool `short:"j" long:"output-json" description:"Return response in JSON format"` 11 | ClientCommand 12 | } 13 | 14 | func (c *GetPermissionCommand) GetPermission() error { 15 | permission, err := c.client.GetPermissionByPathActor(c.Path, c.Actor) 16 | if err != nil { 17 | return err 18 | } 19 | 20 | formatOutput(c.OutputJSON, permission) 21 | return err 22 | } 23 | 24 | func (c *GetPermissionCommand) Execute([]string) error { 25 | serverVersion, _ := c.client.ServerVersion() 26 | isOlderVersion := serverVersion.Segments()[0] < 2 27 | if isOlderVersion { 28 | return fmt.Errorf("credhub server version <2.0 not supported") 29 | } 30 | return c.GetPermission() 31 | 32 | } 33 | -------------------------------------------------------------------------------- /commands/testdata/bulk_regenerate_response.json: -------------------------------------------------------------------------------- 1 | {"regenerated_credentials": [ 2 | "cert1", 3 | "cert2", 4 | "cert3" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /commands/testdata/delete_response.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry/credhub-cli/23ef6051e1999dbfc28cbfe817159ae19bad3a42/commands/testdata/delete_response.json -------------------------------------------------------------------------------- /commands/testdata/find_response.json: -------------------------------------------------------------------------------- 1 | {"credentials": [{"name": "key", "version_created_at": "something"}]} 2 | -------------------------------------------------------------------------------- /commands/testdata/generate_response.json: -------------------------------------------------------------------------------- 1 | {"data": [{ 2 | "type":"password", 3 | "id":"some_uuid", 4 | "name":"my-password", 5 | "version_created_at":"idc", 6 | "value":"some-password" 7 | }]} 8 | -------------------------------------------------------------------------------- /commands/testdata/get_permission_response.json: -------------------------------------------------------------------------------- 1 | {"error": "The request could not be completed because the permission does not exist or you do not have sufficient authorization."} 2 | -------------------------------------------------------------------------------- /commands/testdata/get_response.json: -------------------------------------------------------------------------------- 1 | {"data": [{ 2 | "type":"json", 3 | "id":"some_uuid", 4 | "name":"my-json", 5 | "version_created_at":"idc", 6 | "value":{"key": 1} 7 | }]} 8 | -------------------------------------------------------------------------------- /commands/testdata/regenerate_response.json: -------------------------------------------------------------------------------- 1 | {"data": [{ 2 | "type":"password", 3 | "id":"some_uuid", 4 | "name":"my-password", 5 | "version_created_at":"idc", 6 | "value":"some-password" 7 | }]} 8 | -------------------------------------------------------------------------------- /commands/testdata/set_permission_response.json: -------------------------------------------------------------------------------- 1 | {"actor": "some-actor", 2 | "operations": [ 3 | "read", 4 | "write", 5 | "delete" 6 | ], 7 | "path": "'/some-path'", 8 | "uuid": "5a2edd4f-1686-4c8d-80eb-5daa866f9f86"} 9 | -------------------------------------------------------------------------------- /commands/testdata/set_response.json: -------------------------------------------------------------------------------- 1 | {"data": [{ 2 | "type":"json", 3 | "id":"some_uuid", 4 | "name":"my-json", 5 | "version_created_at":"idc", 6 | "value":{"key": 1} 7 | }]} 8 | -------------------------------------------------------------------------------- /commands/version.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "fmt" 5 | 6 | "os" 7 | 8 | "code.cloudfoundry.org/credhub-cli/config" 9 | "code.cloudfoundry.org/credhub-cli/version" 10 | ) 11 | 12 | func PrintVersion() error { 13 | cfg := config.ReadConfig() 14 | 15 | credHubServerVersion := "Not Found. Have you targeted and authenticated against a CredHub server?" 16 | fmt.Println("CLI Version:", version.Version) 17 | 18 | if cfg.ApiURL != "" { 19 | credhubClient, err := initializeCredhubClient(cfg) 20 | 21 | if err == nil { 22 | version, err := credhubClient.ServerVersion() 23 | if err == nil { 24 | credHubServerVersion = version.String() 25 | } 26 | } 27 | } 28 | 29 | fmt.Println("Server Version:", credHubServerVersion) 30 | 31 | return nil 32 | } 33 | 34 | func init() { 35 | CredHub.Version = func() { 36 | PrintVersion() 37 | os.Exit(0) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /config/config_suite_test.go: -------------------------------------------------------------------------------- 1 | package config_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo/v2" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestClient(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Config Suite") 13 | } 14 | -------------------------------------------------------------------------------- /config/config_unix.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package config 5 | 6 | import ( 7 | "os" 8 | ) 9 | 10 | func userHomeDir() string { 11 | return os.Getenv("HOME") 12 | } 13 | 14 | func makeDirectory() error { 15 | return os.MkdirAll(ConfigDir(), 0755) 16 | } 17 | -------------------------------------------------------------------------------- /config/config_unix_test.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package config_test 5 | 6 | import ( 7 | "os" 8 | 9 | "path" 10 | 11 | "code.cloudfoundry.org/credhub-cli/config" 12 | . "github.com/onsi/ginkgo/v2" 13 | . "github.com/onsi/gomega" 14 | ) 15 | 16 | var _ = Describe("Config", func() { 17 | var cfg config.Config 18 | var cachedConfig config.Config 19 | 20 | BeforeEach(func() { 21 | cachedConfig = config.ReadConfig() 22 | cfg = config.Config{ 23 | ConfigWithoutSecrets: config.ConfigWithoutSecrets{ 24 | ApiURL: "http://api.example.com", 25 | AuthURL: "http://auth.example.com", 26 | }, 27 | } 28 | }) 29 | 30 | AfterEach(func() { 31 | config.WriteConfig(cachedConfig) 32 | }) 33 | 34 | It("set appropriate permissions for persisted files", func() { 35 | config.WriteConfig(cfg) 36 | 37 | parentStat, _ := os.Stat(path.Dir(config.ConfigPath())) 38 | Expect(parentStat.Mode().String()).To(Equal("drwxr-xr-x")) 39 | 40 | fileStat, _ := os.Stat(config.ConfigPath()) 41 | Expect(fileStat.Mode().String()).To(Equal("-rw-------")) 42 | }) 43 | }) 44 | -------------------------------------------------------------------------------- /config/config_win.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package config 5 | 6 | import ( 7 | "os" 8 | "syscall" 9 | ) 10 | 11 | func userHomeDir() string { 12 | home := os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH") 13 | if home == "" { 14 | home = os.Getenv("USERPROFILE") 15 | } 16 | return home 17 | } 18 | 19 | func makeDirectory() error { 20 | dir := ConfigDir() 21 | 22 | err := os.MkdirAll(dir, 0755) 23 | if err != nil { 24 | return err 25 | } 26 | 27 | p, err := syscall.UTF16PtrFromString(dir) 28 | if err != nil { 29 | return err 30 | } 31 | 32 | attrs, err := syscall.GetFileAttributes(p) 33 | if err != nil { 34 | return err 35 | } 36 | 37 | return syscall.SetFileAttributes(p, attrs|syscall.FILE_ATTRIBUTE_HIDDEN) 38 | } 39 | -------------------------------------------------------------------------------- /config/config_win_test.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package config_test 5 | 6 | import ( 7 | "syscall" 8 | 9 | "code.cloudfoundry.org/credhub-cli/config" 10 | . "github.com/onsi/ginkgo/v2" 11 | . "github.com/onsi/gomega" 12 | ) 13 | 14 | var _ = Describe("Config (windows specific)", func() { 15 | var cfg config.Config 16 | 17 | BeforeEach(func() { 18 | cfg = config.Config{ 19 | ConfigWithoutSecrets: config.ConfigWithoutSecrets{ 20 | ApiURL: "http://api.example.com", 21 | AuthURL: "http://auth.example.com", 22 | }, 23 | } 24 | }) 25 | 26 | It("hides the config directory", func() { 27 | err := config.WriteConfig(cfg) 28 | Expect(err).NotTo(HaveOccurred()) 29 | 30 | p, err := syscall.UTF16PtrFromString(config.ConfigDir()) 31 | Expect(err).ToNot(HaveOccurred()) 32 | 33 | attrs, err := syscall.GetFileAttributes(p) 34 | Expect(err).ToNot(HaveOccurred()) 35 | 36 | Expect(attrs & syscall.FILE_ATTRIBUTE_HIDDEN).To(Equal(uint32(syscall.FILE_ATTRIBUTE_HIDDEN))) 37 | }) 38 | }) 39 | -------------------------------------------------------------------------------- /config/config_without_secrets.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import "time" 4 | 5 | type ConfigWithoutSecrets struct { 6 | ApiURL string 7 | AuthURL string 8 | AccessToken string 9 | RefreshToken string 10 | InsecureSkipVerify bool 11 | CaCerts []string 12 | ServerVersion string 13 | HttpTimeout *time.Duration 14 | } 15 | 16 | func ConvertConfigToConfigWithoutSecrets(config Config) ConfigWithoutSecrets { 17 | return ConfigWithoutSecrets{ 18 | ApiURL: config.ApiURL, 19 | AuthURL: config.AuthURL, 20 | AccessToken: config.AccessToken, 21 | RefreshToken: config.RefreshToken, 22 | InsecureSkipVerify: config.InsecureSkipVerify, 23 | CaCerts: config.CaCerts, 24 | ServerVersion: config.ServerVersion, 25 | HttpTimeout: config.HttpTimeout, 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /config/validation.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import "code.cloudfoundry.org/credhub-cli/errors" 4 | 5 | func ValidateConfig(c Config) error { 6 | err := ValidateConfigApi(c) 7 | if err != nil { 8 | return err 9 | } else if (c.AccessToken == "" || c.AccessToken == "revoked") && c.ClientID == "" { 10 | return errors.NewRevokedTokenError() 11 | } 12 | 13 | return nil 14 | } 15 | 16 | func ValidateConfigApi(c Config) error { 17 | if c.ApiURL == "" { 18 | return errors.NewNoApiUrlSetError() 19 | } 20 | 21 | return nil 22 | } 23 | -------------------------------------------------------------------------------- /credhub/auth/example_test.go: -------------------------------------------------------------------------------- 1 | package auth_test 2 | 3 | import ( 4 | "fmt" 5 | 6 | "code.cloudfoundry.org/credhub-cli/credhub" 7 | "code.cloudfoundry.org/credhub-cli/credhub/auth" 8 | ) 9 | 10 | func ExampleAuth() { 11 | _ = func() { 12 | // To retrieve the access token from the CredHub client, use type assertion 13 | ch, err := credhub.New( 14 | "http://example.com", 15 | credhub.Auth(auth.UaaPassword("client-id", "client-secret", "username", "password")), 16 | ) 17 | if err != nil { 18 | panic("couldn't connect to credhub") 19 | } 20 | 21 | oauth, ok := ch.Auth.(*auth.OAuthStrategy) 22 | if !ok { 23 | panic("Not using UAA") 24 | } 25 | 26 | fmt.Println("Before logging out: ", oauth.AccessToken()) 27 | oauth.Logout() 28 | fmt.Println("After logging out: ", oauth.AccessToken()) 29 | // Sample Output: 30 | // Before logging out: some-access-token 31 | // After logging out: 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /credhub/auth/noop.go: -------------------------------------------------------------------------------- 1 | package auth 2 | 3 | import "net/http" 4 | 5 | // NoopStrategy will submit requests with no additional authentication 6 | type NoopStrategy struct { 7 | *http.Client 8 | } 9 | 10 | var _ Strategy = new(NoopStrategy) 11 | -------------------------------------------------------------------------------- /credhub/auth/strategy.go: -------------------------------------------------------------------------------- 1 | // CredHub authentication strategies 2 | package auth 3 | 4 | import ( 5 | "net/http" 6 | ) 7 | 8 | // Strategy provides http.Client-like interface to send authenticated requests to the server 9 | // 10 | // Modifies the request and client to include authentication based on the authentication strategy 11 | type Strategy interface { 12 | Do(req *http.Request) (*http.Response, error) 13 | } 14 | -------------------------------------------------------------------------------- /credhub/auth/uaa/uaa_suite_test.go: -------------------------------------------------------------------------------- 1 | package uaa_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo/v2" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestUaa(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Uaa Suite") 13 | } 14 | -------------------------------------------------------------------------------- /credhub/bulk_regenerate.go: -------------------------------------------------------------------------------- 1 | package credhub 2 | 3 | import ( 4 | "encoding/json" 5 | "io" 6 | "net/http" 7 | 8 | "code.cloudfoundry.org/credhub-cli/credhub/credentials" 9 | ) 10 | 11 | func (ch *CredHub) BulkRegenerate(signedBy string) (credentials.BulkRegenerateResults, error) { 12 | var creds credentials.BulkRegenerateResults 13 | 14 | bulkRegenerateEndpoint := "/api/v1/bulk-regenerate" 15 | 16 | requestBody := map[string]interface{}{} 17 | requestBody["signed_by"] = signedBy 18 | 19 | resp, err := ch.Request(http.MethodPost, bulkRegenerateEndpoint, nil, requestBody, true) 20 | 21 | if err != nil { 22 | return credentials.BulkRegenerateResults{}, err 23 | } 24 | 25 | defer resp.Body.Close() 26 | defer io.Copy(io.Discard, resp.Body) 27 | dec := json.NewDecoder(resp.Body) 28 | err = dec.Decode(&creds) 29 | 30 | return creds, err 31 | } 32 | -------------------------------------------------------------------------------- /credhub/credentials/credentials_suite_test.go: -------------------------------------------------------------------------------- 1 | package credentials_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo/v2" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestCredentials(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Credentials Suite") 13 | } 14 | -------------------------------------------------------------------------------- /credhub/credentials/values/types.go: -------------------------------------------------------------------------------- 1 | // CredHub credential value types 2 | package values 3 | 4 | type Value string 5 | 6 | type JSON map[string]interface{} 7 | 8 | type Password string 9 | 10 | type User struct { 11 | Username string `json:"username"` 12 | Password string `json:"password"` 13 | } 14 | 15 | type Certificate struct { 16 | Ca string `json:"ca"` 17 | CaName string `json:"ca_name,omitempty" yaml:"ca_name,omitempty"` 18 | Certificate string `json:"certificate"` 19 | PrivateKey string `json:"private_key" yaml:"private_key"` 20 | } 21 | 22 | type RSA struct { 23 | PublicKey string `json:"public_key" yaml:"public_key"` 24 | PrivateKey string `json:"private_key" yaml:"private_key"` 25 | } 26 | 27 | type SSH struct { 28 | PublicKey string `json:"public_key" yaml:"public_key"` 29 | PrivateKey string `json:"private_key" yaml:"private_key"` 30 | } 31 | -------------------------------------------------------------------------------- /credhub/credhub_suite_test.go: -------------------------------------------------------------------------------- 1 | package credhub_test 2 | 3 | import ( 4 | "encoding/json" 5 | "errors" 6 | "net/http" 7 | 8 | "code.cloudfoundry.org/credhub-cli/credhub/auth" 9 | . "github.com/onsi/ginkgo/v2" 10 | . "github.com/onsi/gomega" 11 | 12 | "testing" 13 | ) 14 | 15 | func TestCredhub(t *testing.T) { 16 | RegisterFailHandler(Fail) 17 | RunSpecs(t, "CredHub API Client Suite") 18 | } 19 | 20 | type DummyAuth struct { 21 | Config auth.Config 22 | Request *http.Request 23 | Response *http.Response 24 | Error error 25 | } 26 | 27 | func (d *DummyAuth) Do(req *http.Request) (*http.Response, error) { 28 | d.Request = req 29 | 30 | return d.Response, d.Error 31 | } 32 | 33 | func (d *DummyAuth) Builder() auth.Builder { 34 | return func(config auth.Config) (auth.Strategy, error) { 35 | return d, nil 36 | } 37 | } 38 | 39 | var _ auth.Strategy = new(DummyAuth) 40 | 41 | type NotMarshallable struct{} 42 | 43 | func (u *NotMarshallable) MarshalJSON() ([]byte, error) { 44 | return nil, errors.New("I cannot be marshalled") 45 | } 46 | 47 | var _ json.Marshaler = new(NotMarshallable) 48 | -------------------------------------------------------------------------------- /credhub/delete.go: -------------------------------------------------------------------------------- 1 | package credhub 2 | 3 | import ( 4 | "net/http" 5 | "net/url" 6 | ) 7 | 8 | // Delete will delete all versions of a credential by name 9 | func (ch *CredHub) Delete(name string) error { 10 | query := url.Values{} 11 | query.Set("name", name) 12 | resp, err := ch.Request(http.MethodDelete, "/api/v1/data", query, nil, true) 13 | 14 | if err == nil { 15 | defer resp.Body.Close() 16 | } 17 | 18 | return err 19 | } 20 | -------------------------------------------------------------------------------- /credhub/error.go: -------------------------------------------------------------------------------- 1 | package credhub 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | ) 7 | 8 | // Error provides errors for the CredHub client 9 | type Error struct { 10 | Name string `json:"error"` 11 | Description string `json:"error_description"` 12 | } 13 | 14 | func (e *Error) Error() string { 15 | if e.Description == "" { 16 | return e.Name 17 | } 18 | return fmt.Sprintf("%s: %s", e.Name, e.Description) 19 | } 20 | 21 | func newCredhubError(name, description string) error { 22 | return &Error{ 23 | Name: name, 24 | Description: description, 25 | } 26 | } 27 | 28 | type NotFoundError struct { 29 | Description string `json:"error"` 30 | } 31 | 32 | func (e *NotFoundError) Error() string { 33 | return e.Description 34 | } 35 | 36 | var ServerDoesNotSupportMetadataError = errors.New("the server does not support credential metadata, requires >= 2.6.x") 37 | -------------------------------------------------------------------------------- /credhub/interpolate.go: -------------------------------------------------------------------------------- 1 | package credhub 2 | 3 | import ( 4 | "encoding/json" 5 | "io" 6 | "net/http" 7 | "strings" 8 | ) 9 | 10 | // InterpolateString translates credhub refs in a VCAP_SERVICES object into actual credentials 11 | func (ch *CredHub) InterpolateString(vcapServicesBody string) (string, error) { 12 | if !strings.Contains(vcapServicesBody, `"credhub-ref"`) { 13 | return vcapServicesBody, nil 14 | } 15 | 16 | requestBody := map[string]interface{}{} 17 | if err := json.Unmarshal([]byte(vcapServicesBody), &requestBody); err != nil { 18 | return "", err 19 | } 20 | 21 | resp, err := ch.Request(http.MethodPost, "/api/v1/interpolate", nil, requestBody, true) 22 | if err != nil { 23 | return "", err 24 | } 25 | 26 | defer resp.Body.Close() 27 | 28 | if err := ch.checkForServerError(resp); err != nil { 29 | return "", err 30 | } 31 | 32 | body, err := io.ReadAll(resp.Body) 33 | if err != nil { 34 | return "", err 35 | } 36 | 37 | return string(body), nil 38 | } 39 | -------------------------------------------------------------------------------- /credhub/mode.go: -------------------------------------------------------------------------------- 1 | package credhub 2 | 3 | type Mode string 4 | 5 | const ( 6 | Overwrite Mode = "overwrite" 7 | NoOverwrite Mode = "no-overwrite" 8 | Converge Mode = "converge" 9 | ) 10 | -------------------------------------------------------------------------------- /credhub/new.go: -------------------------------------------------------------------------------- 1 | package credhub 2 | 3 | import ( 4 | "net/url" 5 | 6 | "code.cloudfoundry.org/credhub-cli/credhub/auth" 7 | ) 8 | 9 | // New provides a CredHub API client for the target server. Options can be 10 | // provided to specify additional parameters, including authentication. 11 | // See the Option type for a list of supported options. 12 | // 13 | // When targeting multiple CredHub servers, use a new CredHub API client 14 | // for each target server. 15 | func New(target string, options ...Option) (*CredHub, error) { 16 | baseURL, err := url.Parse(target) 17 | 18 | if err != nil { 19 | return nil, err 20 | } 21 | 22 | credhub := &CredHub{ 23 | ApiURL: target, 24 | baseURL: baseURL, 25 | authBuilder: auth.Noop, 26 | } 27 | 28 | for _, option := range options { 29 | if err := option(credhub); err != nil { 30 | return nil, err 31 | } 32 | } 33 | 34 | credhub.Auth, err = credhub.authBuilder(credhub) 35 | if err != nil { 36 | return nil, err 37 | } 38 | 39 | return credhub, nil 40 | } 41 | -------------------------------------------------------------------------------- /credhub/permissions/types.go: -------------------------------------------------------------------------------- 1 | // CredHub permission types 2 | package permissions 3 | 4 | type Permission struct { 5 | Actor string `json:"actor"` 6 | Operations []string `json:"operations"` 7 | Path string `json:"path"` 8 | UUID string `json:"uuid"` 9 | } 10 | 11 | type V1_Permission struct { 12 | Actor string `json:"actor"` 13 | Operations []string `json:"operations"` 14 | } 15 | -------------------------------------------------------------------------------- /credhub/server/types.go: -------------------------------------------------------------------------------- 1 | // CredHub server types 2 | package server 3 | 4 | type Info struct { 5 | App struct { 6 | Name string 7 | Version string 8 | } 9 | AuthServer struct { 10 | URL string 11 | } `json:"auth-server"` 12 | } 13 | 14 | type VersionData struct { 15 | Version string 16 | } 17 | -------------------------------------------------------------------------------- /errors/internal_errors.go: -------------------------------------------------------------------------------- 1 | package errors 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | func NewUnauthorizedError() error { 8 | return errors.New("Unauthorized") 9 | } 10 | -------------------------------------------------------------------------------- /main_suite_test.go: -------------------------------------------------------------------------------- 1 | package main_test 2 | 3 | import ( 4 | "runtime" 5 | "strings" 6 | "testing" 7 | 8 | . "github.com/onsi/ginkgo/v2" 9 | . "github.com/onsi/gomega" 10 | . "github.com/onsi/gomega/gexec" 11 | ) 12 | 13 | func TestCommands(t *testing.T) { 14 | RegisterFailHandler(Fail) 15 | RunSpecs(t, "Main Suite") 16 | } 17 | 18 | var ( 19 | commandPath string 20 | commandName string 21 | ) 22 | 23 | var _ = SynchronizedBeforeSuite(func() []byte { 24 | executable_path, err := Build("code.cloudfoundry.org/credhub-cli", "-ldflags", "-X code.cloudfoundry.org/credhub-cli/version.Version=test-version") 25 | Expect(err).NotTo(HaveOccurred()) 26 | return []byte(executable_path) 27 | }, func(data []byte) { 28 | commandPath = string(data) 29 | commandName = getLeafFileName(commandPath) 30 | }) 31 | 32 | func getLeafFileName(path string) string { 33 | var pathArray []string 34 | if runtime.GOOS == "windows" { 35 | pathArray = strings.Split(path, "\\") 36 | } else { 37 | pathArray = strings.Split(path, "/") 38 | } 39 | return pathArray[len(pathArray)-1] 40 | } 41 | -------------------------------------------------------------------------------- /models/models_suite_test.go: -------------------------------------------------------------------------------- 1 | package models_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo/v2" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestClient(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Models Suite") 13 | } 14 | -------------------------------------------------------------------------------- /scratch: -------------------------------------------------------------------------------- 1 | root 2 | int1 3 | int2 4 | int3 5 | leaf 6 | 7 | ___________________ 8 | 9 | int2 -> int1 -> int3 ->root -> leaf 10 | 11 | map certsMap{ 12 | int2:int1 13 | int1:root 14 | int3:int2 15 | leaf:int3 16 | } 17 | 18 | for cert in keyset(certsMap) { 19 | import(cert) 20 | } 21 | 22 | private import(cert) { 23 | ca = certmap(cert) 24 | if (certmap.contains(ca) { 25 | import(ca) 26 | } 27 | setInCredhub(cert) 28 | certmap.delete(cert) 29 | } 30 | -------------------------------------------------------------------------------- /scripts/lint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | function set_bash_error_handling() { 4 | set -euo pipefail 5 | } 6 | 7 | function go_to_project_root_directory() { 8 | local -r script_dir=$( dirname "${BASH_SOURCE[0]}") 9 | 10 | cd "$script_dir/.." 11 | } 12 | 13 | function lint_scripts() { 14 | shellcheck scripts/*.sh 15 | } 16 | 17 | function lint_go_code() { 18 | # shellcheck disable=SC2046 19 | go fmt $(go list ./... | grep -v /vendor/) 20 | } 21 | 22 | function main() { 23 | set_bash_error_handling 24 | go_to_project_root_directory 25 | lint_scripts 26 | lint_go_code 27 | } 28 | 29 | main 30 | -------------------------------------------------------------------------------- /scripts/run_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )" 5 | 6 | unset CREDHUB_DEBUG 7 | pushd "$DIR" >/dev/null 8 | make test 9 | popd >/dev/null 10 | -------------------------------------------------------------------------------- /staticcheck.conf: -------------------------------------------------------------------------------- 1 | checks = ["all", "-ST1008","-ST1005","-ST1001","-ST1012","-ST1000","-ST1003","-ST1016","-ST1020","-ST1021","-ST1022"] 2 | -------------------------------------------------------------------------------- /test/certificate-chain.json: -------------------------------------------------------------------------------- 1 | { 2 | "credentials": [ 3 | { 4 | "name": "/leaf_cert", 5 | "type": "certificate", 6 | "value": { 7 | "ca_name": "/intermediate_ca", 8 | "certificate": "leaf-certificate", 9 | "private_key": "leaf-private-key" 10 | } 11 | }, 12 | { 13 | "name": "/intermediate_ca", 14 | "type": "certificate", 15 | "value": { 16 | "ca_name": "/root_ca", 17 | "certificate": "intermediate-certificate", 18 | "private_key": "intermediate-private-key" 19 | } 20 | }, 21 | { 22 | "name": "/root_ca", 23 | "type": "certificate", 24 | "value": { 25 | "ca": "root-ca", 26 | "certificate": "root-certificate", 27 | "private_key": "root-private-key" 28 | } 29 | } 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /test/certificate-chain.yml: -------------------------------------------------------------------------------- 1 | credentials: 2 | - name: /leaf_cert 3 | type: certificate 4 | value: 5 | ca_name: /intermediate_ca 6 | certificate: leaf-certificate 7 | private_key: leaf-private-key 8 | - name: /intermediate_ca 9 | type: certificate 10 | value: 11 | ca_name: /root_ca 12 | certificate: intermediate-certificate 13 | private_key: intermediate-private-key 14 | - name: /root_ca 15 | type: certificate 16 | value: 17 | ca: root-ca 18 | certificate: root-certificate 19 | private_key: root-private-key 20 | -------------------------------------------------------------------------------- /test/test_import_file.yml: -------------------------------------------------------------------------------- 1 | credentials: 2 | - name: /test/password 3 | type: password 4 | value: test-password-value 5 | - name: /test/value 6 | type: value 7 | value: test-value 8 | metadata: 9 | some: thing 10 | nested: 11 | with: value 12 | - name: /test/certificate 13 | type: certificate 14 | value: 15 | ca: ca-certificate 16 | certificate: certificate 17 | private_key: private-key 18 | metadata: 19 | certs: metadata 20 | - name: /test/rsa 21 | type: rsa 22 | value: 23 | public_key: public-key 24 | private_key: private-key 25 | - name: /test/ssh 26 | type: ssh 27 | value: 28 | public_key: ssh-public-key 29 | private_key: private-key 30 | - name: /test/user 31 | type: user 32 | value: 33 | username: covfefe 34 | password: test-user-password 35 | - name: /test/json 36 | type: json 37 | value: 38 | arbitrary_object: 39 | nested_array: 40 | - array_val1 41 | - array_object_subvalue: covfefe 42 | 1: key is not a string 43 | 3.14: pi 44 | true: key is a bool 45 | -------------------------------------------------------------------------------- /test/test_import_file_with_document_end.yml: -------------------------------------------------------------------------------- 1 | --- 2 | credentials: 3 | - name: /test/password 4 | type: password 5 | value: test-password-value 6 | - name: /test/value 7 | type: value 8 | value: test-value 9 | metadata: 10 | some: thing 11 | nested: 12 | with: value 13 | - name: /test/certificate 14 | type: certificate 15 | value: 16 | ca: ca-certificate 17 | certificate: certificate 18 | private_key: private-key 19 | metadata: 20 | certs: metadata 21 | - name: /test/rsa 22 | type: rsa 23 | value: 24 | public_key: public-key 25 | private_key: private-key 26 | - name: /test/ssh 27 | type: ssh 28 | value: 29 | public_key: ssh-public-key 30 | private_key: private-key 31 | - name: /test/user 32 | type: user 33 | value: 34 | username: covfefe 35 | password: test-user-password 36 | - name: /test/json 37 | type: json 38 | value: 39 | arbitrary_object: 40 | nested_array: 41 | - array_val1 42 | - array_object_subvalue: covfefe 43 | 1: key is not a string 44 | 3.14: pi 45 | true: key is a bool 46 | -------------------------------------------------------------------------------- /test/test_import_file_with_document_end_and_spaces.yml: -------------------------------------------------------------------------------- 1 | --- 2 | credentials: 3 | - name: /test/password 4 | type: password 5 | value: test-password-value 6 | - name: /test/value 7 | type: value 8 | value: test-value 9 | metadata: 10 | some: thing 11 | nested: 12 | with: value 13 | - name: /test/certificate 14 | type: certificate 15 | value: 16 | ca: ca-certificate 17 | certificate: certificate 18 | private_key: private-key 19 | metadata: 20 | certs: metadata 21 | - name: /test/rsa 22 | type: rsa 23 | value: 24 | public_key: public-key 25 | private_key: private-key 26 | - name: /test/ssh 27 | type: ssh 28 | value: 29 | public_key: ssh-public-key 30 | private_key: private-key 31 | - name: /test/user 32 | type: user 33 | value: 34 | username: covfefe 35 | password: test-user-password 36 | - name: /test/json 37 | type: json 38 | value: 39 | arbitrary_object: 40 | nested_array: 41 | - array_val1 42 | - array_object_subvalue: covfefe 43 | 1: key is not a string 44 | 3.14: pi 45 | true: key is a bool 46 | -------------------------------------------------------------------------------- /test/test_import_incorrect_format.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "/test/password", 4 | "type": "password", 5 | "value": "test-password-value" 6 | }, 7 | { 8 | "name": "/test/value", 9 | "type": "value", 10 | "value": "test-value" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /test/test_import_incorrect_format.yml: -------------------------------------------------------------------------------- 1 | - name: /test/password 2 | type: password 3 | value: test-password-value 4 | - name: /test/value 5 | type: value 6 | value: test-value 7 | -------------------------------------------------------------------------------- /test/test_import_incorrect_json.json: -------------------------------------------------------------------------------- 1 | { 2 | "credentials": [ 3 | 1, 4 | 2 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /test/test_import_incorrect_yaml.yml: -------------------------------------------------------------------------------- 1 | credentials: 2 | 1 3 | 2 4 | -------------------------------------------------------------------------------- /test/test_import_missing_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "credentials": [ 3 | { 4 | "type": "password", 5 | "value": "test-password" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /test/test_import_missing_name.yml: -------------------------------------------------------------------------------- 1 | credentials: 2 | - type: password 3 | value: test-password 4 | -------------------------------------------------------------------------------- /test/test_import_partial_fail_set.json: -------------------------------------------------------------------------------- 1 | { 2 | "credentials": [ 3 | { 4 | "name": "/test/invalid_type", 5 | "type": "invalid_type", 6 | "value": "some string" 7 | }, 8 | { 9 | "name": "/test/invalid_type1", 10 | "type": "invalid_type", 11 | "value": "some string" 12 | }, 13 | { 14 | "name": "/test/user", 15 | "type": "user", 16 | "value": { 17 | "username": "covfefe", 18 | "password": "test-user-password" 19 | } 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /test/test_import_partial_fail_set.yml: -------------------------------------------------------------------------------- 1 | credentials: 2 | - name: /test/invalid_type 3 | type: invalid_type 4 | value: "some string" 5 | - name: /test/invalid_type1 6 | type: invalid_type 7 | value: "some string" 8 | - name: /test/user 9 | type: user 10 | value: 11 | username: covfefe 12 | password: test-user-password 13 | -------------------------------------------------------------------------------- /test/test_import_ssh_type_with_public_key_fingerprint.json: -------------------------------------------------------------------------------- 1 | { 2 | "credentials": [ 3 | { 4 | "name": "/test/sshCred", 5 | "type": "ssh", 6 | "value": { 7 | "private_key": "some-private-key", 8 | "public_key": "some-key", 9 | "public_key_fingerprint": "some-key-fingerprint" 10 | } 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /test/test_import_ssh_type_with_public_key_fingerprint.yml: -------------------------------------------------------------------------------- 1 | credentials: 2 | - name: /test/sshCred 3 | type: ssh 4 | value: 5 | private_key: some-private-key 6 | public_key: some-key 7 | public_key_fingerprint: some-key-fingerprint 8 | -------------------------------------------------------------------------------- /test/test_import_user_type_with_password_hash.json: -------------------------------------------------------------------------------- 1 | { 2 | "credentials": [ 3 | { 4 | "name": "/test/userCred", 5 | "type": "user", 6 | "value": { 7 | "password": "test-user-password", 8 | "password_hash": "P455W0rd-H45H", 9 | "username": "sample-username" 10 | } 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /test/test_import_user_type_with_password_hash.yml: -------------------------------------------------------------------------------- 1 | credentials: 2 | - name: /test/userCred 3 | type: user 4 | value: 5 | password: test-user-password 6 | password_hash: P455W0rd-H45H 7 | username: sample-username 8 | -------------------------------------------------------------------------------- /test/test_import_with_int_for_value.json: -------------------------------------------------------------------------------- 1 | { 2 | "credentials": [ 3 | { 4 | "type": "value", 5 | "name": "/test/intStringValue", 6 | "value": 123 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /test/test_import_with_int_for_value.yml: -------------------------------------------------------------------------------- 1 | credentials: 2 | - name: /test/intStringValue 3 | type: value 4 | value: 123 5 | -------------------------------------------------------------------------------- /test/test_util.go: -------------------------------------------------------------------------------- 1 | package test 2 | 3 | import ( 4 | "os" 5 | ) 6 | 7 | var CREDHUB_ENV_VARS []string = []string{"CREDHUB_SERVER", "CREDHUB_CLIENT", "CREDHUB_SECRET", "CREDHUB_CA_CERT"} 8 | 9 | func UnsetAndCacheCredHubEnvVars() map[string]string { 10 | credhubEnv := make(map[string]string) 11 | for _, envVar := range CREDHUB_ENV_VARS { 12 | credhubEnv[envVar] = os.Getenv(envVar) 13 | os.Unsetenv(envVar) 14 | } 15 | return credhubEnv 16 | } 17 | 18 | func RestoreEnv(credhubEnv map[string]string) { 19 | for _, envVar := range CREDHUB_ENV_VARS { 20 | os.Setenv(envVar, credhubEnv[envVar]) 21 | } 22 | } 23 | func CreateTempDir(prefix string) string { 24 | name, err := os.MkdirTemp("", prefix) 25 | if err != nil { 26 | panic(err) 27 | } 28 | return name 29 | } 30 | 31 | func CreateCredentialFile(dir, filename string, contents string) string { 32 | path := dir + "/" + filename 33 | err := os.WriteFile(path, []byte(contents), 0644) 34 | if err != nil { 35 | panic(err) 36 | } 37 | return path 38 | } 39 | -------------------------------------------------------------------------------- /util/commands_util.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "strings" 5 | 6 | "os" 7 | 8 | credhub_errors "code.cloudfoundry.org/credhub-cli/errors" 9 | ) 10 | 11 | func ReadFileOrStringFromField(field string) (string, error) { 12 | _, err := os.Stat(field) 13 | 14 | if err != nil { 15 | return strings.Replace(field, "\\n", "\n", -1), nil 16 | } 17 | 18 | dat, err := os.ReadFile(field) 19 | if err != nil { 20 | return "", credhub_errors.NewFileLoadError() 21 | } 22 | return string(dat), nil 23 | } 24 | 25 | func AddDefaultSchemeIfNecessary(serverUrl string) string { 26 | if strings.Contains(serverUrl, "://") { 27 | return serverUrl 28 | } else { 29 | return "https://" + serverUrl 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /util/logging.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | ) 7 | 8 | const ( 9 | InfoColor = "\033[1;34m%s\033[0m" 10 | NoticeColor = "\033[1;36m%s\033[0m" 11 | WarningColor = "\033[1;33m%s\033[0m" 12 | ErrorColor = "\033[1;31m%s\033[0m" 13 | DebugColor = "\033[0;36m%s\033[0m" 14 | ) 15 | 16 | func Warning(msg string) { 17 | fmt.Fprintf(os.Stderr, WarningColor+"\n", msg) 18 | } 19 | 20 | func Error(msg string) { 21 | fmt.Fprintf(os.Stderr, ErrorColor+"\n", msg) 22 | } 23 | -------------------------------------------------------------------------------- /util/token.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | func TokenIsPresent(token string) bool { 4 | return token != "" && token != "revoked" 5 | } 6 | -------------------------------------------------------------------------------- /util/util_suite_test.go: -------------------------------------------------------------------------------- 1 | package util_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestCommands(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Util Suite") 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/bmatcuk/doublestar/.gitignore: -------------------------------------------------------------------------------- 1 | # vi 2 | *~ 3 | *.swp 4 | *.swo 5 | 6 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 7 | *.o 8 | *.a 9 | *.so 10 | 11 | # Folders 12 | _obj 13 | _test 14 | 15 | # Architecture specific extensions/prefixes 16 | *.[568vq] 17 | [568vq].out 18 | 19 | *.cgo1.go 20 | *.cgo2.c 21 | _cgo_defun.c 22 | _cgo_gotypes.go 23 | _cgo_export.* 24 | 25 | _testmain.go 26 | 27 | *.exe 28 | *.test 29 | *.prof 30 | 31 | # test directory 32 | test/ 33 | -------------------------------------------------------------------------------- /vendor/github.com/bmatcuk/doublestar/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.12 5 | - 1.13 6 | - 1.14 7 | 8 | os: 9 | - linux 10 | - windows 11 | 12 | before_install: 13 | - go get -t -v ./... 14 | 15 | script: 16 | - go test -race -coverprofile=coverage.txt -covermode=atomic 17 | 18 | after_success: 19 | - bash <(curl -s https://codecov.io/bash) 20 | 21 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/bosh-cli/v7/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015-Present CloudFoundry.org Foundation, Inc. All Rights Reserved. 2 | 3 | This project contains software that is Copyright (c) 2014-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/bosh-cli/v7/director/template/multi_vars.go: -------------------------------------------------------------------------------- 1 | package template 2 | 3 | type MultiVars struct { 4 | varss []Variables 5 | } 6 | 7 | func NewMultiVars(varss []Variables) MultiVars { 8 | return MultiVars{varss} 9 | } 10 | 11 | var _ Variables = MultiVars{} 12 | 13 | func (m MultiVars) Get(varDef VariableDefinition) (interface{}, bool, error) { 14 | for _, vars := range m.varss { 15 | val, found, err := vars.Get(varDef) 16 | if found || err != nil { 17 | return val, found, err 18 | } 19 | } 20 | 21 | return nil, false, nil 22 | } 23 | 24 | func (m MultiVars) List() ([]VariableDefinition, error) { 25 | var allDefs []VariableDefinition 26 | 27 | for _, vars := range m.varss { 28 | defs, err := vars.List() 29 | if err != nil { 30 | return nil, err 31 | } 32 | 33 | allDefs = append(allDefs, defs...) 34 | } 35 | 36 | return allDefs, nil 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/bosh-cli/v7/director/template/variables.go: -------------------------------------------------------------------------------- 1 | package template 2 | 3 | type Variables interface { 4 | Get(VariableDefinition) (interface{}, bool, error) 5 | List() ([]VariableDefinition, error) 6 | } 7 | 8 | type VariableDefinition struct { 9 | Name string 10 | Type string 11 | Options interface{} 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/bosh-cli/v7/director/template/vars_file_arg.go: -------------------------------------------------------------------------------- 1 | package template 2 | 3 | import ( 4 | bosherr "github.com/cloudfoundry/bosh-utils/errors" 5 | boshlog "github.com/cloudfoundry/bosh-utils/logger" 6 | boshsys "github.com/cloudfoundry/bosh-utils/system" 7 | "gopkg.in/yaml.v2" 8 | ) 9 | 10 | type VarsFileArg struct { 11 | FS boshsys.FileSystem 12 | 13 | Vars StaticVariables 14 | } 15 | 16 | func (a *VarsFileArg) UnmarshalFlag(filePath string) error { 17 | if a.FS == nil { 18 | a.FS = boshsys.NewOsFileSystemWithStrictTempRoot(boshlog.NewLogger(boshlog.LevelNone)) 19 | } 20 | 21 | if len(filePath) == 0 { 22 | return bosherr.Errorf("Expected file path to be non-empty") 23 | } 24 | 25 | bytes, err := a.FS.ReadFile(filePath) 26 | if err != nil { 27 | return bosherr.WrapErrorf(err, "Reading variables file '%s'", filePath) 28 | } 29 | 30 | var vars StaticVariables 31 | 32 | err = yaml.Unmarshal(bytes, &vars) 33 | if err != nil { 34 | return bosherr.WrapErrorf(err, "Deserializing variables file '%s'", filePath) 35 | } 36 | 37 | a.Vars = vars 38 | 39 | return nil 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/bosh-utils/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015-Present CloudFoundry.org Foundation, Inc. All Rights Reserved. 2 | 3 | This project contains software that is Copyright (c) 2015 Pivotal Software, Inc. 4 | 5 | This project is licensed to you under the Apache License, Version 2.0 (the "License"). 6 | 7 | You may not use this project except in compliance with the License. 8 | 9 | This project may include a number of subcomponents with separate copyright notices 10 | and license terms. Your use of these subcomponents is subject to the terms and 11 | conditions of the subcomponent's license, as noted in the LICENSE file. 12 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/bosh-utils/errors/multi_error.go: -------------------------------------------------------------------------------- 1 | package errors 2 | 3 | import ( 4 | "strings" 5 | ) 6 | 7 | type MultiError struct { 8 | Errors []error 9 | } 10 | 11 | func NewMultiError(errors ...error) error { 12 | return MultiError{Errors: errors} 13 | } 14 | 15 | func (e MultiError) Error() string { 16 | errors := make([]string, len(e.Errors), len(e.Errors)) //nolint:gosimple 17 | for i, err := range e.Errors { 18 | errors[i] = err.Error() 19 | } 20 | return strings.Join(errors, "\n") 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/bosh-utils/system/exec_cmd_runner_unix.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package system 5 | 6 | import ( 7 | "strings" 8 | ) 9 | 10 | // mergeEnv merges system and command environments variables. Command variables 11 | // override any system variable with the same key. 12 | func mergeEnv(sysEnv []string, cmdEnv map[string]string) []string { 13 | var env []string 14 | // cmdEnv has precedence and overwrites any duplicate vars 15 | for k, v := range cmdEnv { 16 | env = append(env, k+"="+v) 17 | } 18 | for _, s := range sysEnv { 19 | if n := strings.IndexByte(s, '='); n != -1 { 20 | k := s[:n] // key 21 | if _, found := cmdEnv[k]; !found { 22 | env = append(env, s) 23 | } 24 | } 25 | } 26 | return env 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/go-socks5/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | .idea 24 | go.sum 25 | vendor 26 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/go-socks5/.golangci.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | linters: 4 | default: standard 5 | 6 | settings: 7 | errcheck: 8 | check-blank: true # assignment to blank identifier: `_ := someFunc()`. 9 | 10 | formatters: 11 | enable: 12 | - goimports 13 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/go-socks5/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.1 4 | - tip 5 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/go-socks5/credentials.go: -------------------------------------------------------------------------------- 1 | package socks5 2 | 3 | // CredentialStore is used to support user/pass authentication 4 | type CredentialStore interface { 5 | Valid(user, password string) bool 6 | } 7 | 8 | // StaticCredentials enables using a map directly as a credential store 9 | type StaticCredentials map[string]string 10 | 11 | func (s StaticCredentials) Valid(user, password string) bool { 12 | pass, ok := s[user] 13 | if !ok { 14 | return false 15 | } 16 | return password == pass 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/go-socks5/resolver.go: -------------------------------------------------------------------------------- 1 | package socks5 2 | 3 | import ( 4 | "net" 5 | 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // NameResolver is used to implement custom name resolution 10 | type NameResolver interface { 11 | Resolve(ctx context.Context, name string) (context.Context, net.IP, error) 12 | } 13 | 14 | // DNSResolver uses the system DNS to resolve host names 15 | type DNSResolver struct{} 16 | 17 | func (d DNSResolver) Resolve(ctx context.Context, name string) (context.Context, net.IP, error) { 18 | addr, err := net.ResolveIPAddr("ip", name) 19 | if err != nil { 20 | return ctx, nil, err 21 | } 22 | return ctx, addr.IP, err 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/socks5-proxy/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/socks5-proxy/.golangci.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | linters: 4 | default: standard 5 | 6 | settings: 7 | errcheck: 8 | check-blank: true # assignment to blank identifier: `_ := someFunc()`. 9 | 10 | formatters: 11 | enable: 12 | - goimports 13 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/socks5-proxy/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017-Present CloudFoundry.org Foundation, Inc. All Rights Reserved. 2 | 3 | This project is licensed to you under the Apache License, Version 2.0 (the "License"). 4 | You may not use this project except in compliance with the License. 5 | 6 | This project may include a number of subcomponents with separate copyright notices 7 | and license terms. Your use of these subcomponents is subject to the terms and 8 | conditions of the subcomponent's license, as noted in the LICENSE file. 9 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/socks5-proxy/README.md: -------------------------------------------------------------------------------- 1 | # socks5-proxy 2 | This is a go library for starting a socks5 proxy server via SSH. 3 | 4 | It is intended to be used as a library by Golang CLIs that need to proxy via an SSH jumpbox, which is a common configuration for BOSH operators, so several CLIs in Cloud Foundry could benefit from its use. 5 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/socks5-proxy/ssh_client_config.go: -------------------------------------------------------------------------------- 1 | package proxy 2 | 3 | import ( 4 | "time" 5 | 6 | "golang.org/x/crypto/ssh" 7 | ) 8 | 9 | func NewSSHClientConfig(user string, hostKeyCallback ssh.HostKeyCallback, authMethods ...ssh.AuthMethod) *ssh.ClientConfig { 10 | return &ssh.ClientConfig{ 11 | Timeout: 30 * time.Second, 12 | User: user, 13 | HostKeyCallback: hostKeyCallback, 14 | Auth: authMethods, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/cppforlife/go-patch/patch/array_index.go: -------------------------------------------------------------------------------- 1 | package patch 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | type ArrayIndex struct { 8 | Index int 9 | Modifiers []Modifier 10 | Array []interface{} 11 | Path Pointer 12 | } 13 | 14 | func (i ArrayIndex) Concrete() (int, error) { 15 | result := i.Index 16 | 17 | for _, modifier := range i.Modifiers { 18 | switch modifier.(type) { 19 | case PrevModifier: 20 | result -= 1 21 | case NextModifier: 22 | result += 1 23 | default: 24 | return 0, fmt.Errorf("Expected to find one of the following modifiers: 'prev', 'next', but found modifier '%T'", modifier) 25 | } 26 | } 27 | 28 | if result >= len(i.Array) || (-result)-1 >= len(i.Array) { 29 | return 0, OpMissingIndexErr{result, i.Array, i.Path} 30 | } 31 | 32 | if result < 0 { 33 | result = len(i.Array) + result 34 | } 35 | 36 | return result, nil 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/cppforlife/go-patch/patch/descriptive_op.go: -------------------------------------------------------------------------------- 1 | package patch 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | type DescriptiveOp struct { 8 | Op Op 9 | ErrorMsg string 10 | } 11 | 12 | func (op DescriptiveOp) Apply(doc interface{}) (interface{}, error) { 13 | doc, err := op.Op.Apply(doc) 14 | if err != nil { 15 | return nil, fmt.Errorf("Error '%s': %s", op.ErrorMsg, err.Error()) 16 | } 17 | return doc, nil 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/cppforlife/go-patch/patch/err_op.go: -------------------------------------------------------------------------------- 1 | package patch 2 | 3 | type ErrOp struct { 4 | Err error 5 | } 6 | 7 | func (op ErrOp) Apply(_ interface{}) (interface{}, error) { 8 | return nil, op.Err 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/cppforlife/go-patch/patch/ops.go: -------------------------------------------------------------------------------- 1 | package patch 2 | 3 | type Ops []Op 4 | 5 | type Op interface { 6 | Apply(interface{}) (interface{}, error) 7 | } 8 | 9 | // Ensure basic operations implement Op 10 | var _ Op = Ops{} 11 | var _ Op = ReplaceOp{} 12 | var _ Op = RemoveOp{} 13 | var _ Op = FindOp{} 14 | var _ Op = DescriptiveOp{} 15 | var _ Op = ErrOp{} 16 | 17 | func (ops Ops) Apply(doc interface{}) (interface{}, error) { 18 | var err error 19 | 20 | for _, op := range ops { 21 | doc, err = op.Apply(doc) 22 | if err != nil { 23 | return nil, err 24 | } 25 | } 26 | 27 | return doc, nil 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/cppforlife/go-patch/patch/tokens.go: -------------------------------------------------------------------------------- 1 | package patch 2 | 3 | type Token interface { 4 | _token() 5 | } 6 | 7 | type RootToken struct{} 8 | 9 | type IndexToken struct { 10 | Index int 11 | Modifiers []Modifier 12 | } 13 | 14 | type AfterLastIndexToken struct{} 15 | 16 | type MatchingIndexToken struct { 17 | Key string 18 | Value string 19 | Optional bool 20 | Modifiers []Modifier 21 | } 22 | 23 | type KeyToken struct { 24 | Key string 25 | Optional bool 26 | } 27 | 28 | type Modifier interface { 29 | _modifier() 30 | } 31 | 32 | type PrevModifier struct{} 33 | type NextModifier struct{} 34 | 35 | type BeforeModifier struct{} 36 | type AfterModifier struct{} 37 | -------------------------------------------------------------------------------- /vendor/github.com/cppforlife/go-patch/patch/tokens_impl.go: -------------------------------------------------------------------------------- 1 | package patch 2 | 3 | var _ Token = RootToken{} 4 | var _ Token = IndexToken{} 5 | var _ Token = AfterLastIndexToken{} 6 | var _ Token = MatchingIndexToken{} 7 | var _ Token = KeyToken{} 8 | 9 | func (RootToken) _token() {} 10 | func (IndexToken) _token() {} 11 | func (AfterLastIndexToken) _token() {} 12 | func (MatchingIndexToken) _token() {} 13 | func (KeyToken) _token() {} 14 | 15 | var _ Modifier = PrevModifier{} 16 | var _ Modifier = NextModifier{} 17 | var _ Modifier = BeforeModifier{} 18 | var _ Modifier = AfterModifier{} 19 | 20 | func (PrevModifier) _modifier() {} 21 | func (NextModifier) _modifier() {} 22 | func (BeforeModifier) _modifier() {} 23 | func (AfterModifier) _modifier() {} 24 | -------------------------------------------------------------------------------- /vendor/github.com/fatih/color/color_windows.go: -------------------------------------------------------------------------------- 1 | package color 2 | 3 | import ( 4 | "os" 5 | 6 | "golang.org/x/sys/windows" 7 | ) 8 | 9 | func init() { 10 | // Opt-in for ansi color support for current process. 11 | // https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#output-sequences 12 | var outMode uint32 13 | out := windows.Handle(os.Stdout.Fd()) 14 | if err := windows.GetConsoleMode(out, &outMode); err != nil { 15 | return 16 | } 17 | outMode |= windows.ENABLE_PROCESSED_OUTPUT | windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING 18 | _ = windows.SetConsoleMode(out, outMode) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/go-logr/logr/.golangci.yaml: -------------------------------------------------------------------------------- 1 | run: 2 | timeout: 1m 3 | tests: true 4 | 5 | linters: 6 | disable-all: true 7 | enable: 8 | - asciicheck 9 | - errcheck 10 | - forcetypeassert 11 | - gocritic 12 | - gofmt 13 | - goimports 14 | - gosimple 15 | - govet 16 | - ineffassign 17 | - misspell 18 | - revive 19 | - staticcheck 20 | - typecheck 21 | - unused 22 | 23 | issues: 24 | exclude-use-default: false 25 | max-issues-per-linter: 0 26 | max-same-issues: 10 27 | -------------------------------------------------------------------------------- /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/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/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/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/hashicorp/go-version/version_collection.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) HashiCorp, Inc. 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | package version 5 | 6 | // Collection is a type that implements the sort.Interface interface 7 | // so that versions can be sorted. 8 | type Collection []*Version 9 | 10 | func (v Collection) Len() int { 11 | return len(v) 12 | } 13 | 14 | func (v Collection) Less(i, j int) bool { 15 | return v[i].LessThan(v[j]) 16 | } 17 | 18 | func (v Collection) Swap(i, j int) { 19 | v[i], v[j] = v[j], v[i] 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/jessevdk/go-flags/arg.go: -------------------------------------------------------------------------------- 1 | package flags 2 | 3 | import ( 4 | "reflect" 5 | ) 6 | 7 | // Arg represents a positional argument on the command line. 8 | type Arg struct { 9 | // The name of the positional argument (used in the help) 10 | Name string 11 | 12 | // A description of the positional argument (used in the help) 13 | Description string 14 | 15 | // The minimal number of required positional arguments 16 | Required int 17 | 18 | // The maximum number of required positional arguments 19 | RequiredMaximum int 20 | 21 | value reflect.Value 22 | tag multiTag 23 | } 24 | 25 | func (a *Arg) isRemaining() bool { 26 | return a.value.Type().Kind() == reflect.Slice 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/jessevdk/go-flags/check_crosscompile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | echo '# linux arm7' 6 | GOARM=7 GOARCH=arm GOOS=linux go build 7 | echo '# linux arm5' 8 | GOARM=5 GOARCH=arm GOOS=linux go build 9 | echo '# windows 386' 10 | GOARCH=386 GOOS=windows go build 11 | echo '# windows amd64' 12 | GOARCH=amd64 GOOS=windows go build 13 | echo '# darwin' 14 | GOARCH=amd64 GOOS=darwin go build 15 | echo '# freebsd' 16 | GOARCH=amd64 GOOS=freebsd go build 17 | echo '# aix ppc64' 18 | GOARCH=ppc64 GOOS=aix go build 19 | echo '# solaris amd64' 20 | GOARCH=amd64 GOOS=solaris go build 21 | -------------------------------------------------------------------------------- /vendor/github.com/jessevdk/go-flags/termsize.go: -------------------------------------------------------------------------------- 1 | //go:build !windows && !plan9 && !appengine && !wasm && !aix 2 | // +build !windows,!plan9,!appengine,!wasm,!aix 3 | 4 | package flags 5 | 6 | import ( 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | func getTerminalColumns() int { 11 | ws, err := unix.IoctlGetWinsize(0, unix.TIOCGWINSZ) 12 | if err != nil { 13 | return 80 14 | } 15 | return int(ws.Col) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/jessevdk/go-flags/termsize_nosysioctl.go: -------------------------------------------------------------------------------- 1 | //go:build plan9 || appengine || wasm || aix 2 | // +build plan9 appengine wasm aix 3 | 4 | package flags 5 | 6 | func getTerminalColumns() int { 7 | return 80 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/colorable_others.go: -------------------------------------------------------------------------------- 1 | //go:build !windows || appengine 2 | // +build !windows appengine 3 | 4 | package colorable 5 | 6 | import ( 7 | "io" 8 | "os" 9 | 10 | _ "github.com/mattn/go-isatty" 11 | ) 12 | 13 | // NewColorable returns new instance of Writer which handles escape sequence. 14 | func NewColorable(file *os.File) io.Writer { 15 | if file == nil { 16 | panic("nil passed instead of *os.File to NewColorable()") 17 | } 18 | 19 | return file 20 | } 21 | 22 | // NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. 23 | func NewColorableStdout() io.Writer { 24 | return os.Stdout 25 | } 26 | 27 | // NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. 28 | func NewColorableStderr() io.Writer { 29 | return os.Stderr 30 | } 31 | 32 | // EnableColorsStdout enable colors if possible. 33 | func EnableColorsStdout(enabled *bool) func() { 34 | if enabled != nil { 35 | *enabled = true 36 | } 37 | return func() {} 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/go.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -race -coverprofile=profile.out -covermode=atomic "$d" 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/doc.go: -------------------------------------------------------------------------------- 1 | // Package isatty implements interface to isatty 2 | package isatty 3 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/go.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -race -coverprofile=profile.out -covermode=atomic "$d" 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_bsd.go: -------------------------------------------------------------------------------- 1 | //go:build (darwin || freebsd || openbsd || netbsd || dragonfly || hurd) && !appengine && !tinygo 2 | // +build darwin freebsd openbsd netbsd dragonfly hurd 3 | // +build !appengine 4 | // +build !tinygo 5 | 6 | package isatty 7 | 8 | import "golang.org/x/sys/unix" 9 | 10 | // IsTerminal return true if the file descriptor is terminal. 11 | func IsTerminal(fd uintptr) bool { 12 | _, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA) 13 | return err == nil 14 | } 15 | 16 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 17 | // terminal. This is also always false on this environment. 18 | func IsCygwinTerminal(fd uintptr) bool { 19 | return false 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_others.go: -------------------------------------------------------------------------------- 1 | //go:build (appengine || js || nacl || tinygo || wasm) && !windows 2 | // +build appengine js nacl tinygo wasm 3 | // +build !windows 4 | 5 | package isatty 6 | 7 | // IsTerminal returns true if the file descriptor is terminal which 8 | // is always false on js and appengine classic which is a sandboxed PaaS. 9 | func IsTerminal(fd uintptr) bool { 10 | return false 11 | } 12 | 13 | // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 14 | // terminal. This is also always false on this environment. 15 | func IsCygwinTerminal(fd uintptr) bool { 16 | return false 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_plan9.go: -------------------------------------------------------------------------------- 1 | //go:build plan9 2 | // +build plan9 3 | 4 | package isatty 5 | 6 | import ( 7 | "syscall" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | func IsTerminal(fd uintptr) bool { 12 | path, err := syscall.Fd2path(int(fd)) 13 | if err != nil { 14 | return false 15 | } 16 | return path == "/dev/cons" || path == "/mnt/term/dev/cons" 17 | } 18 | 19 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 20 | // terminal. This is also always false on this environment. 21 | func IsCygwinTerminal(fd uintptr) bool { 22 | return false 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_solaris.go: -------------------------------------------------------------------------------- 1 | //go:build solaris && !appengine 2 | // +build solaris,!appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | // see: https://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libc/port/gen/isatty.c 12 | func IsTerminal(fd uintptr) bool { 13 | _, err := unix.IoctlGetTermio(int(fd), unix.TCGETA) 14 | return err == nil 15 | } 16 | 17 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 18 | // terminal. This is also always false on this environment. 19 | func IsCygwinTerminal(fd uintptr) bool { 20 | return false 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_tcgets.go: -------------------------------------------------------------------------------- 1 | //go:build (linux || aix || zos) && !appengine && !tinygo 2 | // +build linux aix zos 3 | // +build !appengine 4 | // +build !tinygo 5 | 6 | package isatty 7 | 8 | import "golang.org/x/sys/unix" 9 | 10 | // IsTerminal return true if the file descriptor is terminal. 11 | func IsTerminal(fd uintptr) bool { 12 | _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) 13 | return err == nil 14 | } 15 | 16 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 17 | // terminal. This is also always false on this environment. 18 | func IsCygwinTerminal(fd uintptr) bool { 19 | return false 20 | } 21 | -------------------------------------------------------------------------------- /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/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/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/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/README.md: -------------------------------------------------------------------------------- 1 | ![Gomega: Ginkgo's Preferred Matcher Library](http://onsi.github.io/gomega/images/gomega.png) 2 | 3 | [![test](https://github.com/onsi/gomega/actions/workflows/test.yml/badge.svg)](https://github.com/onsi/gomega/actions/workflows/test.yml) 4 | 5 | Jump straight to the [docs](http://onsi.github.io/gomega/) to learn about Gomega, including a list of [all available matchers](http://onsi.github.io/gomega/#provided-matchers). 6 | 7 | If you have a question, comment, bug report, feature request, etc. please open a GitHub issue. 8 | 9 | ## [Ginkgo](http://github.com/onsi/ginkgo): a BDD Testing Framework for Golang 10 | 11 | Learn more about Ginkgo [here](http://onsi.github.io/ginkgo/) 12 | 13 | ## Community Matchers 14 | 15 | A collection of community matchers is available on the [wiki](https://github.com/onsi/gomega/wiki). 16 | 17 | ## License 18 | 19 | Gomega is MIT-Licensed 20 | 21 | The `ConsistOf` matcher uses [goraph](https://github.com/amitkgupta/goraph) which is embedded in the source to simplify distribution. goraph has an MIT license. 22 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/RELEASING.md: -------------------------------------------------------------------------------- 1 | A Gomega release is a tagged sha and a GitHub release. To cut a release: 2 | 3 | 1. Ensure CHANGELOG.md is up to date. 4 | - Use 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/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/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_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_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_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/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_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/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/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/golang.org/x/crypto/chacha20/chacha_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc && !purego 6 | 7 | package chacha20 8 | 9 | const bufSize = 256 10 | 11 | //go:noescape 12 | func xorKeyStreamVX(dst, src []byte, key *[8]uint32, nonce *[3]uint32, counter *uint32) 13 | 14 | func (c *Cipher) xorKeyStreamBlocks(dst, src []byte) { 15 | xorKeyStreamVX(dst, src, &c.key, &c.nonce, &c.counter) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/chacha20/chacha_noasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (!arm64 && !s390x && !ppc64 && !ppc64le) || !gc || purego 6 | 7 | package chacha20 8 | 9 | const bufSize = blockSize 10 | 11 | func (s *Cipher) xorKeyStreamBlocks(dst, src []byte) { 12 | s.xorKeyStreamBlocksGeneric(dst, src) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.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 gc && !purego && (ppc64 || ppc64le) 6 | 7 | package chacha20 8 | 9 | const bufSize = 256 10 | 11 | //go:noescape 12 | func chaCha20_ctr32_vsx(out, inp *byte, len int, key *[8]uint32, counter *uint32) 13 | 14 | func (c *Cipher) xorKeyStreamBlocks(dst, src []byte) { 15 | chaCha20_ctr32_vsx(&dst[0], &src[0], len(src), &c.key, &c.counter) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/chacha20/chacha_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc && !purego 6 | 7 | package chacha20 8 | 9 | import "golang.org/x/sys/cpu" 10 | 11 | var haveAsm = cpu.S390X.HasVX 12 | 13 | const bufSize = 256 14 | 15 | // xorKeyStreamVX is an assembly implementation of XORKeyStream. It must only 16 | // be called when the vector facility is available. Implementation in asm_s390x.s. 17 | // 18 | //go:noescape 19 | func xorKeyStreamVX(dst, src []byte, key *[8]uint32, nonce *[3]uint32, counter *uint32) 20 | 21 | func (c *Cipher) xorKeyStreamBlocks(dst, src []byte) { 22 | if cpu.S390X.HasVX { 23 | xorKeyStreamVX(dst, src, &c.key, &c.nonce, &c.counter) 24 | } else { 25 | c.xorKeyStreamBlocksGeneric(dst, src) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (!amd64 && !loong64 && !ppc64le && !ppc64 && !s390x) || !gc || purego 6 | 7 | package poly1305 8 | 9 | type mac struct{ macGeneric } 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | /* 6 | Package ssh implements an SSH client and server. 7 | 8 | SSH is a transport security protocol, an authentication protocol and a 9 | family of application protocols. The most typical application level 10 | protocol is a remote shell and this is specifically implemented. However, 11 | the multiplexed nature of SSH is exposed to users that wish to support 12 | others. 13 | 14 | References: 15 | 16 | [PROTOCOL]: https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL?rev=HEAD 17 | [PROTOCOL.certkeys]: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.certkeys?rev=HEAD 18 | [SSH-PARAMETERS]: http://www.iana.org/assignments/ssh-parameters/ssh-parameters.xml#ssh-parameters-1 19 | 20 | This package does not fall under the stability promise of the Go language itself, 21 | so its API may be changed when pressing needs arise. 22 | */ 23 | package ssh 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/proxy/direct.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package proxy 6 | 7 | import ( 8 | "context" 9 | "net" 10 | ) 11 | 12 | type direct struct{} 13 | 14 | // Direct implements Dialer by making network connections directly using net.Dial or net.DialContext. 15 | var Direct = direct{} 16 | 17 | var ( 18 | _ Dialer = Direct 19 | _ ContextDialer = Direct 20 | ) 21 | 22 | // Dial directly invokes net.Dial with the supplied parameters. 23 | func (direct) Dial(network, addr string) (net.Conn, error) { 24 | return net.Dial(network, addr) 25 | } 26 | 27 | // DialContext instantiates a net.Dialer and invokes its DialContext receiver with the supplied parameters. 28 | func (direct) DialContext(ctx context.Context, network, addr string) (net.Conn, error) { 29 | var d net.Dialer 30 | return d.DialContext(ctx, network, addr) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //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/cpu/asm_darwin_x86_gc.s: -------------------------------------------------------------------------------- 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 darwin && amd64 && gc 6 | 7 | #include "textflag.h" 8 | 9 | TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 10 | JMP libc_sysctl(SB) 11 | GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 12 | DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) 13 | 14 | TEXT libc_sysctlbyname_trampoline<>(SB),NOSPLIT,$0-0 15 | JMP libc_sysctlbyname(SB) 16 | GLOBL ·libc_sysctlbyname_trampoline_addr(SB), RODATA, $8 17 | DATA ·libc_sysctlbyname_trampoline_addr(SB)/8, $libc_sysctlbyname_trampoline<>(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_aix.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 6 | 7 | package cpu 8 | 9 | const ( 10 | // getsystemcfg constants 11 | _SC_IMPL = 2 12 | _IMPL_POWER8 = 0x10000 13 | _IMPL_POWER9 = 0x20000 14 | ) 15 | 16 | func archInit() { 17 | impl := getsystemcfg(_SC_IMPL) 18 | if impl&_IMPL_POWER8 != 0 { 19 | PPC64.IsPOWER8 = true 20 | } 21 | if impl&_IMPL_POWER9 != 0 { 22 | PPC64.IsPOWER8 = true 23 | PPC64.IsPOWER9 = true 24 | } 25 | 26 | Initialized = true 27 | } 28 | 29 | func getsystemcfg(label int) (n uint64) { 30 | r0, _ := callgetsystemcfg(label) 31 | n = uint64(r0) 32 | return 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_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 gc 6 | 7 | package cpu 8 | 9 | func getisar0() uint64 10 | func getisar1() uint64 11 | func getpfr0() uint64 12 | func getzfr0() uint64 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | package cpu 8 | 9 | // haveAsmFunctions reports whether the other functions in this file can 10 | // be safely called. 11 | func haveAsmFunctions() bool { return true } 12 | 13 | // The following feature detection functions are defined in cpu_s390x.s. 14 | // They are likely to be expensive to call so the results should be cached. 15 | func stfle() facilityList 16 | func kmQuery() queryResult 17 | func kmcQuery() queryResult 18 | func kmctrQuery() queryResult 19 | func kmaQuery() queryResult 20 | func kimdQuery() queryResult 21 | func klmdQuery() queryResult 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_x86.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (386 || amd64 || amd64p32) && gc 6 | 7 | package cpu 8 | 9 | // cpuid is implemented in cpu_gc_x86.s for gc compiler 10 | // and in cpu_gccgo.c for gccgo. 11 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) 12 | 13 | // xgetbv with ecx = 0 is implemented in cpu_gc_x86.s for gc compiler 14 | // and in cpu_gccgo.c for gccgo. 15 | func xgetbv() (eax, edx uint32) 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_x86.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (386 || amd64 || amd64p32) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) 10 | TEXT ·cpuid(SB), NOSPLIT, $0-24 11 | MOVL eaxArg+0(FP), AX 12 | MOVL ecxArg+4(FP), CX 13 | CPUID 14 | MOVL AX, eax+8(FP) 15 | MOVL BX, ebx+12(FP) 16 | MOVL CX, ecx+16(FP) 17 | MOVL DX, edx+20(FP) 18 | RET 19 | 20 | // func xgetbv() (eax, edx uint32) 21 | TEXT ·xgetbv(SB), NOSPLIT, $0-8 22 | MOVL $0, CX 23 | XGETBV 24 | MOVL AX, eax+0(FP) 25 | MOVL DX, edx+4(FP) 26 | RET 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gccgo_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 gccgo 6 | 7 | package cpu 8 | 9 | func getisar0() uint64 { return 0 } 10 | func getisar1() uint64 { return 0 } 11 | func getpfr0() uint64 { return 0 } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (386 || amd64 || amd64p32) && gccgo 6 | 7 | package cpu 8 | 9 | //extern gccgoGetCpuidCount 10 | func gccgoGetCpuidCount(eaxArg, ecxArg uint32, eax, ebx, ecx, edx *uint32) 11 | 12 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) { 13 | var a, b, c, d uint32 14 | gccgoGetCpuidCount(eaxArg, ecxArg, &a, &b, &c, &d) 15 | return a, b, c, d 16 | } 17 | 18 | //extern gccgoXgetbv 19 | func gccgoXgetbv(eax, edx *uint32) 20 | 21 | func xgetbv() (eax, edx uint32) { 22 | var a, d uint32 23 | gccgoXgetbv(&a, &d) 24 | return a, d 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux.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 !386 && !amd64 && !amd64p32 && !arm64 6 | 7 | package cpu 8 | 9 | func archInit() { 10 | if err := readHWCAP(); err != nil { 11 | return 12 | } 13 | doinit() 14 | Initialized = true 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux_loong64.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 | package cpu 6 | 7 | // HWCAP bits. These are exposed by the Linux kernel. 8 | const ( 9 | hwcap_LOONGARCH_LSX = 1 << 4 10 | hwcap_LOONGARCH_LASX = 1 << 5 11 | ) 12 | 13 | func doinit() { 14 | // TODO: Features that require kernel support like LSX and LASX can 15 | // be detected here once needed in std library or by the compiler. 16 | Loong64.HasLSX = hwcIsSet(hwCap, hwcap_LOONGARCH_LSX) 17 | Loong64.HasLASX = hwcIsSet(hwCap, hwcap_LOONGARCH_LASX) 18 | } 19 | 20 | func hwcIsSet(hwc uint, val uint) bool { 21 | return hwc&val != 0 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.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 linux && (mips64 || mips64le) 6 | 7 | package cpu 8 | 9 | // HWCAP bits. These are exposed by the Linux kernel 5.4. 10 | const ( 11 | // CPU features 12 | hwcap_MIPS_MSA = 1 << 1 13 | ) 14 | 15 | func doinit() { 16 | // HWCAP feature bits 17 | MIPS64X.HasMSA = isSet(hwCap, hwcap_MIPS_MSA) 18 | } 19 | 20 | func isSet(hwc uint, value uint) bool { 21 | return hwc&value != 0 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux_noinit.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 linux && !arm && !arm64 && !loong64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x && !riscv64 6 | 7 | package cpu 8 | 9 | func doinit() {} 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (ppc64 || ppc64le) 6 | 7 | package cpu 8 | 9 | // HWCAP/HWCAP2 bits. These are exposed by the kernel. 10 | const ( 11 | // ISA Level 12 | _PPC_FEATURE2_ARCH_2_07 = 0x80000000 13 | _PPC_FEATURE2_ARCH_3_00 = 0x00800000 14 | 15 | // CPU features 16 | _PPC_FEATURE2_DARN = 0x00200000 17 | _PPC_FEATURE2_SCV = 0x00100000 18 | ) 19 | 20 | func doinit() { 21 | // HWCAP2 feature bits 22 | PPC64.IsPOWER8 = isSet(hwCap2, _PPC_FEATURE2_ARCH_2_07) 23 | PPC64.IsPOWER9 = isSet(hwCap2, _PPC_FEATURE2_ARCH_3_00) 24 | PPC64.HasDARN = isSet(hwCap2, _PPC_FEATURE2_DARN) 25 | PPC64.HasSCV = isSet(hwCap2, _PPC_FEATURE2_SCV) 26 | } 27 | 28 | func isSet(hwc uint, value uint) bool { 29 | return hwc&value != 0 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | const ( 8 | // bit mask values from /usr/include/bits/hwcap.h 9 | hwcap_ZARCH = 2 10 | hwcap_STFLE = 4 11 | hwcap_MSA = 8 12 | hwcap_LDISP = 16 13 | hwcap_EIMM = 32 14 | hwcap_DFP = 64 15 | hwcap_ETF3EH = 256 16 | hwcap_VX = 2048 17 | hwcap_VXE = 8192 18 | ) 19 | 20 | func initS390Xbase() { 21 | // test HWCAP bit vector 22 | has := func(featureMask uint) bool { 23 | return hwCap&featureMask == featureMask 24 | } 25 | 26 | // mandatory 27 | S390X.HasZARCH = has(hwcap_ZARCH) 28 | 29 | // optional 30 | S390X.HasSTFLE = has(hwcap_STFLE) 31 | S390X.HasLDISP = has(hwcap_LDISP) 32 | S390X.HasEIMM = has(hwcap_EIMM) 33 | S390X.HasETF3EH = has(hwcap_ETF3EH) 34 | S390X.HasDFP = has(hwcap_DFP) 35 | S390X.HasMSA = has(hwcap_MSA) 36 | S390X.HasVX = has(hwcap_VX) 37 | if S390X.HasVX { 38 | S390X.HasVXE = has(hwcap_VXE) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_loong64.s: -------------------------------------------------------------------------------- 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 | #include "textflag.h" 6 | 7 | // func get_cpucfg(reg uint32) uint32 8 | TEXT ·get_cpucfg(SB), NOSPLIT|NOFRAME, $0 9 | MOVW reg+0(FP), R5 10 | // CPUCFG R5, R4 = 0x00006ca4 11 | WORD $0x00006ca4 12 | MOVW R4, ret+8(FP) 13 | RET 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_mips64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build mips64 || mips64le 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 32 10 | 11 | func initOptions() { 12 | options = []option{ 13 | {Name: "msa", Feature: &MIPS64X.HasMSA}, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_mipsx.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build mips || mipsle 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 32 10 | 11 | func initOptions() {} 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.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 | #include "textflag.h" 6 | 7 | TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 8 | JMP libc_sysctl(SB) 9 | 10 | GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 11 | DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_arm.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 !linux && arm 6 | 7 | package cpu 8 | 9 | func archInit() {} 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux && !netbsd && !openbsd && arm64 6 | 7 | package cpu 8 | 9 | func doinit() {} 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_mips64x.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 !linux && (mips64 || mips64le) 6 | 7 | package cpu 8 | 9 | func archInit() { 10 | Initialized = true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.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 !aix && !linux && (ppc64 || ppc64le) 6 | 7 | package cpu 8 | 9 | func archInit() { 10 | PPC64.IsPOWER8 = true 11 | Initialized = true 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_riscv64.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 && riscv64 6 | 7 | package cpu 8 | 9 | func archInit() { 10 | Initialized = true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_x86.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 386 || amd64p32 || (amd64 && (!darwin || !gc)) 6 | 7 | package cpu 8 | 9 | func darwinSupportsAVX512() bool { 10 | panic("only implemented for gc && amd64 && darwin") 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_ppc64x.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 ppc64 || ppc64le 6 | 7 | package cpu 8 | 9 | const cacheLineSize = 128 10 | 11 | func initOptions() { 12 | options = []option{ 13 | {Name: "darn", Feature: &PPC64.HasDARN}, 14 | {Name: "scv", Feature: &PPC64.HasSCV}, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_wasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build wasm 6 | 7 | package cpu 8 | 9 | // We're compiling the cpu package for an unknown (software-abstracted) CPU. 10 | // Make CacheLinePad an empty struct and hope that the usual struct alignment 11 | // rules are good enough. 12 | 13 | const cacheLineSize = 0 14 | 15 | func initOptions() {} 16 | 17 | func archInit() {} 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_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 | package cpu 6 | 7 | func archInit() { 8 | doinit() 9 | Initialized = true 10 | } 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_zos_s390x.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 | package cpu 6 | 7 | func initS390Xbase() { 8 | // get the facilities list 9 | facilities := stfle() 10 | 11 | // mandatory 12 | S390X.HasZARCH = facilities.Has(zarch) 13 | S390X.HasSTFLE = facilities.Has(stflef) 14 | S390X.HasLDISP = facilities.Has(ldisp) 15 | S390X.HasEIMM = facilities.Has(eimm) 16 | 17 | // optional 18 | S390X.HasETF3EH = facilities.Has(etf3eh) 19 | S390X.HasDFP = facilities.Has(dfp) 20 | S390X.HasMSA = facilities.Has(msa) 21 | S390X.HasVX = facilities.Has(vx) 22 | if S390X.HasVX { 23 | S390X.HasVXE = facilities.Has(vxe) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/endian_big.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 armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | 7 | package cpu 8 | 9 | // IsBigEndian records whether the GOARCH's byte order is big endian. 10 | const IsBigEndian = true 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/endian_little.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 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh || wasm 6 | 7 | package cpu 8 | 9 | // IsBigEndian records whether the GOARCH's byte order is big endian. 10 | const IsBigEndian = false 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/runtime_auxv.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 | package cpu 6 | 7 | // getAuxvFn is non-nil on Go 1.21+ (via runtime_auxv_go121.go init) 8 | // on platforms that use auxv. 9 | var getAuxvFn func() []uintptr 10 | 11 | func getAuxv() []uintptr { 12 | if getAuxvFn == nil { 13 | return nil 14 | } 15 | return getAuxvFn() 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/runtime_auxv_go121.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 go1.21 6 | 7 | package cpu 8 | 9 | import ( 10 | _ "unsafe" // for linkname 11 | ) 12 | 13 | //go:linkname runtime_getAuxv runtime.getAuxv 14 | func runtime_getAuxv() []uintptr 15 | 16 | func init() { 17 | getAuxvFn = runtime_getAuxv 18 | } 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.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 | // Recreate a getsystemcfg syscall handler instead of 6 | // using the one provided by x/sys/unix to avoid having 7 | // the dependency between them. (See golang.org/issue/32102) 8 | // Moreover, this file will be used during the building of 9 | // gccgo's libgo and thus must not used a CGo method. 10 | 11 | //go:build aix && gccgo 12 | 13 | package cpu 14 | 15 | import ( 16 | "syscall" 17 | ) 18 | 19 | //extern getsystemcfg 20 | func gccgoGetsystemcfg(label uint32) (r uint64) 21 | 22 | func callgetsystemcfg(label int) (r1 uintptr, e1 syscall.Errno) { 23 | r1 = uintptr(gccgoGetsystemcfg(uint32(label))) 24 | e1 = syscall.GetErrno() 25 | return 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | TEXT ·use(SB),NOSPLIT,$0 8 | RET 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | // 8 | // System call support for 386, Plan 9 9 | // 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-32 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-44 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 21 | JMP syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 24 | JMP syscall·RawSyscall6(SB) 25 | 26 | TEXT ·seek(SB),NOSPLIT,$0-36 27 | JMP syscall·seek(SB) 28 | 29 | TEXT ·exit(SB),NOSPLIT,$4-4 30 | JMP syscall·exit(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | // 8 | // System call support for amd64, Plan 9 9 | // 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-64 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 21 | JMP syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | JMP syscall·RawSyscall6(SB) 25 | 26 | TEXT ·seek(SB),NOSPLIT,$0-56 27 | JMP syscall·seek(SB) 28 | 29 | TEXT ·exit(SB),NOSPLIT,$8-8 30 | JMP syscall·exit(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_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 | #include "textflag.h" 6 | 7 | // System call support for plan9 on arm 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-32 13 | JMP syscall·Syscall(SB) 14 | 15 | TEXT ·Syscall6(SB),NOSPLIT,$0-44 16 | JMP syscall·Syscall6(SB) 17 | 18 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 19 | JMP syscall·RawSyscall(SB) 20 | 21 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 22 | JMP syscall·RawSyscall6(SB) 23 | 24 | TEXT ·seek(SB),NOSPLIT,$0-36 25 | JMP syscall·exit(SB) 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/env_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Plan 9 environment variables. 6 | 7 | package plan9 8 | 9 | import ( 10 | "syscall" 11 | ) 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | COMMAND="mksysnum_plan9.sh $@" 7 | 8 | cat <= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/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_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_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_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_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_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/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_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_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/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_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/sys/windows/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | type Errno = syscall.Errno 12 | type SysProcAttr = syscall.SysProcAttr 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build generate 6 | 7 | package windows 8 | 9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && !race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | _ uint32 // pad to 8 byte boundary 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | _ uint32 // pad to 8 byte boundary 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Go 2 | 3 | Go is an open source project. 4 | 5 | It is the work of hundreds of contributors. We appreciate your help! 6 | 7 | ## Filing issues 8 | 9 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: 10 | 11 | 1. What version of Go are you using (`go version`)? 12 | 2. What operating system and processor architecture are you using? 13 | 3. What did you do? 14 | 4. What did you expect to see? 15 | 5. What did you see instead? 16 | 17 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. 18 | The gophers there will answer or ask you to file an issue if you've tripped over a bug. 19 | 20 | ## Contributing code 21 | 22 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) 23 | before sending patches. 24 | 25 | Unless otherwise noted, the Go source files are distributed under 26 | the BSD-style license found in the LICENSE file. 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/README.md: -------------------------------------------------------------------------------- 1 | # Go terminal/console support 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/term.svg)](https://pkg.go.dev/golang.org/x/term) 4 | 5 | This repository provides Go terminal and console support packages. 6 | 7 | ## Report Issues / Send Patches 8 | 9 | This repository uses Gerrit for code changes. To learn how to submit changes to 10 | this repository, see https://go.dev/doc/contribute. 11 | 12 | The git repository is https://go.googlesource.com/term. 13 | 14 | The main issue tracker for the term repository is located at 15 | https://go.dev/issues. Prefix your issue with "x/term:" in the 16 | subject line, so it is easy to find. 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/term_unix_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin || dragonfly || freebsd || netbsd || openbsd 6 | 7 | package term 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TIOCGETA 12 | const ioctlWriteTermios = unix.TIOCSETA 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/term_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 aix || linux || solaris || zos 6 | 7 | package term 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TCGETS 12 | const ioctlWriteTermios = unix.TCSETS 13 | -------------------------------------------------------------------------------- /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/google.golang.org/protobuf/encoding/prototext/doc.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 prototext marshals and unmarshals protocol buffer messages as the 6 | // textproto format. 7 | package prototext 8 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/editiondefaults/defaults.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 | // Package editiondefaults contains the binary representation of the editions 6 | // defaults. 7 | package editiondefaults 8 | 9 | import _ "embed" 10 | 11 | //go:embed editions_defaults.binpb 12 | var Defaults []byte 13 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry/credhub-cli/23ef6051e1999dbfc28cbfe817159ae19bad3a42/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.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 !protolegacy 6 | // +build !protolegacy 7 | 8 | package flags 9 | 10 | const protoLegacy = false 11 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.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 protolegacy 6 | // +build protolegacy 7 | 8 | package flags 9 | 10 | const protoLegacy = true 11 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/doc.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 genid contains constants for declarations in descriptor.proto 6 | // and the well-known types. 7 | package genid 8 | 9 | import "google.golang.org/protobuf/reflect/protoreflect" 10 | 11 | const GoogleProtobuf_package protoreflect.FullName = "google.protobuf" 12 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/empty_gen.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 | // Code generated by generate-protos. DO NOT EDIT. 6 | 7 | package genid 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | const File_google_protobuf_empty_proto = "google/protobuf/empty.proto" 14 | 15 | // Names for google.protobuf.Empty. 16 | const ( 17 | Empty_message_name protoreflect.Name = "Empty" 18 | Empty_message_fullname protoreflect.FullName = "google.protobuf.Empty" 19 | ) 20 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/field_mask_gen.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 | // Code generated by generate-protos. DO NOT EDIT. 6 | 7 | package genid 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | const File_google_protobuf_field_mask_proto = "google/protobuf/field_mask.proto" 14 | 15 | // Names for google.protobuf.FieldMask. 16 | const ( 17 | FieldMask_message_name protoreflect.Name = "FieldMask" 18 | FieldMask_message_fullname protoreflect.FullName = "google.protobuf.FieldMask" 19 | ) 20 | 21 | // Field names for google.protobuf.FieldMask. 22 | const ( 23 | FieldMask_Paths_field_name protoreflect.Name = "paths" 24 | 25 | FieldMask_Paths_field_fullname protoreflect.FullName = "google.protobuf.FieldMask.paths" 26 | ) 27 | 28 | // Field numbers for google.protobuf.FieldMask. 29 | const ( 30 | FieldMask_Paths_field_number protoreflect.FieldNumber = 1 31 | ) 32 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/goname.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 genid 6 | 7 | // Go names of implementation-specific struct fields in generated messages. 8 | const ( 9 | State_goname = "state" 10 | 11 | SizeCache_goname = "sizeCache" 12 | SizeCacheA_goname = "XXX_sizecache" 13 | 14 | UnknownFields_goname = "unknownFields" 15 | UnknownFieldsA_goname = "XXX_unrecognized" 16 | 17 | ExtensionFields_goname = "extensionFields" 18 | ExtensionFieldsA_goname = "XXX_InternalExtensions" 19 | ExtensionFieldsB_goname = "XXX_extensions" 20 | ) 21 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/map_entry.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 genid 6 | 7 | import "google.golang.org/protobuf/reflect/protoreflect" 8 | 9 | // Generic field names and numbers for synthetic map entry messages. 10 | const ( 11 | MapEntry_Key_field_name protoreflect.Name = "key" 12 | MapEntry_Value_field_name protoreflect.Name = "value" 13 | 14 | MapEntry_Key_field_number protoreflect.FieldNumber = 1 15 | MapEntry_Value_field_number protoreflect.FieldNumber = 2 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/name.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 | package genid 6 | 7 | const ( 8 | NoUnkeyedLiteral_goname = "noUnkeyedLiteral" 9 | NoUnkeyedLiteralA_goname = "XXX_NoUnkeyedLiteral" 10 | 11 | BuilderSuffix_goname = "_builder" 12 | ) 13 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/wrappers.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 genid 6 | 7 | import "google.golang.org/protobuf/reflect/protoreflect" 8 | 9 | // Generic field name and number for messages in wrappers.proto. 10 | const ( 11 | WrapperValue_Value_field_name protoreflect.Name = "value" 12 | WrapperValue_Value_field_number protoreflect.FieldNumber = 1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.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 impl 6 | 7 | // When using unsafe pointers, we can just treat enum values as int32s. 8 | 9 | var ( 10 | coderEnumNoZero = coderInt32NoZero 11 | coderEnum = coderInt32 12 | coderEnumPtr = coderInt32Ptr 13 | coderEnumSlice = coderInt32Slice 14 | coderEnumPackedSlice = coderInt32PackedSlice 15 | ) 16 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/enum.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 impl 6 | 7 | import ( 8 | "reflect" 9 | 10 | "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | type EnumInfo struct { 14 | GoReflectType reflect.Type // int32 kind 15 | Desc protoreflect.EnumDescriptor 16 | } 17 | 18 | func (t *EnumInfo) New(n protoreflect.EnumNumber) protoreflect.Enum { 19 | return reflect.ValueOf(n).Convert(t.GoReflectType).Interface().(protoreflect.Enum) 20 | } 21 | func (t *EnumInfo) Descriptor() protoreflect.EnumDescriptor { return t.Desc } 22 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/protolazy/pointer_unsafe.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 | package protolazy 6 | 7 | import ( 8 | "sync/atomic" 9 | "unsafe" 10 | ) 11 | 12 | func atomicLoadIndex(p **[]IndexEntry) *[]IndexEntry { 13 | return (*[]IndexEntry)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) 14 | } 15 | func atomicStoreIndex(p **[]IndexEntry, v *[]IndexEntry) { 16 | atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/proto_methods.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 | // The protoreflect build tag disables use of fast-path methods. 6 | //go:build !protoreflect 7 | // +build !protoreflect 8 | 9 | package proto 10 | 11 | import ( 12 | "google.golang.org/protobuf/reflect/protoreflect" 13 | "google.golang.org/protobuf/runtime/protoiface" 14 | ) 15 | 16 | const hasProtoMethods = true 17 | 18 | func protoMethods(m protoreflect.Message) *protoiface.Methods { 19 | return m.ProtoMethods() 20 | } 21 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/proto_reflect.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 | // The protoreflect build tag disables use of fast-path methods. 6 | //go:build protoreflect 7 | // +build protoreflect 8 | 9 | package proto 10 | 11 | import ( 12 | "google.golang.org/protobuf/reflect/protoreflect" 13 | "google.golang.org/protobuf/runtime/protoiface" 14 | ) 15 | 16 | const hasProtoMethods = false 17 | 18 | func protoMethods(m protoreflect.Message) *protoiface.Methods { 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/runtime/protoiface/legacy.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 protoiface 6 | 7 | type MessageV1 interface { 8 | Reset() 9 | String() string 10 | ProtoMessage() 11 | } 12 | 13 | type ExtensionRangeV1 struct { 14 | Start, End int32 // both inclusive 15 | } 16 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.4.x" 5 | - "1.5.x" 6 | - "1.6.x" 7 | - "1.7.x" 8 | - "1.8.x" 9 | - "1.9.x" 10 | - "1.10.x" 11 | - "1.11.x" 12 | - "1.12.x" 13 | - "1.13.x" 14 | - "1.14.x" 15 | - "tip" 16 | 17 | go_import_path: gopkg.in/yaml.v2 18 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/writerc.go: -------------------------------------------------------------------------------- 1 | package yaml 2 | 3 | // Set the writer error and return false. 4 | func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { 5 | emitter.error = yaml_WRITER_ERROR 6 | emitter.problem = problem 7 | return false 8 | } 9 | 10 | // Flush the output buffer. 11 | func yaml_emitter_flush(emitter *yaml_emitter_t) bool { 12 | if emitter.write_handler == nil { 13 | panic("write handler not set") 14 | } 15 | 16 | // Check if the buffer is empty. 17 | if emitter.buffer_pos == 0 { 18 | return true 19 | } 20 | 21 | if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { 22 | return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) 23 | } 24 | emitter.buffer_pos = 0 25 | return true 26 | } 27 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /version/version.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | var Version string 4 | --------------------------------------------------------------------------------