├── .gitignore ├── COPYING.md ├── README.md ├── cmd ├── create.go └── pull.go ├── go.mod ├── go.sum ├── main.go ├── pkg ├── fileutils │ └── file_utils.go ├── imageutils │ └── image_utils.go ├── logging │ └── logging.go ├── sysextutils │ └── sysext_utils.go └── utils │ └── utils.go └── vendor ├── github.com ├── 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 │ └── docker │ │ ├── AUTHORS │ │ ├── LICENSE │ │ ├── NOTICE │ │ └── pkg │ │ └── homedir │ │ ├── homedir.go │ │ ├── homedir_linux.go │ │ └── homedir_others.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 │ │ └── 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 ├── mitchellh │ ├── colorstring │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ └── colorstring.go │ └── go-homedir │ │ ├── LICENSE │ │ ├── README.md │ │ └── homedir.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 ├── 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 ├── schollz │ └── progressbar │ │ └── v3 │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── progressbar.go │ │ └── spinners.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 │ │ ├── .gitignore │ │ ├── .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 │ │ ├── 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 │ ├── sync │ ├── LICENSE │ ├── PATENTS │ └── errgroup │ │ ├── errgroup.go │ │ ├── go120.go │ │ └── pre_go120.go │ ├── sys │ ├── LICENSE │ ├── PATENTS │ ├── plan9 │ │ ├── asm.s │ │ ├── asm_plan9_386.s │ │ ├── asm_plan9_amd64.s │ │ ├── asm_plan9_arm.s │ │ ├── const_plan9.go │ │ ├── dir_plan9.go │ │ ├── env_plan9.go │ │ ├── errors_plan9.go │ │ ├── mkall.sh │ │ ├── mkerrors.sh │ │ ├── mksysnum_plan9.sh │ │ ├── pwd_go15_plan9.go │ │ ├── pwd_plan9.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_plan9.go │ │ ├── zsyscall_plan9_386.go │ │ ├── zsyscall_plan9_amd64.go │ │ ├── zsyscall_plan9_arm.go │ │ └── zsysnum_plan9.go │ ├── unix │ │ ├── .gitignore │ │ ├── README.md │ │ ├── affinity_linux.go │ │ ├── aliases.go │ │ ├── asm_aix_ppc64.s │ │ ├── asm_bsd_386.s │ │ ├── asm_bsd_amd64.s │ │ ├── asm_bsd_arm.s │ │ ├── asm_bsd_arm64.s │ │ ├── asm_bsd_ppc64.s │ │ ├── asm_bsd_riscv64.s │ │ ├── asm_linux_386.s │ │ ├── asm_linux_amd64.s │ │ ├── asm_linux_arm.s │ │ ├── asm_linux_arm64.s │ │ ├── asm_linux_loong64.s │ │ ├── asm_linux_mips64x.s │ │ ├── asm_linux_mipsx.s │ │ ├── asm_linux_ppc64x.s │ │ ├── asm_linux_riscv64.s │ │ ├── asm_linux_s390x.s │ │ ├── asm_openbsd_mips64.s │ │ ├── asm_solaris_amd64.s │ │ ├── asm_zos_s390x.s │ │ ├── bluetooth_linux.go │ │ ├── bpxsvc_zos.go │ │ ├── bpxsvc_zos.s │ │ ├── cap_freebsd.go │ │ ├── constants.go │ │ ├── dev_aix_ppc.go │ │ ├── dev_aix_ppc64.go │ │ ├── dev_darwin.go │ │ ├── dev_dragonfly.go │ │ ├── dev_freebsd.go │ │ ├── dev_linux.go │ │ ├── dev_netbsd.go │ │ ├── dev_openbsd.go │ │ ├── dev_zos.go │ │ ├── dirent.go │ │ ├── endian_big.go │ │ ├── endian_little.go │ │ ├── env_unix.go │ │ ├── fcntl.go │ │ ├── fcntl_darwin.go │ │ ├── fcntl_linux_32bit.go │ │ ├── fdset.go │ │ ├── gccgo.go │ │ ├── gccgo_c.c │ │ ├── gccgo_linux_amd64.go │ │ ├── ifreq_linux.go │ │ ├── ioctl_linux.go │ │ ├── ioctl_signed.go │ │ ├── ioctl_unsigned.go │ │ ├── ioctl_zos.go │ │ ├── mkall.sh │ │ ├── mkerrors.sh │ │ ├── mmap_nomremap.go │ │ ├── mremap.go │ │ ├── pagesize_unix.go │ │ ├── pledge_openbsd.go │ │ ├── ptrace_darwin.go │ │ ├── ptrace_ios.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── readdirent_getdents.go │ │ ├── readdirent_getdirentries.go │ │ ├── sockcmsg_dragonfly.go │ │ ├── sockcmsg_linux.go │ │ ├── sockcmsg_unix.go │ │ ├── sockcmsg_unix_other.go │ │ ├── sockcmsg_zos.go │ │ ├── symaddr_zos_s390x.s │ │ ├── syscall.go │ │ ├── syscall_aix.go │ │ ├── syscall_aix_ppc.go │ │ ├── syscall_aix_ppc64.go │ │ ├── syscall_bsd.go │ │ ├── syscall_darwin.go │ │ ├── syscall_darwin_amd64.go │ │ ├── syscall_darwin_arm64.go │ │ ├── syscall_darwin_libSystem.go │ │ ├── syscall_dragonfly.go │ │ ├── syscall_dragonfly_amd64.go │ │ ├── syscall_freebsd.go │ │ ├── syscall_freebsd_386.go │ │ ├── syscall_freebsd_amd64.go │ │ ├── syscall_freebsd_arm.go │ │ ├── syscall_freebsd_arm64.go │ │ ├── syscall_freebsd_riscv64.go │ │ ├── syscall_hurd.go │ │ ├── syscall_hurd_386.go │ │ ├── syscall_illumos.go │ │ ├── syscall_linux.go │ │ ├── syscall_linux_386.go │ │ ├── syscall_linux_alarm.go │ │ ├── syscall_linux_amd64.go │ │ ├── syscall_linux_amd64_gc.go │ │ ├── syscall_linux_arm.go │ │ ├── syscall_linux_arm64.go │ │ ├── syscall_linux_gc.go │ │ ├── syscall_linux_gc_386.go │ │ ├── syscall_linux_gc_arm.go │ │ ├── syscall_linux_gccgo_386.go │ │ ├── syscall_linux_gccgo_arm.go │ │ ├── syscall_linux_loong64.go │ │ ├── syscall_linux_mips64x.go │ │ ├── syscall_linux_mipsx.go │ │ ├── syscall_linux_ppc.go │ │ ├── syscall_linux_ppc64x.go │ │ ├── syscall_linux_riscv64.go │ │ ├── syscall_linux_s390x.go │ │ ├── syscall_linux_sparc64.go │ │ ├── syscall_netbsd.go │ │ ├── syscall_netbsd_386.go │ │ ├── syscall_netbsd_amd64.go │ │ ├── syscall_netbsd_arm.go │ │ ├── syscall_netbsd_arm64.go │ │ ├── syscall_openbsd.go │ │ ├── syscall_openbsd_386.go │ │ ├── syscall_openbsd_amd64.go │ │ ├── syscall_openbsd_arm.go │ │ ├── syscall_openbsd_arm64.go │ │ ├── syscall_openbsd_libc.go │ │ ├── syscall_openbsd_mips64.go │ │ ├── syscall_openbsd_ppc64.go │ │ ├── syscall_openbsd_riscv64.go │ │ ├── syscall_solaris.go │ │ ├── syscall_solaris_amd64.go │ │ ├── syscall_unix.go │ │ ├── syscall_unix_gc.go │ │ ├── syscall_unix_gc_ppc64x.go │ │ ├── syscall_zos_s390x.go │ │ ├── sysvshm_linux.go │ │ ├── sysvshm_unix.go │ │ ├── sysvshm_unix_other.go │ │ ├── timestruct.go │ │ ├── unveil_openbsd.go │ │ ├── xattr_bsd.go │ │ ├── zerrors_aix_ppc.go │ │ ├── zerrors_aix_ppc64.go │ │ ├── zerrors_darwin_amd64.go │ │ ├── zerrors_darwin_arm64.go │ │ ├── zerrors_dragonfly_amd64.go │ │ ├── zerrors_freebsd_386.go │ │ ├── zerrors_freebsd_amd64.go │ │ ├── zerrors_freebsd_arm.go │ │ ├── zerrors_freebsd_arm64.go │ │ ├── zerrors_freebsd_riscv64.go │ │ ├── zerrors_linux.go │ │ ├── zerrors_linux_386.go │ │ ├── zerrors_linux_amd64.go │ │ ├── zerrors_linux_arm.go │ │ ├── zerrors_linux_arm64.go │ │ ├── zerrors_linux_loong64.go │ │ ├── zerrors_linux_mips.go │ │ ├── zerrors_linux_mips64.go │ │ ├── zerrors_linux_mips64le.go │ │ ├── zerrors_linux_mipsle.go │ │ ├── zerrors_linux_ppc.go │ │ ├── zerrors_linux_ppc64.go │ │ ├── zerrors_linux_ppc64le.go │ │ ├── zerrors_linux_riscv64.go │ │ ├── zerrors_linux_s390x.go │ │ ├── zerrors_linux_sparc64.go │ │ ├── zerrors_netbsd_386.go │ │ ├── zerrors_netbsd_amd64.go │ │ ├── zerrors_netbsd_arm.go │ │ ├── zerrors_netbsd_arm64.go │ │ ├── zerrors_openbsd_386.go │ │ ├── zerrors_openbsd_amd64.go │ │ ├── zerrors_openbsd_arm.go │ │ ├── zerrors_openbsd_arm64.go │ │ ├── zerrors_openbsd_mips64.go │ │ ├── zerrors_openbsd_ppc64.go │ │ ├── zerrors_openbsd_riscv64.go │ │ ├── zerrors_solaris_amd64.go │ │ ├── zerrors_zos_s390x.go │ │ ├── zptrace_armnn_linux.go │ │ ├── zptrace_linux_arm64.go │ │ ├── zptrace_mipsnn_linux.go │ │ ├── zptrace_mipsnnle_linux.go │ │ ├── zptrace_x86_linux.go │ │ ├── zsymaddr_zos_s390x.s │ │ ├── zsyscall_aix_ppc.go │ │ ├── zsyscall_aix_ppc64.go │ │ ├── zsyscall_aix_ppc64_gc.go │ │ ├── zsyscall_aix_ppc64_gccgo.go │ │ ├── zsyscall_darwin_amd64.go │ │ ├── zsyscall_darwin_amd64.s │ │ ├── zsyscall_darwin_arm64.go │ │ ├── zsyscall_darwin_arm64.s │ │ ├── zsyscall_dragonfly_amd64.go │ │ ├── zsyscall_freebsd_386.go │ │ ├── zsyscall_freebsd_amd64.go │ │ ├── zsyscall_freebsd_arm.go │ │ ├── zsyscall_freebsd_arm64.go │ │ ├── zsyscall_freebsd_riscv64.go │ │ ├── zsyscall_illumos_amd64.go │ │ ├── zsyscall_linux.go │ │ ├── zsyscall_linux_386.go │ │ ├── zsyscall_linux_amd64.go │ │ ├── zsyscall_linux_arm.go │ │ ├── zsyscall_linux_arm64.go │ │ ├── zsyscall_linux_loong64.go │ │ ├── zsyscall_linux_mips.go │ │ ├── zsyscall_linux_mips64.go │ │ ├── zsyscall_linux_mips64le.go │ │ ├── zsyscall_linux_mipsle.go │ │ ├── zsyscall_linux_ppc.go │ │ ├── zsyscall_linux_ppc64.go │ │ ├── zsyscall_linux_ppc64le.go │ │ ├── zsyscall_linux_riscv64.go │ │ ├── zsyscall_linux_s390x.go │ │ ├── zsyscall_linux_sparc64.go │ │ ├── zsyscall_netbsd_386.go │ │ ├── zsyscall_netbsd_amd64.go │ │ ├── zsyscall_netbsd_arm.go │ │ ├── zsyscall_netbsd_arm64.go │ │ ├── zsyscall_openbsd_386.go │ │ ├── zsyscall_openbsd_386.s │ │ ├── zsyscall_openbsd_amd64.go │ │ ├── zsyscall_openbsd_amd64.s │ │ ├── zsyscall_openbsd_arm.go │ │ ├── zsyscall_openbsd_arm.s │ │ ├── zsyscall_openbsd_arm64.go │ │ ├── zsyscall_openbsd_arm64.s │ │ ├── zsyscall_openbsd_mips64.go │ │ ├── zsyscall_openbsd_mips64.s │ │ ├── zsyscall_openbsd_ppc64.go │ │ ├── zsyscall_openbsd_ppc64.s │ │ ├── zsyscall_openbsd_riscv64.go │ │ ├── zsyscall_openbsd_riscv64.s │ │ ├── zsyscall_solaris_amd64.go │ │ ├── zsyscall_zos_s390x.go │ │ ├── zsysctl_openbsd_386.go │ │ ├── zsysctl_openbsd_amd64.go │ │ ├── zsysctl_openbsd_arm.go │ │ ├── zsysctl_openbsd_arm64.go │ │ ├── zsysctl_openbsd_mips64.go │ │ ├── zsysctl_openbsd_ppc64.go │ │ ├── zsysctl_openbsd_riscv64.go │ │ ├── zsysnum_darwin_amd64.go │ │ ├── zsysnum_darwin_arm64.go │ │ ├── zsysnum_dragonfly_amd64.go │ │ ├── zsysnum_freebsd_386.go │ │ ├── zsysnum_freebsd_amd64.go │ │ ├── zsysnum_freebsd_arm.go │ │ ├── zsysnum_freebsd_arm64.go │ │ ├── zsysnum_freebsd_riscv64.go │ │ ├── zsysnum_linux_386.go │ │ ├── zsysnum_linux_amd64.go │ │ ├── zsysnum_linux_arm.go │ │ ├── zsysnum_linux_arm64.go │ │ ├── zsysnum_linux_loong64.go │ │ ├── zsysnum_linux_mips.go │ │ ├── zsysnum_linux_mips64.go │ │ ├── zsysnum_linux_mips64le.go │ │ ├── zsysnum_linux_mipsle.go │ │ ├── zsysnum_linux_ppc.go │ │ ├── zsysnum_linux_ppc64.go │ │ ├── zsysnum_linux_ppc64le.go │ │ ├── zsysnum_linux_riscv64.go │ │ ├── zsysnum_linux_s390x.go │ │ ├── zsysnum_linux_sparc64.go │ │ ├── zsysnum_netbsd_386.go │ │ ├── zsysnum_netbsd_amd64.go │ │ ├── zsysnum_netbsd_arm.go │ │ ├── zsysnum_netbsd_arm64.go │ │ ├── zsysnum_openbsd_386.go │ │ ├── zsysnum_openbsd_amd64.go │ │ ├── zsysnum_openbsd_arm.go │ │ ├── zsysnum_openbsd_arm64.go │ │ ├── zsysnum_openbsd_mips64.go │ │ ├── zsysnum_openbsd_ppc64.go │ │ ├── zsysnum_openbsd_riscv64.go │ │ ├── zsysnum_zos_s390x.go │ │ ├── ztypes_aix_ppc.go │ │ ├── ztypes_aix_ppc64.go │ │ ├── ztypes_darwin_amd64.go │ │ ├── ztypes_darwin_arm64.go │ │ ├── ztypes_dragonfly_amd64.go │ │ ├── ztypes_freebsd_386.go │ │ ├── ztypes_freebsd_amd64.go │ │ ├── ztypes_freebsd_arm.go │ │ ├── ztypes_freebsd_arm64.go │ │ ├── ztypes_freebsd_riscv64.go │ │ ├── ztypes_linux.go │ │ ├── ztypes_linux_386.go │ │ ├── ztypes_linux_amd64.go │ │ ├── ztypes_linux_arm.go │ │ ├── ztypes_linux_arm64.go │ │ ├── ztypes_linux_loong64.go │ │ ├── ztypes_linux_mips.go │ │ ├── ztypes_linux_mips64.go │ │ ├── ztypes_linux_mips64le.go │ │ ├── ztypes_linux_mipsle.go │ │ ├── ztypes_linux_ppc.go │ │ ├── ztypes_linux_ppc64.go │ │ ├── ztypes_linux_ppc64le.go │ │ ├── ztypes_linux_riscv64.go │ │ ├── ztypes_linux_s390x.go │ │ ├── ztypes_linux_sparc64.go │ │ ├── ztypes_netbsd_386.go │ │ ├── ztypes_netbsd_amd64.go │ │ ├── ztypes_netbsd_arm.go │ │ ├── ztypes_netbsd_arm64.go │ │ ├── ztypes_openbsd_386.go │ │ ├── ztypes_openbsd_amd64.go │ │ ├── ztypes_openbsd_arm.go │ │ ├── ztypes_openbsd_arm64.go │ │ ├── ztypes_openbsd_mips64.go │ │ ├── ztypes_openbsd_ppc64.go │ │ ├── ztypes_openbsd_riscv64.go │ │ ├── ztypes_solaris_amd64.go │ │ └── ztypes_zos_s390x.go │ └── windows │ │ ├── aliases.go │ │ ├── dll_windows.go │ │ ├── env_windows.go │ │ ├── eventlog.go │ │ ├── exec_windows.go │ │ ├── memory_windows.go │ │ ├── mkerrors.bash │ │ ├── mkknownfolderids.bash │ │ ├── mksyscall.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── security_windows.go │ │ ├── service.go │ │ ├── setupapi_windows.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_windows.go │ │ ├── types_windows.go │ │ ├── types_windows_386.go │ │ ├── types_windows_amd64.go │ │ ├── types_windows_arm.go │ │ ├── types_windows_arm64.go │ │ ├── zerrors_windows.go │ │ ├── zknownfolderids_windows.go │ │ └── zsyscall_windows.go │ └── term │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── PATENTS │ ├── README.md │ ├── codereview.cfg │ ├── term.go │ ├── term_plan9.go │ ├── term_unix.go │ ├── term_unix_bsd.go │ ├── term_unix_other.go │ ├── term_unsupported.go │ ├── term_windows.go │ └── terminal.go └── modules.txt /.gitignore: -------------------------------------------------------------------------------- 1 | oci-sysext 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OCI-SYSEXT 2 | 3 | This tool aims to be a little bridge to transform an OCI image into a systemd-sysext compatible raw image. 4 | 5 | ## Compile 6 | 7 | `CGO_ENABLED=0 go build -mod vendor -ldflags="-s -w"` 8 | 9 | ## Usage 10 | 11 | ```sh 12 | ./oci-sysext pull cgr.dev/chainguard/wolfi-base 13 | ./oci-sysext create --image cgr.dev/chainguard/wolfi-base --name wolfi-zero-cve-userspace --fs btrfs --image-source 14 | ``` 15 | 16 | ### Usage notes 17 | 18 | - Supported `--fs` are `squashfs` and `btrfs` 19 | -------------------------------------------------------------------------------- /cmd/pull.go: -------------------------------------------------------------------------------- 1 | // Package cmd contains all the cobra commands for the CLI application. 2 | package cmd 3 | 4 | import ( 5 | "fmt" 6 | 7 | "github.com/89luca89/oci-sysext/pkg/imageutils" 8 | "github.com/89luca89/oci-sysext/pkg/logging" 9 | "github.com/spf13/cobra" 10 | ) 11 | 12 | // NewPullCommand will pull a new OCI image from a registry. 13 | func NewPullCommand() *cobra.Command { 14 | pullCommand := &cobra.Command{ 15 | Use: "pull [flags] IMAGE:TAG", 16 | Short: "Pull an image from a registry", 17 | PreRunE: logging.Init, 18 | RunE: pull, 19 | SilenceUsage: true, 20 | SilenceErrors: true, 21 | TraverseChildren: true, 22 | } 23 | 24 | pullCommand.Flags().SetInterspersed(false) 25 | pullCommand.Flags().BoolP("help", "h", false, "show help") 26 | pullCommand.Flags().BoolP("quiet", "q", false, "suppress output") 27 | 28 | return pullCommand 29 | } 30 | 31 | // Pull will download an OCI image in the configured DIR. 32 | func pull(cmd *cobra.Command, arguments []string) error { 33 | if len(arguments) < 1 { 34 | return cmd.Help() 35 | } 36 | 37 | quiet, err := cmd.Flags().GetBool("quiet") 38 | if err != nil { 39 | return err 40 | } 41 | 42 | for _, image := range arguments { 43 | id, err := imageutils.Pull(image, quiet) 44 | if err != nil { 45 | return err 46 | } 47 | 48 | fmt.Println(id) 49 | } 50 | 51 | return nil 52 | } 53 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/89luca89/oci-sysext 2 | 3 | go 1.21 4 | 5 | require ( 6 | github.com/google/go-containerregistry v0.19.2 7 | github.com/schollz/progressbar/v3 v3.14.4 8 | github.com/spf13/cobra v1.8.1 9 | ) 10 | 11 | require ( 12 | github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect 13 | github.com/docker/cli v26.1.4+incompatible // indirect 14 | github.com/docker/distribution v2.8.3+incompatible // indirect 15 | github.com/docker/docker v26.1.4+incompatible // indirect 16 | github.com/docker/docker-credential-helpers v0.8.2 // indirect 17 | github.com/inconshreveable/mousetrap v1.1.0 // indirect 18 | github.com/klauspost/compress v1.17.9 // indirect 19 | github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect 20 | github.com/mitchellh/go-homedir v1.1.0 // indirect 21 | github.com/opencontainers/go-digest v1.0.0 // indirect 22 | github.com/opencontainers/image-spec v1.1.0 // indirect 23 | github.com/pkg/errors v0.9.1 // indirect 24 | github.com/rivo/uniseg v0.4.7 // indirect 25 | github.com/sirupsen/logrus v1.9.3 // indirect 26 | github.com/spf13/pflag v1.0.5 // indirect 27 | github.com/stretchr/testify v1.8.2 // indirect 28 | github.com/vbatts/tar-split v0.11.5 // indirect 29 | golang.org/x/sync v0.7.0 // indirect 30 | golang.org/x/sys v0.21.0 // indirect 31 | golang.org/x/term v0.21.0 // indirect 32 | ) 33 | -------------------------------------------------------------------------------- /pkg/utils/utils.go: -------------------------------------------------------------------------------- 1 | // Package utils contains generic helpers, utilities and structs. 2 | package utils 3 | 4 | import ( 5 | "os" 6 | "path/filepath" 7 | ) 8 | 9 | // OciSysextBinPath is the bin path internally used by oci-sysext. 10 | var OciSysextBinPath = filepath.Join(GetOciSysextHome(), "bin") 11 | 12 | // GetOciSysextHome will return where the program will save data. 13 | // This function will search the environment or: 14 | // 15 | // OCI-SYSEXT_HOME 16 | // XDG_DATA_HOME 17 | // HOME 18 | // 19 | // These variable are searched in this order. 20 | func GetOciSysextHome() string { 21 | if os.Getenv("OCI-SYSEXT_HOME") != "" { 22 | return filepath.Join(os.Getenv("OCI-SYSEXT_HOME"), "oci-sysext") 23 | } 24 | 25 | if os.Getenv("XDG_DATA_HOME") != "" { 26 | return filepath.Join(os.Getenv("XDG_DATA_HOME"), "oci-sysext") 27 | } 28 | 29 | return filepath.Join(os.Getenv("HOME"), ".local/share/oci-sysext") 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/containerd/stargz-snapshotter/estargz/errorutil/errors.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The containerd Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package errorutil 18 | 19 | import ( 20 | "errors" 21 | "fmt" 22 | "strings" 23 | ) 24 | 25 | // Aggregate combines a list of errors into a single new error. 26 | func Aggregate(errs []error) error { 27 | switch len(errs) { 28 | case 0: 29 | return nil 30 | case 1: 31 | return errs[0] 32 | default: 33 | points := make([]string, len(errs)+1) 34 | points[0] = fmt.Sprintf("%d error(s) occurred:", len(errs)) 35 | for i, err := range errs { 36 | points[i+1] = fmt.Sprintf("* %s", err) 37 | } 38 | return errors.New(strings.Join(points, "\n\t")) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /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, please 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/docker/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, please 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/docker/pkg/homedir/homedir.go: -------------------------------------------------------------------------------- 1 | package homedir 2 | 3 | import ( 4 | "os" 5 | "os/user" 6 | "runtime" 7 | ) 8 | 9 | // Get returns the home directory of the current user with the help of 10 | // environment variables depending on the target operating system. 11 | // Returned path should be used with "path/filepath" to form new paths. 12 | // 13 | // On non-Windows platforms, it falls back to nss lookups, if the home 14 | // directory cannot be obtained from environment-variables. 15 | // 16 | // If linking statically with cgo enabled against glibc, ensure the 17 | // osusergo build tag is used. 18 | // 19 | // If needing to do nss lookups, do not disable cgo or set osusergo. 20 | func Get() string { 21 | home, _ := os.UserHomeDir() 22 | if home == "" && runtime.GOOS != "windows" { 23 | if u, err := user.Current(); err == nil { 24 | return u.HomeDir 25 | } 26 | } 27 | return home 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/homedir/homedir_others.go: -------------------------------------------------------------------------------- 1 | //go:build !linux 2 | 3 | package homedir // import "github.com/docker/docker/pkg/homedir" 4 | 5 | import ( 6 | "errors" 7 | ) 8 | 9 | // GetRuntimeDir is unsupported on non-linux system. 10 | func GetRuntimeDir() (string, error) { 11 | return "", errors.New("homedir.GetRuntimeDir() is not supported on this system") 12 | } 13 | 14 | // StickRuntimeDirContents is unsupported on non-linux system. 15 | func StickRuntimeDirContents(files []string) ([]string, error) { 16 | return nil, errors.New("homedir.StickRuntimeDirContents() is not supported on this system") 17 | } 18 | 19 | // GetDataHome is unsupported on non-linux system. 20 | func GetDataHome() (string, error) { 21 | return "", errors.New("homedir.GetDataHome() is not supported on this system") 22 | } 23 | 24 | // GetConfigHome is unsupported on non-linux system. 25 | func GetConfigHome() (string, error) { 26 | return "", errors.New("homedir.GetConfigHome() is not supported on this system") 27 | } 28 | 29 | // GetLibHome is unsupported on non-linux system. 30 | func GetLibHome() (string, error) { 31 | return "", errors.New("homedir.GetLibHome() is not supported on this system") 32 | } 33 | -------------------------------------------------------------------------------- /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/catalog.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 16 | 17 | import ( 18 | "context" 19 | 20 | "github.com/google/go-containerregistry/pkg/name" 21 | "github.com/google/go-containerregistry/pkg/v1/remote" 22 | ) 23 | 24 | // Catalog returns the repositories in a registry's catalog. 25 | func Catalog(src string, opt ...Option) (res []string, err error) { 26 | o := makeOptions(opt...) 27 | reg, err := name.NewRegistry(src, o.Name...) 28 | if err != nil { 29 | return nil, err 30 | } 31 | 32 | // This context gets overridden by remote.WithContext, which is set by 33 | // crane.WithContext. 34 | return remote.Catalog(context.Background(), reg, o.Remote...) 35 | } 36 | -------------------------------------------------------------------------------- /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/crane/tag.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 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 | // Tag adds tag to the remote img. 25 | func Tag(img, tag string, opt ...Option) error { 26 | o := makeOptions(opt...) 27 | ref, err := name.ParseReference(img, o.Name...) 28 | if err != nil { 29 | return fmt.Errorf("parsing reference %q: %w", img, err) 30 | } 31 | desc, err := remote.Get(ref, o.Remote...) 32 | if err != nil { 33 | return fmt.Errorf("fetching %q: %w", img, err) 34 | } 35 | 36 | dst := ref.Context().Tag(tag) 37 | 38 | return remote.Tag(dst, desc, o.Remote...) 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-containerregistry/pkg/legacy/config.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 16 | 17 | import ( 18 | v1 "github.com/google/go-containerregistry/pkg/v1" 19 | ) 20 | 21 | // LayerConfigFile is the configuration file that holds the metadata describing 22 | // a v1 layer. See: 23 | // https://github.com/moby/moby/blob/master/image/spec/v1.md 24 | type LayerConfigFile struct { 25 | v1.ConfigFile 26 | 27 | ContainerConfig v1.Config `json:"container_config,omitempty"` 28 | 29 | ID string `json:"id,omitempty"` 30 | Parent string `json:"parent,omitempty"` 31 | Throwaway bool `json:"throwaway,omitempty"` 32 | Comment string `json:"comment,omitempty"` 33 | } 34 | -------------------------------------------------------------------------------- /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/logs/logs.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 logs exposes the loggers used by this library. 16 | package logs 17 | 18 | import ( 19 | "io" 20 | "log" 21 | ) 22 | 23 | var ( 24 | // Warn is used to log non-fatal errors. 25 | Warn = log.New(io.Discard, "", log.LstdFlags) 26 | 27 | // Progress is used to log notable, successful events. 28 | Progress = log.New(io.Discard, "", log.LstdFlags) 29 | 30 | // Debug is used to log information that is useful for debugging. 31 | Debug = log.New(io.Discard, "", log.LstdFlags) 32 | ) 33 | 34 | // Enabled checks to see if the logger's writer is set to something other 35 | // than io.Discard. This allows callers to avoid expensive operations 36 | // that will end up in /dev/null anyway. 37 | func Enabled(l *log.Logger) bool { 38 | return l.Writer() != io.Discard 39 | } 40 | -------------------------------------------------------------------------------- /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/blob.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 16 | 17 | import ( 18 | "io" 19 | "os" 20 | 21 | v1 "github.com/google/go-containerregistry/pkg/v1" 22 | ) 23 | 24 | // Blob returns a blob with the given hash from the Path. 25 | func (l Path) Blob(h v1.Hash) (io.ReadCloser, error) { 26 | return os.Open(l.blobPath(h)) 27 | } 28 | 29 | // Bytes is a convenience function to return a blob from the Path as 30 | // a byte slice. 31 | func (l Path) Bytes(h v1.Hash) ([]byte, error) { 32 | return os.ReadFile(l.blobPath(h)) 33 | } 34 | 35 | func (l Path) blobPath(h v1.Hash) string { 36 | return l.path("blobs", h.Algorithm, h.Hex) 37 | } 38 | -------------------------------------------------------------------------------- /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/inconshreveable/mousetrap/trap_windows.go: -------------------------------------------------------------------------------- 1 | package mousetrap 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | ) 7 | 8 | func getProcessEntry(pid int) (*syscall.ProcessEntry32, error) { 9 | snapshot, err := syscall.CreateToolhelp32Snapshot(syscall.TH32CS_SNAPPROCESS, 0) 10 | if err != nil { 11 | return nil, err 12 | } 13 | defer syscall.CloseHandle(snapshot) 14 | var procEntry syscall.ProcessEntry32 15 | procEntry.Size = uint32(unsafe.Sizeof(procEntry)) 16 | if err = syscall.Process32First(snapshot, &procEntry); err != nil { 17 | return nil, err 18 | } 19 | for { 20 | if procEntry.ProcessID == uint32(pid) { 21 | return &procEntry, nil 22 | } 23 | err = syscall.Process32Next(snapshot, &procEntry) 24 | if err != nil { 25 | return nil, err 26 | } 27 | } 28 | } 29 | 30 | // StartedByExplorer returns true if the program was invoked by the user double-clicking 31 | // on the executable from explorer.exe 32 | // 33 | // It is conservative and returns false if any of the internal calls fail. 34 | // It does not guarantee that the program was run from a terminal. It only can tell you 35 | // whether it was launched from explorer.exe 36 | func StartedByExplorer() bool { 37 | pe, err := getProcessEntry(syscall.Getppid()) 38 | if err != nil { 39 | return false 40 | } 41 | return "explorer.exe" == syscall.UTF16ToString(pe.ExeFile[:]) 42 | } 43 | -------------------------------------------------------------------------------- /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/fse/bytereader.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Klaus Post. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // Based on work Copyright (c) 2013, Yann Collet, released under BSD License. 5 | 6 | package fse 7 | 8 | // byteReader provides a byte reader that reads 9 | // little endian values from a byte stream. 10 | // The input stream is manually advanced. 11 | // The reader performs no bounds checks. 12 | type byteReader struct { 13 | b []byte 14 | off int 15 | } 16 | 17 | // init will initialize the reader and set the input. 18 | func (b *byteReader) init(in []byte) { 19 | b.b = in 20 | b.off = 0 21 | } 22 | 23 | // advance the stream b n bytes. 24 | func (b *byteReader) advance(n uint) { 25 | b.off += int(n) 26 | } 27 | 28 | // Uint32 returns a little endian uint32 starting at current offset. 29 | func (b byteReader) Uint32() uint32 { 30 | b2 := b.b[b.off:] 31 | b2 = b2[:4] 32 | v3 := uint32(b2[3]) 33 | v2 := uint32(b2[2]) 34 | v1 := uint32(b2[1]) 35 | v0 := uint32(b2[0]) 36 | return v0 | (v1 << 8) | (v2 << 16) | (v3 << 24) 37 | } 38 | 39 | // unread returns the unread portion of the input. 40 | func (b byteReader) unread() []byte { 41 | return b.b[b.off:] 42 | } 43 | 44 | // remain will return the number of bytes remaining. 45 | func (b byteReader) remain() int { 46 | return len(b.b) - b.off 47 | } 48 | -------------------------------------------------------------------------------- /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/s2sx.mod: -------------------------------------------------------------------------------- 1 | module github.com/klauspost/compress 2 | 3 | go 1.19 4 | 5 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/s2sx.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/oci-sysext/4eeb2653e493bb4bb5e845d4da3f1e4f96c9c0bc/vendor/github.com/klauspost/compress/s2sx.sum -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/zstd/hash.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019+ Klaus Post. All rights reserved. 2 | // License information can be found in the LICENSE file. 3 | // Based on work by Yann Collet, released under BSD License. 4 | 5 | package zstd 6 | 7 | const ( 8 | prime3bytes = 506832829 9 | prime4bytes = 2654435761 10 | prime5bytes = 889523592379 11 | prime6bytes = 227718039650203 12 | prime7bytes = 58295818150454627 13 | prime8bytes = 0xcf1bbcdcb7a56463 14 | ) 15 | 16 | // hashLen returns a hash of the lowest mls bytes of with length output bits. 17 | // mls must be >=3 and <=8. Any other value will return hash for 4 bytes. 18 | // length should always be < 32. 19 | // Preferably length and mls should be a constant for inlining. 20 | func hashLen(u uint64, length, mls uint8) uint32 { 21 | switch mls { 22 | case 3: 23 | return (uint32(u<<8) * prime3bytes) >> (32 - length) 24 | case 5: 25 | return uint32(((u << (64 - 40)) * prime5bytes) >> (64 - length)) 26 | case 6: 27 | return uint32(((u << (64 - 48)) * prime6bytes) >> (64 - length)) 28 | case 7: 29 | return uint32(((u << (64 - 56)) * prime7bytes) >> (64 - length)) 30 | case 8: 31 | return uint32((u * prime8bytes) >> (64 - length)) 32 | default: 33 | return (uint32(u) * prime4bytes) >> (32 - length) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /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 | "encoding/binary" 11 | "math/bits" 12 | ) 13 | 14 | // matchLen returns the maximum common prefix length of a and b. 15 | // a must be the shortest of the two. 16 | func matchLen(a, b []byte) (n int) { 17 | for ; len(a) >= 8 && len(b) >= 8; a, b = a[8:], b[8:] { 18 | diff := binary.LittleEndian.Uint64(a) ^ binary.LittleEndian.Uint64(b) 19 | if diff != 0 { 20 | return n + bits.TrailingZeros64(diff)>>3 21 | } 22 | n += 8 23 | } 24 | 25 | for i := range a { 26 | if a[i] != b[i] { 27 | break 28 | } 29 | n++ 30 | } 31 | return n 32 | 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/colorstring/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.0 5 | - 1.1 6 | - 1.2 7 | - 1.3 8 | - tip 9 | 10 | script: 11 | - go test 12 | 13 | matrix: 14 | allow_failures: 15 | - go: tip 16 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/colorstring/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 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/colorstring/README.md: -------------------------------------------------------------------------------- 1 | # colorstring [![Build Status](https://travis-ci.org/mitchellh/colorstring.svg)](https://travis-ci.org/mitchellh/colorstring) 2 | 3 | colorstring is a [Go](http://www.golang.org) library for outputting colored 4 | strings to a console using a simple inline syntax in your string to specify 5 | the color to print as. 6 | 7 | For example, the string `[blue]hello [red]world` would output the text 8 | "hello world" in two colors. The API of colorstring allows for easily disabling 9 | colors, adding aliases, etc. 10 | 11 | ## Installation 12 | 13 | Standard `go get`: 14 | 15 | ``` 16 | $ go get github.com/mitchellh/colorstring 17 | ``` 18 | 19 | ## Usage & Example 20 | 21 | For usage and examples see the [Godoc](http://godoc.org/github.com/mitchellh/colorstring). 22 | 23 | Usage is easy enough: 24 | 25 | ```go 26 | colorstring.Println("[blue]Hello [red]World!") 27 | ``` 28 | 29 | Additionally, the `Colorize` struct can be used to set options such as 30 | custom colors, color disabling, etc. 31 | -------------------------------------------------------------------------------- /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/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/go-digest/digester.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019, 2020 OCI Contributors 2 | // Copyright 2017 Docker, Inc. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | package digest 17 | 18 | import "hash" 19 | 20 | // Digester calculates the digest of written data. Writes should go directly 21 | // to the return value of Hash, while calling Digest will return the current 22 | // value of the digest. 23 | type Digester interface { 24 | Hash() hash.Hash // provides direct access to underlying hash instance. 25 | Digest() Digest 26 | } 27 | 28 | // digester provides a simple digester definition that embeds a hasher. 29 | type digester struct { 30 | alg Algorithm 31 | hash hash.Hash 32 | } 33 | 34 | func (d *digester) Hash() hash.Hash { 35 | return d.hash 36 | } 37 | 38 | func (d *digester) Digest() Digest { 39 | return NewDigest(d.alg, d.hash) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.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 v1 16 | 17 | const ( 18 | // ImageLayoutFile is the file name containing ImageLayout in an OCI Image Layout 19 | ImageLayoutFile = "oci-layout" 20 | // ImageLayoutVersion is the version of ImageLayout 21 | ImageLayoutVersion = "1.0.0" 22 | // ImageIndexFile is the file name of the entry point for references and descriptors in an OCI Image Layout 23 | ImageIndexFile = "index.json" 24 | // ImageBlobsDir is the directory name containing content addressable blobs in an OCI Image Layout 25 | ImageBlobsDir = "blobs" 26 | ) 27 | 28 | // ImageLayout is the structure in the "oci-layout" file, found in the root 29 | // of an OCI Image-layout directory. 30 | type ImageLayout struct { 31 | Version string `json:"imageLayoutVersion"` 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/image-spec/specs-go/version.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 | import "fmt" 18 | 19 | const ( 20 | // VersionMajor is for an API incompatible changes 21 | VersionMajor = 1 22 | // VersionMinor is for functionality in a backwards-compatible manner 23 | VersionMinor = 1 24 | // VersionPatch is for backwards-compatible bug fixes 25 | VersionPatch = 0 26 | 27 | // VersionDev indicates development branch. Releases will be empty string. 28 | VersionDev = "" 29 | ) 30 | 31 | // Version is the specification version that the package types support. 32 | var Version = fmt.Sprintf("%d.%d.%d%s", VersionMajor, VersionMinor, VersionPatch, VersionDev) 33 | -------------------------------------------------------------------------------- /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/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/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Dave Cheney 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/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/schollz/progressbar/v3/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, built with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | # Dependency directories (remove the comment below to include it) 15 | # vendor/ 16 | 17 | .idea/ 18 | *.tar.gz 19 | -------------------------------------------------------------------------------- /vendor/github.com/schollz/progressbar/v3/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - tip 5 | 6 | script: go test -v . 7 | -------------------------------------------------------------------------------- /vendor/github.com/schollz/progressbar/v3/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Zack 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/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/hooks.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | // A hook to be fired when logging on the logging levels returned from 4 | // `Levels()` on your implementation of the interface. Note that this is not 5 | // fired in a goroutine or a channel with workers, you should handle such 6 | // functionality yourself if your call is non-blocking and you don't wish for 7 | // the logging calls for levels returned from `Levels()` to block. 8 | type Hook interface { 9 | Levels() []Level 10 | Fire(*Entry) error 11 | } 12 | 13 | // Internal type for storing the hooks on a logger instance. 14 | type LevelHooks map[Level][]Hook 15 | 16 | // Add a hook to an instance of logger. This is called with 17 | // `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface. 18 | func (hooks LevelHooks) Add(hook Hook) { 19 | for _, level := range hook.Levels() { 20 | hooks[level] = append(hooks[level], hook) 21 | } 22 | } 23 | 24 | // Fire all the hooks for the passed level. Used by `entry.log` to fire 25 | // appropriate hooks for a log entry. 26 | func (hooks LevelHooks) Fire(level Level, entry *Entry) error { 27 | for _, hook := range hooks[level] { 28 | if err := hook.Fire(entry); err != nil { 29 | return err 30 | } 31 | } 32 | 33 | return nil 34 | } 35 | -------------------------------------------------------------------------------- /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/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/* 2 | 3 | -------------------------------------------------------------------------------- /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/sync/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sync/errgroup/go120.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.20 6 | 7 | package errgroup 8 | 9 | import "context" 10 | 11 | func withCancelCause(parent context.Context) (context.Context, func(error)) { 12 | return context.WithCancelCause(parent) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sync/errgroup/pre_go120.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.20 6 | 7 | package errgroup 8 | 9 | import "context" 10 | 11 | func withCancelCause(parent context.Context) (context.Context, func(error)) { 12 | ctx, cancel := context.WithCancel(parent) 13 | return ctx, func(error) { cancel() } 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | TEXT ·use(SB),NOSPLIT,$0 8 | RET 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | // 8 | // System call support for 386, Plan 9 9 | // 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-32 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-44 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 21 | JMP syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 24 | JMP syscall·RawSyscall6(SB) 25 | 26 | TEXT ·seek(SB),NOSPLIT,$0-36 27 | JMP syscall·seek(SB) 28 | 29 | TEXT ·exit(SB),NOSPLIT,$4-4 30 | JMP syscall·exit(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | // 8 | // System call support for amd64, Plan 9 9 | // 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-64 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 21 | JMP syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | JMP syscall·RawSyscall6(SB) 25 | 26 | TEXT ·seek(SB),NOSPLIT,$0-56 27 | JMP syscall·seek(SB) 28 | 29 | TEXT ·exit(SB),NOSPLIT,$8-8 30 | JMP syscall·exit(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | // System call support for plan9 on arm 8 | 9 | // Just jump to package syscall's implementation for all these functions. 10 | // The runtime may know about them. 11 | 12 | TEXT ·Syscall(SB),NOSPLIT,$0-32 13 | JMP syscall·Syscall(SB) 14 | 15 | TEXT ·Syscall6(SB),NOSPLIT,$0-44 16 | JMP syscall·Syscall6(SB) 17 | 18 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 19 | JMP syscall·RawSyscall(SB) 20 | 21 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 22 | JMP syscall·RawSyscall6(SB) 23 | 24 | TEXT ·seek(SB),NOSPLIT,$0-36 25 | JMP syscall·exit(SB) 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/const_plan9.go: -------------------------------------------------------------------------------- 1 | package plan9 2 | 3 | // Plan 9 Constants 4 | 5 | // Open modes 6 | const ( 7 | O_RDONLY = 0 8 | O_WRONLY = 1 9 | O_RDWR = 2 10 | O_TRUNC = 16 11 | O_CLOEXEC = 32 12 | O_EXCL = 0x1000 13 | ) 14 | 15 | // Rfork flags 16 | const ( 17 | RFNAMEG = 1 << 0 18 | RFENVG = 1 << 1 19 | RFFDG = 1 << 2 20 | RFNOTEG = 1 << 3 21 | RFPROC = 1 << 4 22 | RFMEM = 1 << 5 23 | RFNOWAIT = 1 << 6 24 | RFCNAMEG = 1 << 10 25 | RFCENVG = 1 << 11 26 | RFCFDG = 1 << 12 27 | RFREND = 1 << 13 28 | RFNOMNT = 1 << 14 29 | ) 30 | 31 | // Qid.Type bits 32 | const ( 33 | QTDIR = 0x80 34 | QTAPPEND = 0x40 35 | QTEXCL = 0x20 36 | QTMOUNT = 0x10 37 | QTAUTH = 0x08 38 | QTTMP = 0x04 39 | QTFILE = 0x00 40 | ) 41 | 42 | // Dir.Mode bits 43 | const ( 44 | DMDIR = 0x80000000 45 | DMAPPEND = 0x40000000 46 | DMEXCL = 0x20000000 47 | DMMOUNT = 0x10000000 48 | DMAUTH = 0x08000000 49 | DMTMP = 0x04000000 50 | DMREAD = 0x4 51 | DMWRITE = 0x2 52 | DMEXEC = 0x1 53 | ) 54 | 55 | const ( 56 | STATMAX = 65535 57 | ERRMAX = 128 58 | STATFIXLEN = 49 59 | ) 60 | 61 | // Mount and bind flags 62 | const ( 63 | MREPL = 0x0000 64 | MBEFORE = 0x0001 65 | MAFTER = 0x0002 66 | MORDER = 0x0003 67 | MCREATE = 0x0004 68 | MCACHE = 0x0010 69 | MMASK = 0x0017 70 | ) 71 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/env_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Plan 9 environment variables. 6 | 7 | package plan9 8 | 9 | import ( 10 | "syscall" 11 | ) 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | COMMAND="mksysnum_plan9.sh $@" 7 | 8 | cat <= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/zsysnum_plan9.go: -------------------------------------------------------------------------------- 1 | // mksysnum_plan9.sh /opt/plan9/sys/src/libc/9syscall/sys.h 2 | // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT 3 | 4 | package plan9 5 | 6 | const ( 7 | SYS_SYSR1 = 0 8 | SYS_BIND = 2 9 | SYS_CHDIR = 3 10 | SYS_CLOSE = 4 11 | SYS_DUP = 5 12 | SYS_ALARM = 6 13 | SYS_EXEC = 7 14 | SYS_EXITS = 8 15 | SYS_FAUTH = 10 16 | SYS_SEGBRK = 12 17 | SYS_OPEN = 14 18 | SYS_OSEEK = 16 19 | SYS_SLEEP = 17 20 | SYS_RFORK = 19 21 | SYS_PIPE = 21 22 | SYS_CREATE = 22 23 | SYS_FD2PATH = 23 24 | SYS_BRK_ = 24 25 | SYS_REMOVE = 25 26 | SYS_NOTIFY = 28 27 | SYS_NOTED = 29 28 | SYS_SEGATTACH = 30 29 | SYS_SEGDETACH = 31 30 | SYS_SEGFREE = 32 31 | SYS_SEGFLUSH = 33 32 | SYS_RENDEZVOUS = 34 33 | SYS_UNMOUNT = 35 34 | SYS_SEMACQUIRE = 37 35 | SYS_SEMRELEASE = 38 36 | SYS_SEEK = 39 37 | SYS_FVERSION = 40 38 | SYS_ERRSTR = 41 39 | SYS_STAT = 42 40 | SYS_FSTAT = 43 41 | SYS_WSTAT = 44 42 | SYS_FWSTAT = 45 43 | SYS_MOUNT = 46 44 | SYS_AWAIT = 47 45 | SYS_PREAD = 50 46 | SYS_PWRITE = 51 47 | SYS_TSEMACQUIRE = 52 48 | SYS_NSEC = 53 49 | ) 50 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | type Signal = syscall.Signal 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for 386 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-28 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for AMD64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for ARM BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-28 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 21 | B syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 24 | B syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 27 | B syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for ARM64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ppc64, BSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for RISCV64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for AMD64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 23 | CALL runtime·entersyscall(SB) 24 | MOVQ a1+8(FP), DI 25 | MOVQ a2+16(FP), SI 26 | MOVQ a3+24(FP), DX 27 | MOVQ $0, R10 28 | MOVQ $0, R8 29 | MOVQ $0, R9 30 | MOVQ trap+0(FP), AX // syscall entry 31 | SYSCALL 32 | MOVQ AX, r1+32(FP) 33 | MOVQ DX, r2+40(FP) 34 | CALL runtime·exitsyscall(SB) 35 | RET 36 | 37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 38 | JMP syscall·RawSyscall(SB) 39 | 40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 41 | JMP syscall·RawSyscall6(SB) 42 | 43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 44 | MOVQ a1+8(FP), DI 45 | MOVQ a2+16(FP), SI 46 | MOVQ a3+24(FP), DX 47 | MOVQ $0, R10 48 | MOVQ $0, R8 49 | MOVQ $0, R9 50 | MOVQ trap+0(FP), AX // syscall entry 51 | SYSCALL 52 | MOVQ AX, r1+32(FP) 53 | MOVQ DX, r2+40(FP) 54 | RET 55 | 56 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16 57 | JMP syscall·gettimeofday(SB) 58 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for arm, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24 23 | BL runtime·entersyscall(SB) 24 | MOVW trap+0(FP), R7 25 | MOVW a1+4(FP), R0 26 | MOVW a2+8(FP), R1 27 | MOVW a3+12(FP), R2 28 | MOVW $0, R3 29 | MOVW $0, R4 30 | MOVW $0, R5 31 | SWI $0 32 | MOVW R0, r1+16(FP) 33 | MOVW $0, R0 34 | MOVW R0, r2+20(FP) 35 | BL runtime·exitsyscall(SB) 36 | RET 37 | 38 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 39 | B syscall·RawSyscall(SB) 40 | 41 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 42 | B syscall·RawSyscall6(SB) 43 | 44 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 45 | MOVW trap+0(FP), R7 // syscall entry 46 | MOVW a1+4(FP), R0 47 | MOVW a2+8(FP), R1 48 | MOVW a3+12(FP), R2 49 | SWI $0 50 | MOVW R0, r1+16(FP) 51 | MOVW $0, R0 52 | MOVW R0, r2+20(FP) 53 | RET 54 | 55 | TEXT ·seek(SB),NOSPLIT,$0-28 56 | B syscall·seek(SB) 57 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && arm64 && gc 6 | 7 | #include "textflag.h" 8 | 9 | // Just jump to package syscall's implementation for all these functions. 10 | // The runtime may know about them. 11 | 12 | TEXT ·Syscall(SB),NOSPLIT,$0-56 13 | B syscall·Syscall(SB) 14 | 15 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 16 | B syscall·Syscall6(SB) 17 | 18 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 19 | BL runtime·entersyscall(SB) 20 | MOVD a1+8(FP), R0 21 | MOVD a2+16(FP), R1 22 | MOVD a3+24(FP), R2 23 | MOVD $0, R3 24 | MOVD $0, R4 25 | MOVD $0, R5 26 | MOVD trap+0(FP), R8 // syscall entry 27 | SVC 28 | MOVD R0, r1+32(FP) // r1 29 | MOVD R1, r2+40(FP) // r2 30 | BL runtime·exitsyscall(SB) 31 | RET 32 | 33 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 34 | B syscall·RawSyscall(SB) 35 | 36 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 37 | B syscall·RawSyscall6(SB) 38 | 39 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 40 | MOVD a1+8(FP), R0 41 | MOVD a2+16(FP), R1 42 | MOVD a3+24(FP), R2 43 | MOVD $0, R3 44 | MOVD $0, R4 45 | MOVD $0, R5 46 | MOVD trap+0(FP), R8 // syscall entry 47 | SVC 48 | MOVD R0, r1+32(FP) 49 | MOVD R1, r2+40(FP) 50 | RET 51 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_loong64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && loong64 && gc 6 | 7 | #include "textflag.h" 8 | 9 | 10 | // Just jump to package syscall's implementation for all these functions. 11 | // The runtime may know about them. 12 | 13 | TEXT ·Syscall(SB),NOSPLIT,$0-56 14 | JMP syscall·Syscall(SB) 15 | 16 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 17 | JMP syscall·Syscall6(SB) 18 | 19 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 20 | JAL runtime·entersyscall(SB) 21 | MOVV a1+8(FP), R4 22 | MOVV a2+16(FP), R5 23 | MOVV a3+24(FP), R6 24 | MOVV R0, R7 25 | MOVV R0, R8 26 | MOVV R0, R9 27 | MOVV trap+0(FP), R11 // syscall entry 28 | SYSCALL 29 | MOVV R4, r1+32(FP) 30 | MOVV R0, r2+40(FP) // r2 is not used. Always set to 0 31 | JAL runtime·exitsyscall(SB) 32 | RET 33 | 34 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 35 | JMP syscall·RawSyscall(SB) 36 | 37 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 38 | JMP syscall·RawSyscall6(SB) 39 | 40 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 41 | MOVV a1+8(FP), R4 42 | MOVV a2+16(FP), R5 43 | MOVV a3+24(FP), R6 44 | MOVV R0, R7 45 | MOVV R0, R8 46 | MOVV R0, R9 47 | MOVV trap+0(FP), R11 // syscall entry 48 | SYSCALL 49 | MOVV R4, r1+32(FP) 50 | MOVV R0, r2+40(FP) // r2 is not used. Always set to 0 51 | RET 52 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_mips64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (mips64 || mips64le) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for mips64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 23 | JAL runtime·entersyscall(SB) 24 | MOVV a1+8(FP), R4 25 | MOVV a2+16(FP), R5 26 | MOVV a3+24(FP), R6 27 | MOVV R0, R7 28 | MOVV R0, R8 29 | MOVV R0, R9 30 | MOVV trap+0(FP), R2 // syscall entry 31 | SYSCALL 32 | MOVV R2, r1+32(FP) 33 | MOVV R3, r2+40(FP) 34 | JAL runtime·exitsyscall(SB) 35 | RET 36 | 37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 38 | JMP syscall·RawSyscall(SB) 39 | 40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 41 | JMP syscall·RawSyscall6(SB) 42 | 43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 44 | MOVV a1+8(FP), R4 45 | MOVV a2+16(FP), R5 46 | MOVV a3+24(FP), R6 47 | MOVV R0, R7 48 | MOVV R0, R8 49 | MOVV R0, R9 50 | MOVV trap+0(FP), R2 // syscall entry 51 | SYSCALL 52 | MOVV R2, r1+32(FP) 53 | MOVV R3, r2+40(FP) 54 | RET 55 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_mipsx.s: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (mips || mipsle) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for mips, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24 26 | JAL runtime·entersyscall(SB) 27 | MOVW a1+4(FP), R4 28 | MOVW a2+8(FP), R5 29 | MOVW a3+12(FP), R6 30 | MOVW R0, R7 31 | MOVW trap+0(FP), R2 // syscall entry 32 | SYSCALL 33 | MOVW R2, r1+16(FP) // r1 34 | MOVW R3, r2+20(FP) // r2 35 | JAL runtime·exitsyscall(SB) 36 | RET 37 | 38 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 39 | JMP syscall·RawSyscall(SB) 40 | 41 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 42 | JMP syscall·RawSyscall6(SB) 43 | 44 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 45 | MOVW a1+4(FP), R4 46 | MOVW a2+8(FP), R5 47 | MOVW a3+12(FP), R6 48 | MOVW trap+0(FP), R2 // syscall entry 49 | SYSCALL 50 | MOVW R2, r1+16(FP) 51 | MOVW R3, r2+20(FP) 52 | RET 53 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (ppc64 || ppc64le) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 17 | BL runtime·entersyscall(SB) 18 | MOVD a1+8(FP), R3 19 | MOVD a2+16(FP), R4 20 | MOVD a3+24(FP), R5 21 | MOVD R0, R6 22 | MOVD R0, R7 23 | MOVD R0, R8 24 | MOVD trap+0(FP), R9 // syscall entry 25 | SYSCALL R9 26 | MOVD R3, r1+32(FP) 27 | MOVD R4, r2+40(FP) 28 | BL runtime·exitsyscall(SB) 29 | RET 30 | 31 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 32 | MOVD a1+8(FP), R3 33 | MOVD a2+16(FP), R4 34 | MOVD a3+24(FP), R5 35 | MOVD R0, R6 36 | MOVD R0, R7 37 | MOVD R0, R8 38 | MOVD trap+0(FP), R9 // syscall entry 39 | SYSCALL R9 40 | MOVD R3, r1+32(FP) 41 | MOVD R4, r2+40(FP) 42 | RET 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_riscv64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build riscv64 && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for linux/riscv64. 11 | // 12 | // Where available, just jump to package syscall's implementation of 13 | // these functions. 14 | 15 | TEXT ·Syscall(SB),NOSPLIT,$0-56 16 | JMP syscall·Syscall(SB) 17 | 18 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 19 | JMP syscall·Syscall6(SB) 20 | 21 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 22 | CALL runtime·entersyscall(SB) 23 | MOV a1+8(FP), A0 24 | MOV a2+16(FP), A1 25 | MOV a3+24(FP), A2 26 | MOV trap+0(FP), A7 // syscall entry 27 | ECALL 28 | MOV A0, r1+32(FP) // r1 29 | MOV A1, r2+40(FP) // r2 30 | CALL runtime·exitsyscall(SB) 31 | RET 32 | 33 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 34 | JMP syscall·RawSyscall(SB) 35 | 36 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 37 | JMP syscall·RawSyscall6(SB) 38 | 39 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 40 | MOV a1+8(FP), A0 41 | MOV a2+16(FP), A1 42 | MOV a3+24(FP), A2 43 | MOV trap+0(FP), A7 // syscall entry 44 | ECALL 45 | MOV A0, r1+32(FP) 46 | MOV A1, r2+40(FP) 47 | RET 48 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_s390x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && s390x && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for s390x, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | BR syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | BR syscall·Syscall6(SB) 21 | 22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 23 | BL runtime·entersyscall(SB) 24 | MOVD a1+8(FP), R2 25 | MOVD a2+16(FP), R3 26 | MOVD a3+24(FP), R4 27 | MOVD $0, R5 28 | MOVD $0, R6 29 | MOVD $0, R7 30 | MOVD trap+0(FP), R1 // syscall entry 31 | SYSCALL 32 | MOVD R2, r1+32(FP) 33 | MOVD R3, r2+40(FP) 34 | BL runtime·exitsyscall(SB) 35 | RET 36 | 37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 38 | BR syscall·RawSyscall(SB) 39 | 40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 41 | BR syscall·RawSyscall6(SB) 42 | 43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 44 | MOVD a1+8(FP), R2 45 | MOVD a2+16(FP), R3 46 | MOVD a3+24(FP), R4 47 | MOVD $0, R5 48 | MOVD $0, R6 49 | MOVD $0, R7 50 | MOVD trap+0(FP), R1 // syscall entry 51 | SYSCALL 52 | MOVD R2, r1+32(FP) 53 | MOVD R3, r2+40(FP) 54 | RET 55 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for mips64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | HCI_CHANNEL_LOGGING = 4 27 | ) 28 | 29 | // Socketoption Level 30 | const ( 31 | SOL_BLUETOOTH = 0x112 32 | SOL_HCI = 0x0 33 | SOL_L2CAP = 0x6 34 | SOL_RFCOMM = 0x12 35 | SOL_SCO = 0x11 36 | ) 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev >> 16) & 0xffff) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32(dev & 0xffff) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | return uint64(((major) << 16) | (minor)) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc64 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev & 0x3fffffff00000000) >> 32) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32((dev & 0x00000000ffffffff) >> 0) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | var DEVNO64 uint64 26 | DEVNO64 = 0x8000000000000000 27 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Dragonfly's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a DragonFlyBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a DragonFlyBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_freebsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in FreeBSD's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a FreeBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a FreeBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a FreeBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_zos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build zos && s390x 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by z/OS. 9 | // 10 | // The information below is extracted and adapted from macros. 11 | 12 | package unix 13 | 14 | // Major returns the major component of a z/OS device number. 15 | func Major(dev uint64) uint32 { 16 | return uint32((dev >> 16) & 0x0000FFFF) 17 | } 18 | 19 | // Minor returns the minor component of a z/OS device number. 20 | func Minor(dev uint64) uint32 { 21 | return uint32(dev & 0x0000FFFF) 22 | } 23 | 24 | // Mkdev returns a z/OS device number generated from the given major and minor 25 | // components. 26 | func Mkdev(major, minor uint32) uint64 { 27 | return (uint64(major) << 16) | uint64(minor) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build dragonfly || freebsd || linux || netbsd 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 12 | // systems by fcntl_linux_32bit.go to be SYS_FCNTL64. 13 | var fcntl64Syscall uintptr = SYS_FCNTL 14 | 15 | func fcntl(fd int, cmd, arg int) (int, error) { 16 | valptr, _, errno := Syscall(fcntl64Syscall, uintptr(fd), uintptr(cmd), uintptr(arg)) 17 | var err error 18 | if errno != 0 { 19 | err = errno 20 | } 21 | return int(valptr), err 22 | } 23 | 24 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 25 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 26 | return fcntl(int(fd), cmd, arg) 27 | } 28 | 29 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 30 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 31 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 32 | if errno == 0 { 33 | return nil 34 | } 35 | return errno 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 11 | return fcntl(int(fd), cmd, arg) 12 | } 13 | 14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) 17 | return err 18 | } 19 | 20 | // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command. 21 | func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error { 22 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore)))) 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fdset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | // Set adds fd to the set fds. 10 | func (fds *FdSet) Set(fd int) { 11 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS)) 12 | } 13 | 14 | // Clear removes fd from the set fds. 15 | func (fds *FdSet) Clear(fd int) { 16 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS)) 17 | } 18 | 19 | // IsSet returns whether fd is in the set fds. 20 | func (fds *FdSet) IsSet(fd int) bool { 21 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0 22 | } 23 | 24 | // Zero clears the set fds. 25 | func (fds *FdSet) Zero() { 26 | for i := range fds.Bits { 27 | fds.Bits[i] = 0 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gccgo && linux && amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mmap_nomremap.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | var mapper = &mmapper{ 10 | active: make(map[*byte][]byte), 11 | mmap: mmap, 12 | munmap: munmap, 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && !ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) error { 10 | return ptrace1(request, pid, addr, data) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_ios.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 10 | return ENOTSUP 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && race) || (linux && race) || (freebsd && race) 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd 6 | 7 | package unix 8 | 9 | // ReadDirent reads directory entries from fd and writes them into buf. 10 | func ReadDirent(fd int, buf []byte) (n int, err error) { 11 | return Getdents(fd, buf) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdirentries.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin || zos 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // ReadDirent reads directory entries from fd and writes them into buf. 12 | func ReadDirent(fd int, buf []byte) (n int, err error) { 13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 15 | // actual system call is getdirentries64, 64 is a good guess. 16 | // TODO(rsc): Can we use a single global basep for all calls? 17 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 18 | return Getdirentries(fd, buf, base) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | // Round the length of a raw sockaddr up to align it properly. 8 | func cmsgAlignOf(salen int) int { 9 | salign := SizeofPtr 10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { 11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires 12 | // 32-bit aligned access to network subsystem. 13 | salign = 4 14 | } 15 | return (salen + salign - 1) & ^(salign - 1) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | ) 12 | 13 | // Round the length of a raw sockaddr up to align it properly. 14 | func cmsgAlignOf(salen int) int { 15 | salign := SizeofPtr 16 | 17 | // dragonfly needs to check ABI version at runtime, see cmsgAlignOf in 18 | // sockcmsg_dragonfly.go 19 | switch runtime.GOOS { 20 | case "aix": 21 | // There is no alignment on AIX. 22 | salign = 1 23 | case "darwin", "ios", "illumos", "solaris": 24 | // NOTE: It seems like 64-bit Darwin, Illumos and Solaris 25 | // kernels still require 32-bit aligned access to network 26 | // subsystem. 27 | if SizeofPtr == 8 { 28 | salign = 4 29 | } 30 | case "netbsd", "openbsd": 31 | // NetBSD and OpenBSD armv7 require 64-bit alignment. 32 | if runtime.GOARCH == "arm" { 33 | salign = 8 34 | } 35 | // NetBSD aarch64 requires 128-bit alignment. 36 | if runtime.GOOS == "netbsd" && runtime.GOARCH == "arm64" { 37 | salign = 16 38 | } 39 | case "zos": 40 | // z/OS socket macros use [32-bit] sizeof(int) alignment, 41 | // not pointer width. 42 | salign = SizeofInt 43 | } 44 | 45 | return (salen + salign - 1) & ^(salign - 1) 46 | } 47 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc 6 | 7 | package unix 8 | 9 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64 10 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64 11 | 12 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) 13 | 14 | func setTimespec(sec, nsec int64) Timespec { 15 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)} 16 | } 17 | 18 | func setTimeval(sec, usec int64) Timeval { 19 | return Timeval{Sec: int32(sec), Usec: int32(usec)} 20 | } 21 | 22 | func (iov *Iovec) SetLen(length int) { 23 | iov.Len = uint32(length) 24 | } 25 | 26 | func (msghdr *Msghdr) SetControllen(length int) { 27 | msghdr.Controllen = uint32(length) 28 | } 29 | 30 | func (msghdr *Msghdr) SetIovlen(length int) { 31 | msghdr.Iovlen = int32(length) 32 | } 33 | 34 | func (cmsg *Cmsghdr) SetLen(length int) { 35 | cmsg.Len = uint32(length) 36 | } 37 | 38 | func Fstat(fd int, stat *Stat_t) error { 39 | return fstat(fd, stat) 40 | } 41 | 42 | func Fstatat(dirfd int, path string, stat *Stat_t, flags int) error { 43 | return fstatat(dirfd, path, stat, flags) 44 | } 45 | 46 | func Lstat(path string, stat *Stat_t) error { 47 | return lstat(path, stat) 48 | } 49 | 50 | func Stat(path string, statptr *Stat_t) error { 51 | return stat(path, statptr) 52 | } 53 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin 6 | 7 | package unix 8 | 9 | import _ "unsafe" 10 | 11 | // Implemented in the runtime package (runtime/sys_darwin.go) 12 | func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 13 | func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 14 | func syscall_syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 15 | func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // 32-bit only 16 | func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 17 | func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 18 | func syscall_syscallPtr(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 19 | 20 | //go:linkname syscall_syscall syscall.syscall 21 | //go:linkname syscall_syscall6 syscall.syscall6 22 | //go:linkname syscall_syscall6X syscall.syscall6X 23 | //go:linkname syscall_syscall9 syscall.syscall9 24 | //go:linkname syscall_rawSyscall syscall.rawSyscall 25 | //go:linkname syscall_rawSyscall6 syscall.rawSyscall6 26 | //go:linkname syscall_syscallPtr syscall.syscallPtr 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && dragonfly 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func setTimespec(sec, nsec int64) Timespec { 15 | return Timespec{Sec: sec, Nsec: nsec} 16 | } 17 | 18 | func setTimeval(sec, usec int64) Timeval { 19 | return Timeval{Sec: sec, Usec: usec} 20 | } 21 | 22 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 23 | k.Ident = uint64(fd) 24 | k.Filter = int16(mode) 25 | k.Flags = uint16(flags) 26 | } 27 | 28 | func (iov *Iovec) SetLen(length int) { 29 | iov.Len = uint64(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetControllen(length int) { 33 | msghdr.Controllen = uint32(length) 34 | } 35 | 36 | func (msghdr *Msghdr) SetIovlen(length int) { 37 | msghdr.Iovlen = int32(length) 38 | } 39 | 40 | func (cmsg *Cmsghdr) SetLen(length int) { 41 | cmsg.Len = uint32(length) 42 | } 43 | 44 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 45 | var writtenOut uint64 = 0 46 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0) 47 | 48 | written = int(writtenOut) 49 | 50 | if e1 != 0 { 51 | err = e1 52 | } 53 | return 54 | } 55 | 56 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) 57 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build hurd 6 | 7 | package unix 8 | 9 | /* 10 | #include 11 | int ioctl(int, unsigned long int, uintptr_t); 12 | */ 13 | import "C" 14 | 15 | func ioctl(fd int, req uint, arg uintptr) (err error) { 16 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) 17 | if r0 == -1 && er != nil { 18 | err = er 19 | } 20 | return 21 | } 22 | 23 | func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { 24 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg))) 25 | if r0 == -1 && er != nil { 26 | err = er 27 | } 28 | return 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && hurd 6 | 7 | package unix 8 | 9 | const ( 10 | TIOCGETA = 0x62251713 11 | ) 12 | 13 | type Winsize struct { 14 | Row uint16 15 | Col uint16 16 | Xpixel uint16 17 | Ypixel uint16 18 | } 19 | 20 | type Termios struct { 21 | Iflag uint32 22 | Oflag uint32 23 | Cflag uint32 24 | Lflag uint32 25 | Cc [20]uint8 26 | Ispeed int32 27 | Ospeed int32 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_alarm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64) 6 | 7 | package unix 8 | 9 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH 10 | // values. 11 | 12 | //sys Alarm(seconds uint) (remaining uint, err error) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && linux && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //go:noescape 12 | func gettimeofday(tv *Timeval) (err syscall.Errno) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc 6 | 7 | package unix 8 | 9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 11 | 12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 13 | // fail. 14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc && 386 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | 15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && gc && linux 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && 386 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | 22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 24 | return int(fd), err 25 | } 26 | 27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 29 | return int(fd), err 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && arm 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm64 && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/386 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/arm the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm64 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build openbsd 6 | 7 | package unix 8 | 9 | import _ "unsafe" 10 | 11 | // Implemented in the runtime package (runtime/sys_openbsd3.go) 12 | func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 13 | func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 14 | func syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 uintptr) (r1, r2 uintptr, err Errno) 15 | func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 16 | func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 17 | 18 | //go:linkname syscall_syscall syscall.syscall 19 | //go:linkname syscall_syscall6 syscall.syscall6 20 | //go:linkname syscall_syscall10 syscall.syscall10 21 | //go:linkname syscall_rawSyscall syscall.rawSyscall 22 | //go:linkname syscall_rawSyscall6 syscall.rawSyscall6 23 | 24 | func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) { 25 | return syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, 0) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | func setTimespec(sec, nsec int64) Timespec { 8 | return Timespec{Sec: sec, Nsec: nsec} 9 | } 10 | 11 | func setTimeval(sec, usec int64) Timeval { 12 | return Timeval{Sec: sec, Usec: usec} 13 | } 14 | 15 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 16 | k.Ident = uint64(fd) 17 | k.Filter = int16(mode) 18 | k.Flags = uint16(flags) 19 | } 20 | 21 | func (iov *Iovec) SetLen(length int) { 22 | iov.Len = uint64(length) 23 | } 24 | 25 | func (msghdr *Msghdr) SetControllen(length int) { 26 | msghdr.Controllen = uint32(length) 27 | } 28 | 29 | func (msghdr *Msghdr) SetIovlen(length int) { 30 | msghdr.Iovlen = uint32(length) 31 | } 32 | 33 | func (cmsg *Cmsghdr) SetLen(length int) { 34 | cmsg.Len = uint32(length) 35 | } 36 | 37 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 38 | // of OpenBSD the syscall is called sysctl instead of __sysctl. 39 | const SYS___SYSCTL = SYS_SYSCTL 40 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ppc64 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/ppc64 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build riscv64 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/riscv64 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (msghdr *Msghdr) SetIovlen(length int) { 22 | msghdr.Iovlen = int32(length) 23 | } 24 | 25 | func (cmsg *Cmsghdr) SetLen(length int) { 26 | cmsg.Len = uint32(length) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 12 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (ppc64le || ppc64) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 12 | return syscall.Syscall(trap, a1, a2, a3) 13 | } 14 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 15 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) 16 | } 17 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 18 | return syscall.RawSyscall(trap, a1, a2, a3) 19 | } 20 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 21 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux 6 | 7 | package unix 8 | 9 | import "runtime" 10 | 11 | // SysvShmCtl performs control operations on the shared memory segment 12 | // specified by id. 13 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 14 | if runtime.GOARCH == "arm" || 15 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" { 16 | cmd |= ipc_64 17 | } 18 | 19 | return shmctl(id, cmd, desc) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && !ios) || zos 6 | 7 | package unix 8 | 9 | // SysvShmCtl performs control operations on the shared memory segment 10 | // specified by id. 11 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 12 | return shmctl(id, cmd, desc) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/unveil_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import "fmt" 8 | 9 | // Unveil implements the unveil syscall. 10 | // For more information see unveil(2). 11 | // Note that the special case of blocking further 12 | // unveil calls is handled by UnveilBlock. 13 | func Unveil(path string, flags string) error { 14 | if err := supportsUnveil(); err != nil { 15 | return err 16 | } 17 | pathPtr, err := BytePtrFromString(path) 18 | if err != nil { 19 | return err 20 | } 21 | flagsPtr, err := BytePtrFromString(flags) 22 | if err != nil { 23 | return err 24 | } 25 | return unveil(pathPtr, flagsPtr) 26 | } 27 | 28 | // UnveilBlock blocks future unveil calls. 29 | // For more information see unveil(2). 30 | func UnveilBlock() error { 31 | if err := supportsUnveil(); err != nil { 32 | return err 33 | } 34 | return unveil(nil, nil) 35 | } 36 | 37 | // supportsUnveil checks for availability of the unveil(2) system call based 38 | // on the running OpenBSD version. 39 | func supportsUnveil() error { 40 | maj, min, err := majmin() 41 | if err != nil { 42 | return err 43 | } 44 | 45 | // unveil is not available before 6.4 46 | if maj < 6 || (maj == 6 && min <= 3) { 47 | return fmt.Errorf("cannot call Unveil on OpenBSD %d.%d", maj, min) 48 | } 49 | 50 | return nil 51 | } 52 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtracePair("arm", "arm64"). DO NOT EDIT. 2 | 3 | //go:build linux && (arm || arm64) 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // PtraceRegsArm is the registers used by arm binaries. 10 | type PtraceRegsArm struct { 11 | Uregs [18]uint32 12 | } 13 | 14 | // PtraceGetRegsArm fetches the registers used by arm binaries. 15 | func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error { 16 | return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout)) 17 | } 18 | 19 | // PtraceSetRegsArm sets the registers used by arm binaries. 20 | func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error { 21 | return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs)) 22 | } 23 | 24 | // PtraceRegsArm64 is the registers used by arm64 binaries. 25 | type PtraceRegsArm64 struct { 26 | Regs [31]uint64 27 | Sp uint64 28 | Pc uint64 29 | Pstate uint64 30 | } 31 | 32 | // PtraceGetRegsArm64 fetches the registers used by arm64 binaries. 33 | func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error { 34 | return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout)) 35 | } 36 | 37 | // PtraceSetRegsArm64 sets the registers used by arm64 binaries. 38 | func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error { 39 | return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs)) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. 2 | 3 | package unix 4 | 5 | import "unsafe" 6 | 7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. 8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { 9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} 10 | return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 11 | } 12 | 13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries. 14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { 15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} 16 | return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | type Errno = syscall.Errno 12 | type SysProcAttr = syscall.SysProcAttr 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mkknownfolderids.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2019 The Go Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style 5 | # license that can be found in the LICENSE file. 6 | 7 | set -e 8 | shopt -s nullglob 9 | 10 | knownfolders="$(printf '%s\n' "/mnt/c/Program Files (x86)/Windows Kits/"/*/Include/*/um/KnownFolders.h | sort -Vr | head -n 1)" 11 | [[ -n $knownfolders ]] || { echo "Unable to find KnownFolders.h" >&2; exit 1; } 12 | 13 | { 14 | echo "// Code generated by 'mkknownfolderids.bash'; DO NOT EDIT." 15 | echo 16 | echo "package windows" 17 | echo "type KNOWNFOLDERID GUID" 18 | echo "var (" 19 | while read -r line; do 20 | [[ $line =~ DEFINE_KNOWN_FOLDER\((FOLDERID_[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+)\) ]] || continue 21 | printf "%s = &KNOWNFOLDERID{0x%08x, 0x%04x, 0x%04x, [8]byte{0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x}}\n" \ 22 | "${BASH_REMATCH[1]}" $(( "${BASH_REMATCH[2]}" )) $(( "${BASH_REMATCH[3]}" )) $(( "${BASH_REMATCH[4]}" )) \ 23 | $(( "${BASH_REMATCH[5]}" )) $(( "${BASH_REMATCH[6]}" )) $(( "${BASH_REMATCH[7]}" )) $(( "${BASH_REMATCH[8]}" )) \ 24 | $(( "${BASH_REMATCH[9]}" )) $(( "${BASH_REMATCH[10]}" )) $(( "${BASH_REMATCH[11]}" )) $(( "${BASH_REMATCH[12]}" )) 25 | done < "$knownfolders" 26 | echo ")" 27 | } | gofmt > "zknownfolderids_windows.go" 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build generate 6 | 7 | package windows 8 | 9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && !race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | _ uint32 // pad to 8 byte boundary 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | _ uint32 // pad to 8 byte boundary 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Go 2 | 3 | Go is an open source project. 4 | 5 | It is the work of hundreds of contributors. We appreciate your help! 6 | 7 | ## Filing issues 8 | 9 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: 10 | 11 | 1. What version of Go are you using (`go version`)? 12 | 2. What operating system and processor architecture are you using? 13 | 3. What did you do? 14 | 4. What did you expect to see? 15 | 5. What did you see instead? 16 | 17 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. 18 | The gophers there will answer or ask you to file an issue if you've tripped over a bug. 19 | 20 | ## Contributing code 21 | 22 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) 23 | before sending patches. 24 | 25 | Unless otherwise noted, the Go source files are distributed under 26 | the BSD-style license found in the LICENSE file. 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/README.md: -------------------------------------------------------------------------------- 1 | # Go terminal/console support 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/term.svg)](https://pkg.go.dev/golang.org/x/term) 4 | 5 | This repository provides Go terminal and console support packages. 6 | 7 | ## Download/Install 8 | 9 | The easiest way to install is to run `go get -u golang.org/x/term`. You can 10 | also manually git clone the repository to `$GOPATH/src/golang.org/x/term`. 11 | 12 | ## Report Issues / Send Patches 13 | 14 | This repository uses Gerrit for code changes. To learn how to submit changes to 15 | this repository, see https://golang.org/doc/contribute.html. 16 | 17 | The main issue tracker for the term repository is located at 18 | https://github.com/golang/go/issues. Prefix your issue with "x/term:" in the 19 | subject line, so it is easy to find. 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/term_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package term 6 | 7 | import ( 8 | "fmt" 9 | "runtime" 10 | 11 | "golang.org/x/sys/plan9" 12 | ) 13 | 14 | type state struct{} 15 | 16 | func isTerminal(fd int) bool { 17 | path, err := plan9.Fd2path(fd) 18 | if err != nil { 19 | return false 20 | } 21 | return path == "/dev/cons" || path == "/mnt/term/dev/cons" 22 | } 23 | 24 | func makeRaw(fd int) (*State, error) { 25 | return nil, fmt.Errorf("terminal: MakeRaw not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 26 | } 27 | 28 | func getState(fd int) (*State, error) { 29 | return nil, fmt.Errorf("terminal: GetState not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 30 | } 31 | 32 | func restore(fd int, state *State) error { 33 | return fmt.Errorf("terminal: Restore not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 34 | } 35 | 36 | func getSize(fd int) (width, height int, err error) { 37 | return 0, 0, fmt.Errorf("terminal: GetSize not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 38 | } 39 | 40 | func readPassword(fd int) ([]byte, error) { 41 | return nil, fmt.Errorf("terminal: ReadPassword not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/term_unix_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin || dragonfly || freebsd || netbsd || openbsd 6 | 7 | package term 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TIOCGETA 12 | const ioctlWriteTermios = unix.TIOCSETA 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/term_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || linux || solaris || zos 6 | 7 | package term 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TCGETS 12 | const ioctlWriteTermios = unix.TCSETS 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/term_unsupported.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !zos && !windows && !solaris && !plan9 6 | 7 | package term 8 | 9 | import ( 10 | "fmt" 11 | "runtime" 12 | ) 13 | 14 | type state struct{} 15 | 16 | func isTerminal(fd int) bool { 17 | return false 18 | } 19 | 20 | func makeRaw(fd int) (*State, error) { 21 | return nil, fmt.Errorf("terminal: MakeRaw not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 22 | } 23 | 24 | func getState(fd int) (*State, error) { 25 | return nil, fmt.Errorf("terminal: GetState not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 26 | } 27 | 28 | func restore(fd int, state *State) error { 29 | return fmt.Errorf("terminal: Restore not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 30 | } 31 | 32 | func getSize(fd int) (width, height int, err error) { 33 | return 0, 0, fmt.Errorf("terminal: GetSize not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 34 | } 35 | 36 | func readPassword(fd int) ([]byte, error) { 37 | return nil, fmt.Errorf("terminal: ReadPassword not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 38 | } 39 | --------------------------------------------------------------------------------