├── .github └── workflows │ └── stale-issues-workflow.yml ├── .gitignore ├── LICENSE ├── README.md ├── analytics.go ├── analytics_test.go ├── bitrise.yml ├── go.mod ├── go.sum ├── icons.go ├── icons_test.go ├── main.go ├── renovate.json ├── step.yml ├── steperror.go ├── submitresult.go ├── submitresult_test.go ├── url.go ├── url_test.go └── vendor ├── github.com ├── Masterminds │ └── semver │ │ └── v3 │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE.txt │ │ ├── Makefile │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── collection.go │ │ ├── constraints.go │ │ ├── doc.go │ │ └── version.go ├── beevik │ └── etree │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── RELEASE_NOTES.md │ │ ├── etree.go │ │ ├── helpers.go │ │ └── path.go ├── bitrise-io │ ├── bitrise-init │ │ ├── LICENSE │ │ ├── analytics │ │ │ └── analytics.go │ │ ├── detectors │ │ │ ├── direntry │ │ │ │ └── direntry.go │ │ │ ├── gradle │ │ │ │ └── gradle.go │ │ │ └── maven │ │ │ │ └── maven.go │ │ ├── errormapper │ │ │ └── errormapper.go │ │ ├── models │ │ │ ├── configbuilder.go │ │ │ ├── models.go │ │ │ ├── option.go │ │ │ ├── pipelinebuilder.go │ │ │ └── workflowbuilder.go │ │ ├── output │ │ │ └── output.go │ │ ├── scanner │ │ │ ├── analytics.go │ │ │ ├── config.go │ │ │ ├── errors.go │ │ │ ├── icon.go │ │ │ ├── manual_config.go │ │ │ ├── result.go │ │ │ ├── tool_detector.go │ │ │ └── utils.go │ │ ├── scanners │ │ │ ├── android │ │ │ │ ├── android.go │ │ │ │ └── icon.go │ │ │ ├── cordova │ │ │ │ ├── cordova.go │ │ │ │ └── utility.go │ │ │ ├── fastlane │ │ │ │ ├── fastlane.go │ │ │ │ ├── fastlane_test_file_contents.go │ │ │ │ └── utility.go │ │ │ ├── flutter │ │ │ │ ├── const.go │ │ │ │ └── flutter.go │ │ │ ├── ionic │ │ │ │ ├── ionic.go │ │ │ │ └── utility.go │ │ │ ├── ios │ │ │ │ ├── appclip.go │ │ │ │ ├── gemutil.go │ │ │ │ ├── icon.go │ │ │ │ ├── ios.go │ │ │ │ ├── podfile.go │ │ │ │ ├── project.go │ │ │ │ ├── project_pod.go │ │ │ │ ├── resource_set.go │ │ │ │ ├── rubyscript.go │ │ │ │ ├── spm.go │ │ │ │ ├── spmproject.go │ │ │ │ ├── utility.go │ │ │ │ ├── workflow.go │ │ │ │ ├── xcodeproj.go │ │ │ │ └── xcodeproj_test_files.go │ │ │ ├── java │ │ │ │ └── java.go │ │ │ ├── kmp │ │ │ │ └── kmp.go │ │ │ ├── macos │ │ │ │ └── macos.go │ │ │ ├── nodejs │ │ │ │ ├── nodejs.go │ │ │ │ └── utiltity.go │ │ │ ├── reactnative │ │ │ │ ├── const.go │ │ │ │ ├── expo.go │ │ │ │ ├── plain.go │ │ │ │ ├── reactnative.go │ │ │ │ └── utility.go │ │ │ └── scanners.go │ │ ├── steps │ │ │ ├── cachesteps.go │ │ │ ├── const.go │ │ │ └── steps.go │ │ ├── toolscanner │ │ │ └── toolscanner.go │ │ └── utility │ │ │ ├── icon.go │ │ │ └── utility.go │ ├── bitrise │ │ └── v2 │ │ │ ├── LICENSE │ │ │ ├── exitcode │ │ │ └── exitcode.go │ │ │ ├── models │ │ │ ├── build_run_results.go │ │ │ ├── config_file_tree.go │ │ │ ├── models.go │ │ │ ├── models_methods.go │ │ │ ├── selective_triggers.go │ │ │ ├── step_run_results.go │ │ │ ├── trigger_map.go │ │ │ ├── trigger_map_item.go │ │ │ └── workflow_run_plan.go │ │ │ └── version │ │ │ ├── build.go │ │ │ ├── init.go │ │ │ └── tool_version.go │ ├── envman │ │ ├── LICENSE │ │ ├── envman │ │ │ └── configs.go │ │ └── v2 │ │ │ ├── LICENSE │ │ │ └── models │ │ │ ├── models.go │ │ │ └── models_methods.go │ ├── go-flutter │ │ ├── LICENSE │ │ ├── flutterproject │ │ │ ├── flutterproject.go │ │ │ └── internal │ │ │ │ └── sdk │ │ │ │ ├── asdf.go │ │ │ │ ├── fileopener.go │ │ │ │ ├── fvm_config.go │ │ │ │ ├── pubspec.go │ │ │ │ ├── pubspec_lock.go │ │ │ │ └── version_constraint.go │ │ └── fluttersdk │ │ │ └── fluttersdk.go │ ├── go-plist │ │ ├── .gitignore │ │ ├── .gitlab-ci.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bitrise.yml │ │ ├── bplist.go │ │ ├── bplist_generator.go │ │ ├── bplist_parser.go │ │ ├── decode.go │ │ ├── doc.go │ │ ├── encode.go │ │ ├── fuzz.go │ │ ├── marshal.go │ │ ├── must.go │ │ ├── plist.go │ │ ├── plist_types.go │ │ ├── text_generator.go │ │ ├── text_parser.go │ │ ├── text_tables.go │ │ ├── typeinfo.go │ │ ├── unmarshal.go │ │ ├── util.go │ │ ├── xml_generator.go │ │ ├── xml_parser.go │ │ ├── zerocopy.go │ │ └── zerocopy_appengine.go │ ├── go-steputils │ │ ├── input │ │ │ ├── fileprovider.go │ │ │ └── input.go │ │ ├── step │ │ │ └── steperror.go │ │ ├── stepconf │ │ │ └── stepconf.go │ │ ├── tools │ │ │ └── tools.go │ │ └── v2 │ │ │ └── export │ │ │ └── export.go │ ├── go-utils │ │ ├── LICENSE │ │ ├── colorstring │ │ │ └── colorstring.go │ │ ├── command │ │ │ ├── command.go │ │ │ ├── file.go │ │ │ ├── git │ │ │ │ ├── commands.go │ │ │ │ └── git.go │ │ │ └── zip.go │ │ ├── errorutil │ │ │ └── errorutil.go │ │ ├── filedownloader │ │ │ └── filedownloader.go │ │ ├── fileutil │ │ │ └── fileutil.go │ │ ├── log │ │ │ ├── defaultlogger.go │ │ │ ├── dummylogger.go │ │ │ ├── internal_logger.go │ │ │ ├── json_logger.go │ │ │ ├── log.go │ │ │ ├── logger.go │ │ │ ├── print.go │ │ │ ├── raw_logger.go │ │ │ └── severity.go │ │ ├── parseutil │ │ │ └── parseutil.go │ │ ├── pathutil │ │ │ ├── path_filter.go │ │ │ ├── pathutil.go │ │ │ └── sortable_path.go │ │ ├── pointers │ │ │ └── pointers.go │ │ ├── pretty │ │ │ └── pretty.go │ │ ├── retry │ │ │ ├── retry.go │ │ │ └── retryhttp.go │ │ ├── sliceutil │ │ │ └── sliceutil.go │ │ ├── v2 │ │ │ ├── LICENSE │ │ │ ├── analytics │ │ │ │ ├── client.go │ │ │ │ ├── event.go │ │ │ │ ├── property.go │ │ │ │ └── track.go │ │ │ ├── command │ │ │ │ ├── command.go │ │ │ │ ├── errorcollector.go │ │ │ │ └── errors.go │ │ │ ├── env │ │ │ │ └── env.go │ │ │ ├── fileutil │ │ │ │ └── fileutil.go │ │ │ ├── log │ │ │ │ ├── colorstring │ │ │ │ │ └── colorstring.go │ │ │ │ ├── log.go │ │ │ │ └── severity.go │ │ │ ├── pathutil │ │ │ │ └── pathutil.go │ │ │ └── retryhttp │ │ │ │ └── retryhttp.go │ │ └── ziputil │ │ │ └── ziputil.go │ ├── go-xcode │ │ ├── LICENSE │ │ ├── pathfilters │ │ │ ├── pathfilters.go │ │ │ └── pathfilters_testdata.go │ │ ├── xcodebuild │ │ │ ├── build.go │ │ │ ├── export.go │ │ │ ├── legacy_export.go │ │ │ ├── resolve_package_deps.go │ │ │ ├── show_build_settings.go │ │ │ ├── test.go │ │ │ └── xcodebuild.go │ │ └── xcodeproject │ │ │ ├── serialized │ │ │ ├── error.go │ │ │ └── serialized.go │ │ │ ├── xcodeproj │ │ │ ├── appiconset.go │ │ │ ├── attributes.go │ │ │ ├── build_configuration.go │ │ │ ├── configuration_list.go │ │ │ ├── plist.go │ │ │ ├── product_reference.go │ │ │ ├── proj.go │ │ │ ├── recreate_schemes.go │ │ │ ├── resources_build_phase.go │ │ │ ├── sample_project.go │ │ │ ├── schemes.go │ │ │ ├── target.go │ │ │ ├── target_dependency.go │ │ │ ├── xcodeproj.go │ │ │ └── xcodeproj_test_files.go │ │ │ ├── xcscheme │ │ │ ├── errors.go │ │ │ └── xcscheme.go │ │ │ └── xcworkspace │ │ │ ├── file_ref.go │ │ │ ├── group.go │ │ │ ├── schemes.go │ │ │ ├── utils.go │ │ │ └── xcworkspace.go │ ├── goinp │ │ └── goinp │ │ │ └── goinp.go │ └── stepman │ │ ├── LICENSE │ │ ├── models │ │ ├── models.go │ │ ├── models_methods.go │ │ ├── parse_util.go │ │ └── version_constraint.go │ │ └── stepid │ │ └── stepid.go ├── bitrise-steplib │ ├── steps-activate-ssh-key │ │ ├── LICENSE │ │ └── activatesshkey │ │ │ ├── activate.go │ │ │ ├── steperror.go │ │ │ └── util.go │ ├── steps-authenticate-host-with-netrc │ │ ├── LICENSE │ │ └── netrcutil │ │ │ └── netrcutil.go │ └── steps-git-clone │ │ ├── LICENSE │ │ ├── gitclone │ │ ├── bitriseapi │ │ │ ├── pr_merge_ref.go │ │ │ └── pr_patch.go │ │ ├── checkout.go │ │ ├── checkout_helper.go │ │ ├── checkout_method_pr_auto_diff.go │ │ ├── checkout_method_pr_auto_merge_branch.go │ │ ├── checkout_method_pr_manual.go │ │ ├── checkout_method_simple.go │ │ ├── checkoutmethod_string.go │ │ ├── command_runner.go │ │ ├── git.go │ │ ├── gitclone.go │ │ ├── output.go │ │ ├── steperror.go │ │ ├── tracker │ │ │ └── tracker.go │ │ └── unshallow.go │ │ └── transport │ │ └── transport.go ├── emirpasic │ └── gods │ │ ├── LICENSE │ │ ├── containers │ │ ├── containers.go │ │ ├── enumerable.go │ │ ├── iterator.go │ │ └── serialization.go │ │ ├── lists │ │ ├── lists.go │ │ └── singlylinkedlist │ │ │ ├── enumerable.go │ │ │ ├── iterator.go │ │ │ ├── serialization.go │ │ │ └── singlylinkedlist.go │ │ ├── queues │ │ ├── linkedlistqueue │ │ │ ├── iterator.go │ │ │ ├── linkedlistqueue.go │ │ │ └── serialization.go │ │ └── queues.go │ │ ├── stacks │ │ ├── linkedliststack │ │ │ ├── iterator.go │ │ │ ├── linkedliststack.go │ │ │ └── serialization.go │ │ └── stacks.go │ │ └── utils │ │ ├── comparator.go │ │ ├── sort.go │ │ └── utils.go ├── gofrs │ └── uuid │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── codec.go │ │ ├── fuzz.go │ │ ├── generator.go │ │ ├── sql.go │ │ └── uuid.go ├── google │ └── uuid │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── dce.go │ │ ├── doc.go │ │ ├── hash.go │ │ ├── marshal.go │ │ ├── node.go │ │ ├── node_js.go │ │ ├── node_net.go │ │ ├── null.go │ │ ├── sql.go │ │ ├── time.go │ │ ├── util.go │ │ ├── uuid.go │ │ ├── version1.go │ │ ├── version4.go │ │ ├── version6.go │ │ └── version7.go ├── hashicorp │ ├── go-cleanhttp │ │ ├── LICENSE │ │ ├── README.md │ │ ├── cleanhttp.go │ │ ├── doc.go │ │ └── handlers.go │ ├── go-retryablehttp │ │ ├── .gitignore │ │ ├── .go-version │ │ ├── CHANGELOG.md │ │ ├── CODEOWNERS │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── cert_error_go119.go │ │ ├── cert_error_go120.go │ │ ├── client.go │ │ └── roundtripper.go │ └── go-version │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── constraint.go │ │ ├── version.go │ │ └── version_collection.go ├── heimdalr │ └── dag │ │ ├── .gitignore │ │ ├── .gitpod.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── dag.go │ │ ├── marshal.go │ │ ├── storage.go │ │ └── visitor.go ├── mitchellh │ └── mapstructure │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── decode_hooks.go │ │ ├── error.go │ │ └── mapstructure.go └── ryanuber │ └── go-glob │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ └── glob.go ├── golang.org └── x │ ├── crypto │ ├── LICENSE │ ├── PATENTS │ └── ssh │ │ └── terminal │ │ └── terminal.go │ ├── exp │ ├── LICENSE │ ├── PATENTS │ └── maps │ │ └── maps.go │ ├── sys │ ├── LICENSE │ ├── PATENTS │ ├── 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 │ │ ├── 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 │ ├── transform │ └── transform.go │ └── unicode │ └── norm │ ├── composition.go │ ├── forminfo.go │ ├── input.go │ ├── iter.go │ ├── normalize.go │ ├── readwriter.go │ ├── tables10.0.0.go │ ├── tables11.0.0.go │ ├── tables12.0.0.go │ ├── tables13.0.0.go │ ├── tables15.0.0.go │ ├── tables9.0.0.go │ ├── transform.go │ └── trie.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 ├── howett.net └── plist │ ├── .gitignore │ ├── .gitlab-ci.yml │ ├── LICENSE │ ├── README.md │ ├── bplist.go │ ├── bplist_generator.go │ ├── bplist_parser.go │ ├── decode.go │ ├── doc.go │ ├── encode.go │ ├── fuzz.go │ ├── marshal.go │ ├── must.go │ ├── plist.go │ ├── plist_types.go │ ├── text_generator.go │ ├── text_parser.go │ ├── text_tables.go │ ├── typeinfo.go │ ├── unmarshal.go │ ├── util.go │ ├── xml_generator.go │ ├── xml_parser.go │ ├── zerocopy.go │ └── zerocopy_appengine.go └── modules.txt /.gitignore: -------------------------------------------------------------------------------- 1 | .bitrise* 2 | _tmp 3 | go/bin/ 4 | go/pkg/ 5 | _scan_result/ 6 | .idea/ 7 | README.md.backup 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Bitrise Ltd. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /analytics.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/bitrise-io/go-utils/log" 5 | ) 6 | 7 | // LogError sends analytics log using log.RErrorf by setting the stepID and data/build_slug. 8 | func LogError(stepID string, tag string, err error, format string, v ...interface{}) { 9 | log.RErrorf(stepID, tag, buildData(err), format, v...) 10 | } 11 | 12 | func buildData(err error) map[string]interface{} { 13 | data := map[string]interface{}{} 14 | data["source"] = "scanner" 15 | if err != nil { 16 | data["error"] = err.Error() 17 | } 18 | return data 19 | } 20 | -------------------------------------------------------------------------------- /analytics_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "errors" 5 | "os" 6 | "testing" 7 | ) 8 | 9 | func TestDataBuild(t *testing.T) { 10 | t.Log("it creates complex data") 11 | { 12 | key := "BITRISE_BUILD_SLUG" 13 | var value string 14 | var err error 15 | if value = os.Getenv(key); value != "" { 16 | err = os.Unsetenv(key) 17 | defer func() { err = os.Setenv(key, value) }() 18 | } else { 19 | defer func() { err = os.Unsetenv(key) }() 20 | } 21 | err = os.Setenv(key, "testSlug") 22 | if err != nil { 23 | t.Fatalf("test setup: os.Setenv() returned error: %s", err) 24 | } 25 | 26 | data := buildData(errors.New("testError")) 27 | if v, ok := data["error"]; !ok || v != "testError" { 28 | t.Fatalf("data := buildData(); data['error'] != 'testError'") 29 | } 30 | if v, ok := data["source"]; !ok || v != "scanner" { 31 | t.Fatalf("data := buildData(); data['source'] != 'scanner'") 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "local>bitrise-steplib/.github:renovate-config" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /steperror.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "github.com/bitrise-io/go-steputils/step" 4 | 5 | func newStepError(tag string, err error, shortMsg string) *step.Error { 6 | return step.NewError("project-scanner", tag, err, shortMsg) 7 | } 8 | -------------------------------------------------------------------------------- /url.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "strings" 4 | 5 | func redactURL(url string) string { 6 | firstSeparator := "://" 7 | firstIndex := strings.Index(url, firstSeparator) 8 | secondIndex := strings.Index(url, "@") 9 | 10 | if 0 < firstIndex && 0 < secondIndex && firstIndex < secondIndex { 11 | url = url[:firstIndex+len(firstSeparator)] + "..." + url[secondIndex:] 12 | } 13 | 14 | return url 15 | } 16 | -------------------------------------------------------------------------------- /url_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "reflect" 5 | "testing" 6 | ) 7 | 8 | func TestURLRedacting(t *testing.T) { 9 | tests := []struct { 10 | url string 11 | want string 12 | }{ 13 | { 14 | url: "https://user:pass@repo.com/org/project.git", 15 | want: "https://...@repo.com/org/project.git", 16 | }, 17 | { 18 | url: "https://github.com/org/project.git", 19 | want: "https://github.com/org/project.git", 20 | }, 21 | { 22 | url: "git@github.com:Org/Applications.git", 23 | want: "git@github.com:Org/Applications.git", 24 | }, 25 | } 26 | 27 | for _, tt := range tests { 28 | got := redactURL(tt.url) 29 | if !reflect.DeepEqual(got, tt.want) { 30 | t.Errorf("redactURL() = %v, want %v", got, tt.want) 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/Masterminds/semver/v3/.gitignore: -------------------------------------------------------------------------------- 1 | _fuzz/ -------------------------------------------------------------------------------- /vendor/github.com/Masterminds/semver/v3/.golangci.yml: -------------------------------------------------------------------------------- 1 | run: 2 | deadline: 2m 3 | 4 | linters: 5 | disable-all: true 6 | enable: 7 | - misspell 8 | - govet 9 | - staticcheck 10 | - errcheck 11 | - unparam 12 | - ineffassign 13 | - nakedret 14 | - gocyclo 15 | - dupl 16 | - goimports 17 | - revive 18 | - gosec 19 | - gosimple 20 | - typecheck 21 | - unused 22 | 23 | linters-settings: 24 | gofmt: 25 | simplify: true 26 | dupl: 27 | threshold: 600 28 | -------------------------------------------------------------------------------- /vendor/github.com/Masterminds/semver/v3/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014-2019, Matt Butcher and Matt Farina 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/github.com/Masterminds/semver/v3/Makefile: -------------------------------------------------------------------------------- 1 | GOPATH=$(shell go env GOPATH) 2 | GOLANGCI_LINT=$(GOPATH)/bin/golangci-lint 3 | 4 | .PHONY: lint 5 | lint: $(GOLANGCI_LINT) 6 | @echo "==> Linting codebase" 7 | @$(GOLANGCI_LINT) run 8 | 9 | .PHONY: test 10 | test: 11 | @echo "==> Running tests" 12 | GO111MODULE=on go test -v 13 | 14 | .PHONY: test-cover 15 | test-cover: 16 | @echo "==> Running Tests with coverage" 17 | GO111MODULE=on go test -cover . 18 | 19 | .PHONY: fuzz 20 | fuzz: 21 | @echo "==> Running Fuzz Tests" 22 | go test -fuzz=FuzzNewVersion -fuzztime=15s . 23 | go test -fuzz=FuzzStrictNewVersion -fuzztime=15s . 24 | go test -fuzz=FuzzNewConstraint -fuzztime=15s . 25 | 26 | $(GOLANGCI_LINT): 27 | # Install golangci-lint. The configuration for it is in the .golangci.yml 28 | # file in the root of the repository 29 | echo ${GOPATH} 30 | curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.17.1 31 | -------------------------------------------------------------------------------- /vendor/github.com/Masterminds/semver/v3/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | The following versions of semver are currently supported: 6 | 7 | | Version | Supported | 8 | | ------- | ------------------ | 9 | | 3.x | :white_check_mark: | 10 | | 2.x | :x: | 11 | | 1.x | :x: | 12 | 13 | Fixes are only released for the latest minor version in the form of a patch release. 14 | 15 | ## Reporting a Vulnerability 16 | 17 | You can privately disclose a vulnerability through GitHubs 18 | [private vulnerability reporting](https://github.com/Masterminds/semver/security/advisories) 19 | mechanism. 20 | -------------------------------------------------------------------------------- /vendor/github.com/Masterminds/semver/v3/collection.go: -------------------------------------------------------------------------------- 1 | package semver 2 | 3 | // Collection is a collection of Version instances and implements the sort 4 | // interface. See the sort package for more details. 5 | // https://golang.org/pkg/sort/ 6 | type Collection []*Version 7 | 8 | // Len returns the length of a collection. The number of Version instances 9 | // on the slice. 10 | func (c Collection) Len() int { 11 | return len(c) 12 | } 13 | 14 | // Less is needed for the sort interface to compare two Version objects on the 15 | // slice. If checks if one is less than the other. 16 | func (c Collection) Less(i, j int) bool { 17 | return c[i].LessThan(c[j]) 18 | } 19 | 20 | // Swap is needed for the sort interface to replace the Version objects 21 | // at two different positions in the slice. 22 | func (c Collection) Swap(i, j int) { 23 | c[i], c[j] = c[j], c[i] 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/beevik/etree/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Brett Vickers (beevik) 2 | Felix Geisendörfer (felixge) 3 | Kamil Kisiel (kisielk) 4 | Graham King (grahamking) 5 | Matt Smith (ma314smith) 6 | Michal Jemala (michaljemala) 7 | Nicolas Piganeau (npiganeau) 8 | Chris Brown (ccbrown) 9 | Earncef Sequeira (earncef) 10 | Gabriel de Labachelerie (wuzuf) 11 | Martin Dosch (mdosch) 12 | Hugo Wetterberg (hugowetterberg) 13 | -------------------------------------------------------------------------------- /vendor/github.com/beevik/etree/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2015-2023 Brett Vickers. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER ``AS IS'' AND ANY 15 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 17 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER OR 18 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 20 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 21 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 22 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/bitrise-init/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Bitrise Ltd. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/bitrise-init/detectors/maven/maven.go: -------------------------------------------------------------------------------- 1 | package maven 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/bitrise-io/bitrise-init/detectors/direntry" 7 | ) 8 | 9 | type Project struct { 10 | RootDirEntry direntry.DirEntry 11 | ProjectObjectModelFileEntry direntry.DirEntry 12 | MavenWrapperFileEntry direntry.DirEntry 13 | } 14 | 15 | func ScanProject(projectRootDirEntry direntry.DirEntry) (*Project, error) { 16 | return detectMavenProjectRoot(projectRootDirEntry) 17 | } 18 | 19 | func detectMavenProjectRoot(searchDir direntry.DirEntry) (*Project, error) { 20 | projectObjectModelEntry := searchDir.FindImmediateChildByName("pom.xml", false) 21 | if projectObjectModelEntry == nil { 22 | return nil, nil 23 | } 24 | 25 | projectRootDirEntry := projectObjectModelEntry.Parent() 26 | if projectRootDirEntry == nil { 27 | return nil, fmt.Errorf("unable to detect project root") 28 | } 29 | 30 | mavenWrapperEntry := projectRootDirEntry.FindImmediateChildByName("mvnw", false) 31 | if mavenWrapperEntry == nil { 32 | return nil, nil 33 | } 34 | 35 | return &Project{ 36 | RootDirEntry: *projectRootDirEntry, 37 | ProjectObjectModelFileEntry: *projectObjectModelEntry, 38 | MavenWrapperFileEntry: *mavenWrapperEntry, 39 | }, nil 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/bitrise-init/models/pipelinebuilder.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | bitriseModels "github.com/bitrise-io/bitrise/v2/models" 5 | ) 6 | 7 | type pipelineBuilderModel struct { 8 | Workflows map[WorkflowID]bitriseModels.GraphPipelineWorkflowModel 9 | Description string 10 | Summary string 11 | } 12 | 13 | func newDefaultPipelineBuilder() *pipelineBuilderModel { 14 | return &pipelineBuilderModel{ 15 | Workflows: map[WorkflowID]bitriseModels.GraphPipelineWorkflowModel{}, 16 | } 17 | } 18 | 19 | func (builder *pipelineBuilderModel) setGraphPipelineWorkflow(workflow WorkflowID, item bitriseModels.GraphPipelineWorkflowModel) { 20 | builder.Workflows[workflow] = item 21 | } 22 | 23 | func (builder *pipelineBuilderModel) generate() bitriseModels.PipelineModel { 24 | workflows := bitriseModels.GraphPipelineWorkflowListItemModel{} 25 | for workflowID, workflow := range builder.Workflows { 26 | workflows[string(workflowID)] = workflow 27 | } 28 | 29 | return bitriseModels.PipelineModel{ 30 | Workflows: workflows, 31 | Description: builder.Description, 32 | Summary: builder.Summary, 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/bitrise-init/models/workflowbuilder.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import bitriseModels "github.com/bitrise-io/bitrise/v2/models" 4 | 5 | type workflowBuilderModel struct { 6 | Steps []bitriseModels.StepListItemModel 7 | Description string 8 | Summary string 9 | } 10 | 11 | func newDefaultWorkflowBuilder() *workflowBuilderModel { 12 | return &workflowBuilderModel{ 13 | Steps: []bitriseModels.StepListItemModel{}, 14 | } 15 | } 16 | 17 | func (builder *workflowBuilderModel) appendStepListItems(items ...bitriseModels.StepListItemModel) { 18 | builder.Steps = append(builder.Steps, items...) 19 | } 20 | 21 | func (builder *workflowBuilderModel) generate() bitriseModels.WorkflowModel { 22 | return bitriseModels.WorkflowModel{ 23 | Steps: builder.Steps, 24 | Description: builder.Description, 25 | Summary: builder.Summary, 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/bitrise-init/scanner/analytics.go: -------------------------------------------------------------------------------- 1 | package scanner 2 | 3 | func detectorErrorData(detector string, err error) map[string]interface{} { 4 | return map[string]interface{}{ 5 | "detector": detector, 6 | "error": err.Error(), 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/bitrise-init/scanner/icon.go: -------------------------------------------------------------------------------- 1 | package scanner 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "path/filepath" 7 | 8 | "github.com/bitrise-io/bitrise-init/models" 9 | "github.com/bitrise-io/go-utils/pathutil" 10 | ) 11 | 12 | func copyIconsToDir(icons models.Icons, outputDir string) error { 13 | if exist, err := pathutil.IsDirExists(outputDir); err != nil { 14 | return err 15 | } else if !exist { 16 | return fmt.Errorf("output dir does not exist") 17 | } 18 | 19 | for _, icon := range icons { 20 | if err := copyFile(icon.Path, filepath.Join(outputDir, icon.Filename)); err != nil { 21 | return err 22 | } 23 | } 24 | return nil 25 | } 26 | 27 | func copyFile(src string, dst string) (err error) { 28 | data, err := os.ReadFile(src) 29 | if err != nil { 30 | return err 31 | } 32 | 33 | if err = os.WriteFile(dst, data, 0644); err != nil { 34 | return err 35 | } 36 | 37 | return nil 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/bitrise-init/scanner/manual_config.go: -------------------------------------------------------------------------------- 1 | package scanner 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/bitrise-io/bitrise-init/models" 7 | "github.com/bitrise-io/bitrise-init/scanners" 8 | ) 9 | 10 | // ManualConfig ... 11 | func ManualConfig() (models.ScanResultModel, error) { 12 | scannerList := append(scanners.ProjectScanners(), scanners.AutomationToolScanners()...) 13 | scannerToOptionRoot := map[string]models.OptionNode{} 14 | scannerToBitriseConfigMap := map[string]models.BitriseConfigMap{} 15 | 16 | for _, scanner := range scannerList { 17 | options := scanner.DefaultOptions() 18 | 19 | scannerToOptionRoot[scanner.Name()] = options 20 | 21 | configs, err := scanner.DefaultConfigs() 22 | if err != nil { 23 | return models.ScanResultModel{}, fmt.Errorf("Failed create default configs, error: %s", err) 24 | } 25 | scannerToBitriseConfigMap[scanner.Name()] = configs 26 | } 27 | 28 | customConfig, err := scanners.CustomConfig() 29 | if err != nil { 30 | return models.ScanResultModel{}, fmt.Errorf("Failed create default custom configs, error: %s", err) 31 | } 32 | 33 | scannerToBitriseConfigMap[scanners.CustomProjectType] = customConfig 34 | 35 | return models.ScanResultModel{ 36 | ScannerToOptionRoot: scannerToOptionRoot, 37 | ScannerToBitriseConfigMap: scannerToBitriseConfigMap, 38 | }, nil 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/bitrise-init/scanners/cordova/utility.go: -------------------------------------------------------------------------------- 1 | package cordova 2 | 3 | import ( 4 | "encoding/xml" 5 | 6 | "github.com/bitrise-io/go-utils/fileutil" 7 | "github.com/bitrise-io/go-utils/pathutil" 8 | ) 9 | 10 | const configXMLBasePath = "config.xml" 11 | 12 | // WidgetModel ... 13 | type WidgetModel struct { 14 | XMLNSCDV string `xml:"xmlns cdv,attr"` 15 | } 16 | 17 | func parseConfigXMLContent(content string) (WidgetModel, error) { 18 | widget := WidgetModel{} 19 | if err := xml.Unmarshal([]byte(content), &widget); err != nil { 20 | return WidgetModel{}, err 21 | } 22 | return widget, nil 23 | } 24 | 25 | // ParseConfigXML ... 26 | func ParseConfigXML(pth string) (WidgetModel, error) { 27 | content, err := fileutil.ReadStringFromFile(pth) 28 | if err != nil { 29 | return WidgetModel{}, err 30 | } 31 | return parseConfigXMLContent(content) 32 | } 33 | 34 | // FilterRootConfigXMLFile ... 35 | func FilterRootConfigXMLFile(fileList []string) (string, error) { 36 | allowConfigXMLBaseFilter := pathutil.BaseFilter(configXMLBasePath, true) 37 | configXMLs, err := pathutil.FilterPaths(fileList, allowConfigXMLBaseFilter) 38 | if err != nil { 39 | return "", err 40 | } 41 | 42 | if len(configXMLs) == 0 { 43 | return "", nil 44 | } 45 | 46 | return configXMLs[0], nil 47 | } 48 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/bitrise-init/scanners/flutter/const.go: -------------------------------------------------------------------------------- 1 | package flutter 2 | 3 | const ( 4 | primaryWorkflowDescription = `Builds project and runs tests. 5 | 6 | Next steps: 7 | - Check out [Getting started with Flutter apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html). 8 | ` 9 | 10 | deployWorkflowDescription = `Builds and deploys app using [Deploy to bitrise.io Step](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html#deploying-a-flutter-app). 11 | 12 | If you build for iOS, make sure to set up code signing secrets on Bitrise for a successful build. 13 | 14 | Next steps: 15 | - Check out [Getting started with Flutter apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html) for signing and deployment options. 16 | - Check out the [Code signing guide](https://devcenter.bitrise.io/en/code-signing.html) for iOS and Android 17 | ` 18 | ) 19 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/bitrise-init/scanners/ionic/utility.go: -------------------------------------------------------------------------------- 1 | package ionic 2 | 3 | import "github.com/bitrise-io/go-utils/pathutil" 4 | 5 | // FilterRootFile ... 6 | func FilterRootFile(fileList []string, fileName string) (string, error) { 7 | allowBaseFilter := pathutil.BaseFilter(fileName, true) 8 | files, err := pathutil.FilterPaths(fileList, allowBaseFilter) 9 | if err != nil { 10 | return "", err 11 | } 12 | 13 | if len(files) == 0 { 14 | return "", nil 15 | } 16 | 17 | return files[0], nil 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/bitrise-init/scanners/ios/gemutil.go: -------------------------------------------------------------------------------- 1 | package ios 2 | 3 | import ( 4 | "fmt" 5 | "regexp" 6 | "strings" 7 | 8 | "github.com/bitrise-io/go-utils/fileutil" 9 | ) 10 | 11 | // GemVersionFromGemfileLockContent ... 12 | func GemVersionFromGemfileLockContent(gem, content string) string { 13 | relevantLines := []string{} 14 | lines := strings.Split(content, "\n") 15 | 16 | specsStart := false 17 | for _, line := range lines { 18 | if strings.Contains(line, "specs:") { 19 | specsStart = true 20 | } 21 | 22 | trimmed := strings.Trim(line, " ") 23 | if trimmed == "" { 24 | specsStart = false 25 | } 26 | 27 | if specsStart { 28 | relevantLines = append(relevantLines, line) 29 | } 30 | } 31 | 32 | exp := regexp.MustCompile(fmt.Sprintf(`%s \((.+)\)`, gem)) 33 | for _, line := range relevantLines { 34 | match := exp.FindStringSubmatch(line) 35 | if len(match) == 2 { 36 | return match[1] 37 | } 38 | } 39 | 40 | return "" 41 | } 42 | 43 | // GemVersionFromGemfileLock ... 44 | func GemVersionFromGemfileLock(gem, gemfileLockPth string) (string, error) { 45 | content, err := fileutil.ReadStringFromFile(gemfileLockPth) 46 | if err != nil { 47 | return "", err 48 | } 49 | return GemVersionFromGemfileLockContent(gem, content), nil 50 | } 51 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/bitrise-init/utility/icon.go: -------------------------------------------------------------------------------- 1 | package utility 2 | 3 | import ( 4 | "crypto/sha256" 5 | "fmt" 6 | "path/filepath" 7 | "sort" 8 | 9 | "github.com/bitrise-io/bitrise-init/models" 10 | "github.com/bitrise-io/go-utils/sliceutil" 11 | ) 12 | 13 | // CreateIconDescriptors returns a sorted array of generated unique icon names, and the original file path. 14 | func CreateIconDescriptors(absoluteIconPaths []string, basepath string) (models.Icons, error) { 15 | absoluteIconPaths = sliceutil.UniqueStringSlice(absoluteIconPaths) 16 | sort.Strings(absoluteIconPaths) 17 | 18 | icons := models.Icons{} 19 | for _, iconPath := range absoluteIconPaths { 20 | relativePath, err := filepath.Rel(basepath, iconPath) 21 | if err != nil { 22 | return nil, err 23 | } 24 | hash := sha256.Sum256([]byte(relativePath)) 25 | hashStr := fmt.Sprintf("%x", hash) + filepath.Ext(iconPath) 26 | 27 | icons = append(icons, models.Icon{ 28 | Filename: hashStr, 29 | Path: iconPath, 30 | }) 31 | } 32 | return icons, nil 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/bitrise/v2/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Bitrise 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/bitrise/v2/exitcode/exitcode.go: -------------------------------------------------------------------------------- 1 | package exitcode 2 | 3 | const ( 4 | CLISuccess = 0 5 | CLIFailed = 1 6 | CLIAbortedWithCustomTimeout = 91 7 | CLIAbortedWithNoOutputTimeout = 92 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/bitrise/v2/version/build.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | // VERSION is the main CLI version number. It's defined at build time using -ldflags 4 | var VERSION = "2.30.5" 5 | 6 | // BuildNumber is the CI build number that creates the release. It's defined at build time using -ldflags 7 | var BuildNumber = "" 8 | 9 | // Commit is the git commit hash used for building the release. It's defined at build time using -ldflags 10 | var Commit = "" 11 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/bitrise/v2/version/init.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | import ( 4 | "runtime/debug" 5 | "strings" 6 | ) 7 | 8 | // IsAlternativeInstallation tracks if the current cli was installed via `go install` or not. 9 | var IsAlternativeInstallation = false 10 | 11 | func init() { 12 | if Commit != "" { 13 | return 14 | } 15 | 16 | info, available := debug.ReadBuildInfo() 17 | if available && info.Main.Version != "" { 18 | IsAlternativeInstallation = true 19 | 20 | components := strings.Split(info.Main.Version, "-") 21 | count := len(components) 22 | if count != 0 { 23 | Commit = components[count-1] 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/envman/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Bitrise 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/envman/v2/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Bitrise 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-flutter/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Bitrise 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-flutter/flutterproject/internal/sdk/fileopener.go: -------------------------------------------------------------------------------- 1 | package sdk 2 | 3 | import ( 4 | "io" 5 | ) 6 | 7 | type FileOpener interface { 8 | OpenReaderIfExists(path string) (io.Reader, error) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-plist/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | *.wasm 8 | 9 | # Test binary, built with `go test -c` 10 | *.test 11 | 12 | # Output of the go coverage tool, specifically when used with LiteIDE 13 | *.out 14 | 15 | # Dependency directories (remove the comment below to include it) 16 | # vendor/ 17 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-plist/.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | image: golang:alpine 2 | stages: 3 | - test 4 | 5 | variables: 6 | GO_PACKAGE: "github.com/bitrise-io/go-plist" 7 | 8 | before_script: 9 | - "mkdir -p $(dirname $GOPATH/src/$GO_PACKAGE)" 10 | - "ln -s $(pwd) $GOPATH/src/$GO_PACKAGE" 11 | - "cd $GOPATH/src/$GO_PACKAGE" 12 | 13 | .template:go-test: &template-go-test 14 | stage: test 15 | script: 16 | - go test 17 | 18 | go-test-cover:latest: 19 | stage: test 20 | script: 21 | - go test -v -cover 22 | coverage: '/^coverage: \d+\.\d+/' 23 | 24 | go-test-appengine:latest: 25 | stage: test 26 | script: 27 | - go test -tags appengine 28 | 29 | go-test:1.6: 30 | <<: *template-go-test 31 | image: golang:1.6-alpine 32 | 33 | go-test:1.4: 34 | <<: *template-go-test 35 | image: golang:1.4-alpine 36 | 37 | go-test:1.2: 38 | <<: *template-go-test 39 | image: golang:1.2 40 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-plist/README.md: -------------------------------------------------------------------------------- 1 | # plist - A pure Go property list transcoder [![coverage report](https://gitlab.howett.net/go/plist/badges/master/coverage.svg)](https://gitlab.howett.net/go/plist/commits/master) 2 | ## INSTALL 3 | ``` 4 | $ go get howett.net/plist 5 | ``` 6 | 7 | ## FEATURES 8 | * Supports encoding/decoding property lists (Apple XML, Apple Binary, OpenStep and GNUStep) from/to arbitrary Go types 9 | 10 | ## USE 11 | ```go 12 | package main 13 | import ( 14 | "howett.net/plist" 15 | "os" 16 | ) 17 | func main() { 18 | encoder := plist.NewEncoder(os.Stdout) 19 | encoder.Encode(map[string]string{"hello": "world"}) 20 | } 21 | ``` 22 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-plist/bitrise.yml: -------------------------------------------------------------------------------- 1 | format_version: "10" 2 | default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git 3 | 4 | workflows: 5 | ci: 6 | before_run: 7 | - test 8 | 9 | test: 10 | steps: 11 | - go-test: 12 | inputs: 13 | - packages: github.com/bitrise-io/go-plist -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-plist/bplist.go: -------------------------------------------------------------------------------- 1 | package plist 2 | 3 | type bplistTrailer struct { 4 | Unused [5]uint8 5 | SortVersion uint8 6 | OffsetIntSize uint8 7 | ObjectRefSize uint8 8 | NumObjects uint64 9 | TopObject uint64 10 | OffsetTableOffset uint64 11 | } 12 | 13 | const ( 14 | bpTagNull uint8 = 0x00 15 | bpTagBoolFalse = 0x08 16 | bpTagBoolTrue = 0x09 17 | bpTagInteger = 0x10 18 | bpTagReal = 0x20 19 | bpTagDate = 0x30 20 | bpTagData = 0x40 21 | bpTagASCIIString = 0x50 22 | bpTagUTF16String = 0x60 23 | bpTagUID = 0x80 24 | bpTagArray = 0xA0 25 | bpTagDictionary = 0xD0 26 | ) 27 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-plist/doc.go: -------------------------------------------------------------------------------- 1 | // Package plist implements encoding and decoding of Apple's "property list" format. 2 | // Property lists come in three sorts: plain text (GNUStep and OpenStep), XML and binary. 3 | // plist supports all of them. 4 | // The mapping between property list and Go objects is described in the documentation for the Marshal and Unmarshal functions. 5 | package plist 6 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-plist/fuzz.go: -------------------------------------------------------------------------------- 1 | // +build gofuzz 2 | 3 | package plist 4 | 5 | import ( 6 | "bytes" 7 | ) 8 | 9 | func Fuzz(data []byte) int { 10 | buf := bytes.NewReader(data) 11 | 12 | var obj interface{} 13 | if err := NewDecoder(buf).Decode(&obj); err != nil { 14 | return 0 15 | } 16 | return 1 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-plist/must.go: -------------------------------------------------------------------------------- 1 | package plist 2 | 3 | import ( 4 | "io" 5 | "strconv" 6 | ) 7 | 8 | type mustWriter struct { 9 | io.Writer 10 | } 11 | 12 | func (w mustWriter) Write(p []byte) (int, error) { 13 | n, err := w.Writer.Write(p) 14 | if err != nil { 15 | panic(err) 16 | } 17 | return n, nil 18 | } 19 | 20 | func mustParseInt(str string, base, bits int) int64 { 21 | i, err := strconv.ParseInt(str, base, bits) 22 | if err != nil { 23 | panic(err) 24 | } 25 | return i 26 | } 27 | 28 | func mustParseUint(str string, base, bits int) uint64 { 29 | i, err := strconv.ParseUint(str, base, bits) 30 | if err != nil { 31 | panic(err) 32 | } 33 | return i 34 | } 35 | 36 | func mustParseFloat(str string, bits int) float64 { 37 | i, err := strconv.ParseFloat(str, bits) 38 | if err != nil { 39 | panic(err) 40 | } 41 | return i 42 | } 43 | 44 | func mustParseBool(str string) bool { 45 | i, err := strconv.ParseBool(str) 46 | if err != nil { 47 | panic(err) 48 | } 49 | return i 50 | } 51 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-plist/util.go: -------------------------------------------------------------------------------- 1 | package plist 2 | 3 | import "io" 4 | 5 | type countedWriter struct { 6 | io.Writer 7 | nbytes int 8 | } 9 | 10 | func (w *countedWriter) Write(p []byte) (int, error) { 11 | n, err := w.Writer.Write(p) 12 | w.nbytes += n 13 | return n, err 14 | } 15 | 16 | func (w *countedWriter) BytesWritten() int { 17 | return w.nbytes 18 | } 19 | 20 | func unsignedGetBase(s string) (string, int) { 21 | if len(s) > 1 && s[0] == '0' && (s[1] == 'x' || s[1] == 'X') { 22 | return s[2:], 16 23 | } 24 | return s, 10 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-plist/zerocopy.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package plist 4 | 5 | import ( 6 | "reflect" 7 | "unsafe" 8 | ) 9 | 10 | func zeroCopy8BitString(buf []byte, off int, len int) string { 11 | if len == 0 { 12 | return "" 13 | } 14 | 15 | var s string 16 | hdr := (*reflect.StringHeader)(unsafe.Pointer(&s)) 17 | hdr.Data = uintptr(unsafe.Pointer(&buf[off])) 18 | hdr.Len = len 19 | return s 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-plist/zerocopy_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package plist 4 | 5 | func zeroCopy8BitString(buf []byte, off int, len int) string { 6 | return string(buf[off : off+len]) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-steputils/step/steperror.go: -------------------------------------------------------------------------------- 1 | package step 2 | 3 | import "errors" 4 | 5 | // Error is an error occuring top level in a step 6 | type Error struct { 7 | StepID, Tag, ShortMsg string 8 | Err error 9 | Recommendations Recommendation 10 | } 11 | 12 | // Recommendation interface 13 | type Recommendation map[string]interface{} 14 | 15 | // NewError constructs a step.Error 16 | func NewError(stepID, tag string, err error, shortMsg string) *Error { 17 | return &Error{ 18 | StepID: stepID, 19 | Tag: tag, 20 | Err: err, 21 | ShortMsg: shortMsg, 22 | } 23 | } 24 | 25 | // NewErrorWithRecommendations constructs a step.Error 26 | func NewErrorWithRecommendations(stepID, tag string, err error, shortMsg string, recommendations Recommendation) *Error { 27 | return &Error{ 28 | StepID: stepID, 29 | Tag: tag, 30 | Err: err, 31 | ShortMsg: shortMsg, 32 | Recommendations: recommendations, 33 | } 34 | } 35 | 36 | func (e *Error) Error() string { 37 | return e.Err.Error() 38 | } 39 | 40 | func (e *Error) Unwrap() error { 41 | if err := errors.Unwrap(e.Err); err != nil { 42 | return err 43 | } 44 | 45 | return nil 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-steputils/tools/tools.go: -------------------------------------------------------------------------------- 1 | package tools 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/bitrise-io/go-utils/command" 7 | ) 8 | 9 | // ExportEnvironmentWithEnvman ... 10 | func ExportEnvironmentWithEnvman(key, value string) error { 11 | cmd := command.New("envman", "add", "--key", key) 12 | cmd.SetStdin(strings.NewReader(value)) 13 | return cmd.Run() 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-utils/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Bitrise 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-utils/command/git/git.go: -------------------------------------------------------------------------------- 1 | package git 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/bitrise-io/go-utils/command" 7 | ) 8 | 9 | // Git represents a Git project. 10 | type Git struct { 11 | dir string 12 | } 13 | 14 | // New creates a new git project. 15 | func New(dir string) (Git, error) { 16 | if err := os.MkdirAll(dir, 0755); err != nil { 17 | return Git{}, err 18 | } 19 | return Git{dir: dir}, nil 20 | } 21 | 22 | func (g *Git) command(args ...string) *command.Model { 23 | cmd := command.New("git", args...) 24 | cmd.SetDir(g.dir) 25 | cmd.SetEnvs(append(os.Environ(), "GIT_ASKPASS=echo")...) 26 | return cmd 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-utils/errorutil/errorutil.go: -------------------------------------------------------------------------------- 1 | // Package errorutil ... 2 | package errorutil 3 | 4 | import ( 5 | "errors" 6 | "os/exec" 7 | "regexp" 8 | ) 9 | 10 | func exitCode(err error) int { 11 | var exitError *exec.ExitError 12 | if errors.As(err, &exitError) { 13 | return exitError.ProcessState.ExitCode() 14 | } 15 | return -1 16 | } 17 | 18 | // IsExitStatusError ... 19 | func IsExitStatusError(err error) bool { 20 | return exitCode(err) != -1 21 | } 22 | 23 | // IsExitStatusErrorStr ... 24 | func IsExitStatusErrorStr(errString string) bool { 25 | // https://golang.org/src/os/exec_posix.go?s=2421:2459#L87 26 | // example exit status error string: exit status 1 27 | var rex = regexp.MustCompile(`^exit status \d{1,3}$`) 28 | return rex.MatchString(errString) 29 | } 30 | 31 | // CmdExitCodeFromError ... 32 | func CmdExitCodeFromError(err error) (int, error) { 33 | return exitCode(err), err 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-utils/log/dummylogger.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | // DummyLogger ... 4 | type DummyLogger struct{} 5 | 6 | // NewDummyLogger ... 7 | func NewDummyLogger() DummyLogger { 8 | return DummyLogger{} 9 | } 10 | 11 | // Donef ... 12 | func (dl DummyLogger) Donef(format string, v ...interface{}) {} 13 | 14 | // Successf ... 15 | func (dl DummyLogger) Successf(format string, v ...interface{}) {} 16 | 17 | // Infof ... 18 | func (dl DummyLogger) Infof(format string, v ...interface{}) {} 19 | 20 | // Printf ... 21 | func (dl DummyLogger) Printf(format string, v ...interface{}) {} 22 | 23 | // Debugf ... 24 | func (dl DummyLogger) Debugf(format string, v ...interface{}) {} 25 | 26 | // Warnf ... 27 | func (dl DummyLogger) Warnf(format string, v ...interface{}) {} 28 | 29 | // Errorf ... 30 | func (dl DummyLogger) Errorf(format string, v ...interface{}) {} 31 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-utils/log/json_logger.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "os" 7 | ) 8 | 9 | // JSONLoger ... 10 | type JSONLoger struct { 11 | writer io.Writer 12 | } 13 | 14 | // NewJSONLoger ... 15 | func NewJSONLoger(writer io.Writer) *JSONLoger { 16 | return &JSONLoger{ 17 | writer: writer, 18 | } 19 | } 20 | 21 | // NewDefaultJSONLoger ... 22 | func NewDefaultJSONLoger() JSONLoger { 23 | return JSONLoger{ 24 | writer: os.Stdout, 25 | } 26 | } 27 | 28 | // Print ... 29 | func (l JSONLoger) Print(f Formatable) { 30 | if _, err := fmt.Fprint(l.writer, f.JSON()); err != nil { 31 | fmt.Printf("failed to print message: %s, error: %s\n", f.JSON(), err) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-utils/log/log.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "os" 7 | "time" 8 | ) 9 | 10 | var outWriter io.Writer = os.Stdout 11 | 12 | // SetOutWriter ... 13 | func SetOutWriter(writer io.Writer) { 14 | outWriter = writer 15 | } 16 | 17 | var enableDebugLog = false 18 | 19 | // SetEnableDebugLog ... 20 | func SetEnableDebugLog(enable bool) { 21 | enableDebugLog = enable 22 | } 23 | 24 | var timestampLayout = "15:04:05" 25 | 26 | // SetTimestampLayout ... 27 | func SetTimestampLayout(layout string) { 28 | timestampLayout = layout 29 | } 30 | 31 | func timestampField() string { 32 | currentTime := time.Now() 33 | return fmt.Sprintf("[%s]", currentTime.Format(timestampLayout)) 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-utils/log/logger.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | // Logger ... 4 | type Logger interface { 5 | Print(f Formatable) 6 | } 7 | 8 | // Formatable ... 9 | type Formatable interface { 10 | String() string 11 | JSON() string 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-utils/log/raw_logger.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "os" 7 | ) 8 | 9 | // RawLogger ... 10 | type RawLogger struct { 11 | writer io.Writer 12 | } 13 | 14 | // NewRawLogger ... 15 | func NewRawLogger(writer io.Writer) *RawLogger { 16 | return &RawLogger{ 17 | writer: writer, 18 | } 19 | } 20 | 21 | // NewDefaultRawLogger ... 22 | func NewDefaultRawLogger() RawLogger { 23 | return RawLogger{ 24 | writer: os.Stdout, 25 | } 26 | } 27 | 28 | // Print ... 29 | func (l RawLogger) Print(f Formatable) { 30 | if _, err := fmt.Fprintln(l.writer, f.String()); err != nil { 31 | fmt.Printf("failed to print message: %s, error: %s\n", f.String(), err) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-utils/log/severity.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import "github.com/bitrise-io/go-utils/colorstring" 4 | 5 | // Severity ... 6 | type Severity uint8 7 | 8 | const ( 9 | errorSeverity Severity = iota 10 | warnSeverity 11 | normalSeverity 12 | infoSeverity 13 | successSeverity 14 | debugSeverity 15 | ) 16 | 17 | type severityColorFunc colorstring.ColorfFunc 18 | 19 | var ( 20 | successSeverityColorFunc severityColorFunc = colorstring.Greenf 21 | infoSeverityColorFunc severityColorFunc = colorstring.Bluef 22 | normalSeverityColorFunc severityColorFunc = colorstring.NoColorf 23 | debugSeverityColorFunc severityColorFunc = colorstring.Magentaf 24 | warnSeverityColorFunc severityColorFunc = colorstring.Yellowf 25 | errorSeverityColorFunc severityColorFunc = colorstring.Redf 26 | ) 27 | 28 | var severityColorFuncMap = map[Severity]severityColorFunc{ 29 | successSeverity: successSeverityColorFunc, 30 | infoSeverity: infoSeverityColorFunc, 31 | normalSeverity: normalSeverityColorFunc, 32 | debugSeverity: debugSeverityColorFunc, 33 | warnSeverity: warnSeverityColorFunc, 34 | errorSeverity: errorSeverityColorFunc, 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-utils/pretty/pretty.go: -------------------------------------------------------------------------------- 1 | package pretty 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | ) 7 | 8 | // Object returns the json representation of the given parameter 9 | // if json marshal fails it returns the parameter's default format 10 | func Object(o interface{}) string { 11 | b, err := json.MarshalIndent(o, "", "\t") 12 | if err != nil { 13 | return fmt.Sprint(o) 14 | } 15 | return string(b) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-utils/retry/retryhttp.go: -------------------------------------------------------------------------------- 1 | package retry 2 | 3 | import ( 4 | "github.com/bitrise-io/go-utils/log" 5 | retryablehttp "github.com/hashicorp/go-retryablehttp" 6 | ) 7 | 8 | // HTTPLogAdaptor adapts the retryablehttp.Logger interface to the go-utils logger. 9 | type HTTPLogAdaptor struct{} 10 | 11 | // Printf implements the retryablehttp.Logger interface 12 | func (*HTTPLogAdaptor) Printf(fmtStr string, vars ...interface{}) { 13 | log.Debugf(fmtStr, vars...) 14 | } 15 | 16 | // NewHTTPClient returns a retryable HTTP client 17 | func NewHTTPClient() *retryablehttp.Client { 18 | client := retryablehttp.NewClient() 19 | client.Logger = &HTTPLogAdaptor{} 20 | client.ErrorHandler = retryablehttp.PassthroughErrorHandler 21 | 22 | return client 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-utils/v2/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Bitrise 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-utils/v2/analytics/event.go: -------------------------------------------------------------------------------- 1 | package analytics 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "io" 7 | "time" 8 | 9 | "github.com/gofrs/uuid" 10 | ) 11 | 12 | type event struct { 13 | ID string `json:"id"` 14 | EventName string `json:"event_name"` 15 | Timestamp int64 `json:"timestamp"` 16 | Properties Properties `json:"properties"` 17 | } 18 | 19 | func newEvent(name string, properties []Properties) event { 20 | return event{ 21 | ID: uuid.Must(uuid.NewV4()).String(), 22 | EventName: name, 23 | Timestamp: time.Now().UnixNano() / int64(time.Microsecond), 24 | Properties: merge(properties), 25 | } 26 | } 27 | 28 | func (e event) toJSON(writer io.Writer) { 29 | if err := json.NewEncoder(writer).Encode(e); err != nil { 30 | panic(fmt.Sprintf("Analytics event should be serializable to JSON: %s", err.Error())) 31 | } 32 | } 33 | 34 | func merge(properties []Properties) Properties { 35 | if len(properties) == 0 { 36 | return nil 37 | } 38 | m := map[string]interface{}{} 39 | for _, p := range properties { 40 | for key, value := range p { 41 | m[key] = value 42 | } 43 | } 44 | return m 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-utils/v2/analytics/property.go: -------------------------------------------------------------------------------- 1 | package analytics 2 | 3 | import ( 4 | "github.com/mitchellh/mapstructure" 5 | ) 6 | 7 | // Properties ... 8 | type Properties map[string]interface{} 9 | 10 | // Merge ... 11 | func (p Properties) Merge(properties Properties) Properties { 12 | r := Properties{} 13 | for key, value := range p { 14 | r[key] = value 15 | } 16 | for key, value := range properties { 17 | r[key] = value 18 | } 19 | return r 20 | } 21 | 22 | // AppendIfNotEmpty ... 23 | func (p Properties) AppendIfNotEmpty(key string, value string) { 24 | if value != "" { 25 | p[key] = value 26 | } 27 | } 28 | 29 | // NewProperty Converts struct into Properties map based on json tags 30 | func NewProperty(item interface{}) Properties { 31 | result := Properties{} 32 | decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{ 33 | TagName: "json", 34 | Result: &result, 35 | }) 36 | if err != nil { 37 | return Properties{} 38 | } 39 | if err := decoder.Decode(item); err != nil { 40 | return Properties{} 41 | } 42 | return result 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-utils/v2/command/errorcollector.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | type errorCollector struct { 4 | errorLines []string 5 | errorFinder ErrorFinder 6 | } 7 | 8 | func (e *errorCollector) Write(p []byte) (n int, err error) { 9 | e.collectErrors(string(p)) 10 | return len(p), nil 11 | } 12 | 13 | func (e *errorCollector) collectErrors(output string) { 14 | lines := e.errorFinder(output) 15 | if len(lines) > 0 { 16 | e.errorLines = append(e.errorLines, lines...) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-utils/v2/env/env.go: -------------------------------------------------------------------------------- 1 | package env 2 | 3 | import ( 4 | "os" 5 | "os/exec" 6 | ) 7 | 8 | // CommandLocator ... 9 | type CommandLocator interface { 10 | LookPath(file string) (string, error) 11 | } 12 | 13 | type commandLocator struct{} 14 | 15 | // NewCommandLocator ... 16 | func NewCommandLocator() CommandLocator { 17 | return commandLocator{} 18 | } 19 | 20 | // LookPath ... 21 | func (l commandLocator) LookPath(file string) (string, error) { 22 | return exec.LookPath(file) 23 | } 24 | 25 | // Repository ... 26 | type Repository interface { 27 | List() []string 28 | Unset(key string) error 29 | Get(key string) string 30 | Set(key, value string) error 31 | } 32 | 33 | // NewRepository ... 34 | func NewRepository() Repository { 35 | return repository{} 36 | } 37 | 38 | type repository struct{} 39 | 40 | // Get ... 41 | func (d repository) Get(key string) string { 42 | return os.Getenv(key) 43 | } 44 | 45 | // Set ... 46 | func (d repository) Set(key, value string) error { 47 | return os.Setenv(key, value) 48 | } 49 | 50 | // Unset ... 51 | func (d repository) Unset(key string) error { 52 | return os.Unsetenv(key) 53 | } 54 | 55 | // List ... 56 | func (d repository) List() []string { 57 | return os.Environ() 58 | } 59 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-utils/v2/log/severity.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import "github.com/bitrise-io/go-utils/v2/log/colorstring" 4 | 5 | // Severity ... 6 | type Severity uint8 7 | 8 | const ( 9 | errorSeverity Severity = iota 10 | warnSeverity 11 | normalSeverity 12 | infoSeverity 13 | doneSeverity 14 | debugSeverity 15 | ) 16 | 17 | type severityColorFunc colorstring.ColorfFunc 18 | 19 | var ( 20 | doneSeverityColorFunc severityColorFunc = colorstring.Greenf 21 | infoSeverityColorFunc severityColorFunc = colorstring.Bluef 22 | normalSeverityColorFunc severityColorFunc = colorstring.NoColorf 23 | debugSeverityColorFunc severityColorFunc = colorstring.Magentaf 24 | warnSeverityColorFunc severityColorFunc = colorstring.Yellowf 25 | errorSeverityColorFunc severityColorFunc = colorstring.Redf 26 | ) 27 | 28 | var severityColorFuncMap = map[Severity]severityColorFunc{ 29 | doneSeverity: doneSeverityColorFunc, 30 | infoSeverity: infoSeverityColorFunc, 31 | normalSeverity: normalSeverityColorFunc, 32 | debugSeverity: debugSeverityColorFunc, 33 | warnSeverity: warnSeverityColorFunc, 34 | errorSeverity: errorSeverityColorFunc, 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-utils/v2/retryhttp/retryhttp.go: -------------------------------------------------------------------------------- 1 | package retryhttp 2 | 3 | import ( 4 | "github.com/bitrise-io/go-utils/v2/log" 5 | "github.com/hashicorp/go-retryablehttp" 6 | ) 7 | 8 | // NewClient returns a retryable HTTP client with common defaults 9 | func NewClient(logger log.Logger) *retryablehttp.Client { 10 | client := retryablehttp.NewClient() 11 | client.Logger = &httpLogAdaptor{logger: logger} 12 | client.ErrorHandler = retryablehttp.PassthroughErrorHandler 13 | 14 | return client 15 | } 16 | 17 | // httpLogAdaptor adapts the retryablehttp.Logger interface to the go-utils logger. 18 | type httpLogAdaptor struct { 19 | logger log.Logger 20 | } 21 | 22 | // Printf implements the retryablehttp.Logger interface 23 | func (a *httpLogAdaptor) Printf(fmtStr string, vars ...interface{}) { 24 | a.logger.Debugf(fmtStr, vars...) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-xcode/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Bitrise 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-xcode/xcodebuild/xcodebuild.go: -------------------------------------------------------------------------------- 1 | package xcodebuild 2 | 3 | import "github.com/bitrise-io/go-utils/command" 4 | 5 | const ( 6 | toolName = "xcodebuild" 7 | ) 8 | 9 | // CommandModel ... 10 | type CommandModel interface { 11 | PrintableCmd() string 12 | Command() *command.Model 13 | } 14 | 15 | // AuthenticationParams are used to authenticate to App Store Connect API and let xcodebuild download missing provisioning profiles. 16 | type AuthenticationParams struct { 17 | KeyID string 18 | IsssuerID string 19 | KeyPath string 20 | } 21 | 22 | func (a *AuthenticationParams) args() []string { 23 | return []string{ 24 | "-allowProvisioningUpdates", 25 | "-authenticationKeyPath", a.KeyPath, 26 | "-authenticationKeyID", a.KeyID, 27 | "-authenticationKeyIssuerID", a.IsssuerID, 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-xcode/xcodeproject/xcodeproj/build_configuration.go: -------------------------------------------------------------------------------- 1 | package xcodeproj 2 | 3 | import "github.com/bitrise-io/go-xcode/xcodeproject/serialized" 4 | 5 | // BuildConfiguration .. 6 | type BuildConfiguration struct { 7 | ID string 8 | Name string 9 | BuildSettings serialized.Object 10 | } 11 | 12 | func parseBuildConfiguration(id string, objects serialized.Object) (BuildConfiguration, error) { 13 | raw, err := objects.Object(id) 14 | if err != nil { 15 | return BuildConfiguration{}, err 16 | } 17 | 18 | name, err := raw.String("name") 19 | if err != nil { 20 | return BuildConfiguration{}, err 21 | } 22 | 23 | buildSettings, err := raw.Object("buildSettings") 24 | if err != nil { 25 | return BuildConfiguration{}, err 26 | } 27 | 28 | return BuildConfiguration{ 29 | ID: id, 30 | Name: name, 31 | BuildSettings: buildSettings, 32 | }, nil 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-xcode/xcodeproject/xcodeproj/product_reference.go: -------------------------------------------------------------------------------- 1 | package xcodeproj 2 | 3 | import "github.com/bitrise-io/go-xcode/xcodeproject/serialized" 4 | 5 | // ProductReference ... 6 | type ProductReference struct { 7 | Path string 8 | } 9 | 10 | func parseProductReference(id string, objects serialized.Object) (ProductReference, error) { 11 | raw, err := objects.Object(id) 12 | if err != nil { 13 | return ProductReference{}, err 14 | } 15 | 16 | pth, err := raw.String("path") 17 | if err != nil { 18 | return ProductReference{}, err 19 | } 20 | 21 | return ProductReference{ 22 | Path: pth, 23 | }, nil 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-xcode/xcodeproject/xcodeproj/target_dependency.go: -------------------------------------------------------------------------------- 1 | package xcodeproj 2 | 3 | import "github.com/bitrise-io/go-xcode/xcodeproject/serialized" 4 | 5 | // TargetDependency is a reference to another Target that is a dependency of a given Target 6 | type TargetDependency struct { 7 | id string 8 | TargetID string 9 | } 10 | 11 | func parseTargetDependency(id string, objects serialized.Object) (TargetDependency, error) { 12 | rawTargetDependency, err := objects.Object(id) 13 | if err != nil { 14 | return TargetDependency{}, err 15 | } 16 | 17 | targetID, err := rawTargetDependency.String("target") 18 | if err != nil { 19 | return TargetDependency{}, err 20 | } 21 | 22 | return TargetDependency{ 23 | id: id, 24 | TargetID: targetID, 25 | }, nil 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-xcode/xcodeproject/xcscheme/errors.go: -------------------------------------------------------------------------------- 1 | package xcscheme 2 | 3 | import "fmt" 4 | 5 | // NotFoundError represents that the given scheme was not found in the container 6 | type NotFoundError struct { 7 | Scheme string 8 | Container string 9 | } 10 | 11 | // Error implements the error interface 12 | func (e NotFoundError) Error() string { 13 | return fmt.Sprintf("scheme %s not found in %s", e.Scheme, e.Container) 14 | } 15 | 16 | // IsNotFoundError reports whatever the given error is an instance of NotFoundError 17 | func IsNotFoundError(err error) bool { 18 | if err == nil { 19 | return false 20 | } 21 | _, ok := err.(NotFoundError) 22 | return ok 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-xcode/xcodeproject/xcworkspace/group.go: -------------------------------------------------------------------------------- 1 | package xcworkspace 2 | 3 | import ( 4 | "fmt" 5 | "path/filepath" 6 | "strings" 7 | 8 | "github.com/bitrise-io/go-utils/pathutil" 9 | ) 10 | 11 | // Group ... 12 | type Group struct { 13 | Location string `xml:"location,attr"` 14 | FileRefs []FileRef `xml:"FileRef"` 15 | Groups []Group `xml:"Group"` 16 | } 17 | 18 | // AbsPath ... 19 | func (g Group) AbsPath(dir string) (string, error) { 20 | s := strings.Split(g.Location, ":") 21 | if len(s) != 2 { 22 | return "", fmt.Errorf("unknown group location (%s)", g.Location) 23 | } 24 | pth := filepath.Join(dir, s[1]) 25 | return pathutil.AbsPath(pth) 26 | } 27 | 28 | // FileLocations ... 29 | func (g Group) FileLocations(dir string) ([]string, error) { 30 | var fileLocations []string 31 | 32 | groupPth, err := g.AbsPath(dir) 33 | if err != nil { 34 | return nil, err 35 | } 36 | 37 | for _, fileRef := range g.FileRefs { 38 | fileLocation, err := fileRef.AbsPath(groupPth) 39 | if err != nil { 40 | return nil, err 41 | } 42 | fileLocations = append(fileLocations, fileLocation) 43 | } 44 | 45 | for _, group := range g.Groups { 46 | groupFileLocations, err := group.FileLocations(groupPth) 47 | if err != nil { 48 | return nil, err 49 | } 50 | fileLocations = append(fileLocations, groupFileLocations...) 51 | } 52 | 53 | return fileLocations, nil 54 | } 55 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/go-xcode/xcodeproject/xcworkspace/utils.go: -------------------------------------------------------------------------------- 1 | package xcworkspace 2 | 3 | import "path/filepath" 4 | 5 | // IsWorkspace ... 6 | func IsWorkspace(pth string) bool { 7 | return filepath.Ext(pth) == ".xcworkspace" 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-io/stepman/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Bitrise 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-steplib/steps-activate-ssh-key/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Bitrise 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-steplib/steps-activate-ssh-key/activatesshkey/steperror.go: -------------------------------------------------------------------------------- 1 | package activatesshkey 2 | 3 | import ( 4 | "github.com/bitrise-io/go-steputils/step" 5 | ) 6 | 7 | func newStepError(tag string, err error, shortMsg string) *step.Error { 8 | return step.NewError("activate-ssh-key", tag, err, shortMsg) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-steplib/steps-authenticate-host-with-netrc/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 bitrise-steplib 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-steplib/steps-git-clone/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Bitrise 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-steplib/steps-git-clone/gitclone/bitriseapi/pr_patch.go: -------------------------------------------------------------------------------- 1 | package bitriseapi 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | "net/url" 7 | "path/filepath" 8 | 9 | "github.com/bitrise-io/go-steputils/input" 10 | "github.com/bitrise-io/go-utils/filedownloader" 11 | ) 12 | 13 | type PatchSource interface { 14 | // GetPRPatch fetches the git patch file of the PR (if available) and returns its local file path 15 | GetPRPatch() (string, error) 16 | } 17 | 18 | func NewPatchSource(buildURL, apiToken string) PatchSource { 19 | return apiPatchSource{ 20 | buildURL: buildURL, 21 | apiToken: apiToken, 22 | } 23 | } 24 | 25 | type apiPatchSource struct { 26 | buildURL string 27 | apiToken string 28 | } 29 | 30 | func (s apiPatchSource) GetPRPatch() (string, error) { 31 | if s.buildURL == "" { 32 | return "", fmt.Errorf("Bitrise build URL is not defined") 33 | } 34 | if s.apiToken == "" { 35 | return "", fmt.Errorf("Bitrise API token is not defined") 36 | } 37 | 38 | u, err := url.Parse(s.buildURL) 39 | if err != nil { 40 | return "", fmt.Errorf("could not parse build URL: %v", err) 41 | } 42 | 43 | if u.Scheme == "file" { 44 | return filepath.Join(u.Path, "diff.txt"), nil 45 | } 46 | 47 | diffURL := fmt.Sprintf("%s/diff.txt?api_token=%s", s.buildURL, s.apiToken) 48 | fileProvider := input.NewFileProvider(filedownloader.New(http.DefaultClient)) 49 | return fileProvider.LocalPath(diffURL) 50 | } 51 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-steplib/steps-git-clone/gitclone/checkoutmethod_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=CheckoutMethod"; DO NOT EDIT. 2 | 3 | package gitclone 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[InvalidCheckoutMethod-0] 12 | _ = x[CheckoutNoneMethod-1] 13 | _ = x[CheckoutCommitMethod-2] 14 | _ = x[CheckoutTagMethod-3] 15 | _ = x[CheckoutBranchMethod-4] 16 | _ = x[CheckoutPRMergeBranchMethod-5] 17 | _ = x[CheckoutPRDiffFileMethod-6] 18 | _ = x[CheckoutPRManualMergeMethod-7] 19 | _ = x[CheckoutHeadBranchCommitMethod-8] 20 | _ = x[CheckoutForkCommitMethod-9] 21 | } 22 | 23 | const _CheckoutMethod_name = "InvalidCheckoutMethodCheckoutNoneMethodCheckoutCommitMethodCheckoutTagMethodCheckoutBranchMethodCheckoutPRMergeBranchMethodCheckoutPRDiffFileMethodCheckoutPRManualMergeMethodCheckoutHeadBranchCommitMethodCheckoutForkCommitMethod" 24 | 25 | var _CheckoutMethod_index = [...]uint8{0, 21, 39, 59, 76, 96, 123, 147, 174, 204, 228} 26 | 27 | func (i CheckoutMethod) String() string { 28 | if i < 0 || i >= CheckoutMethod(len(_CheckoutMethod_index)-1) { 29 | return "CheckoutMethod(" + strconv.FormatInt(int64(i), 10) + ")" 30 | } 31 | return _CheckoutMethod_name[_CheckoutMethod_index[i]:_CheckoutMethod_index[i+1]] 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/bitrise-steplib/steps-git-clone/transport/transport.go: -------------------------------------------------------------------------------- 1 | package transport 2 | 3 | import ( 4 | "fmt" 5 | "net/url" 6 | "strings" 7 | 8 | "github.com/bitrise-steplib/steps-authenticate-host-with-netrc/netrcutil" 9 | ) 10 | 11 | type Config struct { 12 | URL string 13 | HTTPUsername string 14 | HTTPPassword string 15 | } 16 | 17 | func Setup(cfg Config) error { 18 | // We only deal with http URLs for now 19 | if !strings.HasPrefix(cfg.URL, "http") { 20 | return nil 21 | } 22 | 23 | // Setup is a no-op if no password is provided 24 | if cfg.HTTPPassword == "" { 25 | return nil 26 | } 27 | 28 | url, err := url.Parse(cfg.URL) 29 | if err != nil { 30 | return fmt.Errorf("failed to parse URL: %w", err) 31 | } 32 | host := url.Host 33 | username := cfg.HTTPUsername 34 | // Some providers (e.g. GitHub) doesn't care about the username, so we don't ask for it from the user 35 | // But something still needs to be provided when making the network call 36 | if username == "" { 37 | username = "bitrise-git-clone-step" 38 | } 39 | password := cfg.HTTPPassword 40 | 41 | netRC := netrcutil.New() 42 | 43 | if err := netRC.CreateOrUpdateFile(netrcutil.NetRCItemModel{Machine: host, Login: username, Password: password}); err != nil { 44 | return fmt.Errorf("failed to update .netrc file: %w", err) 45 | } 46 | 47 | return nil 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/emirpasic/gods/containers/containers.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Emir Pasic. All rights reserved. 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 containers provides core interfaces and functions for data structures. 6 | // 7 | // Container is the base interface for all data structures to implement. 8 | // 9 | // Iterators provide stateful iterators. 10 | // 11 | // Enumerable provides Ruby inspired (each, select, map, find, any?, etc.) container functions. 12 | // 13 | // Serialization provides serializers (marshalers) and deserializers (unmarshalers). 14 | package containers 15 | 16 | import "github.com/emirpasic/gods/utils" 17 | 18 | // Container is base interface that all data structures implement. 19 | type Container interface { 20 | Empty() bool 21 | Size() int 22 | Clear() 23 | Values() []interface{} 24 | String() string 25 | } 26 | 27 | // GetSortedValues returns sorted container's elements with respect to the passed comparator. 28 | // Does not affect the ordering of elements within the container. 29 | func GetSortedValues(container Container, comparator utils.Comparator) []interface{} { 30 | values := container.Values() 31 | if len(values) < 2 { 32 | return values 33 | } 34 | utils.Sort(values, comparator) 35 | return values 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/emirpasic/gods/containers/serialization.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Emir Pasic. All rights reserved. 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 containers 6 | 7 | // JSONSerializer provides JSON serialization 8 | type JSONSerializer interface { 9 | // ToJSON outputs the JSON representation of containers's elements. 10 | ToJSON() ([]byte, error) 11 | // MarshalJSON @implements json.Marshaler 12 | MarshalJSON() ([]byte, error) 13 | } 14 | 15 | // JSONDeserializer provides JSON deserialization 16 | type JSONDeserializer interface { 17 | // FromJSON populates containers's elements from the input JSON representation. 18 | FromJSON([]byte) error 19 | // UnmarshalJSON @implements json.Unmarshaler 20 | UnmarshalJSON([]byte) error 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/emirpasic/gods/lists/singlylinkedlist/serialization.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Emir Pasic. All rights reserved. 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 singlylinkedlist 6 | 7 | import ( 8 | "encoding/json" 9 | "github.com/emirpasic/gods/containers" 10 | ) 11 | 12 | // Assert Serialization implementation 13 | var _ containers.JSONSerializer = (*List)(nil) 14 | var _ containers.JSONDeserializer = (*List)(nil) 15 | 16 | // ToJSON outputs the JSON representation of list's elements. 17 | func (list *List) ToJSON() ([]byte, error) { 18 | return json.Marshal(list.Values()) 19 | } 20 | 21 | // FromJSON populates list's elements from the input JSON representation. 22 | func (list *List) FromJSON(data []byte) error { 23 | elements := []interface{}{} 24 | err := json.Unmarshal(data, &elements) 25 | if err == nil { 26 | list.Clear() 27 | list.Add(elements...) 28 | } 29 | return err 30 | } 31 | 32 | // UnmarshalJSON @implements json.Unmarshaler 33 | func (list *List) UnmarshalJSON(bytes []byte) error { 34 | return list.FromJSON(bytes) 35 | } 36 | 37 | // MarshalJSON @implements json.Marshaler 38 | func (list *List) MarshalJSON() ([]byte, error) { 39 | return list.ToJSON() 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/emirpasic/gods/queues/linkedlistqueue/serialization.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Emir Pasic. All rights reserved. 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 linkedlistqueue 6 | 7 | import ( 8 | "github.com/emirpasic/gods/containers" 9 | ) 10 | 11 | // Assert Serialization implementation 12 | var _ containers.JSONSerializer = (*Queue)(nil) 13 | var _ containers.JSONDeserializer = (*Queue)(nil) 14 | 15 | // ToJSON outputs the JSON representation of the queue. 16 | func (queue *Queue) ToJSON() ([]byte, error) { 17 | return queue.list.ToJSON() 18 | } 19 | 20 | // FromJSON populates the queue from the input JSON representation. 21 | func (queue *Queue) FromJSON(data []byte) error { 22 | return queue.list.FromJSON(data) 23 | } 24 | 25 | // UnmarshalJSON @implements json.Unmarshaler 26 | func (queue *Queue) UnmarshalJSON(bytes []byte) error { 27 | return queue.FromJSON(bytes) 28 | } 29 | 30 | // MarshalJSON @implements json.Marshaler 31 | func (queue *Queue) MarshalJSON() ([]byte, error) { 32 | return queue.ToJSON() 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/emirpasic/gods/stacks/linkedliststack/serialization.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Emir Pasic. All rights reserved. 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 linkedliststack 6 | 7 | import ( 8 | "github.com/emirpasic/gods/containers" 9 | ) 10 | 11 | // Assert Serialization implementation 12 | var _ containers.JSONSerializer = (*Stack)(nil) 13 | var _ containers.JSONDeserializer = (*Stack)(nil) 14 | 15 | // ToJSON outputs the JSON representation of the stack. 16 | func (stack *Stack) ToJSON() ([]byte, error) { 17 | return stack.list.ToJSON() 18 | } 19 | 20 | // FromJSON populates the stack from the input JSON representation. 21 | func (stack *Stack) FromJSON(data []byte) error { 22 | return stack.list.FromJSON(data) 23 | } 24 | 25 | // UnmarshalJSON @implements json.Unmarshaler 26 | func (stack *Stack) UnmarshalJSON(bytes []byte) error { 27 | return stack.FromJSON(bytes) 28 | } 29 | 30 | // MarshalJSON @implements json.Marshaler 31 | func (stack *Stack) MarshalJSON() ([]byte, error) { 32 | return stack.ToJSON() 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/emirpasic/gods/stacks/stacks.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Emir Pasic. All rights reserved. 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 stacks provides an abstract Stack interface. 6 | // 7 | // In computer science, a stack is an abstract data type that serves as a collection of elements, with two principal operations: push, which adds an element to the collection, and pop, which removes the most recently added element that was not yet removed. The order in which elements come off a stack gives rise to its alternative name, LIFO (for last in, first out). Additionally, a peek operation may give access to the top without modifying the stack. 8 | // 9 | // Reference: https://en.wikipedia.org/wiki/Stack_%28abstract_data_type%29 10 | package stacks 11 | 12 | import "github.com/emirpasic/gods/containers" 13 | 14 | // Stack interface that all stacks implement 15 | type Stack interface { 16 | Push(value interface{}) 17 | Pop() (value interface{}, ok bool) 18 | Peek() (value interface{}, ok bool) 19 | 20 | containers.Container 21 | // Empty() bool 22 | // Size() int 23 | // Clear() 24 | // Values() []interface{} 25 | // String() string 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/emirpasic/gods/utils/sort.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Emir Pasic. All rights reserved. 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 utils 6 | 7 | import "sort" 8 | 9 | // Sort sorts values (in-place) with respect to the given comparator. 10 | // 11 | // Uses Go's sort (hybrid of quicksort for large and then insertion sort for smaller slices). 12 | func Sort(values []interface{}, comparator Comparator) { 13 | sort.Sort(sortable{values, comparator}) 14 | } 15 | 16 | type sortable struct { 17 | values []interface{} 18 | comparator Comparator 19 | } 20 | 21 | func (s sortable) Len() int { 22 | return len(s.values) 23 | } 24 | func (s sortable) Swap(i, j int) { 25 | s.values[i], s.values[j] = s.values[j], s.values[i] 26 | } 27 | func (s sortable) Less(i, j int) bool { 28 | return s.comparator(s.values[i], s.values[j]) < 0 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/emirpasic/gods/utils/utils.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Emir Pasic. All rights reserved. 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 utils provides common utility functions. 6 | // 7 | // Provided functionalities: 8 | // - sorting 9 | // - comparators 10 | package utils 11 | 12 | import ( 13 | "fmt" 14 | "strconv" 15 | ) 16 | 17 | // ToString converts a value to string. 18 | func ToString(value interface{}) string { 19 | switch value := value.(type) { 20 | case string: 21 | return value 22 | case int8: 23 | return strconv.FormatInt(int64(value), 10) 24 | case int16: 25 | return strconv.FormatInt(int64(value), 10) 26 | case int32: 27 | return strconv.FormatInt(int64(value), 10) 28 | case int64: 29 | return strconv.FormatInt(value, 10) 30 | case uint8: 31 | return strconv.FormatUint(uint64(value), 10) 32 | case uint16: 33 | return strconv.FormatUint(uint64(value), 10) 34 | case uint32: 35 | return strconv.FormatUint(uint64(value), 10) 36 | case uint64: 37 | return strconv.FormatUint(value, 10) 38 | case float32: 39 | return strconv.FormatFloat(float64(value), 'g', -1, 64) 40 | case float64: 41 | return strconv.FormatFloat(value, 'g', -1, 64) 42 | case bool: 43 | return strconv.FormatBool(value) 44 | default: 45 | return fmt.Sprintf("%+v", value) 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /vendor/github.com/gofrs/uuid/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, build with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | # binary bundle generated by go-fuzz 15 | uuid-fuzz.zip 16 | -------------------------------------------------------------------------------- /vendor/github.com/gofrs/uuid/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2013-2018 by Maxim Bublis 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/google/uuid/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | We definitely welcome patches and contribution to this project! 4 | 5 | ### Tips 6 | 7 | Commits must be formatted according to the [Conventional Commits Specification](https://www.conventionalcommits.org). 8 | 9 | Always try to include a test case! If it is not possible or not necessary, 10 | please explain why in the pull request description. 11 | 12 | ### Releasing 13 | 14 | Commits that would precipitate a SemVer change, as described in the Conventional 15 | Commits Specification, will trigger [`release-please`](https://github.com/google-github-actions/release-please-action) 16 | to create a release candidate pull request. Once submitted, `release-please` 17 | will create a release. 18 | 19 | For tips on how to work with `release-please`, see its documentation. 20 | 21 | ### Legal requirements 22 | 23 | In order to protect both you and ourselves, you will need to sign the 24 | [Contributor License Agreement](https://cla.developers.google.com/clas). 25 | 26 | You may have already signed it for other Google projects. 27 | -------------------------------------------------------------------------------- /vendor/github.com/google/uuid/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Paul Borman 2 | bmatsuo 3 | shawnps 4 | theory 5 | jboverfelt 6 | dsymonds 7 | cd1 8 | wallclockbuilder 9 | dansouza 10 | -------------------------------------------------------------------------------- /vendor/github.com/google/uuid/README.md: -------------------------------------------------------------------------------- 1 | # uuid 2 | The uuid package generates and inspects UUIDs based on 3 | [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122) 4 | and DCE 1.1: Authentication and Security Services. 5 | 6 | This package is based on the github.com/pborman/uuid package (previously named 7 | code.google.com/p/go-uuid). It differs from these earlier packages in that 8 | a UUID is a 16 byte array rather than a byte slice. One loss due to this 9 | change is the ability to represent an invalid UUID (vs a NIL UUID). 10 | 11 | ###### Install 12 | ```sh 13 | go get github.com/google/uuid 14 | ``` 15 | 16 | ###### Documentation 17 | [![Go Reference](https://pkg.go.dev/badge/github.com/google/uuid.svg)](https://pkg.go.dev/github.com/google/uuid) 18 | 19 | Full `go doc` style documentation for the package can be viewed online without 20 | installing this package by using the GoDoc site here: 21 | http://pkg.go.dev/github.com/google/uuid 22 | -------------------------------------------------------------------------------- /vendor/github.com/google/uuid/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 Google Inc. All rights reserved. 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 uuid generates and inspects UUIDs. 6 | // 7 | // UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security 8 | // Services. 9 | // 10 | // A UUID is a 16 byte (128 bit) array. UUIDs may be used as keys to 11 | // maps or compared directly. 12 | package uuid 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/uuid/marshal.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 Google Inc. All rights reserved. 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 uuid 6 | 7 | import "fmt" 8 | 9 | // MarshalText implements encoding.TextMarshaler. 10 | func (uuid UUID) MarshalText() ([]byte, error) { 11 | var js [36]byte 12 | encodeHex(js[:], uuid) 13 | return js[:], nil 14 | } 15 | 16 | // UnmarshalText implements encoding.TextUnmarshaler. 17 | func (uuid *UUID) UnmarshalText(data []byte) error { 18 | id, err := ParseBytes(data) 19 | if err != nil { 20 | return err 21 | } 22 | *uuid = id 23 | return nil 24 | } 25 | 26 | // MarshalBinary implements encoding.BinaryMarshaler. 27 | func (uuid UUID) MarshalBinary() ([]byte, error) { 28 | return uuid[:], nil 29 | } 30 | 31 | // UnmarshalBinary implements encoding.BinaryUnmarshaler. 32 | func (uuid *UUID) UnmarshalBinary(data []byte) error { 33 | if len(data) != 16 { 34 | return fmt.Errorf("invalid UUID (got %d bytes)", len(data)) 35 | } 36 | copy(uuid[:], data) 37 | return nil 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/google/uuid/node_js.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build js 6 | 7 | package uuid 8 | 9 | // getHardwareInterface returns nil values for the JS version of the code. 10 | // This removes the "net" dependency, because it is not used in the browser. 11 | // Using the "net" library inflates the size of the transpiled JS code by 673k bytes. 12 | func getHardwareInterface(name string) (string, []byte) { return "", nil } 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/uuid/node_net.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !js 6 | 7 | package uuid 8 | 9 | import "net" 10 | 11 | var interfaces []net.Interface // cached list of interfaces 12 | 13 | // getHardwareInterface returns the name and hardware address of interface name. 14 | // If name is "" then the name and hardware address of one of the system's 15 | // interfaces is returned. If no interfaces are found (name does not exist or 16 | // there are no interfaces) then "", nil is returned. 17 | // 18 | // Only addresses of at least 6 bytes are returned. 19 | func getHardwareInterface(name string) (string, []byte) { 20 | if interfaces == nil { 21 | var err error 22 | interfaces, err = net.Interfaces() 23 | if err != nil { 24 | return "", nil 25 | } 26 | } 27 | for _, ifs := range interfaces { 28 | if len(ifs.HardwareAddr) >= 6 && (name == "" || name == ifs.Name) { 29 | return ifs.Name, ifs.HardwareAddr 30 | } 31 | } 32 | return "", nil 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-cleanhttp/doc.go: -------------------------------------------------------------------------------- 1 | // Package cleanhttp offers convenience utilities for acquiring "clean" 2 | // http.Transport and http.Client structs. 3 | // 4 | // Values set on http.DefaultClient and http.DefaultTransport affect all 5 | // callers. This can have detrimental effects, esepcially in TLS contexts, 6 | // where client or root certificates set to talk to multiple endpoints can end 7 | // up displacing each other, leading to hard-to-debug issues. This package 8 | // provides non-shared http.Client and http.Transport structs to ensure that 9 | // the configuration will not be overwritten by other parts of the application 10 | // or dependencies. 11 | // 12 | // The DefaultClient and DefaultTransport functions disable idle connections 13 | // and keepalives. Without ensuring that idle connections are closed before 14 | // garbage collection, short-term clients/transports can leak file descriptors, 15 | // eventually leading to "too many open files" errors. If you will be 16 | // connecting to the same hosts repeatedly from the same client, you can use 17 | // DefaultPooledClient to receive a client that has connection pooling 18 | // semantics similar to http.DefaultClient. 19 | // 20 | package cleanhttp 21 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-cleanhttp/handlers.go: -------------------------------------------------------------------------------- 1 | package cleanhttp 2 | 3 | import ( 4 | "net/http" 5 | "strings" 6 | "unicode" 7 | ) 8 | 9 | // HandlerInput provides input options to cleanhttp's handlers 10 | type HandlerInput struct { 11 | ErrStatus int 12 | } 13 | 14 | // PrintablePathCheckHandler is a middleware that ensures the request path 15 | // contains only printable runes. 16 | func PrintablePathCheckHandler(next http.Handler, input *HandlerInput) http.Handler { 17 | // Nil-check on input to make it optional 18 | if input == nil { 19 | input = &HandlerInput{ 20 | ErrStatus: http.StatusBadRequest, 21 | } 22 | } 23 | 24 | // Default to http.StatusBadRequest on error 25 | if input.ErrStatus == 0 { 26 | input.ErrStatus = http.StatusBadRequest 27 | } 28 | 29 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 30 | if r != nil { 31 | // Check URL path for non-printable characters 32 | idx := strings.IndexFunc(r.URL.Path, func(c rune) bool { 33 | return !unicode.IsPrint(c) 34 | }) 35 | 36 | if idx != -1 { 37 | w.WriteHeader(input.ErrStatus) 38 | return 39 | } 40 | 41 | if next != nil { 42 | next.ServeHTTP(w, r) 43 | } 44 | } 45 | 46 | return 47 | }) 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-retryablehttp/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | *.iml 3 | *.test 4 | .vscode/ -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-retryablehttp/.go-version: -------------------------------------------------------------------------------- 1 | 1.22.2 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-retryablehttp/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.7.7 (May 30, 2024) 2 | 3 | BUG FIXES: 4 | 5 | - client: avoid potentially leaking URL-embedded basic authentication credentials in logs (#158) 6 | 7 | ## 0.7.6 (May 9, 2024) 8 | 9 | ENHANCEMENTS: 10 | 11 | - client: support a `RetryPrepare` function for modifying the request before retrying (#216) 12 | - client: support HTTP-date values for `Retry-After` header value (#138) 13 | - client: avoid reading entire body when the body is a `*bytes.Reader` (#197) 14 | 15 | BUG FIXES: 16 | 17 | - client: fix a broken check for invalid server certificate in go 1.20+ (#210) 18 | 19 | ## 0.7.5 (Nov 8, 2023) 20 | 21 | BUG FIXES: 22 | 23 | - client: fixes an issue where the request body is not preserved on temporary redirects or re-established HTTP/2 connections (#207) 24 | 25 | ## 0.7.4 (Jun 6, 2023) 26 | 27 | BUG FIXES: 28 | 29 | - client: fixing an issue where the Content-Type header wouldn't be sent with an empty payload when using HTTP/2 (#194) 30 | 31 | ## 0.7.3 (May 15, 2023) 32 | 33 | Initial release 34 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-retryablehttp/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @hashicorp/go-retryablehttp-maintainers 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-retryablehttp/Makefile: -------------------------------------------------------------------------------- 1 | default: test 2 | 3 | test: 4 | go vet ./... 5 | go test -v -race ./... 6 | 7 | updatedeps: 8 | go get -f -t -u ./... 9 | go get -f -u ./... 10 | 11 | .PHONY: default test updatedeps 12 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-retryablehttp/cert_error_go119.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) HashiCorp, Inc. 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | //go:build !go1.20 5 | // +build !go1.20 6 | 7 | package retryablehttp 8 | 9 | import "crypto/x509" 10 | 11 | func isCertError(err error) bool { 12 | _, ok := err.(x509.UnknownAuthorityError) 13 | return ok 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-retryablehttp/cert_error_go120.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) HashiCorp, Inc. 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | //go:build go1.20 5 | // +build go1.20 6 | 7 | package retryablehttp 8 | 9 | import "crypto/tls" 10 | 11 | func isCertError(err error) bool { 12 | _, ok := err.(*tls.CertificateVerificationError) 13 | return ok 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-version/version_collection.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | // Collection is a type that implements the sort.Interface interface 4 | // so that versions can be sorted. 5 | type Collection []*Version 6 | 7 | func (v Collection) Len() int { 8 | return len(v) 9 | } 10 | 11 | func (v Collection) Less(i, j int) bool { 12 | return v[i].LessThan(v[j]) 13 | } 14 | 15 | func (v Collection) Swap(i, j int) { 16 | v[i], v[j] = v[j], v[i] 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/heimdalr/dag/.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | *~ 3 | /coverage.txt 4 | -------------------------------------------------------------------------------- /vendor/github.com/heimdalr/dag/.gitpod.yml: -------------------------------------------------------------------------------- 1 | tasks: 2 | - init: go get && go build ./... && go test ./... 3 | command: go run 4 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Mitchell Hashimoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/error.go: -------------------------------------------------------------------------------- 1 | package mapstructure 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | "sort" 7 | "strings" 8 | ) 9 | 10 | // Error implements the error interface and can represents multiple 11 | // errors that occur in the course of a single decode. 12 | type Error struct { 13 | Errors []string 14 | } 15 | 16 | func (e *Error) Error() string { 17 | points := make([]string, len(e.Errors)) 18 | for i, err := range e.Errors { 19 | points[i] = fmt.Sprintf("* %s", err) 20 | } 21 | 22 | sort.Strings(points) 23 | return fmt.Sprintf( 24 | "%d error(s) decoding:\n\n%s", 25 | len(e.Errors), strings.Join(points, "\n")) 26 | } 27 | 28 | // WrappedErrors implements the errwrap.Wrapper interface to make this 29 | // return value more useful with the errwrap and go-multierror libraries. 30 | func (e *Error) WrappedErrors() []error { 31 | if e == nil { 32 | return nil 33 | } 34 | 35 | result := make([]error, len(e.Errors)) 36 | for i, e := range e.Errors { 37 | result[i] = errors.New(e) 38 | } 39 | 40 | return result 41 | } 42 | 43 | func appendErrors(errors []string, err error) []string { 44 | switch e := err.(type) { 45 | case *Error: 46 | return append(errors, e.Errors...) 47 | default: 48 | return append(errors, e.Error()) 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /vendor/github.com/ryanuber/go-glob/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | script: 5 | - go test -v ./... 6 | -------------------------------------------------------------------------------- /vendor/github.com/ryanuber/go-glob/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Ryan Uber 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/ryanuber/go-glob/README.md: -------------------------------------------------------------------------------- 1 | # String globbing in golang [![Build Status](https://travis-ci.org/ryanuber/go-glob.svg)](https://travis-ci.org/ryanuber/go-glob) 2 | 3 | `go-glob` is a single-function library implementing basic string glob support. 4 | 5 | Globs are an extremely user-friendly way of supporting string matching without 6 | requiring knowledge of regular expressions or Go's particular regex engine. Most 7 | people understand that if you put a `*` character somewhere in a string, it is 8 | treated as a wildcard. Surprisingly, this functionality isn't found in Go's 9 | standard library, except for `path.Match`, which is intended to be used while 10 | comparing paths (not arbitrary strings), and contains specialized logic for this 11 | use case. A better solution might be a POSIX basic (non-ERE) regular expression 12 | engine for Go, which doesn't exist currently. 13 | 14 | Example 15 | ======= 16 | 17 | ``` 18 | package main 19 | 20 | import "github.com/ryanuber/go-glob" 21 | 22 | func main() { 23 | glob.Glob("*World!", "Hello, World!") // true 24 | glob.Glob("Hello,*", "Hello, World!") // true 25 | glob.Glob("*ello,*", "Hello, World!") // true 26 | glob.Glob("World!", "Hello, World!") // false 27 | glob.Glob("/home/*", "/home/ryanuber/.bashrc") // true 28 | } 29 | ``` 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/exp/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/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/const_plan9.go: -------------------------------------------------------------------------------- 1 | package plan9 2 | 3 | // Plan 9 Constants 4 | 5 | // Open modes 6 | const ( 7 | O_RDONLY = 0 8 | O_WRONLY = 1 9 | O_RDWR = 2 10 | O_TRUNC = 16 11 | O_CLOEXEC = 32 12 | O_EXCL = 0x1000 13 | ) 14 | 15 | // Rfork flags 16 | const ( 17 | RFNAMEG = 1 << 0 18 | RFENVG = 1 << 1 19 | RFFDG = 1 << 2 20 | RFNOTEG = 1 << 3 21 | RFPROC = 1 << 4 22 | RFMEM = 1 << 5 23 | RFNOWAIT = 1 << 6 24 | RFCNAMEG = 1 << 10 25 | RFCENVG = 1 << 11 26 | RFCFDG = 1 << 12 27 | RFREND = 1 << 13 28 | RFNOMNT = 1 << 14 29 | ) 30 | 31 | // Qid.Type bits 32 | const ( 33 | QTDIR = 0x80 34 | QTAPPEND = 0x40 35 | QTEXCL = 0x20 36 | QTMOUNT = 0x10 37 | QTAUTH = 0x08 38 | QTTMP = 0x04 39 | QTFILE = 0x00 40 | ) 41 | 42 | // Dir.Mode bits 43 | const ( 44 | DMDIR = 0x80000000 45 | DMAPPEND = 0x40000000 46 | DMEXCL = 0x20000000 47 | DMMOUNT = 0x10000000 48 | DMAUTH = 0x08000000 49 | DMTMP = 0x04000000 50 | DMREAD = 0x4 51 | DMWRITE = 0x2 52 | DMEXEC = 0x1 53 | ) 54 | 55 | const ( 56 | STATMAX = 65535 57 | ERRMAX = 128 58 | STATFIXLEN = 49 59 | ) 60 | 61 | // Mount and bind flags 62 | const ( 63 | MREPL = 0x0000 64 | MBEFORE = 0x0001 65 | MAFTER = 0x0002 66 | MORDER = 0x0003 67 | MCREATE = 0x0004 68 | MCACHE = 0x0010 69 | MMASK = 0x0017 70 | ) 71 | -------------------------------------------------------------------------------- /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/plan9/zsysnum_plan9.go: -------------------------------------------------------------------------------- 1 | // mksysnum_plan9.sh /opt/plan9/sys/src/libc/9syscall/sys.h 2 | // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT 3 | 4 | package plan9 5 | 6 | const ( 7 | SYS_SYSR1 = 0 8 | SYS_BIND = 2 9 | SYS_CHDIR = 3 10 | SYS_CLOSE = 4 11 | SYS_DUP = 5 12 | SYS_ALARM = 6 13 | SYS_EXEC = 7 14 | SYS_EXITS = 8 15 | SYS_FAUTH = 10 16 | SYS_SEGBRK = 12 17 | SYS_OPEN = 14 18 | SYS_OSEEK = 16 19 | SYS_SLEEP = 17 20 | SYS_RFORK = 19 21 | SYS_PIPE = 21 22 | SYS_CREATE = 22 23 | SYS_FD2PATH = 23 24 | SYS_BRK_ = 24 25 | SYS_REMOVE = 25 26 | SYS_NOTIFY = 28 27 | SYS_NOTED = 29 28 | SYS_SEGATTACH = 30 29 | SYS_SEGDETACH = 31 30 | SYS_SEGFREE = 32 31 | SYS_SEGFLUSH = 33 32 | SYS_RENDEZVOUS = 34 33 | SYS_UNMOUNT = 35 34 | SYS_SEMACQUIRE = 37 35 | SYS_SEMRELEASE = 38 36 | SYS_SEEK = 39 37 | SYS_FVERSION = 40 38 | SYS_ERRSTR = 41 39 | SYS_STAT = 42 40 | SYS_FSTAT = 43 41 | SYS_WSTAT = 44 42 | SYS_FWSTAT = 45 43 | SYS_MOUNT = 46 44 | SYS_AWAIT = 47 45 | SYS_PREAD = 50 46 | SYS_PWRITE = 51 47 | SYS_TSEMACQUIRE = 52 48 | SYS_NSEC = 53 49 | ) 50 | -------------------------------------------------------------------------------- /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_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for arm, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24 23 | BL runtime·entersyscall(SB) 24 | MOVW trap+0(FP), R7 25 | MOVW a1+4(FP), R0 26 | MOVW a2+8(FP), R1 27 | MOVW a3+12(FP), R2 28 | MOVW $0, R3 29 | MOVW $0, R4 30 | MOVW $0, R5 31 | SWI $0 32 | MOVW R0, r1+16(FP) 33 | MOVW $0, R0 34 | MOVW R0, r2+20(FP) 35 | BL runtime·exitsyscall(SB) 36 | RET 37 | 38 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 39 | B syscall·RawSyscall(SB) 40 | 41 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 42 | B syscall·RawSyscall6(SB) 43 | 44 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 45 | MOVW trap+0(FP), R7 // syscall entry 46 | MOVW a1+4(FP), R0 47 | MOVW a2+8(FP), R1 48 | MOVW a3+12(FP), R2 49 | SWI $0 50 | MOVW R0, r1+16(FP) 51 | MOVW $0, R0 52 | MOVW R0, r2+20(FP) 53 | RET 54 | 55 | TEXT ·seek(SB),NOSPLIT,$0-28 56 | B syscall·seek(SB) 57 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && arm64 && gc 6 | 7 | #include "textflag.h" 8 | 9 | // Just jump to package syscall's implementation for all these functions. 10 | // The runtime may know about them. 11 | 12 | TEXT ·Syscall(SB),NOSPLIT,$0-56 13 | B syscall·Syscall(SB) 14 | 15 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 16 | B syscall·Syscall6(SB) 17 | 18 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 19 | BL runtime·entersyscall(SB) 20 | MOVD a1+8(FP), R0 21 | MOVD a2+16(FP), R1 22 | MOVD a3+24(FP), R2 23 | MOVD $0, R3 24 | MOVD $0, R4 25 | MOVD $0, R5 26 | MOVD trap+0(FP), R8 // syscall entry 27 | SVC 28 | MOVD R0, r1+32(FP) // r1 29 | MOVD R1, r2+40(FP) // r2 30 | BL runtime·exitsyscall(SB) 31 | RET 32 | 33 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 34 | B syscall·RawSyscall(SB) 35 | 36 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 37 | B syscall·RawSyscall6(SB) 38 | 39 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 40 | MOVD a1+8(FP), R0 41 | MOVD a2+16(FP), R1 42 | MOVD a3+24(FP), R2 43 | MOVD $0, R3 44 | MOVD $0, R4 45 | MOVD $0, R5 46 | MOVD trap+0(FP), R8 // syscall entry 47 | SVC 48 | MOVD R0, r1+32(FP) 49 | MOVD R1, r2+40(FP) 50 | RET 51 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_loong64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && loong64 && gc 6 | 7 | #include "textflag.h" 8 | 9 | 10 | // Just jump to package syscall's implementation for all these functions. 11 | // The runtime may know about them. 12 | 13 | TEXT ·Syscall(SB),NOSPLIT,$0-56 14 | JMP syscall·Syscall(SB) 15 | 16 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 17 | JMP syscall·Syscall6(SB) 18 | 19 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 20 | JAL runtime·entersyscall(SB) 21 | MOVV a1+8(FP), R4 22 | MOVV a2+16(FP), R5 23 | MOVV a3+24(FP), R6 24 | MOVV R0, R7 25 | MOVV R0, R8 26 | MOVV R0, R9 27 | MOVV trap+0(FP), R11 // syscall entry 28 | SYSCALL 29 | MOVV R4, r1+32(FP) 30 | MOVV R0, r2+40(FP) // r2 is not used. Always set to 0 31 | JAL runtime·exitsyscall(SB) 32 | RET 33 | 34 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 35 | JMP syscall·RawSyscall(SB) 36 | 37 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 38 | JMP syscall·RawSyscall6(SB) 39 | 40 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 41 | MOVV a1+8(FP), R4 42 | MOVV a2+16(FP), R5 43 | MOVV a3+24(FP), R6 44 | MOVV R0, R7 45 | MOVV R0, R8 46 | MOVV R0, R9 47 | MOVV trap+0(FP), R11 // syscall entry 48 | SYSCALL 49 | MOVV R4, r1+32(FP) 50 | MOVV R0, r2+40(FP) // r2 is not used. Always set to 0 51 | RET 52 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_mips64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (mips64 || mips64le) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for mips64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 23 | JAL runtime·entersyscall(SB) 24 | MOVV a1+8(FP), R4 25 | MOVV a2+16(FP), R5 26 | MOVV a3+24(FP), R6 27 | MOVV R0, R7 28 | MOVV R0, R8 29 | MOVV R0, R9 30 | MOVV trap+0(FP), R2 // syscall entry 31 | SYSCALL 32 | MOVV R2, r1+32(FP) 33 | MOVV R3, r2+40(FP) 34 | JAL runtime·exitsyscall(SB) 35 | RET 36 | 37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 38 | JMP syscall·RawSyscall(SB) 39 | 40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 41 | JMP syscall·RawSyscall6(SB) 42 | 43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 44 | MOVV a1+8(FP), R4 45 | MOVV a2+16(FP), R5 46 | MOVV a3+24(FP), R6 47 | MOVV R0, R7 48 | MOVV R0, R8 49 | MOVV R0, R9 50 | MOVV trap+0(FP), R2 // syscall entry 51 | SYSCALL 52 | MOVV R2, r1+32(FP) 53 | MOVV R3, r2+40(FP) 54 | RET 55 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_mipsx.s: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (mips || mipsle) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for mips, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24 26 | JAL runtime·entersyscall(SB) 27 | MOVW a1+4(FP), R4 28 | MOVW a2+8(FP), R5 29 | MOVW a3+12(FP), R6 30 | MOVW R0, R7 31 | MOVW trap+0(FP), R2 // syscall entry 32 | SYSCALL 33 | MOVW R2, r1+16(FP) // r1 34 | MOVW R3, r2+20(FP) // r2 35 | JAL runtime·exitsyscall(SB) 36 | RET 37 | 38 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 39 | JMP syscall·RawSyscall(SB) 40 | 41 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 42 | JMP syscall·RawSyscall6(SB) 43 | 44 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 45 | MOVW a1+4(FP), R4 46 | MOVW a2+8(FP), R5 47 | MOVW a3+12(FP), R6 48 | MOVW trap+0(FP), R2 // syscall entry 49 | SYSCALL 50 | MOVW R2, r1+16(FP) 51 | MOVW R3, r2+20(FP) 52 | RET 53 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (ppc64 || ppc64le) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 17 | BL runtime·entersyscall(SB) 18 | MOVD a1+8(FP), R3 19 | MOVD a2+16(FP), R4 20 | MOVD a3+24(FP), R5 21 | MOVD R0, R6 22 | MOVD R0, R7 23 | MOVD R0, R8 24 | MOVD trap+0(FP), R9 // syscall entry 25 | SYSCALL R9 26 | MOVD R3, r1+32(FP) 27 | MOVD R4, r2+40(FP) 28 | BL runtime·exitsyscall(SB) 29 | RET 30 | 31 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 32 | MOVD a1+8(FP), R3 33 | MOVD a2+16(FP), R4 34 | MOVD a3+24(FP), R5 35 | MOVD R0, R6 36 | MOVD R0, R7 37 | MOVD R0, R8 38 | MOVD trap+0(FP), R9 // syscall entry 39 | SYSCALL R9 40 | MOVD R3, r1+32(FP) 41 | MOVD R4, r2+40(FP) 42 | RET 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_riscv64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build riscv64 && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for linux/riscv64. 11 | // 12 | // Where available, just jump to package syscall's implementation of 13 | // these functions. 14 | 15 | TEXT ·Syscall(SB),NOSPLIT,$0-56 16 | JMP syscall·Syscall(SB) 17 | 18 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 19 | JMP syscall·Syscall6(SB) 20 | 21 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 22 | CALL runtime·entersyscall(SB) 23 | MOV a1+8(FP), A0 24 | MOV a2+16(FP), A1 25 | MOV a3+24(FP), A2 26 | MOV trap+0(FP), A7 // syscall entry 27 | ECALL 28 | MOV A0, r1+32(FP) // r1 29 | MOV A1, r2+40(FP) // r2 30 | CALL runtime·exitsyscall(SB) 31 | RET 32 | 33 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 34 | JMP syscall·RawSyscall(SB) 35 | 36 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 37 | JMP syscall·RawSyscall6(SB) 38 | 39 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 40 | MOV a1+8(FP), A0 41 | MOV a2+16(FP), A1 42 | MOV a3+24(FP), A2 43 | MOV trap+0(FP), A7 // syscall entry 44 | ECALL 45 | MOV A0, r1+32(FP) 46 | MOV A1, r2+40(FP) 47 | RET 48 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_s390x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && s390x && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for s390x, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | BR syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | BR syscall·Syscall6(SB) 21 | 22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 23 | BL runtime·entersyscall(SB) 24 | MOVD a1+8(FP), R2 25 | MOVD a2+16(FP), R3 26 | MOVD a3+24(FP), R4 27 | MOVD $0, R5 28 | MOVD $0, R6 29 | MOVD $0, R7 30 | MOVD trap+0(FP), R1 // syscall entry 31 | SYSCALL 32 | MOVD R2, r1+32(FP) 33 | MOVD R3, r2+40(FP) 34 | BL runtime·exitsyscall(SB) 35 | RET 36 | 37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 38 | BR syscall·RawSyscall(SB) 39 | 40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 41 | BR syscall·RawSyscall6(SB) 42 | 43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 44 | MOVD a1+8(FP), R2 45 | MOVD a2+16(FP), R3 46 | MOVD a3+24(FP), R4 47 | MOVD $0, R5 48 | MOVD $0, R6 49 | MOVD $0, R7 50 | MOVD trap+0(FP), R1 // syscall entry 51 | SYSCALL 52 | MOVD R2, r1+32(FP) 53 | MOVD R3, r2+40(FP) 54 | RET 55 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for mips64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | HCI_CHANNEL_LOGGING = 4 27 | ) 28 | 29 | // Socketoption Level 30 | const ( 31 | SOL_BLUETOOTH = 0x112 32 | SOL_HCI = 0x0 33 | SOL_L2CAP = 0x6 34 | SOL_RFCOMM = 0x12 35 | SOL_SCO = 0x11 36 | ) 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev >> 16) & 0xffff) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32(dev & 0xffff) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | return uint64(((major) << 16) | (minor)) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc64 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev & 0x3fffffff00000000) >> 32) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32((dev & 0x00000000ffffffff) >> 0) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | var DEVNO64 uint64 26 | DEVNO64 = 0x8000000000000000 27 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Dragonfly's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a DragonFlyBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a DragonFlyBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_freebsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in FreeBSD's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a FreeBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a FreeBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a FreeBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_zos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build zos && s390x 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by z/OS. 9 | // 10 | // The information below is extracted and adapted from macros. 11 | 12 | package unix 13 | 14 | // Major returns the major component of a z/OS device number. 15 | func Major(dev uint64) uint32 { 16 | return uint32((dev >> 16) & 0x0000FFFF) 17 | } 18 | 19 | // Minor returns the minor component of a z/OS device number. 20 | func Minor(dev uint64) uint32 { 21 | return uint32(dev & 0x0000FFFF) 22 | } 23 | 24 | // Mkdev returns a z/OS device number generated from the given major and minor 25 | // components. 26 | func Mkdev(major, minor uint32) uint64 { 27 | return (uint64(major) << 16) | uint64(minor) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build dragonfly || freebsd || linux || netbsd 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 12 | // systems by fcntl_linux_32bit.go to be SYS_FCNTL64. 13 | var fcntl64Syscall uintptr = SYS_FCNTL 14 | 15 | func fcntl(fd int, cmd, arg int) (int, error) { 16 | valptr, _, errno := Syscall(fcntl64Syscall, uintptr(fd), uintptr(cmd), uintptr(arg)) 17 | var err error 18 | if errno != 0 { 19 | err = errno 20 | } 21 | return int(valptr), err 22 | } 23 | 24 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 25 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 26 | return fcntl(int(fd), cmd, arg) 27 | } 28 | 29 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 30 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 31 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 32 | if errno == 0 { 33 | return nil 34 | } 35 | return errno 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 11 | return fcntl(int(fd), cmd, arg) 12 | } 13 | 14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) 17 | return err 18 | } 19 | 20 | // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command. 21 | func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error { 22 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore)))) 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fdset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | // Set adds fd to the set fds. 10 | func (fds *FdSet) Set(fd int) { 11 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS)) 12 | } 13 | 14 | // Clear removes fd from the set fds. 15 | func (fds *FdSet) Clear(fd int) { 16 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS)) 17 | } 18 | 19 | // IsSet returns whether fd is in the set fds. 20 | func (fds *FdSet) IsSet(fd int) bool { 21 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0 22 | } 23 | 24 | // Zero clears the set fds. 25 | func (fds *FdSet) Zero() { 26 | for i := range fds.Bits { 27 | fds.Bits[i] = 0 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gccgo && linux && amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mmap_nomremap.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | var mapper = &mmapper{ 10 | active: make(map[*byte][]byte), 11 | mmap: mmap, 12 | munmap: munmap, 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && !ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) error { 10 | return ptrace1(request, pid, addr, data) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_ios.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 10 | return ENOTSUP 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && race) || (linux && race) || (freebsd && race) 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd 6 | 7 | package unix 8 | 9 | // ReadDirent reads directory entries from fd and writes them into buf. 10 | func ReadDirent(fd int, buf []byte) (n int, err error) { 11 | return Getdents(fd, buf) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdirentries.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin || zos 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // ReadDirent reads directory entries from fd and writes them into buf. 12 | func ReadDirent(fd int, buf []byte) (n int, err error) { 13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 15 | // actual system call is getdirentries64, 64 is a good guess. 16 | // TODO(rsc): Can we use a single global basep for all calls? 17 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 18 | return Getdirentries(fd, buf, base) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | // Round the length of a raw sockaddr up to align it properly. 8 | func cmsgAlignOf(salen int) int { 9 | salign := SizeofPtr 10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { 11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires 12 | // 32-bit aligned access to network subsystem. 13 | salign = 4 14 | } 15 | return (salen + salign - 1) & ^(salign - 1) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin 6 | 7 | package unix 8 | 9 | import _ "unsafe" 10 | 11 | // Implemented in the runtime package (runtime/sys_darwin.go) 12 | func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 13 | func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 14 | func syscall_syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 15 | func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // 32-bit only 16 | func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 17 | func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 18 | func syscall_syscallPtr(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 19 | 20 | //go:linkname syscall_syscall syscall.syscall 21 | //go:linkname syscall_syscall6 syscall.syscall6 22 | //go:linkname syscall_syscall6X syscall.syscall6X 23 | //go:linkname syscall_syscall9 syscall.syscall9 24 | //go:linkname syscall_rawSyscall syscall.rawSyscall 25 | //go:linkname syscall_rawSyscall6 syscall.rawSyscall6 26 | //go:linkname syscall_syscallPtr syscall.syscallPtr 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build hurd 6 | 7 | package unix 8 | 9 | /* 10 | #include 11 | int ioctl(int, unsigned long int, uintptr_t); 12 | */ 13 | import "C" 14 | import "unsafe" 15 | 16 | func ioctl(fd int, req uint, arg uintptr) (err error) { 17 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) 18 | if r0 == -1 && er != nil { 19 | err = er 20 | } 21 | return 22 | } 23 | 24 | func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { 25 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg))) 26 | if r0 == -1 && er != nil { 27 | err = er 28 | } 29 | return 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && hurd 6 | 7 | package unix 8 | 9 | const ( 10 | TIOCGETA = 0x62251713 11 | ) 12 | 13 | type Winsize struct { 14 | Row uint16 15 | Col uint16 16 | Xpixel uint16 17 | Ypixel uint16 18 | } 19 | 20 | type Termios struct { 21 | Iflag uint32 22 | Oflag uint32 23 | Cflag uint32 24 | Lflag uint32 25 | Cc [20]uint8 26 | Ispeed int32 27 | Ospeed int32 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_alarm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64) 6 | 7 | package unix 8 | 9 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH 10 | // values. 11 | 12 | //sys Alarm(seconds uint) (remaining uint, err error) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && linux && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //go:noescape 12 | func gettimeofday(tv *Timeval) (err syscall.Errno) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc 6 | 7 | package unix 8 | 9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 11 | 12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 13 | // fail. 14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc && 386 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | 15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && gc && linux 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && 386 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | 22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 24 | return int(fd), err 25 | } 26 | 27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 29 | return int(fd), err 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && arm 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm64 && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/386 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/arm the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm64 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build openbsd 6 | 7 | package unix 8 | 9 | import _ "unsafe" 10 | 11 | // Implemented in the runtime package (runtime/sys_openbsd3.go) 12 | func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 13 | func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 14 | func syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 uintptr) (r1, r2 uintptr, err Errno) 15 | func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 16 | func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 17 | 18 | //go:linkname syscall_syscall syscall.syscall 19 | //go:linkname syscall_syscall6 syscall.syscall6 20 | //go:linkname syscall_syscall10 syscall.syscall10 21 | //go:linkname syscall_rawSyscall syscall.rawSyscall 22 | //go:linkname syscall_rawSyscall6 syscall.rawSyscall6 23 | 24 | func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) { 25 | return syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, 0) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | func setTimespec(sec, nsec int64) Timespec { 8 | return Timespec{Sec: sec, Nsec: nsec} 9 | } 10 | 11 | func setTimeval(sec, usec int64) Timeval { 12 | return Timeval{Sec: sec, Usec: usec} 13 | } 14 | 15 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 16 | k.Ident = uint64(fd) 17 | k.Filter = int16(mode) 18 | k.Flags = uint16(flags) 19 | } 20 | 21 | func (iov *Iovec) SetLen(length int) { 22 | iov.Len = uint64(length) 23 | } 24 | 25 | func (msghdr *Msghdr) SetControllen(length int) { 26 | msghdr.Controllen = uint32(length) 27 | } 28 | 29 | func (msghdr *Msghdr) SetIovlen(length int) { 30 | msghdr.Iovlen = uint32(length) 31 | } 32 | 33 | func (cmsg *Cmsghdr) SetLen(length int) { 34 | cmsg.Len = uint32(length) 35 | } 36 | 37 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 38 | // of OpenBSD the syscall is called sysctl instead of __sysctl. 39 | const SYS___SYSCTL = SYS_SYSCTL 40 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ppc64 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/ppc64 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build riscv64 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/riscv64 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (msghdr *Msghdr) SetIovlen(length int) { 22 | msghdr.Iovlen = int32(length) 23 | } 24 | 25 | func (cmsg *Cmsghdr) SetLen(length int) { 26 | cmsg.Len = uint32(length) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 12 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (ppc64le || ppc64) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 12 | return syscall.Syscall(trap, a1, a2, a3) 13 | } 14 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 15 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) 16 | } 17 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 18 | return syscall.RawSyscall(trap, a1, a2, a3) 19 | } 20 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 21 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux 6 | 7 | package unix 8 | 9 | import "runtime" 10 | 11 | // SysvShmCtl performs control operations on the shared memory segment 12 | // specified by id. 13 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 14 | if runtime.GOARCH == "arm" || 15 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" { 16 | cmd |= ipc_64 17 | } 18 | 19 | return shmctl(id, cmd, desc) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && !ios) || zos 6 | 7 | package unix 8 | 9 | // SysvShmCtl performs control operations on the shared memory segment 10 | // specified by id. 11 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 12 | return shmctl(id, cmd, desc) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/vgetrandom_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && go1.24 6 | 7 | package unix 8 | 9 | import _ "unsafe" 10 | 11 | //go:linkname vgetrandom runtime.vgetrandom 12 | //go:noescape 13 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux || !go1.24 6 | 7 | package unix 8 | 9 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool) { 10 | return -1, false 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtracePair("arm", "arm64"). DO NOT EDIT. 2 | 3 | //go:build linux && (arm || arm64) 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // PtraceRegsArm is the registers used by arm binaries. 10 | type PtraceRegsArm struct { 11 | Uregs [18]uint32 12 | } 13 | 14 | // PtraceGetRegsArm fetches the registers used by arm binaries. 15 | func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error { 16 | return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout)) 17 | } 18 | 19 | // PtraceSetRegsArm sets the registers used by arm binaries. 20 | func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error { 21 | return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs)) 22 | } 23 | 24 | // PtraceRegsArm64 is the registers used by arm64 binaries. 25 | type PtraceRegsArm64 struct { 26 | Regs [31]uint64 27 | Sp uint64 28 | Pc uint64 29 | Pstate uint64 30 | } 31 | 32 | // PtraceGetRegsArm64 fetches the registers used by arm64 binaries. 33 | func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error { 34 | return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout)) 35 | } 36 | 37 | // PtraceSetRegsArm64 sets the registers used by arm64 binaries. 38 | func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error { 39 | return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs)) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. 2 | 3 | package unix 4 | 5 | import "unsafe" 6 | 7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. 8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { 9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} 10 | return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 11 | } 12 | 13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries. 14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { 15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} 16 | return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/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/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/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_plan9.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 term 6 | 7 | import ( 8 | "fmt" 9 | "runtime" 10 | 11 | "golang.org/x/sys/plan9" 12 | ) 13 | 14 | type state struct{} 15 | 16 | func isTerminal(fd int) bool { 17 | path, err := plan9.Fd2path(fd) 18 | if err != nil { 19 | return false 20 | } 21 | return path == "/dev/cons" || path == "/mnt/term/dev/cons" 22 | } 23 | 24 | func makeRaw(fd int) (*State, error) { 25 | return nil, fmt.Errorf("terminal: MakeRaw not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 26 | } 27 | 28 | func getState(fd int) (*State, error) { 29 | return nil, fmt.Errorf("terminal: GetState not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 30 | } 31 | 32 | func restore(fd int, state *State) error { 33 | return fmt.Errorf("terminal: Restore not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 34 | } 35 | 36 | func getSize(fd int) (width, height int, err error) { 37 | return 0, 0, fmt.Errorf("terminal: GetSize not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 38 | } 39 | 40 | func readPassword(fd int) ([]byte, error) { 41 | return nil, fmt.Errorf("terminal: ReadPassword not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 42 | } 43 | -------------------------------------------------------------------------------- /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/term/term_unsupported.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 && !zos && !windows && !solaris && !plan9 6 | 7 | package term 8 | 9 | import ( 10 | "fmt" 11 | "runtime" 12 | ) 13 | 14 | type state struct{} 15 | 16 | func isTerminal(fd int) bool { 17 | return false 18 | } 19 | 20 | func makeRaw(fd int) (*State, error) { 21 | return nil, fmt.Errorf("terminal: MakeRaw not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 22 | } 23 | 24 | func getState(fd int) (*State, error) { 25 | return nil, fmt.Errorf("terminal: GetState not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 26 | } 27 | 28 | func restore(fd int, state *State) error { 29 | return fmt.Errorf("terminal: Restore not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 30 | } 31 | 32 | func getSize(fd int) (width, height int, err error) { 33 | return 0, 0, fmt.Errorf("terminal: GetSize not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 34 | } 35 | 36 | func readPassword(fd int) ([]byte, error) { 37 | return nil, fmt.Errorf("terminal: ReadPassword not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 38 | } 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /vendor/howett.net/plist/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | *.wasm 8 | 9 | # Test binary, built with `go test -c` 10 | *.test 11 | 12 | # Output of the go coverage tool, specifically when used with LiteIDE 13 | *.out 14 | 15 | # Dependency directories (remove the comment below to include it) 16 | # vendor/ 17 | -------------------------------------------------------------------------------- /vendor/howett.net/plist/.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | image: golang:alpine 2 | stages: 3 | - test 4 | 5 | variables: 6 | GO_PACKAGE: "howett.net/plist" 7 | 8 | before_script: 9 | - "mkdir -p $(dirname $GOPATH/src/$GO_PACKAGE)" 10 | - "ln -s $(pwd) $GOPATH/src/$GO_PACKAGE" 11 | - "cd $GOPATH/src/$GO_PACKAGE" 12 | 13 | .template:go-test: &template-go-test 14 | stage: test 15 | script: 16 | - go test 17 | 18 | go-test-cover:latest: 19 | stage: test 20 | script: 21 | - go test -v -cover 22 | coverage: '/^coverage: \d+\.\d+/' 23 | 24 | go-test-appengine:latest: 25 | stage: test 26 | script: 27 | - go test -tags appengine 28 | 29 | go-test:1.6: 30 | <<: *template-go-test 31 | image: golang:1.6-alpine 32 | 33 | go-test:1.4: 34 | <<: *template-go-test 35 | image: golang:1.4-alpine 36 | 37 | go-test:1.2: 38 | <<: *template-go-test 39 | image: golang:1.2 40 | -------------------------------------------------------------------------------- /vendor/howett.net/plist/README.md: -------------------------------------------------------------------------------- 1 | # plist - A pure Go property list transcoder [![coverage report](https://gitlab.howett.net/go/plist/badges/main/coverage.svg)](https://gitlab.howett.net/go/plist/commits/main) 2 | ## INSTALL 3 | ``` 4 | $ go get howett.net/plist 5 | ``` 6 | 7 | ## FEATURES 8 | * Supports encoding/decoding property lists (Apple XML, Apple Binary, OpenStep and GNUStep) from/to arbitrary Go types 9 | 10 | ## USE 11 | ```go 12 | package main 13 | import ( 14 | "howett.net/plist" 15 | "os" 16 | ) 17 | func main() { 18 | encoder := plist.NewEncoder(os.Stdout) 19 | encoder.Encode(map[string]string{"hello": "world"}) 20 | } 21 | ``` 22 | -------------------------------------------------------------------------------- /vendor/howett.net/plist/bplist.go: -------------------------------------------------------------------------------- 1 | package plist 2 | 3 | type bplistTrailer struct { 4 | Unused [5]uint8 5 | SortVersion uint8 6 | OffsetIntSize uint8 7 | ObjectRefSize uint8 8 | NumObjects uint64 9 | TopObject uint64 10 | OffsetTableOffset uint64 11 | } 12 | 13 | const ( 14 | bpTagNull uint8 = 0x00 15 | bpTagBoolFalse = 0x08 16 | bpTagBoolTrue = 0x09 17 | bpTagInteger = 0x10 18 | bpTagReal = 0x20 19 | bpTagDate = 0x30 20 | bpTagData = 0x40 21 | bpTagASCIIString = 0x50 22 | bpTagUTF16String = 0x60 23 | bpTagUID = 0x80 24 | bpTagArray = 0xA0 25 | bpTagDictionary = 0xD0 26 | ) 27 | -------------------------------------------------------------------------------- /vendor/howett.net/plist/doc.go: -------------------------------------------------------------------------------- 1 | // Package plist implements encoding and decoding of Apple's "property list" format. 2 | // Property lists come in three sorts: plain text (GNUStep and OpenStep), XML and binary. 3 | // plist supports all of them. 4 | // The mapping between property list and Go objects is described in the documentation for the Marshal and Unmarshal functions. 5 | package plist 6 | -------------------------------------------------------------------------------- /vendor/howett.net/plist/fuzz.go: -------------------------------------------------------------------------------- 1 | // +build gofuzz 2 | 3 | package plist 4 | 5 | import ( 6 | "bytes" 7 | ) 8 | 9 | func Fuzz(data []byte) int { 10 | buf := bytes.NewReader(data) 11 | 12 | var obj interface{} 13 | if err := NewDecoder(buf).Decode(&obj); err != nil { 14 | return 0 15 | } 16 | return 1 17 | } 18 | -------------------------------------------------------------------------------- /vendor/howett.net/plist/must.go: -------------------------------------------------------------------------------- 1 | package plist 2 | 3 | import ( 4 | "io" 5 | "strconv" 6 | ) 7 | 8 | type mustWriter struct { 9 | io.Writer 10 | } 11 | 12 | func (w mustWriter) Write(p []byte) (int, error) { 13 | n, err := w.Writer.Write(p) 14 | if err != nil { 15 | panic(err) 16 | } 17 | return n, nil 18 | } 19 | 20 | func mustParseInt(str string, base, bits int) int64 { 21 | i, err := strconv.ParseInt(str, base, bits) 22 | if err != nil { 23 | panic(err) 24 | } 25 | return i 26 | } 27 | 28 | func mustParseUint(str string, base, bits int) uint64 { 29 | i, err := strconv.ParseUint(str, base, bits) 30 | if err != nil { 31 | panic(err) 32 | } 33 | return i 34 | } 35 | 36 | func mustParseFloat(str string, bits int) float64 { 37 | i, err := strconv.ParseFloat(str, bits) 38 | if err != nil { 39 | panic(err) 40 | } 41 | return i 42 | } 43 | 44 | func mustParseBool(str string) bool { 45 | i, err := strconv.ParseBool(str) 46 | if err != nil { 47 | panic(err) 48 | } 49 | return i 50 | } 51 | -------------------------------------------------------------------------------- /vendor/howett.net/plist/util.go: -------------------------------------------------------------------------------- 1 | package plist 2 | 3 | import "io" 4 | 5 | type countedWriter struct { 6 | io.Writer 7 | nbytes int 8 | } 9 | 10 | func (w *countedWriter) Write(p []byte) (int, error) { 11 | n, err := w.Writer.Write(p) 12 | w.nbytes += n 13 | return n, err 14 | } 15 | 16 | func (w *countedWriter) BytesWritten() int { 17 | return w.nbytes 18 | } 19 | 20 | func unsignedGetBase(s string) (string, int) { 21 | if len(s) > 1 && s[0] == '0' && (s[1] == 'x' || s[1] == 'X') { 22 | return s[2:], 16 23 | } 24 | return s, 10 25 | } 26 | -------------------------------------------------------------------------------- /vendor/howett.net/plist/zerocopy.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package plist 4 | 5 | import ( 6 | "reflect" 7 | "unsafe" 8 | ) 9 | 10 | func zeroCopy8BitString(buf []byte, off int, len int) string { 11 | if len == 0 { 12 | return "" 13 | } 14 | 15 | var s string 16 | hdr := (*reflect.StringHeader)(unsafe.Pointer(&s)) 17 | hdr.Data = uintptr(unsafe.Pointer(&buf[off])) 18 | hdr.Len = len 19 | return s 20 | } 21 | -------------------------------------------------------------------------------- /vendor/howett.net/plist/zerocopy_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package plist 4 | 5 | func zeroCopy8BitString(buf []byte, off int, len int) string { 6 | return string(buf[off : off+len]) 7 | } 8 | --------------------------------------------------------------------------------