├── .DEREK.yml ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yml └── workflows │ ├── build.yml │ ├── e2e-url-checker.yml │ └── publish.yml ├── .gitignore ├── ADOPTERS.md ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── README.md ├── cmd ├── apps │ ├── argocd_app.go │ ├── cassandra_app.go │ ├── certmanager_app.go │ ├── chart_app.go │ ├── cockroachdb_app.go │ ├── confluentkafka.go │ ├── consul_app.go │ ├── cronconnector_app.go │ ├── crossplane_app.go │ ├── falco.go │ ├── gitea_app.go │ ├── gitlab_app.go │ ├── grafana_app.go │ ├── influxdb_app.go │ ├── inletsoperator_app.go │ ├── inletsoperator_app_test.go │ ├── istio_app.go │ ├── jenkins_app.go │ ├── kafkaconnector_app.go │ ├── kong_ingress_app.go │ ├── kube_image_prefetch_app.go │ ├── kube_state_metrics.go │ ├── kubernetes_dashboard_app.go │ ├── kuma_app.go │ ├── kyverno_app.go │ ├── linkerd_app.go │ ├── loki_app.go │ ├── messages.go │ ├── metallb_app.go │ ├── metricsserver_app.go │ ├── minio_app.go │ ├── mongodb_app.go │ ├── mqttconnector_app.go │ ├── nats_connector.go │ ├── nfs_app.go │ ├── nginx_app.go │ ├── of_loki.go │ ├── opa_gatekeeper.go │ ├── openfaas_app.go │ ├── openfaas_app_test.go │ ├── openfaas_ingress_app.go │ ├── openfaas_ingress_app_test.go │ ├── portainer_app.go │ ├── postgres_app.go │ ├── prometheus_app.go │ ├── qemu-static.go │ ├── rabbitmq_app.go │ ├── redis_app.go │ ├── registry_app.go │ ├── registry_creds_app.go │ ├── registry_ingress_app.go │ ├── sealed_secret_app.go │ ├── tekton_app.go │ ├── traefik2_app.go │ ├── vault_app.go │ └── waypoint_app.go ├── chart │ ├── bump.go │ ├── chart.go │ ├── upgrade.go │ ├── upgrade_test.go │ └── verify.go ├── completion.go ├── get.go ├── get_test.go ├── info.go ├── install.go ├── install_test.go ├── oci │ ├── install.go │ └── oci.go ├── system │ ├── actions_runner.go │ ├── buildkitd.go │ ├── caddy.go │ ├── cni.go │ ├── common.go │ ├── containerd.go │ ├── firecracker.go │ ├── gitlab_runner.go │ ├── go.go │ ├── install.go │ ├── node.go │ ├── nodeexporter.go │ ├── powershell.go │ ├── prometheus.go │ ├── registry.go │ ├── system.go │ └── tc_redirect_tap.go ├── uninstall.go ├── update.go └── version.go ├── docs ├── arkade-logo-sm.png ├── arkade-swag.jpg └── arkade.tape ├── get.sh ├── go.mod ├── go.sum ├── hack ├── hashgen.sh ├── platform-tag.sh └── test-tool.sh ├── main.go ├── pkg ├── apps │ └── chart_app.go ├── archive │ ├── untar.go │ ├── untar_nested.go │ └── unzip.go ├── config │ ├── config.go │ ├── config_test.go │ └── file.go ├── env │ └── env.go ├── get │ ├── download.go │ ├── get.go │ ├── get_test.go │ ├── table.go │ ├── tools.go │ └── url_checker_test.go ├── helm │ ├── helm.go │ ├── io.go │ └── io_test.go ├── k8s │ └── kubernetes_exec.go ├── thanks.go ├── types │ └── types.go ├── update │ ├── update.go │ ├── verifier.go │ └── version_check.go └── version.go └── vendor ├── github.com ├── Masterminds │ └── semver │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE.txt │ │ ├── Makefile │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── collection.go │ │ ├── constraints.go │ │ ├── doc.go │ │ ├── version.go │ │ └── version_fuzz.go ├── VividCortex │ └── ewma │ │ ├── .gitignore │ │ ├── .whitesource │ │ ├── LICENSE │ │ ├── README.md │ │ ├── codecov.yml │ │ └── ewma.go ├── alexellis │ └── go-execute │ │ └── v2 │ │ ├── .DEREK.yml │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ └── exec.go ├── cheggaaa │ └── pb │ │ └── v3 │ │ ├── LICENSE │ │ ├── element.go │ │ ├── io.go │ │ ├── pb.go │ │ ├── pool.go │ │ ├── pool_win.go │ │ ├── pool_x.go │ │ ├── preset.go │ │ ├── speed.go │ │ ├── template.go │ │ ├── termutil │ │ ├── term.go │ │ ├── term_aix.go │ │ ├── term_appengine.go │ │ ├── term_bsd.go │ │ ├── term_linux.go │ │ ├── term_nix.go │ │ ├── term_plan9.go │ │ ├── term_solaris.go │ │ ├── term_win.go │ │ └── term_x.go │ │ └── util.go ├── containerd │ └── stargz-snapshotter │ │ └── estargz │ │ ├── LICENSE │ │ ├── build.go │ │ ├── errorutil │ │ └── errors.go │ │ ├── estargz.go │ │ ├── gzip.go │ │ ├── testutil.go │ │ └── types.go ├── docker │ ├── cli │ │ ├── AUTHORS │ │ ├── LICENSE │ │ ├── NOTICE │ │ └── cli │ │ │ └── config │ │ │ ├── config.go │ │ │ ├── configfile │ │ │ ├── file.go │ │ │ ├── file_unix.go │ │ │ └── file_windows.go │ │ │ ├── credentials │ │ │ ├── credentials.go │ │ │ ├── default_store.go │ │ │ ├── default_store_darwin.go │ │ │ ├── default_store_linux.go │ │ │ ├── default_store_unsupported.go │ │ │ ├── default_store_windows.go │ │ │ ├── file_store.go │ │ │ └── native_store.go │ │ │ └── types │ │ │ └── authconfig.go │ ├── distribution │ │ ├── LICENSE │ │ └── registry │ │ │ └── client │ │ │ └── auth │ │ │ └── challenge │ │ │ ├── addr.go │ │ │ └── authchallenge.go │ ├── docker-credential-helpers │ │ ├── LICENSE │ │ ├── client │ │ │ ├── client.go │ │ │ └── command.go │ │ └── credentials │ │ │ ├── credentials.go │ │ │ ├── error.go │ │ │ ├── helper.go │ │ │ └── version.go │ └── go-units │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── MAINTAINERS │ │ ├── README.md │ │ ├── circle.yml │ │ ├── duration.go │ │ ├── size.go │ │ └── ulimit.go ├── fatih │ └── color │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── color.go │ │ ├── color_windows.go │ │ └── doc.go ├── google │ └── go-containerregistry │ │ ├── LICENSE │ │ ├── internal │ │ ├── and │ │ │ └── and_closer.go │ │ ├── compression │ │ │ └── compression.go │ │ ├── estargz │ │ │ └── estargz.go │ │ ├── gzip │ │ │ └── zip.go │ │ ├── redact │ │ │ └── redact.go │ │ ├── retry │ │ │ ├── retry.go │ │ │ └── wait │ │ │ │ └── kubernetes_apimachinery_wait.go │ │ ├── verify │ │ │ └── verify.go │ │ ├── windows │ │ │ └── windows.go │ │ └── zstd │ │ │ └── zstd.go │ │ └── pkg │ │ ├── authn │ │ ├── README.md │ │ ├── anon.go │ │ ├── auth.go │ │ ├── authn.go │ │ ├── basic.go │ │ ├── bearer.go │ │ ├── doc.go │ │ ├── keychain.go │ │ └── multikeychain.go │ │ ├── compression │ │ └── compression.go │ │ ├── crane │ │ ├── append.go │ │ ├── catalog.go │ │ ├── config.go │ │ ├── copy.go │ │ ├── delete.go │ │ ├── digest.go │ │ ├── doc.go │ │ ├── export.go │ │ ├── filemap.go │ │ ├── get.go │ │ ├── list.go │ │ ├── manifest.go │ │ ├── options.go │ │ ├── pull.go │ │ ├── push.go │ │ └── tag.go │ │ ├── legacy │ │ ├── config.go │ │ ├── doc.go │ │ └── tarball │ │ │ ├── README.md │ │ │ ├── doc.go │ │ │ └── write.go │ │ ├── logs │ │ └── logs.go │ │ ├── name │ │ ├── README.md │ │ ├── check.go │ │ ├── digest.go │ │ ├── doc.go │ │ ├── errors.go │ │ ├── options.go │ │ ├── ref.go │ │ ├── registry.go │ │ ├── repository.go │ │ └── tag.go │ │ └── v1 │ │ ├── config.go │ │ ├── doc.go │ │ ├── empty │ │ ├── README.md │ │ ├── doc.go │ │ ├── image.go │ │ └── index.go │ │ ├── hash.go │ │ ├── image.go │ │ ├── index.go │ │ ├── layer.go │ │ ├── layout │ │ ├── README.md │ │ ├── blob.go │ │ ├── doc.go │ │ ├── gc.go │ │ ├── image.go │ │ ├── index.go │ │ ├── layoutpath.go │ │ ├── options.go │ │ ├── read.go │ │ └── write.go │ │ ├── manifest.go │ │ ├── match │ │ └── match.go │ │ ├── mutate │ │ ├── README.md │ │ ├── doc.go │ │ ├── image.go │ │ ├── index.go │ │ ├── mutate.go │ │ └── rebase.go │ │ ├── partial │ │ ├── README.md │ │ ├── compressed.go │ │ ├── doc.go │ │ ├── image.go │ │ ├── index.go │ │ ├── uncompressed.go │ │ └── with.go │ │ ├── platform.go │ │ ├── progress.go │ │ ├── remote │ │ ├── README.md │ │ ├── catalog.go │ │ ├── check.go │ │ ├── delete.go │ │ ├── descriptor.go │ │ ├── doc.go │ │ ├── fetcher.go │ │ ├── image.go │ │ ├── index.go │ │ ├── layer.go │ │ ├── list.go │ │ ├── mount.go │ │ ├── multi_write.go │ │ ├── options.go │ │ ├── progress.go │ │ ├── puller.go │ │ ├── pusher.go │ │ ├── referrers.go │ │ ├── schema1.go │ │ ├── transport │ │ │ ├── README.md │ │ │ ├── basic.go │ │ │ ├── bearer.go │ │ │ ├── doc.go │ │ │ ├── error.go │ │ │ ├── logger.go │ │ │ ├── ping.go │ │ │ ├── retry.go │ │ │ ├── schemer.go │ │ │ ├── scope.go │ │ │ ├── transport.go │ │ │ └── useragent.go │ │ └── write.go │ │ ├── stream │ │ ├── README.md │ │ └── layer.go │ │ ├── tarball │ │ ├── README.md │ │ ├── doc.go │ │ ├── image.go │ │ ├── layer.go │ │ └── write.go │ │ ├── types │ │ └── types.go │ │ └── zz_deepcopy_generated.go ├── inconshreveable │ └── mousetrap │ │ ├── LICENSE │ │ ├── README.md │ │ ├── trap_others.go │ │ └── trap_windows.go ├── klauspost │ └── compress │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── .goreleaser.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── compressible.go │ │ ├── fse │ │ ├── README.md │ │ ├── bitreader.go │ │ ├── bitwriter.go │ │ ├── bytereader.go │ │ ├── compress.go │ │ ├── decompress.go │ │ └── fse.go │ │ ├── gen.sh │ │ ├── huff0 │ │ ├── .gitignore │ │ ├── README.md │ │ ├── bitreader.go │ │ ├── bitwriter.go │ │ ├── compress.go │ │ ├── decompress.go │ │ ├── decompress_amd64.go │ │ ├── decompress_amd64.s │ │ ├── decompress_generic.go │ │ └── huff0.go │ │ ├── internal │ │ ├── cpuinfo │ │ │ ├── cpuinfo.go │ │ │ ├── cpuinfo_amd64.go │ │ │ └── cpuinfo_amd64.s │ │ ├── le │ │ │ ├── le.go │ │ │ ├── unsafe_disabled.go │ │ │ └── unsafe_enabled.go │ │ └── snapref │ │ │ ├── LICENSE │ │ │ ├── decode.go │ │ │ ├── decode_other.go │ │ │ ├── encode.go │ │ │ ├── encode_other.go │ │ │ └── snappy.go │ │ ├── s2sx.mod │ │ ├── s2sx.sum │ │ └── zstd │ │ ├── README.md │ │ ├── bitreader.go │ │ ├── bitwriter.go │ │ ├── blockdec.go │ │ ├── blockenc.go │ │ ├── blocktype_string.go │ │ ├── bytebuf.go │ │ ├── bytereader.go │ │ ├── decodeheader.go │ │ ├── decoder.go │ │ ├── decoder_options.go │ │ ├── dict.go │ │ ├── enc_base.go │ │ ├── enc_best.go │ │ ├── enc_better.go │ │ ├── enc_dfast.go │ │ ├── enc_fast.go │ │ ├── encoder.go │ │ ├── encoder_options.go │ │ ├── framedec.go │ │ ├── frameenc.go │ │ ├── fse_decoder.go │ │ ├── fse_decoder_amd64.go │ │ ├── fse_decoder_amd64.s │ │ ├── fse_decoder_generic.go │ │ ├── fse_encoder.go │ │ ├── fse_predefined.go │ │ ├── hash.go │ │ ├── history.go │ │ ├── internal │ │ └── xxhash │ │ │ ├── LICENSE.txt │ │ │ ├── README.md │ │ │ ├── xxhash.go │ │ │ ├── xxhash_amd64.s │ │ │ ├── xxhash_arm64.s │ │ │ ├── xxhash_asm.go │ │ │ ├── xxhash_other.go │ │ │ └── xxhash_safe.go │ │ ├── matchlen_amd64.go │ │ ├── matchlen_amd64.s │ │ ├── matchlen_generic.go │ │ ├── seqdec.go │ │ ├── seqdec_amd64.go │ │ ├── seqdec_amd64.s │ │ ├── seqdec_generic.go │ │ ├── seqenc.go │ │ ├── snappy.go │ │ ├── zip.go │ │ └── zstd.go ├── mattn │ ├── go-colorable │ │ ├── LICENSE │ │ ├── README.md │ │ ├── colorable_others.go │ │ ├── colorable_windows.go │ │ ├── go.test.sh │ │ └── noncolorable.go │ ├── go-isatty │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc.go │ │ ├── go.test.sh │ │ ├── isatty_bsd.go │ │ ├── isatty_others.go │ │ ├── isatty_plan9.go │ │ ├── isatty_solaris.go │ │ ├── isatty_tcgets.go │ │ └── isatty_windows.go │ └── go-runewidth │ │ ├── LICENSE │ │ ├── README.md │ │ ├── runewidth.go │ │ ├── runewidth_appengine.go │ │ ├── runewidth_js.go │ │ ├── runewidth_posix.go │ │ ├── runewidth_table.go │ │ └── runewidth_windows.go ├── mitchellh │ └── go-homedir │ │ ├── LICENSE │ │ ├── README.md │ │ └── homedir.go ├── morikuni │ └── aec │ │ ├── LICENSE │ │ ├── README.md │ │ ├── aec.go │ │ ├── ansi.go │ │ ├── builder.go │ │ ├── sample.gif │ │ └── sgr.go ├── olekukonko │ └── tablewriter │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── csv.go │ │ ├── table.go │ │ ├── table_with_color.go │ │ ├── util.go │ │ └── wrap.go ├── opencontainers │ ├── go-digest │ │ ├── .mailmap │ │ ├── .pullapprove.yml │ │ ├── .travis.yml │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── LICENSE.docs │ │ ├── MAINTAINERS │ │ ├── README.md │ │ ├── algorithm.go │ │ ├── digest.go │ │ ├── digester.go │ │ ├── doc.go │ │ └── verifiers.go │ └── image-spec │ │ ├── LICENSE │ │ └── specs-go │ │ ├── v1 │ │ ├── annotations.go │ │ ├── config.go │ │ ├── descriptor.go │ │ ├── index.go │ │ ├── layout.go │ │ ├── manifest.go │ │ └── mediatype.go │ │ ├── version.go │ │ └── versioned.go ├── otiai10 │ ├── copy │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── copy.go │ │ ├── copy_namedpipes.go │ │ ├── copy_namedpipes_x.go │ │ ├── options.go │ │ ├── permission_control.go │ │ ├── preserve_ltimes.go │ │ ├── preserve_ltimes_x.go │ │ ├── preserve_owner.go │ │ ├── preserve_owner_x.go │ │ ├── preserve_times.go │ │ ├── stat_times.go │ │ ├── stat_times_darwin.go │ │ ├── stat_times_freebsd.go │ │ ├── stat_times_js.go │ │ ├── stat_times_windows.go │ │ ├── stat_times_x.go │ │ └── symlink_test_x.go │ └── mint │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── because.go │ │ ├── comparer.go │ │ ├── exit.go │ │ ├── exit_freebsd.go │ │ ├── log.go │ │ ├── mint.go │ │ ├── mocks.go │ │ ├── mquery │ │ ├── README.md │ │ └── mquery.go │ │ ├── result.go │ │ └── testee.go ├── pkg │ └── errors │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── errors.go │ │ ├── go113.go │ │ └── stack.go ├── rivo │ └── uniseg │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── doc.go │ │ ├── eastasianwidth.go │ │ ├── emojipresentation.go │ │ ├── gen_breaktest.go │ │ ├── gen_properties.go │ │ ├── grapheme.go │ │ ├── graphemeproperties.go │ │ ├── graphemerules.go │ │ ├── line.go │ │ ├── lineproperties.go │ │ ├── linerules.go │ │ ├── properties.go │ │ ├── sentence.go │ │ ├── sentenceproperties.go │ │ ├── sentencerules.go │ │ ├── step.go │ │ ├── width.go │ │ ├── word.go │ │ ├── wordproperties.go │ │ └── wordrules.go ├── sethvargo │ └── go-password │ │ ├── LICENSE │ │ └── password │ │ ├── generate.go │ │ └── mock.go ├── sirupsen │ └── logrus │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── alt_exit.go │ │ ├── appveyor.yml │ │ ├── buffer_pool.go │ │ ├── doc.go │ │ ├── entry.go │ │ ├── exported.go │ │ ├── formatter.go │ │ ├── hooks.go │ │ ├── json_formatter.go │ │ ├── logger.go │ │ ├── logrus.go │ │ ├── terminal_check_appengine.go │ │ ├── terminal_check_bsd.go │ │ ├── terminal_check_js.go │ │ ├── terminal_check_no_terminal.go │ │ ├── terminal_check_notappengine.go │ │ ├── terminal_check_solaris.go │ │ ├── terminal_check_unix.go │ │ ├── terminal_check_windows.go │ │ ├── text_formatter.go │ │ └── writer.go ├── spf13 │ ├── cobra │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── .mailmap │ │ ├── CONDUCT.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE.txt │ │ ├── MAINTAINERS │ │ ├── Makefile │ │ ├── README.md │ │ ├── active_help.go │ │ ├── args.go │ │ ├── bash_completions.go │ │ ├── bash_completionsV2.go │ │ ├── cobra.go │ │ ├── command.go │ │ ├── command_notwin.go │ │ ├── command_win.go │ │ ├── completions.go │ │ ├── fish_completions.go │ │ ├── flag_groups.go │ │ ├── powershell_completions.go │ │ ├── shell_completions.go │ │ └── zsh_completions.go │ └── pflag │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .golangci.yaml │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bool.go │ │ ├── bool_slice.go │ │ ├── bytes.go │ │ ├── count.go │ │ ├── duration.go │ │ ├── duration_slice.go │ │ ├── flag.go │ │ ├── float32.go │ │ ├── float32_slice.go │ │ ├── float64.go │ │ ├── float64_slice.go │ │ ├── golangflag.go │ │ ├── int.go │ │ ├── int16.go │ │ ├── int32.go │ │ ├── int32_slice.go │ │ ├── int64.go │ │ ├── int64_slice.go │ │ ├── int8.go │ │ ├── int_slice.go │ │ ├── ip.go │ │ ├── ip_slice.go │ │ ├── ipmask.go │ │ ├── ipnet.go │ │ ├── ipnet_slice.go │ │ ├── string.go │ │ ├── string_array.go │ │ ├── string_slice.go │ │ ├── string_to_int.go │ │ ├── string_to_int64.go │ │ ├── string_to_string.go │ │ ├── uint.go │ │ ├── uint16.go │ │ ├── uint32.go │ │ ├── uint64.go │ │ ├── uint8.go │ │ └── uint_slice.go └── vbatts │ └── tar-split │ ├── LICENSE │ └── archive │ └── tar │ ├── common.go │ ├── format.go │ ├── reader.go │ ├── stat_actime1.go │ ├── stat_actime2.go │ ├── stat_unix.go │ ├── strconv.go │ └── writer.go ├── golang.org └── x │ ├── crypto │ ├── LICENSE │ ├── PATENTS │ ├── bcrypt │ │ ├── base64.go │ │ └── bcrypt.go │ └── blowfish │ │ ├── block.go │ │ ├── cipher.go │ │ └── const.go │ ├── mod │ ├── LICENSE │ ├── PATENTS │ └── semver │ │ └── semver.go │ ├── sync │ ├── LICENSE │ ├── PATENTS │ ├── errgroup │ │ └── errgroup.go │ └── semaphore │ │ └── semaphore.go │ └── sys │ ├── LICENSE │ ├── PATENTS │ ├── unix │ ├── .gitignore │ ├── README.md │ ├── affinity_linux.go │ ├── aliases.go │ ├── asm_aix_ppc64.s │ ├── asm_bsd_386.s │ ├── asm_bsd_amd64.s │ ├── asm_bsd_arm.s │ ├── asm_bsd_arm64.s │ ├── asm_bsd_ppc64.s │ ├── asm_bsd_riscv64.s │ ├── asm_linux_386.s │ ├── asm_linux_amd64.s │ ├── asm_linux_arm.s │ ├── asm_linux_arm64.s │ ├── asm_linux_loong64.s │ ├── asm_linux_mips64x.s │ ├── asm_linux_mipsx.s │ ├── asm_linux_ppc64x.s │ ├── asm_linux_riscv64.s │ ├── asm_linux_s390x.s │ ├── asm_openbsd_mips64.s │ ├── asm_solaris_amd64.s │ ├── asm_zos_s390x.s │ ├── auxv.go │ ├── auxv_unsupported.go │ ├── bluetooth_linux.go │ ├── bpxsvc_zos.go │ ├── bpxsvc_zos.s │ ├── cap_freebsd.go │ ├── constants.go │ ├── dev_aix_ppc.go │ ├── dev_aix_ppc64.go │ ├── dev_darwin.go │ ├── dev_dragonfly.go │ ├── dev_freebsd.go │ ├── dev_linux.go │ ├── dev_netbsd.go │ ├── dev_openbsd.go │ ├── dev_zos.go │ ├── dirent.go │ ├── endian_big.go │ ├── endian_little.go │ ├── env_unix.go │ ├── fcntl.go │ ├── fcntl_darwin.go │ ├── fcntl_linux_32bit.go │ ├── fdset.go │ ├── gccgo.go │ ├── gccgo_c.c │ ├── gccgo_linux_amd64.go │ ├── ifreq_linux.go │ ├── ioctl_linux.go │ ├── ioctl_signed.go │ ├── ioctl_unsigned.go │ ├── ioctl_zos.go │ ├── mkall.sh │ ├── mkerrors.sh │ ├── mmap_nomremap.go │ ├── mremap.go │ ├── pagesize_unix.go │ ├── pledge_openbsd.go │ ├── ptrace_darwin.go │ ├── ptrace_ios.go │ ├── race.go │ ├── race0.go │ ├── readdirent_getdents.go │ ├── readdirent_getdirentries.go │ ├── sockcmsg_dragonfly.go │ ├── sockcmsg_linux.go │ ├── sockcmsg_unix.go │ ├── sockcmsg_unix_other.go │ ├── sockcmsg_zos.go │ ├── symaddr_zos_s390x.s │ ├── syscall.go │ ├── syscall_aix.go │ ├── syscall_aix_ppc.go │ ├── syscall_aix_ppc64.go │ ├── syscall_bsd.go │ ├── syscall_darwin.go │ ├── syscall_darwin_amd64.go │ ├── syscall_darwin_arm64.go │ ├── syscall_darwin_libSystem.go │ ├── syscall_dragonfly.go │ ├── syscall_dragonfly_amd64.go │ ├── syscall_freebsd.go │ ├── syscall_freebsd_386.go │ ├── syscall_freebsd_amd64.go │ ├── syscall_freebsd_arm.go │ ├── syscall_freebsd_arm64.go │ ├── syscall_freebsd_riscv64.go │ ├── syscall_hurd.go │ ├── syscall_hurd_386.go │ ├── syscall_illumos.go │ ├── syscall_linux.go │ ├── syscall_linux_386.go │ ├── syscall_linux_alarm.go │ ├── syscall_linux_amd64.go │ ├── syscall_linux_amd64_gc.go │ ├── syscall_linux_arm.go │ ├── syscall_linux_arm64.go │ ├── syscall_linux_gc.go │ ├── syscall_linux_gc_386.go │ ├── syscall_linux_gc_arm.go │ ├── syscall_linux_gccgo_386.go │ ├── syscall_linux_gccgo_arm.go │ ├── syscall_linux_loong64.go │ ├── syscall_linux_mips64x.go │ ├── syscall_linux_mipsx.go │ ├── syscall_linux_ppc.go │ ├── syscall_linux_ppc64x.go │ ├── syscall_linux_riscv64.go │ ├── syscall_linux_s390x.go │ ├── syscall_linux_sparc64.go │ ├── syscall_netbsd.go │ ├── syscall_netbsd_386.go │ ├── syscall_netbsd_amd64.go │ ├── syscall_netbsd_arm.go │ ├── syscall_netbsd_arm64.go │ ├── syscall_openbsd.go │ ├── syscall_openbsd_386.go │ ├── syscall_openbsd_amd64.go │ ├── syscall_openbsd_arm.go │ ├── syscall_openbsd_arm64.go │ ├── syscall_openbsd_libc.go │ ├── syscall_openbsd_mips64.go │ ├── syscall_openbsd_ppc64.go │ ├── syscall_openbsd_riscv64.go │ ├── syscall_solaris.go │ ├── syscall_solaris_amd64.go │ ├── syscall_unix.go │ ├── syscall_unix_gc.go │ ├── syscall_unix_gc_ppc64x.go │ ├── syscall_zos_s390x.go │ ├── sysvshm_linux.go │ ├── sysvshm_unix.go │ ├── sysvshm_unix_other.go │ ├── timestruct.go │ ├── unveil_openbsd.go │ ├── vgetrandom_linux.go │ ├── vgetrandom_unsupported.go │ ├── xattr_bsd.go │ ├── zerrors_aix_ppc.go │ ├── zerrors_aix_ppc64.go │ ├── zerrors_darwin_amd64.go │ ├── zerrors_darwin_arm64.go │ ├── zerrors_dragonfly_amd64.go │ ├── zerrors_freebsd_386.go │ ├── zerrors_freebsd_amd64.go │ ├── zerrors_freebsd_arm.go │ ├── zerrors_freebsd_arm64.go │ ├── zerrors_freebsd_riscv64.go │ ├── zerrors_linux.go │ ├── zerrors_linux_386.go │ ├── zerrors_linux_amd64.go │ ├── zerrors_linux_arm.go │ ├── zerrors_linux_arm64.go │ ├── zerrors_linux_loong64.go │ ├── zerrors_linux_mips.go │ ├── zerrors_linux_mips64.go │ ├── zerrors_linux_mips64le.go │ ├── zerrors_linux_mipsle.go │ ├── zerrors_linux_ppc.go │ ├── zerrors_linux_ppc64.go │ ├── zerrors_linux_ppc64le.go │ ├── zerrors_linux_riscv64.go │ ├── zerrors_linux_s390x.go │ ├── zerrors_linux_sparc64.go │ ├── zerrors_netbsd_386.go │ ├── zerrors_netbsd_amd64.go │ ├── zerrors_netbsd_arm.go │ ├── zerrors_netbsd_arm64.go │ ├── zerrors_openbsd_386.go │ ├── zerrors_openbsd_amd64.go │ ├── zerrors_openbsd_arm.go │ ├── zerrors_openbsd_arm64.go │ ├── zerrors_openbsd_mips64.go │ ├── zerrors_openbsd_ppc64.go │ ├── zerrors_openbsd_riscv64.go │ ├── zerrors_solaris_amd64.go │ ├── zerrors_zos_s390x.go │ ├── zptrace_armnn_linux.go │ ├── zptrace_linux_arm64.go │ ├── zptrace_mipsnn_linux.go │ ├── zptrace_mipsnnle_linux.go │ ├── zptrace_x86_linux.go │ ├── zsymaddr_zos_s390x.s │ ├── zsyscall_aix_ppc.go │ ├── zsyscall_aix_ppc64.go │ ├── zsyscall_aix_ppc64_gc.go │ ├── zsyscall_aix_ppc64_gccgo.go │ ├── zsyscall_darwin_amd64.go │ ├── zsyscall_darwin_amd64.s │ ├── zsyscall_darwin_arm64.go │ ├── zsyscall_darwin_arm64.s │ ├── zsyscall_dragonfly_amd64.go │ ├── zsyscall_freebsd_386.go │ ├── zsyscall_freebsd_amd64.go │ ├── zsyscall_freebsd_arm.go │ ├── zsyscall_freebsd_arm64.go │ ├── zsyscall_freebsd_riscv64.go │ ├── zsyscall_illumos_amd64.go │ ├── zsyscall_linux.go │ ├── zsyscall_linux_386.go │ ├── zsyscall_linux_amd64.go │ ├── zsyscall_linux_arm.go │ ├── zsyscall_linux_arm64.go │ ├── zsyscall_linux_loong64.go │ ├── zsyscall_linux_mips.go │ ├── zsyscall_linux_mips64.go │ ├── zsyscall_linux_mips64le.go │ ├── zsyscall_linux_mipsle.go │ ├── zsyscall_linux_ppc.go │ ├── zsyscall_linux_ppc64.go │ ├── zsyscall_linux_ppc64le.go │ ├── zsyscall_linux_riscv64.go │ ├── zsyscall_linux_s390x.go │ ├── zsyscall_linux_sparc64.go │ ├── zsyscall_netbsd_386.go │ ├── zsyscall_netbsd_amd64.go │ ├── zsyscall_netbsd_arm.go │ ├── zsyscall_netbsd_arm64.go │ ├── zsyscall_openbsd_386.go │ ├── zsyscall_openbsd_386.s │ ├── zsyscall_openbsd_amd64.go │ ├── zsyscall_openbsd_amd64.s │ ├── zsyscall_openbsd_arm.go │ ├── zsyscall_openbsd_arm.s │ ├── zsyscall_openbsd_arm64.go │ ├── zsyscall_openbsd_arm64.s │ ├── zsyscall_openbsd_mips64.go │ ├── zsyscall_openbsd_mips64.s │ ├── zsyscall_openbsd_ppc64.go │ ├── zsyscall_openbsd_ppc64.s │ ├── zsyscall_openbsd_riscv64.go │ ├── zsyscall_openbsd_riscv64.s │ ├── zsyscall_solaris_amd64.go │ ├── zsyscall_zos_s390x.go │ ├── zsysctl_openbsd_386.go │ ├── zsysctl_openbsd_amd64.go │ ├── zsysctl_openbsd_arm.go │ ├── zsysctl_openbsd_arm64.go │ ├── zsysctl_openbsd_mips64.go │ ├── zsysctl_openbsd_ppc64.go │ ├── zsysctl_openbsd_riscv64.go │ ├── zsysnum_darwin_amd64.go │ ├── zsysnum_darwin_arm64.go │ ├── zsysnum_dragonfly_amd64.go │ ├── zsysnum_freebsd_386.go │ ├── zsysnum_freebsd_amd64.go │ ├── zsysnum_freebsd_arm.go │ ├── zsysnum_freebsd_arm64.go │ ├── zsysnum_freebsd_riscv64.go │ ├── zsysnum_linux_386.go │ ├── zsysnum_linux_amd64.go │ ├── zsysnum_linux_arm.go │ ├── zsysnum_linux_arm64.go │ ├── zsysnum_linux_loong64.go │ ├── zsysnum_linux_mips.go │ ├── zsysnum_linux_mips64.go │ ├── zsysnum_linux_mips64le.go │ ├── zsysnum_linux_mipsle.go │ ├── zsysnum_linux_ppc.go │ ├── zsysnum_linux_ppc64.go │ ├── zsysnum_linux_ppc64le.go │ ├── zsysnum_linux_riscv64.go │ ├── zsysnum_linux_s390x.go │ ├── zsysnum_linux_sparc64.go │ ├── zsysnum_netbsd_386.go │ ├── zsysnum_netbsd_amd64.go │ ├── zsysnum_netbsd_arm.go │ ├── zsysnum_netbsd_arm64.go │ ├── zsysnum_openbsd_386.go │ ├── zsysnum_openbsd_amd64.go │ ├── zsysnum_openbsd_arm.go │ ├── zsysnum_openbsd_arm64.go │ ├── zsysnum_openbsd_mips64.go │ ├── zsysnum_openbsd_ppc64.go │ ├── zsysnum_openbsd_riscv64.go │ ├── zsysnum_zos_s390x.go │ ├── ztypes_aix_ppc.go │ ├── ztypes_aix_ppc64.go │ ├── ztypes_darwin_amd64.go │ ├── ztypes_darwin_arm64.go │ ├── ztypes_dragonfly_amd64.go │ ├── ztypes_freebsd_386.go │ ├── ztypes_freebsd_amd64.go │ ├── ztypes_freebsd_arm.go │ ├── ztypes_freebsd_arm64.go │ ├── ztypes_freebsd_riscv64.go │ ├── ztypes_linux.go │ ├── ztypes_linux_386.go │ ├── ztypes_linux_amd64.go │ ├── ztypes_linux_arm.go │ ├── ztypes_linux_arm64.go │ ├── ztypes_linux_loong64.go │ ├── ztypes_linux_mips.go │ ├── ztypes_linux_mips64.go │ ├── ztypes_linux_mips64le.go │ ├── ztypes_linux_mipsle.go │ ├── ztypes_linux_ppc.go │ ├── ztypes_linux_ppc64.go │ ├── ztypes_linux_ppc64le.go │ ├── ztypes_linux_riscv64.go │ ├── ztypes_linux_s390x.go │ ├── ztypes_linux_sparc64.go │ ├── ztypes_netbsd_386.go │ ├── ztypes_netbsd_amd64.go │ ├── ztypes_netbsd_arm.go │ ├── ztypes_netbsd_arm64.go │ ├── ztypes_openbsd_386.go │ ├── ztypes_openbsd_amd64.go │ ├── ztypes_openbsd_arm.go │ ├── ztypes_openbsd_arm64.go │ ├── ztypes_openbsd_mips64.go │ ├── ztypes_openbsd_ppc64.go │ ├── ztypes_openbsd_riscv64.go │ ├── ztypes_solaris_amd64.go │ └── ztypes_zos_s390x.go │ └── 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 ├── gopkg.in └── yaml.v3 │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── apic.go │ ├── decode.go │ ├── emitterc.go │ ├── encode.go │ ├── parserc.go │ ├── readerc.go │ ├── resolve.go │ ├── scannerc.go │ ├── sorter.go │ ├── writerc.go │ ├── yaml.go │ ├── yamlh.go │ └── yamlprivateh.go └── modules.txt /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | @alexellis 2 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | # reference: https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates 3 | updates: 4 | - package-ecosystem: "gomod" 5 | directory: "/" 6 | schedule: 7 | interval: "daily" 8 | - package-ecosystem: "github-actions" 9 | directory: "/" 10 | schedule: 11 | interval: "daily" -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | 3 | on: 4 | push: 5 | branches: 6 | - '*' 7 | pull_request: 8 | branches: 9 | - '*' 10 | 11 | jobs: 12 | build: 13 | concurrency: 14 | group: ${{ github.ref }} 15 | cancel-in-progress: true 16 | 17 | runs-on: ubuntu-latest 18 | steps: 19 | - uses: actions/checkout@master 20 | with: 21 | fetch-depth: 1 22 | - name: Install Go 23 | uses: actions/setup-go@master 24 | with: 25 | go-version: 1.23.x 26 | - name: Make all 27 | run: make all 28 | -------------------------------------------------------------------------------- /.github/workflows/e2e-url-checker.yml: -------------------------------------------------------------------------------- 1 | name: e2e-url-checker 2 | 3 | on: 4 | schedule: 5 | - cron: '0 0 * * *' 6 | push: 7 | branches: 8 | - '*' 9 | pull_request: 10 | branches: 11 | - '*' 12 | 13 | jobs: 14 | build: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@master 18 | with: 19 | fetch-depth: 1 20 | - name: Install Go 21 | uses: actions/setup-go@master 22 | with: 23 | go-version: 1.23.x 24 | - name: Run URL checker tests 25 | run: make e2e 26 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: publish 2 | 3 | on: 4 | push: 5 | tags: 6 | - '*' 7 | 8 | jobs: 9 | publish: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@master 13 | with: 14 | fetch-depth: 1 15 | - name: Install Go 16 | uses: actions/setup-go@master 17 | with: 18 | go-version: 1.23.x 19 | - name: Make all 20 | run: make all 21 | - name: Upload release binaries 22 | uses: alexellis/upload-assets@0.4.1 23 | env: 24 | GITHUB_TOKEN: ${{ github.token }} 25 | with: 26 | asset_paths: '["./bin/arkade*"]' 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | arkade 2 | arkade.exe 3 | bin/** 4 | kubeconfig 5 | .DS_Store 6 | .idea/ 7 | mc 8 | /arkade-* 9 | /faas-cli* 10 | test.out 11 | docker-compose.yaml* -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Alex Ellis 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. -------------------------------------------------------------------------------- /cmd/apps/messages.go: -------------------------------------------------------------------------------- 1 | package apps 2 | 3 | var ( 4 | IntelArch = "amd64" 5 | OnlyIntelArch = `only Intel, i.e. PC architecture is supported for this app` 6 | ) 7 | -------------------------------------------------------------------------------- /cmd/apps/openfaas_app_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) arkade author(s) 2022. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | package apps 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func Test_getValuesSuffix_arm64(t *testing.T) { 11 | want := "-arm64" 12 | got := getValuesSuffix("arm64") 13 | if want != got { 14 | t.Errorf("suffix, want: %s, got: %s", want, got) 15 | } 16 | } 17 | 18 | func Test_getValuesSuffix_aarch64(t *testing.T) { 19 | want := "-arm64" 20 | got := getValuesSuffix("aarch64") 21 | if want != got { 22 | t.Errorf("suffix, want: %s, got: %s", want, got) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /cmd/chart/chart.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) arkade author(s) 2022. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | // chart contains packages for Linux servers and workstations 5 | package chart 6 | 7 | import ( 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | func MakeChart() *cobra.Command { 12 | 13 | command := &cobra.Command{ 14 | Use: "chart", 15 | Short: "Chart utilities", 16 | Long: `Utilities for Helm charts.`, 17 | Aliases: []string{"c"}, 18 | Example: ` arkade chart verify --help`, 19 | SilenceUsage: true, 20 | } 21 | 22 | command.RunE = func(cmd *cobra.Command, args []string) error { 23 | return cmd.Usage() 24 | } 25 | 26 | command.AddCommand(MakeVerify()) 27 | command.AddCommand(MakeUpgrade()) 28 | command.AddCommand(MakeBump()) 29 | 30 | return command 31 | } 32 | -------------------------------------------------------------------------------- /cmd/get_test.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "strings" 5 | "testing" 6 | ) 7 | 8 | func Test_GetCommandWithInvalidArch(t *testing.T) { 9 | tests := []struct { 10 | args []string 11 | wantError string 12 | }{ 13 | { 14 | args: []string{"kind", "--arch", "invalid"}, 15 | wantError: "cpu architecture \"invalid\" is not supported", 16 | }, 17 | { 18 | args: []string{"kind", "--os", "invalid"}, 19 | wantError: "operating system \"invalid\" is not supported", 20 | }, 21 | } 22 | 23 | for _, tc := range tests { 24 | cmd := MakeGet() 25 | cmd.SetArgs(tc.args) 26 | err := cmd.Execute() 27 | 28 | if !strings.Contains(err.Error(), tc.wantError) { 29 | t.Fatalf("for args %q\n want: %q\n but got: %q", tc.args, tc.wantError, err) 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /cmd/oci/oci.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) arkade author(s) 2022. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | // system contains packages for Linux servers and workstations 5 | package oci 6 | 7 | import ( 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | func MakeOci() *cobra.Command { 12 | 13 | command := &cobra.Command{ 14 | Use: "oci", 15 | Aliases: []string{"o"}, 16 | Short: "oci apps", 17 | Long: `Apps from OCI images.`, 18 | Example: ` arkade oci install [container image] 19 | arkade oci i [container image]`, 20 | SilenceUsage: true, 21 | } 22 | 23 | command.RunE = func(cmd *cobra.Command, args []string) error { 24 | return cmd.Usage() 25 | } 26 | 27 | command.AddCommand(MakeOciInstall()) 28 | 29 | return command 30 | } 31 | -------------------------------------------------------------------------------- /cmd/system/common.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | const ( 4 | githubDownloadTemplate = "https://github.com/%s/%s/releases/download/%s/%s" 5 | githubLatest = "latest" 6 | 7 | readWriteExecuteEveryone = 0755 8 | ) 9 | -------------------------------------------------------------------------------- /cmd/system/system.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) arkade author(s) 2022. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | // system contains packages for Linux servers and workstations 5 | package system 6 | 7 | import ( 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | func MakeSystem() *cobra.Command { 12 | 13 | command := &cobra.Command{ 14 | Use: "system", 15 | Short: "System apps", 16 | Long: `Apps for systems.`, 17 | Aliases: []string{"s"}, 18 | Example: ` arkade system install [APP] 19 | arkade s i [APP]`, 20 | SilenceUsage: true, 21 | } 22 | 23 | command.RunE = func(cmd *cobra.Command, args []string) error { 24 | return cmd.Usage() 25 | } 26 | 27 | command.AddCommand(MakeInstall()) 28 | 29 | return command 30 | } 31 | -------------------------------------------------------------------------------- /docs/arkade-logo-sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexellis/arkade/fcf9eff85478d1fc5fcd5f7c66528c174594a0b8/docs/arkade-logo-sm.png -------------------------------------------------------------------------------- /docs/arkade-swag.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexellis/arkade/fcf9eff85478d1fc5fcd5f7c66528c174594a0b8/docs/arkade-swag.jpg -------------------------------------------------------------------------------- /hack/hashgen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | for f in bin/arkade*; do shasum -a 256 $f > $f.sha256; done 4 | -------------------------------------------------------------------------------- /hack/platform-tag.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | getPackage() { 4 | suffix="" 5 | arch=$(uname -m) 6 | case $arch in 7 | "aarch64") 8 | suffix="-arm64" 9 | ;; 10 | esac 11 | case $arch in 12 | "armv6l" | "armv7l") 13 | suffix="-armhf" 14 | ;; 15 | esac 16 | } 17 | 18 | getPackage 19 | echo ${suffix} 20 | -------------------------------------------------------------------------------- /hack/test-tool.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z $1 ]; 4 | then 5 | echo "test-tool.sh" 6 | echo "" 7 | echo "Downloads the tool for all supported operating systems and" 8 | echo "CPU architectures. Print the file type for manual checking" 9 | echo "This often finds issues with PRs that are not caught by" 10 | echo "unit test alone" 11 | echo 12 | echo usage: test-tool.sh TOOLNAME 13 | exit 1 14 | fi 15 | 16 | set -x 17 | 18 | ./arkade get $1 --arch arm64 --os darwin --quiet && file $HOME/.arkade/bin/$1 && rm $HOME/.arkade/bin/$1 && echo 19 | 20 | ./arkade get $1 --arch x86_64 --os darwin --quiet && file $HOME/.arkade/bin/$1 && rm $HOME/.arkade/bin/$1 && echo 21 | 22 | ./arkade get $1 --arch x86_64 --os linux --quiet && file $HOME/.arkade/bin/$1 && rm $HOME/.arkade/bin/$1 && echo 23 | 24 | ./arkade get $1 --arch aarch64 --os linux --quiet && file $HOME/.arkade/bin/$1 && rm $HOME/.arkade/bin/$1 && echo 25 | 26 | ./arkade get $1 --arch x86_64 --os mingw --quiet && file $HOME/.arkade/bin/$1.exe && rm $HOME/.arkade/bin/$1.exe && echo 27 | 28 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) arkade author(s) 2022. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | package main 5 | 6 | import ( 7 | "os" 8 | 9 | "github.com/alexellis/arkade/cmd" 10 | "github.com/alexellis/arkade/cmd/chart" 11 | "github.com/alexellis/arkade/cmd/oci" 12 | "github.com/alexellis/arkade/cmd/system" 13 | "github.com/spf13/cobra" 14 | ) 15 | 16 | func main() { 17 | printarkadeASCIIArt := cmd.PrintArkadeASCIIArt 18 | 19 | var rootCmd = &cobra.Command{ 20 | Use: "arkade", 21 | Run: func(cmd *cobra.Command, args []string) { 22 | printarkadeASCIIArt() 23 | cmd.Help() 24 | }, 25 | } 26 | 27 | rootCmd.AddCommand(cmd.MakeInstall()) 28 | rootCmd.AddCommand(cmd.MakeVersion()) 29 | rootCmd.AddCommand(cmd.MakeInfo()) 30 | rootCmd.AddCommand(cmd.MakeUpdate()) 31 | rootCmd.AddCommand(cmd.MakeGet()) 32 | rootCmd.AddCommand(cmd.MakeUninstall()) 33 | rootCmd.AddCommand(cmd.MakeShellCompletion()) 34 | 35 | rootCmd.AddCommand(chart.MakeChart()) 36 | rootCmd.AddCommand(system.MakeSystem()) 37 | rootCmd.AddCommand(oci.MakeOci()) 38 | 39 | if err := rootCmd.Execute(); err != nil { 40 | os.Exit(1) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /pkg/config/file.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "os" 5 | 6 | "gopkg.in/yaml.v3" 7 | ) 8 | 9 | type ArkadeConfig struct { 10 | Ignore []string `yaml:"ignore"` 11 | } 12 | 13 | func Load(file string) (*ArkadeConfig, error) { 14 | 15 | data, err := os.ReadFile(file) 16 | if err != nil { 17 | return nil, err 18 | } 19 | 20 | cfg := &ArkadeConfig{} 21 | 22 | if err := yaml.Unmarshal(data, cfg); err != nil { 23 | return nil, err 24 | } 25 | 26 | return cfg, nil 27 | } 28 | -------------------------------------------------------------------------------- /pkg/helm/io_test.go: -------------------------------------------------------------------------------- 1 | package helm 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func Test_LoadFrom(t *testing.T) { 8 | yamlText := `faas-netes: 9 | image: openfaas/faas-netes:0.1.0 10 | ` 11 | 12 | imageWant := `openfaas/faas-netes:0.1.0` 13 | 14 | values, err := LoadFrom(yamlText) 15 | if err != nil { 16 | t.Fatal(err) 17 | } 18 | 19 | imageGot := values["faas-netes"].(ValuesMap)["image"] 20 | if imageGot != imageWant { 21 | t.Fatalf("got %q, want %q", imageGot, imageWant) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /pkg/thanks.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) arkade author(s) 2022. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | package pkg 5 | 6 | // SupportMessageShort shows how to support arkade 7 | const SupportMessageShort = `👏 Say thanks for arkade and sponsor Alex via GitHub: https://github.com/sponsors/alexellis` 8 | -------------------------------------------------------------------------------- /pkg/update/version_check.go: -------------------------------------------------------------------------------- 1 | package update 2 | 3 | import ( 4 | "context" 5 | "os" 6 | "strings" 7 | 8 | "github.com/alexellis/go-execute/v2" 9 | ) 10 | 11 | type VersionCheck interface { 12 | UpdateRequired(target string) (bool, error) 13 | } 14 | 15 | type DefaultVersionCheck struct { 16 | Command string 17 | Argument string 18 | } 19 | 20 | func (d DefaultVersionCheck) UpdateRequired(target string) (bool, error) { 21 | executable, err := os.Executable() 22 | if err != nil { 23 | return false, err 24 | } 25 | 26 | task := execute.ExecTask{ 27 | Command: executable, 28 | Args: []string{"version"}, 29 | } 30 | 31 | res, err := task.Execute(context.TODO()) 32 | if err != nil { 33 | return false, err 34 | } 35 | 36 | if !strings.Contains(res.Stdout, target) { 37 | return true, nil 38 | } 39 | 40 | return false, nil 41 | } 42 | -------------------------------------------------------------------------------- /pkg/version.go: -------------------------------------------------------------------------------- 1 | package pkg 2 | 3 | import "fmt" 4 | 5 | var ( 6 | Version, 7 | GitCommit string 8 | ) 9 | 10 | func UserAgent() string { 11 | return fmt.Sprintf("arkade/%s", Version) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/Masterminds/semver/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.6.x 5 | - 1.7.x 6 | - 1.8.x 7 | - 1.9.x 8 | - 1.10.x 9 | - 1.11.x 10 | - 1.12.x 11 | - tip 12 | 13 | # Setting sudo access to false will let Travis CI use containers rather than 14 | # VMs to run the tests. For more details see: 15 | # - http://docs.travis-ci.com/user/workers/container-based-infrastructure/ 16 | # - http://docs.travis-ci.com/user/workers/standard-infrastructure/ 17 | sudo: false 18 | 19 | script: 20 | - make setup 21 | - make test 22 | 23 | notifications: 24 | webhooks: 25 | urls: 26 | - https://webhooks.gitter.im/e/06e3328629952dabe3e0 27 | on_success: change # options: [always|never|change] default: always 28 | on_failure: always # options: [always|never|change] default: always 29 | on_start: never # options: [always|never|change] default: always 30 | -------------------------------------------------------------------------------- /vendor/github.com/Masterminds/semver/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/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: setup 2 | setup: 3 | go get -u gopkg.in/alecthomas/gometalinter.v1 4 | gometalinter.v1 --install 5 | 6 | .PHONY: test 7 | test: validate lint 8 | @echo "==> Running tests" 9 | go test -v 10 | 11 | .PHONY: validate 12 | validate: 13 | @echo "==> Running static validations" 14 | @gometalinter.v1 \ 15 | --disable-all \ 16 | --enable deadcode \ 17 | --severity deadcode:error \ 18 | --enable gofmt \ 19 | --enable gosimple \ 20 | --enable ineffassign \ 21 | --enable misspell \ 22 | --enable vet \ 23 | --tests \ 24 | --vendor \ 25 | --deadline 60s \ 26 | ./... || exit_code=1 27 | 28 | .PHONY: lint 29 | lint: 30 | @echo "==> Running linters" 31 | @gometalinter.v1 \ 32 | --disable-all \ 33 | --enable golint \ 34 | --vendor \ 35 | --deadline 60s \ 36 | ./... || : 37 | -------------------------------------------------------------------------------- /vendor/github.com/Masterminds/semver/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\Masterminds\semver 4 | shallow_clone: true 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | install: 13 | - go version 14 | - go env 15 | - go get -u gopkg.in/alecthomas/gometalinter.v1 16 | - set PATH=%PATH%;%GOPATH%\bin 17 | - gometalinter.v1.exe --install 18 | 19 | build_script: 20 | - go install -v ./... 21 | 22 | test_script: 23 | - "gometalinter.v1 \ 24 | --disable-all \ 25 | --enable deadcode \ 26 | --severity deadcode:error \ 27 | --enable gofmt \ 28 | --enable gosimple \ 29 | --enable ineffassign \ 30 | --enable misspell \ 31 | --enable vet \ 32 | --tests \ 33 | --vendor \ 34 | --deadline 60s \ 35 | ./... || exit_code=1" 36 | - "gometalinter.v1 \ 37 | --disable-all \ 38 | --enable golint \ 39 | --vendor \ 40 | --deadline 60s \ 41 | ./... || :" 42 | - go test -v 43 | 44 | deploy: off 45 | -------------------------------------------------------------------------------- /vendor/github.com/Masterminds/semver/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/Masterminds/semver/version_fuzz.go: -------------------------------------------------------------------------------- 1 | // +build gofuzz 2 | 3 | package semver 4 | 5 | func Fuzz(data []byte) int { 6 | if _, err := NewVersion(string(data)); err != nil { 7 | return 0 8 | } 9 | return 1 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/VividCortex/ewma/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .*.sw? 3 | /coverage.txt -------------------------------------------------------------------------------- /vendor/github.com/VividCortex/ewma/.whitesource: -------------------------------------------------------------------------------- 1 | { 2 | "settingsInheritedFrom": "VividCortex/whitesource-config@master" 3 | } -------------------------------------------------------------------------------- /vendor/github.com/VividCortex/ewma/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2013 VividCortex 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/VividCortex/ewma/codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: 4 | default: 5 | threshold: 15% 6 | patch: off 7 | -------------------------------------------------------------------------------- /vendor/github.com/alexellis/go-execute/v2/.DEREK.yml: -------------------------------------------------------------------------------- 1 | redirect: https://raw.githubusercontent.com/openfaas/faas/master/.DEREK.yml 2 | -------------------------------------------------------------------------------- /vendor/github.com/alexellis/go-execute/v2/.gitignore: -------------------------------------------------------------------------------- 1 | /go-execute 2 | main.go 3 | -------------------------------------------------------------------------------- /vendor/github.com/alexellis/go-execute/v2/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Alex Ellis 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/alexellis/go-execute/v2/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | go test -v ./... 3 | -------------------------------------------------------------------------------- /vendor/github.com/cheggaaa/pb/v3/pool_win.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package pb 5 | 6 | import ( 7 | "fmt" 8 | "log" 9 | "strings" 10 | 11 | "github.com/cheggaaa/pb/v3/termutil" 12 | ) 13 | 14 | func (p *Pool) print(first bool) bool { 15 | p.m.Lock() 16 | defer p.m.Unlock() 17 | var out string 18 | if !first { 19 | coords, err := termutil.GetCursorPos() 20 | if err != nil { 21 | log.Panic(err) 22 | } 23 | coords.Y -= int16(p.lastBarsCount) 24 | if coords.Y < 0 { 25 | coords.Y = 0 26 | } 27 | coords.X = 0 28 | 29 | err = termutil.SetCursorPos(coords) 30 | if err != nil { 31 | log.Panic(err) 32 | } 33 | } 34 | cols, err := termutil.TerminalWidth() 35 | if err != nil { 36 | cols = defaultBarWidth 37 | } 38 | isFinished := true 39 | for _, bar := range p.bars { 40 | if !bar.IsFinished() { 41 | isFinished = false 42 | } 43 | result := bar.String() 44 | if r := cols - CellCount(result); r > 0 { 45 | result += strings.Repeat(" ", r) 46 | } 47 | out += fmt.Sprintf("\r%s\n", result) 48 | } 49 | if p.Output != nil { 50 | fmt.Fprint(p.Output, out) 51 | } else { 52 | fmt.Print(out) 53 | } 54 | p.lastBarsCount = len(p.bars) 55 | return isFinished 56 | } 57 | -------------------------------------------------------------------------------- /vendor/github.com/cheggaaa/pb/v3/preset.go: -------------------------------------------------------------------------------- 1 | package pb 2 | 3 | var ( 4 | // Full - preset with all default available elements 5 | // Example: 'Prefix 20/100 [-->______] 20% 1 p/s ETA 1m Suffix' 6 | Full ProgressBarTemplate = `{{with string . "prefix"}}{{.}} {{end}}{{counters . }} {{bar . }} {{percent . }} {{speed . }} {{rtime . "ETA %s"}}{{with string . "suffix"}} {{.}}{{end}}` 7 | 8 | // Default - preset like Full but without elapsed time 9 | // Example: 'Prefix 20/100 [-->______] 20% 1 p/s Suffix' 10 | Default ProgressBarTemplate = `{{with string . "prefix"}}{{.}} {{end}}{{counters . }} {{bar . }} {{percent . }} {{speed . }}{{with string . "suffix"}} {{.}}{{end}}` 11 | 12 | // Simple - preset without speed and any timers. Only counters, bar and percents 13 | // Example: 'Prefix 20/100 [-->______] 20% Suffix' 14 | Simple ProgressBarTemplate = `{{with string . "prefix"}}{{.}} {{end}}{{counters . }} {{bar . }} {{percent . }}{{with string . "suffix"}} {{.}}{{end}}` 15 | ) 16 | -------------------------------------------------------------------------------- /vendor/github.com/cheggaaa/pb/v3/termutil/term_appengine.go: -------------------------------------------------------------------------------- 1 | //go:build appengine 2 | // +build appengine 3 | 4 | package termutil 5 | 6 | import "errors" 7 | 8 | // terminalWidth returns width of the terminal, which is not supported 9 | // and should always failed on appengine classic which is a sandboxed PaaS. 10 | func TerminalWidth() (int, error) { 11 | return 0, errors.New("Not supported") 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/cheggaaa/pb/v3/termutil/term_bsd.go: -------------------------------------------------------------------------------- 1 | //go:build (darwin || freebsd || netbsd || openbsd || dragonfly) && !appengine 2 | // +build darwin freebsd netbsd openbsd dragonfly 3 | // +build !appengine 4 | 5 | package termutil 6 | 7 | import "syscall" 8 | 9 | const ioctlReadTermios = syscall.TIOCGETA 10 | const ioctlWriteTermios = syscall.TIOCSETA 11 | -------------------------------------------------------------------------------- /vendor/github.com/cheggaaa/pb/v3/termutil/term_linux.go: -------------------------------------------------------------------------------- 1 | //go:build linux && !appengine 2 | // +build linux,!appengine 3 | 4 | package termutil 5 | 6 | const ioctlReadTermios = 0x5401 // syscall.TCGETS 7 | const ioctlWriteTermios = 0x5402 // syscall.TCSETS 8 | -------------------------------------------------------------------------------- /vendor/github.com/cheggaaa/pb/v3/termutil/term_nix.go: -------------------------------------------------------------------------------- 1 | //go:build (linux || darwin || freebsd || netbsd || openbsd || dragonfly) && !appengine 2 | // +build linux darwin freebsd netbsd openbsd dragonfly 3 | // +build !appengine 4 | 5 | package termutil 6 | 7 | import "syscall" 8 | 9 | const sysIoctl = syscall.SYS_IOCTL 10 | -------------------------------------------------------------------------------- /vendor/github.com/cheggaaa/pb/v3/termutil/term_plan9.go: -------------------------------------------------------------------------------- 1 | package termutil 2 | 3 | import ( 4 | "errors" 5 | "os" 6 | "syscall" 7 | ) 8 | 9 | var ( 10 | consctl *os.File 11 | 12 | // Plan 9 doesn't have syscall.SIGQUIT 13 | unlockSignals = []os.Signal{ 14 | os.Interrupt, syscall.SIGTERM, syscall.SIGKILL, 15 | } 16 | ) 17 | 18 | // TerminalWidth returns width of the terminal. 19 | func TerminalWidth() (int, error) { 20 | return 0, errors.New("Not supported") 21 | } 22 | 23 | func lockEcho() error { 24 | if consctl != nil { 25 | return errors.New("consctl already open") 26 | } 27 | var err error 28 | consctl, err = os.OpenFile("/dev/consctl", os.O_WRONLY, 0) 29 | if err != nil { 30 | return err 31 | } 32 | _, err = consctl.WriteString("rawon") 33 | if err != nil { 34 | consctl.Close() 35 | consctl = nil 36 | return err 37 | } 38 | return nil 39 | } 40 | 41 | func unlockEcho() error { 42 | if consctl == nil { 43 | return nil 44 | } 45 | if err := consctl.Close(); err != nil { 46 | return err 47 | } 48 | consctl = nil 49 | return nil 50 | } 51 | -------------------------------------------------------------------------------- /vendor/github.com/cheggaaa/pb/v3/termutil/term_solaris.go: -------------------------------------------------------------------------------- 1 | //go:build solaris && !appengine 2 | // +build solaris,!appengine 3 | 4 | package termutil 5 | 6 | const ioctlReadTermios = 0x5401 // syscall.TCGETS 7 | const ioctlWriteTermios = 0x5402 // syscall.TCSETS 8 | const sysIoctl = 54 9 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/NOTICE: -------------------------------------------------------------------------------- 1 | Docker 2 | Copyright 2012-2017 Docker, Inc. 3 | 4 | This product includes software developed at Docker, Inc. (https://www.docker.com). 5 | 6 | This product contains software (https://github.com/creack/pty) developed 7 | by Keith Rarick, licensed under the MIT License. 8 | 9 | The following is courtesy of our legal counsel: 10 | 11 | 12 | Use and transfer of Docker may be subject to certain restrictions by the 13 | United States and other governments. 14 | It is your responsibility to ensure that your use and/or transfer does not 15 | violate applicable laws. 16 | 17 | For more information, see https://www.bis.doc.gov 18 | 19 | See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/cli/config/configfile/file_unix.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | 3 | package configfile 4 | 5 | import ( 6 | "os" 7 | "syscall" 8 | ) 9 | 10 | // copyFilePermissions copies file ownership and permissions from "src" to "dst", 11 | // ignoring any error during the process. 12 | func copyFilePermissions(src, dst string) { 13 | var ( 14 | mode os.FileMode = 0o600 15 | uid, gid int 16 | ) 17 | 18 | fi, err := os.Stat(src) 19 | if err != nil { 20 | return 21 | } 22 | if fi.Mode().IsRegular() { 23 | mode = fi.Mode() 24 | } 25 | if err := os.Chmod(dst, mode); err != nil { 26 | return 27 | } 28 | 29 | uid = int(fi.Sys().(*syscall.Stat_t).Uid) 30 | gid = int(fi.Sys().(*syscall.Stat_t).Gid) 31 | 32 | if uid > 0 && gid > 0 { 33 | _ = os.Chown(dst, uid, gid) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/cli/config/configfile/file_windows.go: -------------------------------------------------------------------------------- 1 | package configfile 2 | 3 | func copyFilePermissions(src, dst string) { 4 | // TODO implement for Windows 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/cli/config/credentials/credentials.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | import ( 4 | "github.com/docker/cli/cli/config/types" 5 | ) 6 | 7 | // Store is the interface that any credentials store must implement. 8 | type Store interface { 9 | // Erase removes credentials from the store for a given server. 10 | Erase(serverAddress string) error 11 | // Get retrieves credentials from the store for a given server. 12 | Get(serverAddress string) (types.AuthConfig, error) 13 | // GetAll retrieves all the credentials from the store. 14 | GetAll() (map[string]types.AuthConfig, error) 15 | // Store saves credentials in the store. 16 | Store(authConfig types.AuthConfig) error 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/cli/config/credentials/default_store.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | import "os/exec" 4 | 5 | // DetectDefaultStore return the default credentials store for the platform if 6 | // no user-defined store is passed, and the store executable is available. 7 | func DetectDefaultStore(store string) string { 8 | if store != "" { 9 | // use user-defined 10 | return store 11 | } 12 | 13 | platformDefault := defaultCredentialsStore() 14 | if platformDefault == "" { 15 | return "" 16 | } 17 | 18 | if _, err := exec.LookPath(remoteCredentialsPrefix + platformDefault); err != nil { 19 | return "" 20 | } 21 | return platformDefault 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/cli/config/credentials/default_store_darwin.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | func defaultCredentialsStore() string { 4 | return "osxkeychain" 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/cli/config/credentials/default_store_linux.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | import ( 4 | "os/exec" 5 | ) 6 | 7 | func defaultCredentialsStore() string { 8 | if _, err := exec.LookPath("pass"); err == nil { 9 | return "pass" 10 | } 11 | 12 | return "secretservice" 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/cli/config/credentials/default_store_unsupported.go: -------------------------------------------------------------------------------- 1 | //go:build !windows && !darwin && !linux 2 | 3 | package credentials 4 | 5 | func defaultCredentialsStore() string { 6 | return "" 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/cli/config/credentials/default_store_windows.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | func defaultCredentialsStore() string { 4 | return "wincred" 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/cli/config/types/authconfig.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // AuthConfig contains authorization information for connecting to a Registry 4 | type AuthConfig struct { 5 | Username string `json:"username,omitempty"` 6 | Password string `json:"password,omitempty"` 7 | Auth string `json:"auth,omitempty"` 8 | 9 | // Email is an optional value associated with the username. 10 | // This field is deprecated and will be removed in a later 11 | // version of docker. 12 | Email string `json:"email,omitempty"` 13 | 14 | ServerAddress string `json:"serveraddress,omitempty"` 15 | 16 | // IdentityToken is used to authenticate the user and get 17 | // an access token for the registry. 18 | IdentityToken string `json:"identitytoken,omitempty"` 19 | 20 | // RegistryToken is a bearer token to be sent to a registry 21 | RegistryToken string `json:"registrytoken,omitempty"` 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/distribution/registry/client/auth/challenge/addr.go: -------------------------------------------------------------------------------- 1 | package challenge 2 | 3 | import ( 4 | "net/url" 5 | "strings" 6 | ) 7 | 8 | // FROM: https://golang.org/src/net/http/http.go 9 | // Given a string of the form "host", "host:port", or "[ipv6::address]:port", 10 | // return true if the string includes a port. 11 | func hasPort(s string) bool { return strings.LastIndex(s, ":") > strings.LastIndex(s, "]") } 12 | 13 | // FROM: http://golang.org/src/net/http/transport.go 14 | var portMap = map[string]string{ 15 | "http": "80", 16 | "https": "443", 17 | } 18 | 19 | // canonicalAddr returns url.Host but always with a ":port" suffix 20 | // FROM: http://golang.org/src/net/http/transport.go 21 | func canonicalAddr(url *url.URL) string { 22 | addr := url.Host 23 | if !hasPort(addr) { 24 | return addr + ":" + portMap[url.Scheme] 25 | } 26 | return addr 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker-credential-helpers/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 David Calavera 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 NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 18 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 19 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 20 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker-credential-helpers/credentials/helper.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | // Helper is the interface a credentials store helper must implement. 4 | type Helper interface { 5 | // Add appends credentials to the store. 6 | Add(*Credentials) error 7 | // Delete removes credentials from the store. 8 | Delete(serverURL string) error 9 | // Get retrieves credentials from the store. 10 | // It returns username and secret as strings. 11 | Get(serverURL string) (string, string, error) 12 | // List returns the stored serverURLs and their associated usernames. 13 | List() (map[string]string, error) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker-credential-helpers/credentials/version.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | var ( 4 | // Name is filled at linking time 5 | Name = "" 6 | 7 | // Package is filled at linking time 8 | Package = "github.com/docker/docker-credential-helpers" 9 | 10 | // Version holds the complete version number. Filled in at linking time. 11 | Version = "v0.0.0+unknown" 12 | 13 | // Revision is filled with the VCS (e.g. git) revision being used to build 14 | // the program at linking time. 15 | Revision = "" 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-units/README.md: -------------------------------------------------------------------------------- 1 | [![GoDoc](https://godoc.org/github.com/docker/go-units?status.svg)](https://godoc.org/github.com/docker/go-units) 2 | 3 | # Introduction 4 | 5 | go-units is a library to transform human friendly measurements into machine friendly values. 6 | 7 | ## Usage 8 | 9 | See the [docs in godoc](https://godoc.org/github.com/docker/go-units) for examples and documentation. 10 | 11 | ## Copyright and license 12 | 13 | Copyright © 2015 Docker, Inc. 14 | 15 | go-units is licensed under the Apache License, Version 2.0. 16 | See [LICENSE](LICENSE) for the full text of the license. 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-units/circle.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | post: 3 | # install golint 4 | - go get golang.org/x/lint/golint 5 | 6 | test: 7 | pre: 8 | # run analysis before tests 9 | - go vet ./... 10 | - test -z "$(golint ./... | tee /dev/stderr)" 11 | - test -z "$(gofmt -s -l . | tee /dev/stderr)" 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-units/duration.go: -------------------------------------------------------------------------------- 1 | // Package units provides helper function to parse and print size and time units 2 | // in human-readable format. 3 | package units 4 | 5 | import ( 6 | "fmt" 7 | "time" 8 | ) 9 | 10 | // HumanDuration returns a human-readable approximation of a duration 11 | // (eg. "About a minute", "4 hours ago", etc.). 12 | func HumanDuration(d time.Duration) string { 13 | if seconds := int(d.Seconds()); seconds < 1 { 14 | return "Less than a second" 15 | } else if seconds == 1 { 16 | return "1 second" 17 | } else if seconds < 60 { 18 | return fmt.Sprintf("%d seconds", seconds) 19 | } else if minutes := int(d.Minutes()); minutes == 1 { 20 | return "About a minute" 21 | } else if minutes < 60 { 22 | return fmt.Sprintf("%d minutes", minutes) 23 | } else if hours := int(d.Hours() + 0.5); hours == 1 { 24 | return "About an hour" 25 | } else if hours < 48 { 26 | return fmt.Sprintf("%d hours", hours) 27 | } else if hours < 24*7*2 { 28 | return fmt.Sprintf("%d days", hours/24) 29 | } else if hours < 24*30*2 { 30 | return fmt.Sprintf("%d weeks", hours/24/7) 31 | } else if hours < 24*365*2 { 32 | return fmt.Sprintf("%d months", hours/24/30) 33 | } 34 | return fmt.Sprintf("%d years", int(d.Hours())/24/365) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/fatih/color/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Fatih Arslan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/fatih/color/color_windows.go: -------------------------------------------------------------------------------- 1 | package color 2 | 3 | import ( 4 | "os" 5 | 6 | "golang.org/x/sys/windows" 7 | ) 8 | 9 | func init() { 10 | // Opt-in for ansi color support for current process. 11 | // https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#output-sequences 12 | var outMode uint32 13 | out := windows.Handle(os.Stdout.Fd()) 14 | if err := windows.GetConsoleMode(out, &outMode); err != nil { 15 | return 16 | } 17 | outMode |= windows.ENABLE_PROCESSED_OUTPUT | windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING 18 | _ = windows.SetConsoleMode(out, outMode) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/authn/anon.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package authn 16 | 17 | // anonymous implements Authenticator for anonymous authentication. 18 | type anonymous struct{} 19 | 20 | // Authorization implements Authenticator. 21 | func (a *anonymous) Authorization() (*AuthConfig, error) { 22 | return &AuthConfig{}, nil 23 | } 24 | 25 | // Anonymous is a singleton Authenticator for providing anonymous auth. 26 | var Anonymous Authenticator = &anonymous{} 27 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/authn/auth.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package authn 16 | 17 | // auth is an Authenticator that simply returns the wrapped AuthConfig. 18 | type auth struct { 19 | config AuthConfig 20 | } 21 | 22 | // FromConfig returns an Authenticator that just returns the given AuthConfig. 23 | func FromConfig(cfg AuthConfig) Authenticator { 24 | return &auth{cfg} 25 | } 26 | 27 | // Authorization implements Authenticator. 28 | func (a *auth) Authorization() (*AuthConfig, error) { 29 | return &a.config, nil 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/authn/basic.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package authn 16 | 17 | // Basic implements Authenticator for basic authentication. 18 | type Basic struct { 19 | Username string 20 | Password string 21 | } 22 | 23 | // Authorization implements Authenticator. 24 | func (b *Basic) Authorization() (*AuthConfig, error) { 25 | return &AuthConfig{ 26 | Username: b.Username, 27 | Password: b.Password, 28 | }, nil 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/authn/bearer.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package authn 16 | 17 | // Bearer implements Authenticator for bearer authentication. 18 | type Bearer struct { 19 | Token string `json:"token"` 20 | } 21 | 22 | // Authorization implements Authenticator. 23 | func (b *Bearer) Authorization() (*AuthConfig, error) { 24 | return &AuthConfig{ 25 | RegistryToken: b.Token, 26 | }, nil 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/authn/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package authn defines different methods of authentication for 16 | // talking to a container registry. 17 | package authn 18 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/compression/compression.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package compression abstracts over gzip and zstd. 16 | package compression 17 | 18 | // Compression is an enumeration of the supported compression algorithms 19 | type Compression string 20 | 21 | // The collection of known MediaType values. 22 | const ( 23 | None Compression = "none" 24 | GZip Compression = "gzip" 25 | ZStd Compression = "zstd" 26 | ) 27 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/crane/config.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package crane 16 | 17 | // Config returns the config file for the remote image ref. 18 | func Config(ref string, opt ...Option) ([]byte, error) { 19 | i, _, err := getImage(ref, opt...) 20 | if err != nil { 21 | return nil, err 22 | } 23 | return i.RawConfigFile() 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/crane/delete.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package crane 16 | 17 | import ( 18 | "fmt" 19 | 20 | "github.com/google/go-containerregistry/pkg/name" 21 | "github.com/google/go-containerregistry/pkg/v1/remote" 22 | ) 23 | 24 | // Delete deletes the remote reference at src. 25 | func Delete(src string, opt ...Option) error { 26 | o := makeOptions(opt...) 27 | ref, err := name.ParseReference(src, o.Name...) 28 | if err != nil { 29 | return fmt.Errorf("parsing reference %q: %w", src, err) 30 | } 31 | 32 | return remote.Delete(ref, o.Remote...) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/crane/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package crane holds libraries used to implement the crane CLI. 16 | package crane 17 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/crane/list.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package crane 16 | 17 | import ( 18 | "fmt" 19 | 20 | "github.com/google/go-containerregistry/pkg/name" 21 | "github.com/google/go-containerregistry/pkg/v1/remote" 22 | ) 23 | 24 | // ListTags returns the tags in repository src. 25 | func ListTags(src string, opt ...Option) ([]string, error) { 26 | o := makeOptions(opt...) 27 | repo, err := name.NewRepository(src, o.Name...) 28 | if err != nil { 29 | return nil, fmt.Errorf("parsing repo %q: %w", src, err) 30 | } 31 | 32 | return remote.List(repo, o.Remote...) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/crane/manifest.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package crane 16 | 17 | // Manifest returns the manifest for the remote image or index ref. 18 | func Manifest(ref string, opt ...Option) ([]byte, error) { 19 | desc, err := getManifest(ref, opt...) 20 | if err != nil { 21 | return nil, err 22 | } 23 | o := makeOptions(opt...) 24 | if o.Platform != nil { 25 | img, err := desc.Image() 26 | if err != nil { 27 | return nil, err 28 | } 29 | return img.RawManifest() 30 | } 31 | return desc.Manifest, nil 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/legacy/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package legacy provides functionality to work with docker images in the v1 16 | // format. 17 | // See: https://github.com/moby/moby/blob/master/image/spec/v1.md 18 | package legacy 19 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/legacy/tarball/README.md: -------------------------------------------------------------------------------- 1 | # `legacy/tarball` 2 | 3 | [![GoDoc](https://godoc.org/github.com/google/go-containerregistry/pkg/legacy/tarball?status.svg)](https://godoc.org/github.com/google/go-containerregistry/pkg/legacy/tarball) 4 | 5 | This package implements support for writing legacy tarballs, as described 6 | [here](https://github.com/moby/moby/blob/749d90e10f989802638ae542daf54257f3bf71f2/image/spec/v1.2.md#combined-image-json--filesystem-changeset-format). 7 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/legacy/tarball/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package tarball provides facilities for writing v1 docker images 16 | // (https://github.com/moby/moby/blob/master/image/spec/v1.md) from/to a tarball 17 | // on-disk. 18 | package tarball 19 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/name/README.md: -------------------------------------------------------------------------------- 1 | # `name` 2 | 3 | [![GoDoc](https://godoc.org/github.com/google/go-containerregistry/pkg/name?status.svg)](https://godoc.org/github.com/google/go-containerregistry/pkg/name) 4 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/v1/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // +k8s:deepcopy-gen=package 16 | 17 | // Package v1 defines structured types for OCI v1 images 18 | package v1 19 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/v1/empty/README.md: -------------------------------------------------------------------------------- 1 | # `empty` 2 | 3 | [![GoDoc](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/empty?status.svg)](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/empty) 4 | 5 | The empty packages provides an empty base for constructing a `v1.Image` or `v1.ImageIndex`. 6 | This is especially useful when paired with the [`mutate`](/pkg/v1/mutate) package, 7 | see [`mutate.Append`](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/mutate#Append) 8 | and [`mutate.AppendManifests`](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/mutate#AppendManifests). 9 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/v1/empty/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package empty provides an implementation of v1.Image equivalent to "FROM scratch". 16 | package empty 17 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/v1/layout/README.md: -------------------------------------------------------------------------------- 1 | # `layout` 2 | 3 | [![GoDoc](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/layout?status.svg)](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/layout) 4 | 5 | The `layout` package implements support for interacting with an [OCI Image Layout](https://github.com/opencontainers/image-spec/blob/master/image-layout.md). 6 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/v1/layout/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package layout provides facilities for reading/writing artifacts from/to 16 | // an OCI image layout on disk, see: 17 | // 18 | // https://github.com/opencontainers/image-spec/blob/master/image-layout.md 19 | package layout 20 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/v1/layout/layoutpath.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The original author or authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package layout 16 | 17 | import "path/filepath" 18 | 19 | // Path represents an OCI image layout rooted in a file system path 20 | type Path string 21 | 22 | func (l Path) path(elem ...string) string { 23 | complete := []string{string(l)} 24 | return filepath.Join(append(complete, elem...)...) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/v1/layout/read.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The original author or authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package layout 16 | 17 | import ( 18 | "os" 19 | "path/filepath" 20 | ) 21 | 22 | // FromPath reads an OCI image layout at path and constructs a layout.Path. 23 | func FromPath(path string) (Path, error) { 24 | // TODO: check oci-layout exists 25 | 26 | _, err := os.Stat(filepath.Join(path, "index.json")) 27 | if err != nil { 28 | return "", err 29 | } 30 | 31 | return Path(path), nil 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/v1/mutate/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package mutate provides facilities for mutating v1.Images of any kind. 16 | package mutate 17 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/v1/partial/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package partial defines methods for building up a v1.Image from 16 | // minimal subsets that are sufficient for defining a v1.Image. 17 | package partial 18 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/v1/partial/image.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package partial 16 | 17 | import ( 18 | "github.com/google/go-containerregistry/pkg/v1/types" 19 | ) 20 | 21 | // ImageCore is the core set of properties without which we cannot build a v1.Image 22 | type ImageCore interface { 23 | // RawConfigFile returns the serialized bytes of this image's config file. 24 | RawConfigFile() ([]byte, error) 25 | 26 | // MediaType of this image's manifest. 27 | MediaType() (types.MediaType, error) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/v1/progress.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package v1 16 | 17 | // Update representation of an update of transfer progress. Some functions 18 | // in this module can take a channel to which updates will be sent while a 19 | // transfer is in progress. 20 | // +k8s:deepcopy-gen=false 21 | type Update struct { 22 | Total int64 23 | Complete int64 24 | Error error 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/v1/remote/delete.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package remote 16 | 17 | import ( 18 | "github.com/google/go-containerregistry/pkg/name" 19 | ) 20 | 21 | // Delete removes the specified image reference from the remote registry. 22 | func Delete(ref name.Reference, options ...Option) error { 23 | o, err := makeOptions(options...) 24 | if err != nil { 25 | return err 26 | } 27 | return newPusher(o).Delete(o.context, ref) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/v1/remote/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package remote provides facilities for reading/writing v1.Images from/to 16 | // a remote image registry. 17 | package remote 18 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package transport provides facilities for setting up an authenticated 16 | // http.RoundTripper given an Authenticator and base RoundTripper. See 17 | // transport.New for more information. 18 | package transport 19 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/scope.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package transport 16 | 17 | // Scopes suitable to qualify each Repository 18 | const ( 19 | PullScope string = "pull" 20 | PushScope string = "push,pull" 21 | // For now DELETE is PUSH, which is the read/write ACL. 22 | DeleteScope string = PushScope 23 | CatalogScope string = "catalog" 24 | ) 25 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/v1/tarball/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package tarball provides facilities for reading/writing v1.Images from/to 16 | // a tarball on-disk. 17 | package tarball 18 | -------------------------------------------------------------------------------- /vendor/github.com/inconshreveable/mousetrap/README.md: -------------------------------------------------------------------------------- 1 | # mousetrap 2 | 3 | mousetrap is a tiny library that answers a single question. 4 | 5 | On a Windows machine, was the process invoked by someone double clicking on 6 | the executable file while browsing in explorer? 7 | 8 | ### Motivation 9 | 10 | Windows developers unfamiliar with command line tools will often "double-click" 11 | the executable for a tool. Because most CLI tools print the help and then exit 12 | when invoked without arguments, this is often very frustrating for those users. 13 | 14 | mousetrap provides a way to detect these invocations so that you can provide 15 | more helpful behavior and instructions on how to run the CLI tool. To see what 16 | this looks like, both from an organizational and a technical perspective, see 17 | https://inconshreveable.com/09-09-2014/sweat-the-small-stuff/ 18 | 19 | ### The interface 20 | 21 | The library exposes a single interface: 22 | 23 | func StartedByExplorer() (bool) 24 | -------------------------------------------------------------------------------- /vendor/github.com/inconshreveable/mousetrap/trap_others.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package mousetrap 5 | 6 | // StartedByExplorer returns true if the program was invoked by the user 7 | // double-clicking on the executable from explorer.exe 8 | // 9 | // It is conservative and returns false if any of the internal calls fail. 10 | // It does not guarantee that the program was run from a terminal. It only can tell you 11 | // whether it was launched from explorer.exe 12 | // 13 | // On non-Windows platforms, it always returns false. 14 | func StartedByExplorer() bool { 15 | return false 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/.gitattributes: -------------------------------------------------------------------------------- 1 | * -text 2 | *.bin -text -diff 3 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | /s2/cmd/_s2sx/sfx-exe 26 | 27 | # Linux perf files 28 | perf.data 29 | perf.data.old 30 | 31 | # gdb history 32 | .gdb_history 33 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/gen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd s2/cmd/_s2sx/ || exit 1 4 | go generate . 5 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/huff0/.gitignore: -------------------------------------------------------------------------------- 1 | /huff0-fuzz.zip 2 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo.go: -------------------------------------------------------------------------------- 1 | // Package cpuinfo gives runtime info about the current CPU. 2 | // 3 | // This is a very limited module meant for use internally 4 | // in this project. For more versatile solution check 5 | // https://github.com/klauspost/cpuid. 6 | package cpuinfo 7 | 8 | // HasBMI1 checks whether an x86 CPU supports the BMI1 extension. 9 | func HasBMI1() bool { 10 | return hasBMI1 11 | } 12 | 13 | // HasBMI2 checks whether an x86 CPU supports the BMI2 extension. 14 | func HasBMI2() bool { 15 | return hasBMI2 16 | } 17 | 18 | // DisableBMI2 will disable BMI2, for testing purposes. 19 | // Call returned function to restore previous state. 20 | func DisableBMI2() func() { 21 | old := hasBMI2 22 | hasBMI2 = false 23 | return func() { 24 | hasBMI2 = old 25 | } 26 | } 27 | 28 | // HasBMI checks whether an x86 CPU supports both BMI1 and BMI2 extensions. 29 | func HasBMI() bool { 30 | return HasBMI1() && HasBMI2() 31 | } 32 | 33 | var hasBMI1 bool 34 | var hasBMI2 bool 35 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.go: -------------------------------------------------------------------------------- 1 | //go:build amd64 && !appengine && !noasm && gc 2 | // +build amd64,!appengine,!noasm,gc 3 | 4 | package cpuinfo 5 | 6 | // go:noescape 7 | func x86extensions() (bmi1, bmi2 bool) 8 | 9 | func init() { 10 | hasBMI1, hasBMI2 = x86extensions() 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.s: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | // +build gc 3 | // +build !noasm 4 | 5 | #include "textflag.h" 6 | #include "funcdata.h" 7 | #include "go_asm.h" 8 | 9 | TEXT ·x86extensions(SB), NOSPLIT, $0 10 | // 1. determine max EAX value 11 | XORQ AX, AX 12 | CPUID 13 | 14 | CMPQ AX, $7 15 | JB unsupported 16 | 17 | // 2. EAX = 7, ECX = 0 --- see Table 3-8 "Information Returned by CPUID Instruction" 18 | MOVQ $7, AX 19 | MOVQ $0, CX 20 | CPUID 21 | 22 | BTQ $3, BX // bit 3 = BMI1 23 | SETCS AL 24 | 25 | BTQ $8, BX // bit 8 = BMI2 26 | SETCS AH 27 | 28 | MOVB AL, bmi1+0(FP) 29 | MOVB AH, bmi2+1(FP) 30 | RET 31 | 32 | unsupported: 33 | XORQ AX, AX 34 | MOVB AL, bmi1+0(FP) 35 | MOVB AL, bmi2+1(FP) 36 | RET 37 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/internal/le/le.go: -------------------------------------------------------------------------------- 1 | package le 2 | 3 | type Indexer interface { 4 | int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/internal/le/unsafe_disabled.go: -------------------------------------------------------------------------------- 1 | //go:build !(amd64 || arm64 || ppc64le || riscv64) || nounsafe || purego || appengine 2 | 3 | package le 4 | 5 | import ( 6 | "encoding/binary" 7 | ) 8 | 9 | // Load8 will load from b at index i. 10 | func Load8[I Indexer](b []byte, i I) byte { 11 | return b[i] 12 | } 13 | 14 | // Load16 will load from b at index i. 15 | func Load16[I Indexer](b []byte, i I) uint16 { 16 | return binary.LittleEndian.Uint16(b[i:]) 17 | } 18 | 19 | // Load32 will load from b at index i. 20 | func Load32[I Indexer](b []byte, i I) uint32 { 21 | return binary.LittleEndian.Uint32(b[i:]) 22 | } 23 | 24 | // Load64 will load from b at index i. 25 | func Load64[I Indexer](b []byte, i I) uint64 { 26 | return binary.LittleEndian.Uint64(b[i:]) 27 | } 28 | 29 | // Store16 will store v at b. 30 | func Store16(b []byte, v uint16) { 31 | binary.LittleEndian.PutUint16(b, v) 32 | } 33 | 34 | // Store32 will store v at b. 35 | func Store32(b []byte, v uint32) { 36 | binary.LittleEndian.PutUint32(b, v) 37 | } 38 | 39 | // Store64 will store v at b. 40 | func Store64(b []byte, v uint64) { 41 | binary.LittleEndian.PutUint64(b, v) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/s2sx.mod: -------------------------------------------------------------------------------- 1 | module github.com/klauspost/compress 2 | 3 | go 1.22 4 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/s2sx.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexellis/arkade/fcf9eff85478d1fc5fcd5f7c66528c174594a0b8/vendor/github.com/klauspost/compress/s2sx.sum -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Caleb Spare 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_asm.go: -------------------------------------------------------------------------------- 1 | //go:build (amd64 || arm64) && !appengine && gc && !purego && !noasm 2 | // +build amd64 arm64 3 | // +build !appengine 4 | // +build gc 5 | // +build !purego 6 | // +build !noasm 7 | 8 | package xxhash 9 | 10 | // Sum64 computes the 64-bit xxHash digest of b. 11 | // 12 | //go:noescape 13 | func Sum64(b []byte) uint64 14 | 15 | //go:noescape 16 | func writeBlocks(s *Digest, b []byte) int 17 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_safe.go: -------------------------------------------------------------------------------- 1 | package xxhash 2 | 3 | // Sum64String computes the 64-bit xxHash digest of s. 4 | func Sum64String(s string) uint64 { 5 | return Sum64([]byte(s)) 6 | } 7 | 8 | // WriteString adds more data to d. It always returns len(s), nil. 9 | func (d *Digest) WriteString(s string) (n int, err error) { 10 | return d.Write([]byte(s)) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/zstd/matchlen_amd64.go: -------------------------------------------------------------------------------- 1 | //go:build amd64 && !appengine && !noasm && gc 2 | // +build amd64,!appengine,!noasm,gc 3 | 4 | // Copyright 2019+ Klaus Post. All rights reserved. 5 | // License information can be found in the LICENSE file. 6 | 7 | package zstd 8 | 9 | // matchLen returns how many bytes match in a and b 10 | // 11 | // It assumes that: 12 | // 13 | // len(a) <= len(b) and len(a) > 0 14 | // 15 | //go:noescape 16 | func matchLen(a []byte, b []byte) int 17 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/zstd/matchlen_generic.go: -------------------------------------------------------------------------------- 1 | //go:build !amd64 || appengine || !gc || noasm 2 | // +build !amd64 appengine !gc noasm 3 | 4 | // Copyright 2019+ Klaus Post. All rights reserved. 5 | // License information can be found in the LICENSE file. 6 | 7 | package zstd 8 | 9 | import ( 10 | "math/bits" 11 | 12 | "github.com/klauspost/compress/internal/le" 13 | ) 14 | 15 | // matchLen returns the maximum common prefix length of a and b. 16 | // a must be the shortest of the two. 17 | func matchLen(a, b []byte) (n int) { 18 | left := len(a) 19 | for left >= 8 { 20 | diff := le.Load64(a, n) ^ le.Load64(b, n) 21 | if diff != 0 { 22 | return n + bits.TrailingZeros64(diff)>>3 23 | } 24 | n += 8 25 | left -= 8 26 | } 27 | a = a[n:] 28 | b = b[n:] 29 | 30 | for i := range a { 31 | if a[i] != b[i] { 32 | break 33 | } 34 | n++ 35 | } 36 | return n 37 | 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Yasuhiro Matsumoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/colorable_others.go: -------------------------------------------------------------------------------- 1 | //go:build !windows || appengine 2 | // +build !windows appengine 3 | 4 | package colorable 5 | 6 | import ( 7 | "io" 8 | "os" 9 | 10 | _ "github.com/mattn/go-isatty" 11 | ) 12 | 13 | // NewColorable returns new instance of Writer which handles escape sequence. 14 | func NewColorable(file *os.File) io.Writer { 15 | if file == nil { 16 | panic("nil passed instead of *os.File to NewColorable()") 17 | } 18 | 19 | return file 20 | } 21 | 22 | // NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. 23 | func NewColorableStdout() io.Writer { 24 | return os.Stdout 25 | } 26 | 27 | // NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. 28 | func NewColorableStderr() io.Writer { 29 | return os.Stderr 30 | } 31 | 32 | // EnableColorsStdout enable colors if possible. 33 | func EnableColorsStdout(enabled *bool) func() { 34 | if enabled != nil { 35 | *enabled = true 36 | } 37 | return func() {} 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-colorable/go.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -race -coverprofile=profile.out -covermode=atomic "$d" 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) Yasuhiro MATSUMOTO 2 | 3 | MIT License (Expat) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/doc.go: -------------------------------------------------------------------------------- 1 | // Package isatty implements interface to isatty 2 | package isatty 3 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/go.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -race -coverprofile=profile.out -covermode=atomic "$d" 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_bsd.go: -------------------------------------------------------------------------------- 1 | //go:build (darwin || freebsd || openbsd || netbsd || dragonfly || hurd) && !appengine && !tinygo 2 | // +build darwin freebsd openbsd netbsd dragonfly hurd 3 | // +build !appengine 4 | // +build !tinygo 5 | 6 | package isatty 7 | 8 | import "golang.org/x/sys/unix" 9 | 10 | // IsTerminal return true if the file descriptor is terminal. 11 | func IsTerminal(fd uintptr) bool { 12 | _, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA) 13 | return err == nil 14 | } 15 | 16 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 17 | // terminal. This is also always false on this environment. 18 | func IsCygwinTerminal(fd uintptr) bool { 19 | return false 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_others.go: -------------------------------------------------------------------------------- 1 | //go:build (appengine || js || nacl || tinygo || wasm) && !windows 2 | // +build appengine js nacl tinygo wasm 3 | // +build !windows 4 | 5 | package isatty 6 | 7 | // IsTerminal returns true if the file descriptor is terminal which 8 | // is always false on js and appengine classic which is a sandboxed PaaS. 9 | func IsTerminal(fd uintptr) bool { 10 | return false 11 | } 12 | 13 | // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 14 | // terminal. This is also always false on this environment. 15 | func IsCygwinTerminal(fd uintptr) bool { 16 | return false 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_plan9.go: -------------------------------------------------------------------------------- 1 | //go:build plan9 2 | // +build plan9 3 | 4 | package isatty 5 | 6 | import ( 7 | "syscall" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | func IsTerminal(fd uintptr) bool { 12 | path, err := syscall.Fd2path(int(fd)) 13 | if err != nil { 14 | return false 15 | } 16 | return path == "/dev/cons" || path == "/mnt/term/dev/cons" 17 | } 18 | 19 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 20 | // terminal. This is also always false on this environment. 21 | func IsCygwinTerminal(fd uintptr) bool { 22 | return false 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_solaris.go: -------------------------------------------------------------------------------- 1 | //go:build solaris && !appengine 2 | // +build solaris,!appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | // see: https://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libc/port/gen/isatty.c 12 | func IsTerminal(fd uintptr) bool { 13 | _, err := unix.IoctlGetTermio(int(fd), unix.TCGETA) 14 | return err == nil 15 | } 16 | 17 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 18 | // terminal. This is also always false on this environment. 19 | func IsCygwinTerminal(fd uintptr) bool { 20 | return false 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_tcgets.go: -------------------------------------------------------------------------------- 1 | //go:build (linux || aix || zos) && !appengine && !tinygo 2 | // +build linux aix zos 3 | // +build !appengine 4 | // +build !tinygo 5 | 6 | package isatty 7 | 8 | import "golang.org/x/sys/unix" 9 | 10 | // IsTerminal return true if the file descriptor is terminal. 11 | func IsTerminal(fd uintptr) bool { 12 | _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) 13 | return err == nil 14 | } 15 | 16 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 17 | // terminal. This is also always false on this environment. 18 | func IsCygwinTerminal(fd uintptr) bool { 19 | return false 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Yasuhiro Matsumoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/README.md: -------------------------------------------------------------------------------- 1 | go-runewidth 2 | ============ 3 | 4 | [![Build Status](https://github.com/mattn/go-runewidth/workflows/test/badge.svg?branch=master)](https://github.com/mattn/go-runewidth/actions?query=workflow%3Atest) 5 | [![Codecov](https://codecov.io/gh/mattn/go-runewidth/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-runewidth) 6 | [![GoDoc](https://godoc.org/github.com/mattn/go-runewidth?status.svg)](http://godoc.org/github.com/mattn/go-runewidth) 7 | [![Go Report Card](https://goreportcard.com/badge/github.com/mattn/go-runewidth)](https://goreportcard.com/report/github.com/mattn/go-runewidth) 8 | 9 | Provides functions to get fixed width of the character or string. 10 | 11 | Usage 12 | ----- 13 | 14 | ```go 15 | runewidth.StringWidth("つのだ☆HIRO") == 12 16 | ``` 17 | 18 | 19 | Author 20 | ------ 21 | 22 | Yasuhiro Matsumoto 23 | 24 | License 25 | ------- 26 | 27 | under the MIT License: http://mattn.mit-license.org/2013 28 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_appengine.go: -------------------------------------------------------------------------------- 1 | //go:build appengine 2 | // +build appengine 3 | 4 | package runewidth 5 | 6 | // IsEastAsian return true if the current locale is CJK 7 | func IsEastAsian() bool { 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_js.go: -------------------------------------------------------------------------------- 1 | //go:build js && !appengine 2 | // +build js,!appengine 3 | 4 | package runewidth 5 | 6 | func IsEastAsian() bool { 7 | // TODO: Implement this for the web. Detect east asian in a compatible way, and return true. 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows && !appengine 2 | // +build windows,!appengine 3 | 4 | package runewidth 5 | 6 | import ( 7 | "syscall" 8 | ) 9 | 10 | var ( 11 | kernel32 = syscall.NewLazyDLL("kernel32") 12 | procGetConsoleOutputCP = kernel32.NewProc("GetConsoleOutputCP") 13 | ) 14 | 15 | // IsEastAsian return true if the current locale is CJK 16 | func IsEastAsian() bool { 17 | r1, _, _ := procGetConsoleOutputCP.Call() 18 | if r1 == 0 { 19 | return false 20 | } 21 | 22 | switch int(r1) { 23 | case 932, 51932, 936, 949, 950: 24 | return true 25 | } 26 | 27 | return false 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/go-homedir/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/go-homedir/README.md: -------------------------------------------------------------------------------- 1 | # go-homedir 2 | 3 | This is a Go library for detecting the user's home directory without 4 | the use of cgo, so the library can be used in cross-compilation environments. 5 | 6 | Usage is incredibly simple, just call `homedir.Dir()` to get the home directory 7 | for a user, and `homedir.Expand()` to expand the `~` in a path to the home 8 | directory. 9 | 10 | **Why not just use `os/user`?** The built-in `os/user` package requires 11 | cgo on Darwin systems. This means that any Go code that uses that package 12 | cannot cross compile. But 99% of the time the use for `os/user` is just to 13 | retrieve the home directory, which we can do for the current user without 14 | cgo. This library does that, enabling cross-compilation. 15 | -------------------------------------------------------------------------------- /vendor/github.com/morikuni/aec/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Taihei Morikuni 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/morikuni/aec/ansi.go: -------------------------------------------------------------------------------- 1 | package aec 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | ) 7 | 8 | const esc = "\x1b[" 9 | 10 | // Reset resets SGR effect. 11 | const Reset string = "\x1b[0m" 12 | 13 | var empty = newAnsi("") 14 | 15 | // ANSI represents ANSI escape code. 16 | type ANSI interface { 17 | fmt.Stringer 18 | 19 | // With adapts given ANSIs. 20 | With(...ANSI) ANSI 21 | 22 | // Apply wraps given string in ANSI. 23 | Apply(string) string 24 | } 25 | 26 | type ansiImpl string 27 | 28 | func newAnsi(s string) *ansiImpl { 29 | r := ansiImpl(s) 30 | return &r 31 | } 32 | 33 | func (a *ansiImpl) With(ansi ...ANSI) ANSI { 34 | return concat(append([]ANSI{a}, ansi...)) 35 | } 36 | 37 | func (a *ansiImpl) Apply(s string) string { 38 | return a.String() + s + Reset 39 | } 40 | 41 | func (a *ansiImpl) String() string { 42 | return string(*a) 43 | } 44 | 45 | // Apply wraps given string in ANSIs. 46 | func Apply(s string, ansi ...ANSI) string { 47 | if len(ansi) == 0 { 48 | return s 49 | } 50 | return concat(ansi).Apply(s) 51 | } 52 | 53 | func concat(ansi []ANSI) ANSI { 54 | strs := make([]string, 0, len(ansi)) 55 | for _, p := range ansi { 56 | strs = append(strs, p.String()) 57 | } 58 | return newAnsi(strings.Join(strs, "")) 59 | } 60 | -------------------------------------------------------------------------------- /vendor/github.com/morikuni/aec/sample.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexellis/arkade/fcf9eff85478d1fc5fcd5f7c66528c174594a0b8/vendor/github.com/morikuni/aec/sample.gif -------------------------------------------------------------------------------- /vendor/github.com/olekukonko/tablewriter/.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Go template 3 | # Binaries for programs and plugins 4 | *.exe 5 | *.exe~ 6 | *.dll 7 | *.so 8 | *.dylib 9 | 10 | # Test binary, build with `go test -c` 11 | *.test 12 | 13 | # Output of the go coverage tool, specifically when used with LiteIDE 14 | *.out 15 | 16 | -------------------------------------------------------------------------------- /vendor/github.com/olekukonko/tablewriter/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | arch: 3 | - ppc64le 4 | - amd64 5 | go: 6 | - 1.3 7 | - 1.4 8 | - 1.5 9 | - 1.6 10 | - 1.7 11 | - 1.8 12 | - 1.9 13 | - "1.10" 14 | - tip 15 | jobs: 16 | exclude : 17 | - arch : ppc64le 18 | go : 19 | - 1.3 20 | - arch : ppc64le 21 | go : 22 | - 1.4 23 | -------------------------------------------------------------------------------- /vendor/github.com/olekukonko/tablewriter/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014 by Oleku Konko 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/opencontainers/go-digest/.mailmap: -------------------------------------------------------------------------------- 1 | Aaron Lehmann 2 | Derek McGowan 3 | Stephen J Day 4 | Haibing Zhou 5 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/go-digest/.pullapprove.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | requirements: 4 | signed_off_by: 5 | required: true 6 | 7 | always_pending: 8 | title_regex: '^WIP' 9 | explanation: 'Work in progress...' 10 | 11 | group_defaults: 12 | required: 2 13 | approve_by_comment: 14 | enabled: true 15 | approve_regex: '^LGTM' 16 | reject_regex: '^Rejected' 17 | reset_on_push: 18 | enabled: true 19 | author_approval: 20 | ignored: true 21 | conditions: 22 | branches: 23 | - master 24 | 25 | groups: 26 | go-digest: 27 | teams: 28 | - go-digest-maintainers 29 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/go-digest/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.12.x 4 | - 1.13.x 5 | - master 6 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/go-digest/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Derek McGowan (@dmcgowan) 2 | Stephen Day (@stevvooe) 3 | Vincent Batts (@vbatts) 4 | Akihiro Suda (@AkihiroSuda) 5 | Sebastiaan van Stijn (@thaJeztah) 6 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/image-spec/specs-go/versioned.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Linux Foundation 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package specs 16 | 17 | // Versioned provides a struct with the manifest schemaVersion and mediaType. 18 | // Incoming content with unknown schema version can be decoded against this 19 | // struct to check the version. 20 | type Versioned struct { 21 | // SchemaVersion is the image manifest schema that this image follows 22 | SchemaVersion int `json:"schemaVersion"` 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/copy/.gitignore: -------------------------------------------------------------------------------- 1 | test/data.copy 2 | test/owned-by-root 3 | coverage.txt 4 | vendor 5 | .vagrant 6 | .idea/ 7 | 8 | # Test Specific 9 | test/data/case16/large.file 10 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/copy/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 otiai10 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/otiai10/copy/copy_namedpipes.go: -------------------------------------------------------------------------------- 1 | //go:build !windows && !plan9 && !netbsd && !aix && !illumos && !solaris && !js 2 | 3 | package copy 4 | 5 | import ( 6 | "os" 7 | "path/filepath" 8 | "syscall" 9 | ) 10 | 11 | // pcopy is for just named pipes 12 | func pcopy(dest string, info os.FileInfo) error { 13 | if err := os.MkdirAll(filepath.Dir(dest), os.ModePerm); err != nil { 14 | return err 15 | } 16 | return syscall.Mkfifo(dest, uint32(info.Mode())) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/copy/copy_namedpipes_x.go: -------------------------------------------------------------------------------- 1 | //go:build windows || plan9 || netbsd || aix || illumos || solaris || js 2 | 3 | package copy 4 | 5 | import ( 6 | "os" 7 | ) 8 | 9 | // TODO: check plan9 netbsd aix illumos solaris in future 10 | 11 | // pcopy is for just named pipes. Windows doesn't support them 12 | func pcopy(dest string, info os.FileInfo) error { 13 | return nil 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/copy/preserve_ltimes.go: -------------------------------------------------------------------------------- 1 | //go:build !windows && !plan9 && !js 2 | 3 | package copy 4 | 5 | import ( 6 | "golang.org/x/sys/unix" 7 | ) 8 | 9 | func preserveLtimes(src, dest string) error { 10 | info := new(unix.Stat_t) 11 | if err := unix.Lstat(src, info); err != nil { 12 | return err 13 | } 14 | 15 | return unix.Lutimes(dest, []unix.Timeval{ 16 | unix.NsecToTimeval(info.Atim.Nano()), 17 | unix.NsecToTimeval(info.Mtim.Nano()), 18 | }) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/copy/preserve_ltimes_x.go: -------------------------------------------------------------------------------- 1 | //go:build windows || js || plan9 2 | 3 | package copy 4 | 5 | func preserveLtimes(src, dest string) error { 6 | return nil // Unsupported 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/copy/preserve_owner.go: -------------------------------------------------------------------------------- 1 | //go:build !windows && !plan9 2 | 3 | package copy 4 | 5 | import ( 6 | "io/fs" 7 | "os" 8 | "syscall" 9 | ) 10 | 11 | func preserveOwner(src, dest string, info fs.FileInfo) (err error) { 12 | if info == nil { 13 | if info, err = os.Stat(src); err != nil { 14 | return err 15 | } 16 | } 17 | if stat, ok := info.Sys().(*syscall.Stat_t); ok { 18 | if err := os.Chown(dest, int(stat.Uid), int(stat.Gid)); err != nil { 19 | return err 20 | } 21 | } 22 | return nil 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/copy/preserve_owner_x.go: -------------------------------------------------------------------------------- 1 | //go:build windows || plan9 2 | 3 | package copy 4 | 5 | import "io/fs" 6 | 7 | func preserveOwner(src, dest string, info fs.FileInfo) (err error) { 8 | return nil 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/copy/preserve_times.go: -------------------------------------------------------------------------------- 1 | package copy 2 | 3 | import "os" 4 | 5 | func preserveTimes(srcinfo os.FileInfo, dest string) error { 6 | spec := getTimeSpec(srcinfo) 7 | if err := os.Chtimes(dest, spec.Atime, spec.Mtime); err != nil { 8 | return err 9 | } 10 | return nil 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/copy/stat_times.go: -------------------------------------------------------------------------------- 1 | //go:build !windows && !darwin && !freebsd && !plan9 && !netbsd && !js 2 | 3 | // TODO: add more runtimes 4 | 5 | package copy 6 | 7 | import ( 8 | "os" 9 | "syscall" 10 | "time" 11 | ) 12 | 13 | func getTimeSpec(info os.FileInfo) timespec { 14 | stat := info.Sys().(*syscall.Stat_t) 15 | times := timespec{ 16 | Mtime: info.ModTime(), 17 | Atime: time.Unix(int64(stat.Atim.Sec), int64(stat.Atim.Nsec)), 18 | Ctime: time.Unix(int64(stat.Ctim.Sec), int64(stat.Ctim.Nsec)), 19 | } 20 | return times 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/copy/stat_times_darwin.go: -------------------------------------------------------------------------------- 1 | //go:build darwin 2 | 3 | package copy 4 | 5 | import ( 6 | "os" 7 | "syscall" 8 | "time" 9 | ) 10 | 11 | func getTimeSpec(info os.FileInfo) timespec { 12 | stat := info.Sys().(*syscall.Stat_t) 13 | times := timespec{ 14 | Mtime: info.ModTime(), 15 | Atime: time.Unix(stat.Atimespec.Sec, stat.Atimespec.Nsec), 16 | Ctime: time.Unix(stat.Ctimespec.Sec, stat.Ctimespec.Nsec), 17 | } 18 | return times 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/copy/stat_times_freebsd.go: -------------------------------------------------------------------------------- 1 | //go:build freebsd 2 | 3 | package copy 4 | 5 | import ( 6 | "os" 7 | "syscall" 8 | "time" 9 | ) 10 | 11 | func getTimeSpec(info os.FileInfo) timespec { 12 | stat := info.Sys().(*syscall.Stat_t) 13 | times := timespec{ 14 | Mtime: info.ModTime(), 15 | Atime: time.Unix(int64(stat.Atimespec.Sec), int64(stat.Atimespec.Nsec)), 16 | Ctime: time.Unix(int64(stat.Ctimespec.Sec), int64(stat.Ctimespec.Nsec)), 17 | } 18 | return times 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/copy/stat_times_js.go: -------------------------------------------------------------------------------- 1 | //go:build js 2 | 3 | package copy 4 | 5 | import ( 6 | "os" 7 | "syscall" 8 | "time" 9 | ) 10 | 11 | func getTimeSpec(info os.FileInfo) timespec { 12 | stat := info.Sys().(*syscall.Stat_t) 13 | times := timespec{ 14 | Mtime: info.ModTime(), 15 | Atime: time.Unix(int64(stat.Atime), int64(stat.AtimeNsec)), 16 | Ctime: time.Unix(int64(stat.Ctime), int64(stat.CtimeNsec)), 17 | } 18 | return times 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/copy/stat_times_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | 3 | package copy 4 | 5 | import ( 6 | "os" 7 | "syscall" 8 | "time" 9 | ) 10 | 11 | func getTimeSpec(info os.FileInfo) timespec { 12 | stat := info.Sys().(*syscall.Win32FileAttributeData) 13 | return timespec{ 14 | Mtime: time.Unix(0, stat.LastWriteTime.Nanoseconds()), 15 | Atime: time.Unix(0, stat.LastAccessTime.Nanoseconds()), 16 | Ctime: time.Unix(0, stat.CreationTime.Nanoseconds()), 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/copy/stat_times_x.go: -------------------------------------------------------------------------------- 1 | //go:build plan9 || netbsd 2 | 3 | package copy 4 | 5 | import ( 6 | "os" 7 | ) 8 | 9 | // TODO: check plan9 netbsd in future 10 | func getTimeSpec(info os.FileInfo) timespec { 11 | times := timespec{ 12 | Mtime: info.ModTime(), 13 | Atime: info.ModTime(), 14 | Ctime: info.ModTime(), 15 | } 16 | return times 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/mint/.gitignore: -------------------------------------------------------------------------------- 1 | coverage.txt 2 | vendor 3 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/mint/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017 otiai10 (Hiromu OCHIAI) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/mint/because.go: -------------------------------------------------------------------------------- 1 | package mint 2 | 3 | import "testing" 4 | 5 | // Because is context printer. 6 | func Because(t *testing.T, context string, wrapper func(*testing.T)) { 7 | Log(" Because ", context, "\n") 8 | wrapper(t) 9 | } 10 | 11 | // When is an alternative of `Because` 12 | func When(t *testing.T, context string, wrapper func(*testing.T)) { 13 | Log(" When ", context, "\n") 14 | wrapper(t) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/mint/comparer.go: -------------------------------------------------------------------------------- 1 | package mint 2 | 3 | import ( 4 | "fmt" 5 | "reflect" 6 | ) 7 | 8 | func getComparer(a, b interface{}, deeply bool) Comparer { 9 | if deeply { 10 | return deepComparer{} 11 | } 12 | switch reflect.ValueOf(a).Kind() { 13 | case reflect.Slice: 14 | return sliceComparer{} 15 | case reflect.Map: 16 | return mapComparer{} 17 | } 18 | if b == nil { 19 | return nilComparer{} 20 | } 21 | return defaultComparer{} 22 | } 23 | 24 | type Comparer interface { 25 | Compare(a, b interface{}) bool 26 | } 27 | 28 | type defaultComparer struct{} 29 | 30 | func (c defaultComparer) Compare(a, b interface{}) bool { 31 | return a == b 32 | } 33 | 34 | type deepComparer struct{} 35 | 36 | func (c deepComparer) Compare(a, b interface{}) bool { 37 | return reflect.DeepEqual(a, b) 38 | } 39 | 40 | type mapComparer struct { 41 | deepComparer 42 | } 43 | 44 | type sliceComparer struct { 45 | deepComparer 46 | } 47 | 48 | type nilComparer struct { 49 | } 50 | 51 | func (c nilComparer) Compare(a, _ interface{}) bool { 52 | return fmt.Sprintf("%v", a) == fmt.Sprintf("%v", nil) 53 | } 54 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/mint/exit_freebsd.go: -------------------------------------------------------------------------------- 1 | //go:build freebsd 2 | // +build freebsd 3 | 4 | package mint 5 | 6 | // Exit ... 7 | func (testee *Testee) Exit(expectedCode int) MintResult { 8 | panic("Exit method can NOT be used on FreeBSD, for now.") 9 | return MintResult{ok: false} 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/mint/log.go: -------------------------------------------------------------------------------- 1 | package mint 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | ) 7 | 8 | // Log only output if -v flag is given. 9 | // This is because the standard "t.Testing.Log" method decorates 10 | // its caller: runtime.Caller(3) automatically. 11 | func Log(args ...interface{}) { 12 | if isVerbose(os.Args) { 13 | fmt.Print(args...) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/mint/mocks.go: -------------------------------------------------------------------------------- 1 | package mint 2 | 3 | import ( 4 | "bytes" 5 | "io/ioutil" 6 | "net/http" 7 | ) 8 | 9 | type HTTPClientMock struct { 10 | HTTPError error 11 | ResponseStatusCode int 12 | ResponseBody string 13 | } 14 | 15 | func (hcm *HTTPClientMock) Handle() (res *http.Response, err error, ok bool) { 16 | if hcm.HTTPError != nil { 17 | err = hcm.HTTPError 18 | ok = true 19 | } 20 | res = new(http.Response) 21 | if hcm.ResponseBody != "" { 22 | res.Body = ioutil.NopCloser(bytes.NewBufferString(hcm.ResponseBody)) 23 | ok = true 24 | } 25 | if hcm.ResponseStatusCode != 0 { 26 | res.StatusCode = hcm.ResponseStatusCode 27 | ok = true 28 | } 29 | return res, err, ok 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/otiai10/mint/mquery/README.md: -------------------------------------------------------------------------------- 1 | mquery 2 | === 3 | 4 | ```go 5 | import mquery 6 | 7 | var m = map[string]interface{}{ 8 | "foo": "bar", 9 | "hoge": map[string]interface{}{ 10 | "name": "otiai10", 11 | }, 12 | "fuga": map[int]map[string]interface{}{ 13 | 0: {"greet": "Hello"}, 14 | 1: {"greet": "こんにちは"}, 15 | }, 16 | "langs": []string{"Go", "JavaScript", "English"}, 17 | "baz": nil, 18 | "required": false, 19 | } 20 | 21 | func main() { 22 | fmt.Println( 23 | Query(m, "foo"), // "bar" 24 | Query(m, "hoge.name"), // "otiai10" 25 | Query(m, "fuga.0.greet"), // "Hello" 26 | Query(m, "langs.2"), // "English" 27 | Query(m, "required"), // false 28 | Query(m, "baz.biz"), // nil 29 | ) 30 | } 31 | ``` -------------------------------------------------------------------------------- /vendor/github.com/otiai10/mint/result.go: -------------------------------------------------------------------------------- 1 | package mint 2 | 3 | // MintResult provide the results of assertion 4 | // for `Dry` option. 5 | type MintResult struct { 6 | ok bool 7 | message string 8 | } 9 | 10 | // OK returns whether result is ok or not. 11 | func (r MintResult) OK() bool { 12 | return r.ok 13 | } 14 | 15 | // NG is the opposite alias for OK(). 16 | func (r MintResult) NG() bool { 17 | return !r.ok 18 | } 19 | 20 | // Message returns failure message. 21 | func (r MintResult) Message() string { 22 | return r.message 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/pkg/errors 3 | go: 4 | - 1.11.x 5 | - 1.12.x 6 | - 1.13.x 7 | - tip 8 | 9 | script: 10 | - make check 11 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/Makefile: -------------------------------------------------------------------------------- 1 | PKGS := github.com/pkg/errors 2 | SRCDIRS := $(shell go list -f '{{.Dir}}' $(PKGS)) 3 | GO := go 4 | 5 | check: test vet gofmt misspell unconvert staticcheck ineffassign unparam 6 | 7 | test: 8 | $(GO) test $(PKGS) 9 | 10 | vet: | test 11 | $(GO) vet $(PKGS) 12 | 13 | staticcheck: 14 | $(GO) get honnef.co/go/tools/cmd/staticcheck 15 | staticcheck -checks all $(PKGS) 16 | 17 | misspell: 18 | $(GO) get github.com/client9/misspell/cmd/misspell 19 | misspell \ 20 | -locale GB \ 21 | -error \ 22 | *.md *.go 23 | 24 | unconvert: 25 | $(GO) get github.com/mdempsky/unconvert 26 | unconvert -v $(PKGS) 27 | 28 | ineffassign: 29 | $(GO) get github.com/gordonklaus/ineffassign 30 | find $(SRCDIRS) -name '*.go' | xargs ineffassign 31 | 32 | pedantic: check errcheck 33 | 34 | unparam: 35 | $(GO) get mvdan.cc/unparam 36 | unparam ./... 37 | 38 | errcheck: 39 | $(GO) get github.com/kisielk/errcheck 40 | errcheck $(PKGS) 41 | 42 | gofmt: 43 | @echo Checking code is gofmted 44 | @test -z "$(shell gofmt -s -l -d -e $(SRCDIRS) | tee /dev/stderr)" 45 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /vendor/github.com/rivo/uniseg/LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Oliver Kuederle 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/sethvargo/go-password/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017 Seth Vargo 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/sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | vendor 3 | 4 | .idea/ 5 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.golangci.yml: -------------------------------------------------------------------------------- 1 | run: 2 | # do not run on test files yet 3 | tests: false 4 | 5 | # all available settings of specific linters 6 | linters-settings: 7 | errcheck: 8 | # report about not checking of errors in type assetions: `a := b.(MyStruct)`; 9 | # default is false: such cases aren't reported by default. 10 | check-type-assertions: false 11 | 12 | # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; 13 | # default is false: such cases aren't reported by default. 14 | check-blank: false 15 | 16 | lll: 17 | line-length: 100 18 | tab-width: 4 19 | 20 | prealloc: 21 | simple: false 22 | range-loops: false 23 | for-loops: false 24 | 25 | whitespace: 26 | multi-if: false # Enforces newlines (or comments) after every multi-line if statement 27 | multi-func: false # Enforces newlines (or comments) after every multi-line function signature 28 | 29 | linters: 30 | enable: 31 | - megacheck 32 | - govet 33 | disable: 34 | - maligned 35 | - prealloc 36 | disable-all: false 37 | presets: 38 | - bugs 39 | - unused 40 | fast: false 41 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/sirupsen/logrus 3 | git: 4 | depth: 1 5 | env: 6 | - GO111MODULE=on 7 | go: 1.15.x 8 | os: linux 9 | install: 10 | - ./travis/install.sh 11 | script: 12 | - cd ci 13 | - go run mage.go -v -w ../ crossBuild 14 | - go run mage.go -v -w ../ lint 15 | - go run mage.go -v -w ../ test 16 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Simon Eskildsen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | platform: x64 3 | clone_folder: c:\gopath\src\github.com\sirupsen\logrus 4 | environment: 5 | GOPATH: c:\gopath 6 | branches: 7 | only: 8 | - master 9 | install: 10 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 11 | - go version 12 | build_script: 13 | - go get -t 14 | - go test 15 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/buffer_pool.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "bytes" 5 | "sync" 6 | ) 7 | 8 | var ( 9 | bufferPool BufferPool 10 | ) 11 | 12 | type BufferPool interface { 13 | Put(*bytes.Buffer) 14 | Get() *bytes.Buffer 15 | } 16 | 17 | type defaultPool struct { 18 | pool *sync.Pool 19 | } 20 | 21 | func (p *defaultPool) Put(buf *bytes.Buffer) { 22 | p.pool.Put(buf) 23 | } 24 | 25 | func (p *defaultPool) Get() *bytes.Buffer { 26 | return p.pool.Get().(*bytes.Buffer) 27 | } 28 | 29 | // SetBufferPool allows to replace the default logrus buffer pool 30 | // to better meets the specific needs of an application. 31 | func SetBufferPool(bp BufferPool) { 32 | bufferPool = bp 33 | } 34 | 35 | func init() { 36 | SetBufferPool(&defaultPool{ 37 | pool: &sync.Pool{ 38 | New: func() interface{} { 39 | return new(bytes.Buffer) 40 | }, 41 | }, 42 | }) 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger. 3 | 4 | 5 | The simplest way to use Logrus is simply the package-level exported logger: 6 | 7 | package main 8 | 9 | import ( 10 | log "github.com/sirupsen/logrus" 11 | ) 12 | 13 | func main() { 14 | log.WithFields(log.Fields{ 15 | "animal": "walrus", 16 | "number": 1, 17 | "size": 10, 18 | }).Info("A walrus appears") 19 | } 20 | 21 | Output: 22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 23 | 24 | For a full guide visit https://github.com/sirupsen/logrus 25 | */ 26 | package logrus 27 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd netbsd openbsd 2 | // +build !js 3 | 4 | package logrus 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ioctlReadTermios = unix.TIOCGETA 9 | 10 | func isTerminal(fd int) bool { 11 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) 12 | return err == nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_js.go: -------------------------------------------------------------------------------- 1 | // +build js 2 | 3 | package logrus 4 | 5 | func isTerminal(fd int) bool { 6 | return false 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go: -------------------------------------------------------------------------------- 1 | // +build js nacl plan9 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return false 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,!windows,!nacl,!plan9 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | func checkIfTerminal(w io.Writer) bool { 11 | switch v := w.(type) { 12 | case *os.File: 13 | return isTerminal(int(v.Fd())) 14 | default: 15 | return false 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_solaris.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "golang.org/x/sys/unix" 5 | ) 6 | 7 | // IsTerminal returns true if the given file descriptor is a terminal. 8 | func isTerminal(fd int) bool { 9 | _, err := unix.IoctlGetTermio(fd, unix.TCGETA) 10 | return err == nil 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux aix zos 2 | // +build !js 3 | 4 | package logrus 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ioctlReadTermios = unix.TCGETS 9 | 10 | func isTerminal(fd int) bool { 11 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) 12 | return err == nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_windows.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,windows 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | 9 | "golang.org/x/sys/windows" 10 | ) 11 | 12 | func checkIfTerminal(w io.Writer) bool { 13 | switch v := w.(type) { 14 | case *os.File: 15 | handle := windows.Handle(v.Fd()) 16 | var mode uint32 17 | if err := windows.GetConsoleMode(handle, &mode); err != nil { 18 | return false 19 | } 20 | mode |= windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING 21 | if err := windows.SetConsoleMode(handle, mode); err != nil { 22 | return false 23 | } 24 | return true 25 | } 26 | return false 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | # Vim files https://github.com/github/gitignore/blob/master/Global/Vim.gitignore 23 | # swap 24 | [._]*.s[a-w][a-z] 25 | [._]s[a-w][a-z] 26 | # session 27 | Session.vim 28 | # temporary 29 | .netrwhist 30 | *~ 31 | # auto-generated tag files 32 | tags 33 | 34 | *.exe 35 | cobra.test 36 | bin 37 | 38 | .idea/ 39 | *.iml 40 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/.mailmap: -------------------------------------------------------------------------------- 1 | Steve Francia 2 | Bjørn Erik Pedersen 3 | Fabiano Franz 4 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/MAINTAINERS: -------------------------------------------------------------------------------- 1 | maintainers: 2 | - spf13 3 | - johnSchnake 4 | - jpmcb 5 | - marckhouzam 6 | inactive: 7 | - anthonyfok 8 | - bep 9 | - bogem 10 | - broady 11 | - eparis 12 | - jharshman 13 | - wfernandes 14 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/Makefile: -------------------------------------------------------------------------------- 1 | BIN="./bin" 2 | SRC=$(shell find . -name "*.go") 3 | 4 | ifeq (, $(shell which golangci-lint)) 5 | $(warning "could not find golangci-lint in $(PATH), run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh") 6 | endif 7 | 8 | .PHONY: fmt lint test install_deps clean 9 | 10 | default: all 11 | 12 | all: fmt test 13 | 14 | fmt: 15 | $(info ******************** checking formatting ********************) 16 | @test -z $(shell gofmt -l $(SRC)) || (gofmt -d $(SRC); exit 1) 17 | 18 | lint: 19 | $(info ******************** running lint tools ********************) 20 | golangci-lint run -v 21 | 22 | test: install_deps 23 | $(info ******************** running tests ********************) 24 | go test -v ./... 25 | 26 | richtest: install_deps 27 | $(info ******************** running tests with kyoh86/richgo ********************) 28 | richgo test -v ./... 29 | 30 | install_deps: 31 | $(info ******************** downloading dependencies ********************) 32 | go get -v ./... 33 | 34 | clean: 35 | rm -rf $(BIN) 36 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/command_notwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2023 The Cobra Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | //go:build !windows 16 | // +build !windows 17 | 18 | package cobra 19 | 20 | var preExecHookFn func(*Command) 21 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/command_win.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2023 The Cobra Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | //go:build windows 16 | // +build windows 17 | 18 | package cobra 19 | 20 | import ( 21 | "fmt" 22 | "os" 23 | "time" 24 | 25 | "github.com/inconshreveable/mousetrap" 26 | ) 27 | 28 | var preExecHookFn = preExecHook 29 | 30 | func preExecHook(c *Command) { 31 | if MousetrapHelpText != "" && mousetrap.StartedByExplorer() { 32 | c.Print(MousetrapHelpText) 33 | if MousetrapDisplayDuration > 0 { 34 | time.Sleep(MousetrapDisplayDuration) 35 | } else { 36 | c.Println("Press return to continue...") 37 | fmt.Scanln() 38 | } 39 | os.Exit(1) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.go] 12 | indent_style = tab 13 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/* 2 | 3 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/.golangci.yaml: -------------------------------------------------------------------------------- 1 | linters: 2 | disable-all: true 3 | enable: 4 | - nolintlint 5 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: go 4 | 5 | go: 6 | - 1.9.x 7 | - 1.10.x 8 | - 1.11.x 9 | - tip 10 | 11 | matrix: 12 | allow_failures: 13 | - go: tip 14 | 15 | install: 16 | - go get golang.org/x/lint/golint 17 | - export PATH=$GOPATH/bin:$PATH 18 | - go install ./... 19 | 20 | script: 21 | - verify/all.sh -v 22 | - go test ./... 23 | -------------------------------------------------------------------------------- /vendor/github.com/vbatts/tar-split/archive/tar/stat_actime1.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux dragonfly openbsd solaris 6 | 7 | package tar 8 | 9 | import ( 10 | "syscall" 11 | "time" 12 | ) 13 | 14 | func statAtime(st *syscall.Stat_t) time.Time { 15 | return time.Unix(st.Atim.Unix()) 16 | } 17 | 18 | func statCtime(st *syscall.Stat_t) time.Time { 19 | return time.Unix(st.Ctim.Unix()) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/vbatts/tar-split/archive/tar/stat_actime2.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin freebsd netbsd 6 | 7 | package tar 8 | 9 | import ( 10 | "syscall" 11 | "time" 12 | ) 13 | 14 | func statAtime(st *syscall.Stat_t) time.Time { 15 | return time.Unix(st.Atimespec.Unix()) 16 | } 17 | 18 | func statCtime(st *syscall.Stat_t) time.Time { 19 | return time.Unix(st.Ctimespec.Unix()) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/bcrypt/base64.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 bcrypt 6 | 7 | import "encoding/base64" 8 | 9 | const alphabet = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" 10 | 11 | var bcEncoding = base64.NewEncoding(alphabet) 12 | 13 | func base64Encode(src []byte) []byte { 14 | n := bcEncoding.EncodedLen(len(src)) 15 | dst := make([]byte, n) 16 | bcEncoding.Encode(dst, src) 17 | for dst[n-1] == '=' { 18 | n-- 19 | } 20 | return dst[:n] 21 | } 22 | 23 | func base64Decode(src []byte) ([]byte, error) { 24 | numOfEquals := 4 - (len(src) % 4) 25 | for i := 0; i < numOfEquals; i++ { 26 | src = append(src, '=') 27 | } 28 | 29 | dst := make([]byte, bcEncoding.DecodedLen(len(src))) 30 | n, err := bcEncoding.Decode(dst, src) 31 | if err != nil { 32 | return nil, err 33 | } 34 | return dst[:n], nil 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | type Signal = syscall.Signal 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for 386 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-28 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for AMD64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for ARM BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-28 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 21 | B syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 24 | B syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 27 | B syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for ARM64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ppc64, BSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for RISCV64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (ppc64 || ppc64le) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 17 | BL runtime·entersyscall(SB) 18 | MOVD a1+8(FP), R3 19 | MOVD a2+16(FP), R4 20 | MOVD a3+24(FP), R5 21 | MOVD R0, R6 22 | MOVD R0, R7 23 | MOVD R0, R8 24 | MOVD trap+0(FP), R9 // syscall entry 25 | SYSCALL R9 26 | MOVD R3, r1+32(FP) 27 | MOVD R4, r2+40(FP) 28 | BL runtime·exitsyscall(SB) 29 | RET 30 | 31 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 32 | MOVD a1+8(FP), R3 33 | MOVD a2+16(FP), R4 34 | MOVD a3+24(FP), R5 35 | MOVD R0, R6 36 | MOVD R0, R7 37 | MOVD R0, R8 38 | MOVD trap+0(FP), R9 // syscall entry 39 | SYSCALL R9 40 | MOVD R3, r1+32(FP) 41 | MOVD R4, r2+40(FP) 42 | RET 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_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_openbsd_mips64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for mips64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/auxv.go: -------------------------------------------------------------------------------- 1 | // Copyright 2025 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.21 && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | //go:linkname runtime_getAuxv runtime.getAuxv 15 | func runtime_getAuxv() []uintptr 16 | 17 | // Auxv returns the ELF auxiliary vector as a sequence of key/value pairs. 18 | // The returned slice is always a fresh copy, owned by the caller. 19 | // It returns an error on non-ELF platforms, or if the auxiliary vector cannot be accessed, 20 | // which happens in some locked-down environments and build modes. 21 | func Auxv() ([][2]uintptr, error) { 22 | vec := runtime_getAuxv() 23 | vecLen := len(vec) 24 | 25 | if vecLen == 0 { 26 | return nil, syscall.ENOENT 27 | } 28 | 29 | if vecLen%2 != 0 { 30 | return nil, syscall.EINVAL 31 | } 32 | 33 | result := make([]uintptr, vecLen) 34 | copy(result, vec) 35 | return unsafe.Slice((*[2]uintptr)(unsafe.Pointer(&result[0])), vecLen/2), nil 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/auxv_unsupported.go: -------------------------------------------------------------------------------- 1 | // Copyright 2025 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.21 && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Auxv() ([][2]uintptr, error) { 12 | return nil, syscall.ENOTSUP 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | HCI_CHANNEL_LOGGING = 4 27 | ) 28 | 29 | // Socketoption Level 30 | const ( 31 | SOL_BLUETOOTH = 0x112 32 | SOL_HCI = 0x0 33 | SOL_L2CAP = 0x6 34 | SOL_RFCOMM = 0x12 35 | SOL_SCO = 0x11 36 | ) 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev >> 16) & 0xffff) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32(dev & 0xffff) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | return uint64(((major) << 16) | (minor)) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc64 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev & 0x3fffffff00000000) >> 32) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32((dev & 0x00000000ffffffff) >> 0) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | var DEVNO64 uint64 26 | DEVNO64 = 0x8000000000000000 27 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Dragonfly's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a DragonFlyBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a DragonFlyBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_freebsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in FreeBSD's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a FreeBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a FreeBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a FreeBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_zos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build zos && s390x 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by z/OS. 9 | // 10 | // The information below is extracted and adapted from macros. 11 | 12 | package unix 13 | 14 | // Major returns the major component of a z/OS device number. 15 | func Major(dev uint64) uint32 { 16 | return uint32((dev >> 16) & 0x0000FFFF) 17 | } 18 | 19 | // Minor returns the minor component of a z/OS device number. 20 | func Minor(dev uint64) uint32 { 21 | return uint32(dev & 0x0000FFFF) 22 | } 23 | 24 | // Mkdev returns a z/OS device number generated from the given major and minor 25 | // components. 26 | func Mkdev(major, minor uint32) uint64 { 27 | return (uint64(major) << 16) | uint64(minor) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build dragonfly || freebsd || linux || netbsd 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 12 | // systems by fcntl_linux_32bit.go to be SYS_FCNTL64. 13 | var fcntl64Syscall uintptr = SYS_FCNTL 14 | 15 | func fcntl(fd int, cmd, arg int) (int, error) { 16 | valptr, _, errno := Syscall(fcntl64Syscall, uintptr(fd), uintptr(cmd), uintptr(arg)) 17 | var err error 18 | if errno != 0 { 19 | err = errno 20 | } 21 | return int(valptr), err 22 | } 23 | 24 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 25 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 26 | return fcntl(int(fd), cmd, arg) 27 | } 28 | 29 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 30 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 31 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 32 | if errno == 0 { 33 | return nil 34 | } 35 | return errno 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 11 | return fcntl(int(fd), cmd, arg) 12 | } 13 | 14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) 17 | return err 18 | } 19 | 20 | // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command. 21 | func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error { 22 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore)))) 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fdset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | // Set adds fd to the set fds. 10 | func (fds *FdSet) Set(fd int) { 11 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS)) 12 | } 13 | 14 | // Clear removes fd from the set fds. 15 | func (fds *FdSet) Clear(fd int) { 16 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS)) 17 | } 18 | 19 | // IsSet returns whether fd is in the set fds. 20 | func (fds *FdSet) IsSet(fd int) bool { 21 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0 22 | } 23 | 24 | // Zero clears the set fds. 25 | func (fds *FdSet) Zero() { 26 | for i := range fds.Bits { 27 | fds.Bits[i] = 0 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gccgo && linux && amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mmap_nomremap.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | var mapper = &mmapper{ 10 | active: make(map[*byte][]byte), 11 | mmap: mmap, 12 | munmap: munmap, 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && !ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) error { 10 | return ptrace1(request, pid, addr, data) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_ios.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 10 | return ENOTSUP 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && race) || (linux && race) || (freebsd && race) 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd 6 | 7 | package unix 8 | 9 | // ReadDirent reads directory entries from fd and writes them into buf. 10 | func ReadDirent(fd int, buf []byte) (n int, err error) { 11 | return Getdents(fd, buf) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdirentries.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin || zos 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // ReadDirent reads directory entries from fd and writes them into buf. 12 | func ReadDirent(fd int, buf []byte) (n int, err error) { 13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 15 | // actual system call is getdirentries64, 64 is a good guess. 16 | // TODO(rsc): Can we use a single global basep for all calls? 17 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 18 | return Getdirentries(fd, buf, base) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | // Round the length of a raw sockaddr up to align it properly. 8 | func cmsgAlignOf(salen int) int { 9 | salign := SizeofPtr 10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { 11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires 12 | // 32-bit aligned access to network subsystem. 13 | salign = 4 14 | } 15 | return (salen + salign - 1) & ^(salign - 1) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/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_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_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/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 | --------------------------------------------------------------------------------