├── .github └── workflows │ └── ci.yaml ├── .gitignore ├── .make-release.sh ├── CONTRIBUTING.md ├── LICENSE ├── NEWS.md ├── README.md ├── add.go ├── completion.go ├── conf.go ├── conf ├── config.go ├── profile.go └── template.go ├── down.go ├── go.mod ├── go.sum ├── host.go ├── internal └── term │ └── term.go ├── list.go ├── main.go ├── pacman ├── alpm │ ├── format.go │ ├── testdata │ │ ├── .gitignore │ │ ├── prepare.go │ │ ├── vercmp.dat.xz │ │ └── versions.dat │ ├── vercmp.go │ └── vercmp_test.go ├── any.go ├── aur │ ├── aur.go │ └── aur_test.go ├── doc.go ├── graph │ ├── factory.go │ ├── functions.go │ └── graph.go ├── meta │ ├── meta.go │ └── read.go ├── package.go ├── pkgutil │ ├── filter.go │ ├── map.go │ └── set.go ├── read-db.go ├── read-db_test.go ├── read-fs.go └── read-pkg.go ├── query.go ├── remove.go ├── repo ├── actions.go ├── database.go ├── down.go ├── errors.go ├── find.go ├── list.go ├── read.go └── repo.go ├── reset.go ├── search.go ├── shortry └── shortry.go ├── status.go ├── update.go ├── vendor ├── github.com │ ├── BurntSushi │ │ └── toml │ │ │ ├── .gitignore │ │ │ ├── COPYING │ │ │ ├── README.md │ │ │ ├── decode.go │ │ │ ├── decode_go116.go │ │ │ ├── deprecated.go │ │ │ ├── doc.go │ │ │ ├── encode.go │ │ │ ├── error.go │ │ │ ├── internal │ │ │ └── tz.go │ │ │ ├── lex.go │ │ │ ├── meta.go │ │ │ ├── parse.go │ │ │ ├── type_fields.go │ │ │ └── type_toml.go │ ├── goulash │ │ ├── archive │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── archive.go │ │ │ └── dir_reader.go │ │ ├── color │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── color.go │ │ ├── errs │ │ │ ├── LICENSE │ │ │ ├── errs.go │ │ │ └── multiple.go │ │ ├── osutil │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── errors.go │ │ │ ├── exec.go │ │ │ ├── os.go │ │ │ └── path.go │ │ ├── pr │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── columns.go │ │ │ ├── columns_linux.go │ │ │ ├── doc.go │ │ │ ├── grid.go │ │ │ └── term_linux.go │ │ └── xdg │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── xdg.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 │ ├── 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 │ └── ulikunitz │ │ └── xz │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── TODO.md │ │ ├── bits.go │ │ ├── crc.go │ │ ├── format.go │ │ ├── fox-check-none.xz │ │ ├── fox.xz │ │ ├── internal │ │ ├── hash │ │ │ ├── cyclic_poly.go │ │ │ ├── doc.go │ │ │ ├── rabin_karp.go │ │ │ └── roller.go │ │ └── xlog │ │ │ └── xlog.go │ │ ├── lzma │ │ ├── bintree.go │ │ ├── bitops.go │ │ ├── breader.go │ │ ├── buffer.go │ │ ├── bytewriter.go │ │ ├── decoder.go │ │ ├── decoderdict.go │ │ ├── directcodec.go │ │ ├── distcodec.go │ │ ├── encoder.go │ │ ├── encoderdict.go │ │ ├── fox.lzma │ │ ├── hashtable.go │ │ ├── header.go │ │ ├── header2.go │ │ ├── lengthcodec.go │ │ ├── literalcodec.go │ │ ├── matchalgorithm.go │ │ ├── operation.go │ │ ├── prob.go │ │ ├── properties.go │ │ ├── rangecodec.go │ │ ├── reader.go │ │ ├── reader2.go │ │ ├── state.go │ │ ├── treecodecs.go │ │ ├── writer.go │ │ └── writer2.go │ │ ├── lzmafilter.go │ │ ├── make-docs │ │ ├── none-check.go │ │ ├── reader.go │ │ └── writer.go ├── golang.org │ └── x │ │ ├── crypto │ │ ├── LICENSE │ │ ├── PATENTS │ │ └── ssh │ │ │ └── terminal │ │ │ └── terminal.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 │ │ │ ├── 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 │ │ │ ├── epoll_zos.go │ │ │ ├── fcntl.go │ │ │ ├── fcntl_darwin.go │ │ │ ├── fcntl_linux_32bit.go │ │ │ ├── fdset.go │ │ │ ├── fstatfs_zos.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 │ │ │ ├── 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 │ │ │ ├── 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 │ │ │ ├── empty.s │ │ │ ├── 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 ├── gonum.org │ └── v1 │ │ └── gonum │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── blas │ │ ├── README.md │ │ ├── blas.go │ │ ├── blas64 │ │ │ ├── blas64.go │ │ │ ├── conv.go │ │ │ ├── conv_symmetric.go │ │ │ └── doc.go │ │ ├── cblas128 │ │ │ ├── cblas128.go │ │ │ ├── conv.go │ │ │ ├── conv_hermitian.go │ │ │ ├── conv_symmetric.go │ │ │ └── doc.go │ │ ├── conversions.bash │ │ ├── doc.go │ │ └── gonum │ │ │ ├── dgemm.go │ │ │ ├── doc.go │ │ │ ├── errors.go │ │ │ ├── gonum.go │ │ │ ├── level1cmplx128.go │ │ │ ├── level1cmplx64.go │ │ │ ├── level1float32.go │ │ │ ├── level1float32_dsdot.go │ │ │ ├── level1float32_sdot.go │ │ │ ├── level1float32_sdsdot.go │ │ │ ├── level1float64.go │ │ │ ├── level1float64_ddot.go │ │ │ ├── level2cmplx128.go │ │ │ ├── level2cmplx64.go │ │ │ ├── level2float32.go │ │ │ ├── level2float64.go │ │ │ ├── level3cmplx128.go │ │ │ ├── level3cmplx64.go │ │ │ ├── level3float32.go │ │ │ ├── level3float64.go │ │ │ ├── sgemm.go │ │ │ └── single_precision.bash │ │ ├── floats │ │ ├── README.md │ │ ├── doc.go │ │ ├── floats.go │ │ └── scalar │ │ │ ├── doc.go │ │ │ └── scalar.go │ │ ├── graph │ │ ├── .gitignore │ │ ├── README.md │ │ ├── complement.go │ │ ├── doc.go │ │ ├── graph.go │ │ ├── internal │ │ │ ├── linear │ │ │ │ ├── doc.go │ │ │ │ └── linear.go │ │ │ ├── ordered │ │ │ │ ├── doc.go │ │ │ │ └── sort.go │ │ │ └── set │ │ │ │ ├── doc.go │ │ │ │ ├── same.go │ │ │ │ ├── same_appengine.go │ │ │ │ └── set.go │ │ ├── iterator │ │ │ ├── doc.go │ │ │ ├── edges.go │ │ │ ├── lines.go │ │ │ ├── lines_map.go │ │ │ ├── lines_map_safe.go │ │ │ ├── map.go │ │ │ ├── map.s │ │ │ ├── nodes.go │ │ │ ├── nodes_map.go │ │ │ └── nodes_map_safe.go │ │ ├── multigraph.go │ │ ├── nodes_edges.go │ │ ├── set │ │ │ └── uid │ │ │ │ └── uid.go │ │ ├── simple │ │ │ ├── dense_directed_matrix.go │ │ │ ├── dense_undirected_matrix.go │ │ │ ├── directed.go │ │ │ ├── doc.go │ │ │ ├── simple.go │ │ │ ├── undirected.go │ │ │ ├── weighted_directed.go │ │ │ └── weighted_undirected.go │ │ ├── topo │ │ │ ├── bron_kerbosch.go │ │ │ ├── clique_graph.go │ │ │ ├── doc.go │ │ │ ├── johnson_cycles.go │ │ │ ├── non_tomita_choice.go │ │ │ ├── paton_cycles.go │ │ │ ├── tarjan.go │ │ │ ├── tomita_choice.go │ │ │ └── topo.go │ │ ├── traverse │ │ │ ├── doc.go │ │ │ └── traverse.go │ │ └── undirect.go │ │ ├── internal │ │ ├── asm │ │ │ ├── c128 │ │ │ │ ├── axpyinc_amd64.s │ │ │ │ ├── axpyincto_amd64.s │ │ │ │ ├── axpyunitary_amd64.s │ │ │ │ ├── axpyunitaryto_amd64.s │ │ │ │ ├── doc.go │ │ │ │ ├── dotcinc_amd64.s │ │ │ │ ├── dotcunitary_amd64.s │ │ │ │ ├── dotuinc_amd64.s │ │ │ │ ├── dotuunitary_amd64.s │ │ │ │ ├── dscalinc_amd64.s │ │ │ │ ├── dscalunitary_amd64.s │ │ │ │ ├── scal.go │ │ │ │ ├── scalUnitary_amd64.s │ │ │ │ ├── scalinc_amd64.s │ │ │ │ ├── stubs.go │ │ │ │ ├── stubs_amd64.go │ │ │ │ └── stubs_noasm.go │ │ │ ├── c64 │ │ │ │ ├── axpyinc_amd64.s │ │ │ │ ├── axpyincto_amd64.s │ │ │ │ ├── axpyunitary_amd64.s │ │ │ │ ├── axpyunitaryto_amd64.s │ │ │ │ ├── conj.go │ │ │ │ ├── doc.go │ │ │ │ ├── dotcinc_amd64.s │ │ │ │ ├── dotcunitary_amd64.s │ │ │ │ ├── dotuinc_amd64.s │ │ │ │ ├── dotuunitary_amd64.s │ │ │ │ ├── scal.go │ │ │ │ ├── stubs.go │ │ │ │ ├── stubs_amd64.go │ │ │ │ └── stubs_noasm.go │ │ │ ├── f32 │ │ │ │ ├── axpyinc_amd64.s │ │ │ │ ├── axpyincto_amd64.s │ │ │ │ ├── axpyunitary_amd64.s │ │ │ │ ├── axpyunitaryto_amd64.s │ │ │ │ ├── ddotinc_amd64.s │ │ │ │ ├── ddotunitary_amd64.s │ │ │ │ ├── doc.go │ │ │ │ ├── dotinc_amd64.s │ │ │ │ ├── dotunitary_amd64.s │ │ │ │ ├── ge_amd64.go │ │ │ │ ├── ge_amd64.s │ │ │ │ ├── ge_noasm.go │ │ │ │ ├── gemv.go │ │ │ │ ├── l2norm.go │ │ │ │ ├── scal.go │ │ │ │ ├── stubs_amd64.go │ │ │ │ ├── stubs_noasm.go │ │ │ │ └── sum_amd64.s │ │ │ └── f64 │ │ │ │ ├── abssum_amd64.s │ │ │ │ ├── abssuminc_amd64.s │ │ │ │ ├── add_amd64.s │ │ │ │ ├── addconst_amd64.s │ │ │ │ ├── axpy.go │ │ │ │ ├── axpyinc_amd64.s │ │ │ │ ├── axpyincto_amd64.s │ │ │ │ ├── axpyunitary_amd64.s │ │ │ │ ├── axpyunitaryto_amd64.s │ │ │ │ ├── cumprod_amd64.s │ │ │ │ ├── cumsum_amd64.s │ │ │ │ ├── div_amd64.s │ │ │ │ ├── divto_amd64.s │ │ │ │ ├── doc.go │ │ │ │ ├── dot.go │ │ │ │ ├── dot_amd64.s │ │ │ │ ├── ge_amd64.go │ │ │ │ ├── ge_noasm.go │ │ │ │ ├── gemvN_amd64.s │ │ │ │ ├── gemvT_amd64.s │ │ │ │ ├── ger_amd64.s │ │ │ │ ├── l1norm_amd64.s │ │ │ │ ├── l2norm_amd64.s │ │ │ │ ├── l2norm_noasm.go │ │ │ │ ├── l2normdist_amd64.s │ │ │ │ ├── l2norminc_amd64.s │ │ │ │ ├── linfnorm_amd64.s │ │ │ │ ├── scal.go │ │ │ │ ├── scalinc_amd64.s │ │ │ │ ├── scalincto_amd64.s │ │ │ │ ├── scalunitary_amd64.s │ │ │ │ ├── scalunitaryto_amd64.s │ │ │ │ ├── stubs_amd64.go │ │ │ │ ├── stubs_noasm.go │ │ │ │ └── sum_amd64.s │ │ ├── cmplx64 │ │ │ ├── abs.go │ │ │ ├── conj.go │ │ │ ├── doc.go │ │ │ ├── isinf.go │ │ │ ├── isnan.go │ │ │ └── sqrt.go │ │ └── math32 │ │ │ ├── doc.go │ │ │ ├── math.go │ │ │ ├── signbit.go │ │ │ ├── sqrt.go │ │ │ ├── sqrt_amd64.go │ │ │ ├── sqrt_amd64.s │ │ │ ├── sqrt_arm64.go │ │ │ └── sqrt_arm64.s │ │ ├── lapack │ │ ├── .gitignore │ │ ├── README.md │ │ ├── doc.go │ │ ├── gonum │ │ │ ├── dbdsqr.go │ │ │ ├── dgebak.go │ │ │ ├── dgebal.go │ │ │ ├── dgebd2.go │ │ │ ├── dgebrd.go │ │ │ ├── dgecon.go │ │ │ ├── dgeev.go │ │ │ ├── dgehd2.go │ │ │ ├── dgehrd.go │ │ │ ├── dgelq2.go │ │ │ ├── dgelqf.go │ │ │ ├── dgels.go │ │ │ ├── dgeql2.go │ │ │ ├── dgeqp3.go │ │ │ ├── dgeqr2.go │ │ │ ├── dgeqrf.go │ │ │ ├── dgerq2.go │ │ │ ├── dgerqf.go │ │ │ ├── dgesc2.go │ │ │ ├── dgesv.go │ │ │ ├── dgesvd.go │ │ │ ├── dgetc2.go │ │ │ ├── dgetf2.go │ │ │ ├── dgetrf.go │ │ │ ├── dgetri.go │ │ │ ├── dgetrs.go │ │ │ ├── dgghrd.go │ │ │ ├── dggsvd3.go │ │ │ ├── dggsvp3.go │ │ │ ├── dgtsv.go │ │ │ ├── dhseqr.go │ │ │ ├── dlabrd.go │ │ │ ├── dlacn2.go │ │ │ ├── dlacpy.go │ │ │ ├── dlae2.go │ │ │ ├── dlaev2.go │ │ │ ├── dlaexc.go │ │ │ ├── dlag2.go │ │ │ ├── dlags2.go │ │ │ ├── dlagtm.go │ │ │ ├── dlahqr.go │ │ │ ├── dlahr2.go │ │ │ ├── dlaln2.go │ │ │ ├── dlangb.go │ │ │ ├── dlange.go │ │ │ ├── dlangt.go │ │ │ ├── dlanhs.go │ │ │ ├── dlansb.go │ │ │ ├── dlanst.go │ │ │ ├── dlansy.go │ │ │ ├── dlantb.go │ │ │ ├── dlantr.go │ │ │ ├── dlanv2.go │ │ │ ├── dlapll.go │ │ │ ├── dlapmr.go │ │ │ ├── dlapmt.go │ │ │ ├── dlapy2.go │ │ │ ├── dlaqp2.go │ │ │ ├── dlaqps.go │ │ │ ├── dlaqr04.go │ │ │ ├── dlaqr1.go │ │ │ ├── dlaqr23.go │ │ │ ├── dlaqr5.go │ │ │ ├── dlarf.go │ │ │ ├── dlarfb.go │ │ │ ├── dlarfg.go │ │ │ ├── dlarft.go │ │ │ ├── dlarfx.go │ │ │ ├── dlartg.go │ │ │ ├── dlas2.go │ │ │ ├── dlascl.go │ │ │ ├── dlaset.go │ │ │ ├── dlasq1.go │ │ │ ├── dlasq2.go │ │ │ ├── dlasq3.go │ │ │ ├── dlasq4.go │ │ │ ├── dlasq5.go │ │ │ ├── dlasq6.go │ │ │ ├── dlasr.go │ │ │ ├── dlasrt.go │ │ │ ├── dlassq.go │ │ │ ├── dlasv2.go │ │ │ ├── dlaswp.go │ │ │ ├── dlasy2.go │ │ │ ├── dlatbs.go │ │ │ ├── dlatdf.go │ │ │ ├── dlatrd.go │ │ │ ├── dlatrs.go │ │ │ ├── dlauu2.go │ │ │ ├── dlauum.go │ │ │ ├── doc.go │ │ │ ├── dorg2l.go │ │ │ ├── dorg2r.go │ │ │ ├── dorgbr.go │ │ │ ├── dorghr.go │ │ │ ├── dorgl2.go │ │ │ ├── dorglq.go │ │ │ ├── dorgql.go │ │ │ ├── dorgqr.go │ │ │ ├── dorgr2.go │ │ │ ├── dorgtr.go │ │ │ ├── dorm2r.go │ │ │ ├── dormbr.go │ │ │ ├── dormhr.go │ │ │ ├── dorml2.go │ │ │ ├── dormlq.go │ │ │ ├── dormqr.go │ │ │ ├── dormr2.go │ │ │ ├── dpbcon.go │ │ │ ├── dpbtf2.go │ │ │ ├── dpbtrf.go │ │ │ ├── dpbtrs.go │ │ │ ├── dpocon.go │ │ │ ├── dpotf2.go │ │ │ ├── dpotrf.go │ │ │ ├── dpotri.go │ │ │ ├── dpotrs.go │ │ │ ├── dpstf2.go │ │ │ ├── dpstrf.go │ │ │ ├── dptcon.go │ │ │ ├── dptsv.go │ │ │ ├── dpttrf.go │ │ │ ├── dpttrs.go │ │ │ ├── dptts2.go │ │ │ ├── drscl.go │ │ │ ├── dsteqr.go │ │ │ ├── dsterf.go │ │ │ ├── dsyev.go │ │ │ ├── dsytd2.go │ │ │ ├── dsytrd.go │ │ │ ├── dtbtrs.go │ │ │ ├── dtgsja.go │ │ │ ├── dtrcon.go │ │ │ ├── dtrevc3.go │ │ │ ├── dtrexc.go │ │ │ ├── dtrti2.go │ │ │ ├── dtrtri.go │ │ │ ├── dtrtrs.go │ │ │ ├── errors.go │ │ │ ├── iladlc.go │ │ │ ├── iladlr.go │ │ │ ├── ilaenv.go │ │ │ ├── iparmq.go │ │ │ └── lapack.go │ │ ├── lapack.go │ │ └── lapack64 │ │ │ ├── doc.go │ │ │ └── lapack64.go │ │ └── mat │ │ ├── README.md │ │ ├── band.go │ │ ├── cdense.go │ │ ├── cholesky.go │ │ ├── cmatrix.go │ │ ├── consts.go │ │ ├── dense.go │ │ ├── dense_arithmetic.go │ │ ├── diagonal.go │ │ ├── doc.go │ │ ├── eigen.go │ │ ├── errors.go │ │ ├── format.go │ │ ├── gsvd.go │ │ ├── hogsvd.go │ │ ├── index_bound_checks.go │ │ ├── index_no_bound_checks.go │ │ ├── inner.go │ │ ├── io.go │ │ ├── lq.go │ │ ├── lu.go │ │ ├── matrix.go │ │ ├── offset.go │ │ ├── offset_appengine.go │ │ ├── pool.go │ │ ├── product.go │ │ ├── qr.go │ │ ├── shadow.go │ │ ├── shadow_common.go │ │ ├── shadow_complex.go │ │ ├── solve.go │ │ ├── svd.go │ │ ├── symband.go │ │ ├── symmetric.go │ │ ├── triangular.go │ │ ├── triband.go │ │ ├── tridiag.go │ │ └── vector.go └── modules.txt └── version.go /.github/workflows/ci.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Go CI Workflow 3 | 4 | on: 5 | push: 6 | tags: 7 | - v* 8 | branches: 9 | - master 10 | - main 11 | pull_request: 12 | 13 | permissions: 14 | contents: read 15 | pull-requests: read 16 | 17 | jobs: 18 | gobuild: 19 | name: build 20 | runs-on: ubuntu-latest 21 | steps: 22 | - name: Install Go 23 | uses: actions/setup-go@v3 24 | with: 25 | # This should be the same as specified in go.mod 26 | go-version: 1.22.1 27 | - name: Checkout code 28 | uses: actions/checkout@v3 29 | - name: Build code 30 | run: go build -v ./... 31 | - name: Test code 32 | run: go test -v ./... 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .lvimrc 2 | cmd/repoctl/repoctl 3 | cmd/repols/repols 4 | repoctl 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2016 Ben Morgan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/cassava/repoctl 2 | 3 | go 1.21 4 | 5 | toolchain go1.22.1 6 | 7 | require ( 8 | github.com/BurntSushi/toml v1.3.2 9 | github.com/goulash/archive v1.3.2 10 | github.com/goulash/color v1.0.0 11 | github.com/goulash/errs v1.0.0 12 | github.com/goulash/osutil v1.0.2 13 | github.com/goulash/pr v1.0.0 14 | github.com/goulash/xdg v1.0.0 15 | github.com/spf13/cobra v1.8.0 16 | gonum.org/v1/gonum v0.15.0 17 | ) 18 | 19 | require ( 20 | github.com/inconshreveable/mousetrap v1.1.0 // indirect 21 | github.com/klauspost/compress v1.17.7 // indirect 22 | github.com/spf13/pflag v1.0.5 // indirect 23 | github.com/ulikunitz/xz v0.5.11 // indirect 24 | golang.org/x/crypto v0.21.0 // indirect 25 | golang.org/x/sys v0.18.0 // indirect 26 | golang.org/x/term v0.18.0 // indirect 27 | ) 28 | -------------------------------------------------------------------------------- /pacman/alpm/testdata/.gitignore: -------------------------------------------------------------------------------- 1 | vercmp.dat 2 | -------------------------------------------------------------------------------- /pacman/alpm/testdata/prepare.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bufio" 5 | "errors" 6 | "fmt" 7 | "io" 8 | "log" 9 | "os" 10 | "os/exec" 11 | "strings" 12 | ) 13 | 14 | func main() { 15 | if len(os.Args) <= 2 { 16 | die(errors.New("not enough arguments")) 17 | } 18 | 19 | file, err := os.Open(os.Args[1]) 20 | if err != nil { 21 | die(err) 22 | } 23 | defer file.Close() 24 | 25 | var versions []string 26 | buf := bufio.NewReader(file) 27 | for { 28 | line, err := buf.ReadString('\n') 29 | if err != nil { 30 | if err == io.EOF { 31 | break 32 | } 33 | die(err) 34 | } 35 | 36 | versions = append(versions, strings.TrimSpace(line)) 37 | } 38 | 39 | generateData(versions, os.Args[2]) 40 | } 41 | 42 | func generateData(vs []string, filename string) { 43 | file, err := os.Create(filename) 44 | if err != nil { 45 | die(err) 46 | } 47 | defer file.Close() 48 | defer file.Sync() 49 | 50 | buf := bufio.NewWriter(file) 51 | for _, a := range vs { 52 | for _, b := range vs { 53 | cmd := exec.Command("vercmp", a, b) 54 | bs, err := cmd.Output() 55 | if err != nil { 56 | log.Println(err) 57 | } 58 | buf.WriteString(a) 59 | buf.WriteByte(' ') 60 | buf.WriteString(b) 61 | buf.WriteByte(' ') 62 | buf.Write(bs) 63 | } 64 | buf.Flush() 65 | } 66 | } 67 | 68 | func die(err error) { 69 | fmt.Fprintf(os.Stderr, "error: %s\n", err) 70 | os.Exit(1) 71 | } 72 | -------------------------------------------------------------------------------- /pacman/alpm/testdata/vercmp.dat.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cassava/repoctl/6ab74f4d889aed300c5a2dfd055e491d3592eb1a/pacman/alpm/testdata/vercmp.dat.xz -------------------------------------------------------------------------------- /pacman/any.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Ben Morgan. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package pacman 6 | 7 | import "github.com/cassava/repoctl/pacman/alpm" 8 | 9 | type AnyPackages interface { 10 | Iterate(func(AnyPackage)) 11 | Pkgs() Packages 12 | 13 | Len() int 14 | Swap(i, j int) 15 | Less(i, j int) bool 16 | } 17 | 18 | type AnyPackage interface { 19 | Pkg() *Package 20 | PkgName() string 21 | PkgVersion() string 22 | PkgDepends() []string 23 | PkgMakeDepends() []string 24 | } 25 | 26 | // PkgOlder returns true if a's version is older than b's. 27 | // If b is nil, then false is returned. 28 | func PkgOlder(a, b AnyPackage) bool { 29 | if b == nil { 30 | return false 31 | } 32 | return alpm.VerCmp(a.PkgVersion(), b.PkgVersion()) == -1 33 | 34 | } 35 | 36 | // PkgNewer returns true if a's version is newer than b's. 37 | // If b is nil, then true is returned. 38 | func PkgNewer(a, b AnyPackage) bool { 39 | if b == nil { 40 | return true 41 | } 42 | return alpm.VerCmp(a.PkgVersion(), b.PkgVersion()) == 1 43 | } 44 | -------------------------------------------------------------------------------- /pacman/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Ben Morgan. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package pacman provides routines for dealing with Pacman packages. 6 | package pacman 7 | 8 | import ( 9 | "fmt" 10 | "io" 11 | ) 12 | 13 | // DebugWriter is used to write debugging information from this module. 14 | // If it is nil, then no debugging messages are printed. 15 | var DebugWriter io.Writer = nil 16 | 17 | func debugf(format string, obj ...interface{}) { 18 | if DebugWriter != nil { 19 | fmt.Fprintf(DebugWriter, format, obj...) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /pacman/graph/functions.go: -------------------------------------------------------------------------------- 1 | package graph 2 | 3 | import ( 4 | "github.com/cassava/repoctl/pacman" 5 | "github.com/cassava/repoctl/pacman/aur" 6 | 7 | "gonum.org/v1/gonum/graph/topo" 8 | ) 9 | 10 | // Dependencies returns a list of all dependencies in the graph, 11 | // those in repositories, those from AUR, and those unknown. 12 | func Dependencies(g *Graph) (pacman.Packages, aur.Packages, []string) { 13 | rps := make(pacman.Packages, 0) 14 | aps := make(aur.Packages, 0) 15 | ups := make([]string, 0) 16 | 17 | names := make(map[string]bool) 18 | nodes, _ := topo.Sort(g) 19 | for _, vn := range nodes { 20 | n := vn.(*Node) 21 | if names[n.PkgName()] { 22 | continue 23 | } 24 | 25 | names[n.PkgName()] = true 26 | switch p := n.AnyPackage.(type) { 27 | case *aur.Package: 28 | aps = append(aps, p) 29 | case *pacman.Package: 30 | if p.Origin == pacman.UnknownOrigin { 31 | ups = append(ups, p.Name) 32 | } else { 33 | rps = append(rps, p) 34 | } 35 | default: 36 | panic("unexpected type of package in graph") 37 | } 38 | } 39 | return rps, aps, ups 40 | } 41 | -------------------------------------------------------------------------------- /repo/errors.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Ben Morgan. All rights reserved. 2 | // Use of this source code is governed by an MIT license 3 | // that can be found in the LICENSE file. 4 | 5 | package repo 6 | 7 | import ( 8 | "errors" 9 | "fmt" 10 | ) 11 | 12 | var ( 13 | ErrProfileInvalid = errors.New("require valid profile") 14 | ErrRepoDirRelative = errors.New("repository directory path must be absolute") 15 | ErrRepoDirMissing = errors.New("repository directory path does not exist") 16 | ErrRepoDirInvalid = errors.New("repository directory path is invalid") 17 | ErrPkgDirExists = errors.New("package destination directory already exists") 18 | ErrPkgFileExists = errors.New("package destination file already exists") 19 | ) 20 | 21 | type NotExistsError struct { 22 | Filepath string 23 | } 24 | 25 | func (e NotExistsError) Error() string { 26 | return fmt.Sprintf("file %q does not exist", e.Filepath) 27 | } 28 | 29 | type InvalidFileError struct { 30 | Filepath string 31 | WantDir bool 32 | } 33 | 34 | func (e InvalidFileError) Error() string { 35 | if e.WantDir { 36 | return fmt.Sprintf("expected directory at %q", e.Filepath) 37 | } 38 | return fmt.Sprintf("expected file at %q", e.Filepath) 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/.gitignore: -------------------------------------------------------------------------------- 1 | /toml.test 2 | /toml-test 3 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/COPYING: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 TOML authors 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/BurntSushi/toml/decode_go116.go: -------------------------------------------------------------------------------- 1 | //go:build go1.16 2 | // +build go1.16 3 | 4 | package toml 5 | 6 | import ( 7 | "io/fs" 8 | ) 9 | 10 | // DecodeFS reads the contents of a file from [fs.FS] and decodes it with 11 | // [Decode]. 12 | func DecodeFS(fsys fs.FS, path string, v interface{}) (MetaData, error) { 13 | fp, err := fsys.Open(path) 14 | if err != nil { 15 | return MetaData{}, err 16 | } 17 | defer fp.Close() 18 | return NewDecoder(fp).Decode(v) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/deprecated.go: -------------------------------------------------------------------------------- 1 | package toml 2 | 3 | import ( 4 | "encoding" 5 | "io" 6 | ) 7 | 8 | // TextMarshaler is an alias for encoding.TextMarshaler. 9 | // 10 | // Deprecated: use encoding.TextMarshaler 11 | type TextMarshaler encoding.TextMarshaler 12 | 13 | // TextUnmarshaler is an alias for encoding.TextUnmarshaler. 14 | // 15 | // Deprecated: use encoding.TextUnmarshaler 16 | type TextUnmarshaler encoding.TextUnmarshaler 17 | 18 | // PrimitiveDecode is an alias for MetaData.PrimitiveDecode(). 19 | // 20 | // Deprecated: use MetaData.PrimitiveDecode. 21 | func PrimitiveDecode(primValue Primitive, v interface{}) error { 22 | md := MetaData{decoded: make(map[string]struct{})} 23 | return md.unify(primValue.undecoded, rvalue(v)) 24 | } 25 | 26 | // DecodeReader is an alias for NewDecoder(r).Decode(v). 27 | // 28 | // Deprecated: use NewDecoder(reader).Decode(&value). 29 | func DecodeReader(r io.Reader, v interface{}) (MetaData, error) { return NewDecoder(r).Decode(v) } 30 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/doc.go: -------------------------------------------------------------------------------- 1 | // Package toml implements decoding and encoding of TOML files. 2 | // 3 | // This package supports TOML v1.0.0, as specified at https://toml.io 4 | // 5 | // There is also support for delaying decoding with the Primitive type, and 6 | // querying the set of keys in a TOML document with the MetaData type. 7 | // 8 | // The github.com/BurntSushi/toml/cmd/tomlv package implements a TOML validator, 9 | // and can be used to verify if TOML document is valid. It can also be used to 10 | // print the type of each key. 11 | package toml 12 | -------------------------------------------------------------------------------- /vendor/github.com/goulash/archive/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Ben Morgan 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /vendor/github.com/goulash/archive/README.md: -------------------------------------------------------------------------------- 1 | goulash/archive 2 | =============== 3 | 4 | [![GoDoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/goulash/archive) 5 | [![License: MIT](http://img.shields.io/badge/license-MIT-red.svg?style=flat-square)](http://opensource.org/licenses/MIT) 6 | 7 | Package archive provides functions for working with archives. 8 | 9 | For more information, see the documentation! :-) 10 | 11 | This package is licensed under the MIT license. 12 | -------------------------------------------------------------------------------- /vendor/github.com/goulash/color/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Ben Morgan 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /vendor/github.com/goulash/color/README.md: -------------------------------------------------------------------------------- 1 | goulash/color 2 | ============= 3 | 4 | [![GoDoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/goulash/color) 5 | [![License: MIT](http://img.shields.io/badge/license-MIT-red.svg?style=flat-square)](http://opensource.org/licenses/MIT) 6 | 7 | Package color provides routines for printing ANSI color codes. 8 | 9 | For more information, see the documentation! :-) 10 | 11 | This package is licensed under the MIT license. 12 | -------------------------------------------------------------------------------- /vendor/github.com/goulash/errs/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Ben Morgan 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /vendor/github.com/goulash/osutil/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2014 Ben Morgan 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /vendor/github.com/goulash/osutil/README.md: -------------------------------------------------------------------------------- 1 | goulash/osutil 2 | ============== 3 | 4 | Package osutil provides utility functions especially related to 5 | interaction with the outside world, aka the operating system. 6 | -------------------------------------------------------------------------------- /vendor/github.com/goulash/osutil/errors.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Ben Morgan. All rights reserved. 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 osutil 6 | 7 | import ( 8 | "fmt" 9 | ) 10 | 11 | type FileTypeError struct { 12 | Filepath string 13 | } 14 | 15 | func (e FileTypeError) Error() string { 16 | return fmt.Sprintf("unexpected file type at %q", e.Filepath) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/goulash/osutil/path.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013, Ben Morgan. All rights reserved. 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 osutil 6 | 7 | import ( 8 | "path" 9 | "strings" 10 | ) 11 | 12 | // FileExt returns the file type as identified by the (lowercase) extension. 13 | // As such it is very limited, but for limited purposes, simple enough. 14 | func FileExt(filepath string) string { 15 | return strings.ToLower(path.Ext(filepath))[1:] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/goulash/pr/.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 | -------------------------------------------------------------------------------- /vendor/github.com/goulash/pr/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Ben Morgan 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /vendor/github.com/goulash/pr/README.md: -------------------------------------------------------------------------------- 1 | pr 2 | == 3 | 4 | Package pr provides various printing routines analogous to the pr *NIX utility. 5 | -------------------------------------------------------------------------------- /vendor/github.com/goulash/pr/columns_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013, Ben Morgan. All rights reserved. 2 | // Use of this source code is governed by an MIT license 3 | // that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | 7 | package pr 8 | 9 | import ( 10 | "os" 11 | ) 12 | 13 | func PrintGrid(columns int, list []string) { 14 | tw := StdoutTerminalWidth() 15 | FprintGrid(os.Stdout, tw, columns, list) 16 | } 17 | 18 | func PrintFlex(list []string) { 19 | tw := StdoutTerminalWidth() 20 | FprintFlex(os.Stdout, tw, list) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/goulash/pr/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013, Ben Morgan. All rights reserved. 2 | // Use of this source code is governed by an MIT license 3 | // that can be found in the LICENSE file. 4 | 5 | /* 6 | Package pr implements functions for pretty printing of information. 7 | 8 | The following example program demonstrates imitating the columns 9 | outputted by the "ls" program. Run it like so: "ls -1 | ./test". 10 | 11 | package main 12 | 13 | import ( 14 | "bufio" 15 | "flag" 16 | "fmt" 17 | "io" 18 | "os" 19 | "strings" 20 | 21 | "github.com/goulash/pr" 22 | ) 23 | 24 | func main() { 25 | reader := bufio.NewReader(os.Stdin) 26 | buffer := make([]string, 0, 32) 27 | 28 | for { 29 | line, err := reader.ReadString('\n') 30 | if err != nil { 31 | if err != io.EOF { 32 | fmt.Errorf("error: %s\n", err) 33 | } 34 | break 35 | } 36 | 37 | buffer = append(buffer, strings.TrimSpace(line)) 38 | } 39 | 40 | width := flag.Int("width", -1, "width of the terminal") 41 | flag.Parse() 42 | 43 | if *width < 0 { 44 | pr.PrintFlex(buffer) 45 | } else { 46 | pr.FprintFlex(os.Stdout, *width, buffer) 47 | } 48 | } 49 | 50 | */ 51 | package pr 52 | -------------------------------------------------------------------------------- /vendor/github.com/goulash/pr/term_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013, Ben Morgan. All rights reserved. 2 | // Use of this source code is governed by an MIT license 3 | // that can be found in the LICENSE file. 4 | 5 | // Copyright 2011, The Go Authors. All rights reserved. 6 | 7 | // +build linux 8 | 9 | package pr 10 | 11 | import ( 12 | "syscall" 13 | "unsafe" 14 | ) 15 | 16 | // GetTerminalWidth returns the current width of the connected terminal for the 17 | // given file descriptor. If fd is not connected to a terminal, then -1 is 18 | // returned. 19 | // 20 | // Note: this only works on Linux. 21 | func GetTerminalWidth(fd int) int { 22 | var dimensions [4]uint16 23 | 24 | if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), uintptr(syscall.TIOCGWINSZ), uintptr(unsafe.Pointer(&dimensions)), 0, 0, 0); err != 0 { 25 | return -1 26 | } 27 | 28 | return int(dimensions[1]) 29 | } 30 | 31 | // StdoutTerminalWidth returns the current width of the terminal (if any) 32 | // connected to Stdout. 33 | // 34 | // Note: this only works on Linux. 35 | func StdoutTerminalWidth() int { 36 | return GetTerminalWidth(syscall.Stdout) 37 | } 38 | 39 | // StderrTerminalWidth returns the current width of the terminal (if any) 40 | // connected to Stderr. 41 | // 42 | // Note: this only works on Linux. 43 | func StderrTerminalWidth() int { 44 | return GetTerminalWidth(syscall.Stderr) 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/goulash/xdg/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Ben Morgan 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /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/cassava/repoctl/6ab74f4d889aed300c5a2dfd055e491d3592eb1a/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/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/ulikunitz/xz/.gitignore: -------------------------------------------------------------------------------- 1 | # .gitignore 2 | 3 | TODO.html 4 | README.html 5 | 6 | lzma/writer.txt 7 | lzma/reader.txt 8 | 9 | cmd/gxz/gxz 10 | cmd/xb/xb 11 | 12 | # test executables 13 | *.test 14 | 15 | # profile files 16 | *.out 17 | 18 | # vim swap file 19 | .*.swp 20 | 21 | # executables on windows 22 | *.exe 23 | 24 | # default compression test file 25 | enwik8* 26 | 27 | # file generated by example 28 | example.xz -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Currently the last minor version v0.5.x is supported. 6 | 7 | ## Reporting a Vulnerability 8 | 9 | Report a vulnerability by creating a Github issue at 10 | . Expect a response in a week. 11 | -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/fox-check-none.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cassava/repoctl/6ab74f4d889aed300c5a2dfd055e491d3592eb1a/vendor/github.com/ulikunitz/xz/fox-check-none.xz -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/fox.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cassava/repoctl/6ab74f4d889aed300c5a2dfd055e491d3592eb1a/vendor/github.com/ulikunitz/xz/fox.xz -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/internal/hash/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2022 Ulrich Kunitz. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | /* 6 | Package hash provides rolling hashes. 7 | 8 | Rolling hashes have to be used for maintaining the positions of n-byte 9 | sequences in the dictionary buffer. 10 | 11 | The package provides currently the Rabin-Karp rolling hash and a Cyclic 12 | Polynomial hash. Both support the Hashes method to be used with an interface. 13 | */ 14 | package hash 15 | -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/internal/hash/roller.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2022 Ulrich Kunitz. All rights reserved. 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 hash 6 | 7 | // Roller provides an interface for rolling hashes. The hash value will become 8 | // valid after hash has been called Len times. 9 | type Roller interface { 10 | Len() int 11 | RollByte(x byte) uint64 12 | } 13 | 14 | // Hashes computes all hash values for the array p. Note that the state of the 15 | // roller is changed. 16 | func Hashes(r Roller, p []byte) []uint64 { 17 | n := r.Len() 18 | if len(p) < n { 19 | return nil 20 | } 21 | h := make([]uint64, len(p)-n+1) 22 | for i := 0; i < n-1; i++ { 23 | r.RollByte(p[i]) 24 | } 25 | for i := range h { 26 | h[i] = r.RollByte(p[i+n-1]) 27 | } 28 | return h 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/lzma/bitops.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2022 Ulrich Kunitz. All rights reserved. 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 lzma 6 | 7 | /* Naming conventions follows the CodeReviewComments in the Go Wiki. */ 8 | 9 | // ntz32Const is used by the functions NTZ and NLZ. 10 | const ntz32Const = 0x04d7651f 11 | 12 | // ntz32Table is a helper table for de Bruijn algorithm by Danny Dubé. 13 | // See Henry S. Warren, Jr. "Hacker's Delight" section 5-1 figure 5-26. 14 | var ntz32Table = [32]int8{ 15 | 0, 1, 2, 24, 3, 19, 6, 25, 16 | 22, 4, 20, 10, 16, 7, 12, 26, 17 | 31, 23, 18, 5, 21, 9, 15, 11, 18 | 30, 17, 8, 14, 29, 13, 28, 27, 19 | } 20 | 21 | /* 22 | // ntz32 computes the number of trailing zeros for an unsigned 32-bit integer. 23 | func ntz32(x uint32) int { 24 | if x == 0 { 25 | return 32 26 | } 27 | x = (x & -x) * ntz32Const 28 | return int(ntz32Table[x>>27]) 29 | } 30 | */ 31 | 32 | // nlz32 computes the number of leading zeros for an unsigned 32-bit integer. 33 | func nlz32(x uint32) int { 34 | // Smear left most bit to the right 35 | x |= x >> 1 36 | x |= x >> 2 37 | x |= x >> 4 38 | x |= x >> 8 39 | x |= x >> 16 40 | // Use ntz mechanism to calculate nlz. 41 | x++ 42 | if x == 0 { 43 | return 0 44 | } 45 | x *= ntz32Const 46 | return 32 - int(ntz32Table[x>>27]) 47 | } 48 | -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/lzma/breader.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2022 Ulrich Kunitz. All rights reserved. 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 lzma 6 | 7 | import ( 8 | "errors" 9 | "io" 10 | ) 11 | 12 | // breader provides the ReadByte function for a Reader. It doesn't read 13 | // more data from the reader than absolutely necessary. 14 | type breader struct { 15 | io.Reader 16 | // helper slice to save allocations 17 | p []byte 18 | } 19 | 20 | // ByteReader converts an io.Reader into an io.ByteReader. 21 | func ByteReader(r io.Reader) io.ByteReader { 22 | br, ok := r.(io.ByteReader) 23 | if !ok { 24 | return &breader{r, make([]byte, 1)} 25 | } 26 | return br 27 | } 28 | 29 | // ReadByte read byte function. 30 | func (r *breader) ReadByte() (c byte, err error) { 31 | n, err := r.Reader.Read(r.p) 32 | if n < 1 { 33 | if err == nil { 34 | err = errors.New("breader.ReadByte: no data") 35 | } 36 | return 0, err 37 | } 38 | return r.p[0], nil 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/lzma/bytewriter.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2022 Ulrich Kunitz. All rights reserved. 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 lzma 6 | 7 | import ( 8 | "errors" 9 | "io" 10 | ) 11 | 12 | // ErrLimit indicates that the limit of the LimitedByteWriter has been 13 | // reached. 14 | var ErrLimit = errors.New("limit reached") 15 | 16 | // LimitedByteWriter provides a byte writer that can be written until a 17 | // limit is reached. The field N provides the number of remaining 18 | // bytes. 19 | type LimitedByteWriter struct { 20 | BW io.ByteWriter 21 | N int64 22 | } 23 | 24 | // WriteByte writes a single byte to the limited byte writer. It returns 25 | // ErrLimit if the limit has been reached. If the byte is successfully 26 | // written the field N of the LimitedByteWriter will be decremented by 27 | // one. 28 | func (l *LimitedByteWriter) WriteByte(c byte) error { 29 | if l.N <= 0 { 30 | return ErrLimit 31 | } 32 | if err := l.BW.WriteByte(c); err != nil { 33 | return err 34 | } 35 | l.N-- 36 | return nil 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/lzma/directcodec.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2022 Ulrich Kunitz. All rights reserved. 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 lzma 6 | 7 | // directCodec allows the encoding and decoding of values with a fixed number 8 | // of bits. The number of bits must be in the range [1,32]. 9 | type directCodec byte 10 | 11 | // Bits returns the number of bits supported by this codec. 12 | func (dc directCodec) Bits() int { 13 | return int(dc) 14 | } 15 | 16 | // Encode uses the range encoder to encode a value with the fixed number of 17 | // bits. The most-significant bit is encoded first. 18 | func (dc directCodec) Encode(e *rangeEncoder, v uint32) error { 19 | for i := int(dc) - 1; i >= 0; i-- { 20 | if err := e.DirectEncodeBit(v >> uint(i)); err != nil { 21 | return err 22 | } 23 | } 24 | return nil 25 | } 26 | 27 | // Decode uses the range decoder to decode a value with the given number of 28 | // given bits. The most-significant bit is decoded first. 29 | func (dc directCodec) Decode(d *rangeDecoder) (v uint32, err error) { 30 | for i := int(dc) - 1; i >= 0; i-- { 31 | x, err := d.DirectDecodeBit() 32 | if err != nil { 33 | return 0, err 34 | } 35 | v = (v << 1) | x 36 | } 37 | return v, nil 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/lzma/fox.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cassava/repoctl/6ab74f4d889aed300c5a2dfd055e491d3592eb1a/vendor/github.com/ulikunitz/xz/lzma/fox.lzma -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/lzma/matchalgorithm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2022 Ulrich Kunitz. All rights reserved. 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 lzma 6 | 7 | import "errors" 8 | 9 | // MatchAlgorithm identifies an algorithm to find matches in the 10 | // dictionary. 11 | type MatchAlgorithm byte 12 | 13 | // Supported matcher algorithms. 14 | const ( 15 | HashTable4 MatchAlgorithm = iota 16 | BinaryTree 17 | ) 18 | 19 | // maStrings are used by the String method. 20 | var maStrings = map[MatchAlgorithm]string{ 21 | HashTable4: "HashTable4", 22 | BinaryTree: "BinaryTree", 23 | } 24 | 25 | // String returns a string representation of the Matcher. 26 | func (a MatchAlgorithm) String() string { 27 | if s, ok := maStrings[a]; ok { 28 | return s 29 | } 30 | return "unknown" 31 | } 32 | 33 | var errUnsupportedMatchAlgorithm = errors.New( 34 | "lzma: unsupported match algorithm value") 35 | 36 | // verify checks whether the matcher value is supported. 37 | func (a MatchAlgorithm) verify() error { 38 | if _, ok := maStrings[a]; !ok { 39 | return errUnsupportedMatchAlgorithm 40 | } 41 | return nil 42 | } 43 | 44 | func (a MatchAlgorithm) new(dictCap int) (m matcher, err error) { 45 | switch a { 46 | case HashTable4: 47 | return newHashTable(dictCap, 4) 48 | case BinaryTree: 49 | return newBinTree(dictCap) 50 | } 51 | return nil, errUnsupportedMatchAlgorithm 52 | } 53 | -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/lzma/operation.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2022 Ulrich Kunitz. All rights reserved. 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 lzma 6 | 7 | import ( 8 | "fmt" 9 | "unicode" 10 | ) 11 | 12 | // operation represents an operation on the dictionary during encoding or 13 | // decoding. 14 | type operation interface { 15 | Len() int 16 | } 17 | 18 | // rep represents a repetition at the given distance and the given length 19 | type match struct { 20 | // supports all possible distance values, including the eos marker 21 | distance int64 22 | // length 23 | n int 24 | } 25 | 26 | // Len returns the number of bytes matched. 27 | func (m match) Len() int { 28 | return m.n 29 | } 30 | 31 | // String returns a string representation for the repetition. 32 | func (m match) String() string { 33 | return fmt.Sprintf("M{%d,%d}", m.distance, m.n) 34 | } 35 | 36 | // lit represents a single byte literal. 37 | type lit struct { 38 | b byte 39 | } 40 | 41 | // Len returns 1 for the single byte literal. 42 | func (l lit) Len() int { 43 | return 1 44 | } 45 | 46 | // String returns a string representation for the literal. 47 | func (l lit) String() string { 48 | var c byte 49 | if unicode.IsPrint(rune(l.b)) { 50 | c = l.b 51 | } else { 52 | c = '.' 53 | } 54 | return fmt.Sprintf("L{%c/%02x}", c, l.b) 55 | } 56 | -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/make-docs: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -x 4 | pandoc -t html5 -f markdown -s --css=doc/md.css -o README.html README.md 5 | pandoc -t html5 -f markdown -s --css=doc/md.css -o TODO.html TODO.md 6 | -------------------------------------------------------------------------------- /vendor/github.com/ulikunitz/xz/none-check.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2022 Ulrich Kunitz. All rights reserved. 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 xz 6 | 7 | import "hash" 8 | 9 | type noneHash struct{} 10 | 11 | func (h noneHash) Write(p []byte) (n int, err error) { return len(p), nil } 12 | 13 | func (h noneHash) Sum(b []byte) []byte { return b } 14 | 15 | func (h noneHash) Reset() {} 16 | 17 | func (h noneHash) Size() int { return 0 } 18 | 19 | func (h noneHash) BlockSize() int { return 0 } 20 | 21 | func newNoneHash() hash.Hash { 22 | return &noneHash{} 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/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 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 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 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_darwin_libSystem.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin 6 | 7 | package unix 8 | 9 | import _ "unsafe" 10 | 11 | // Implemented in the runtime package (runtime/sys_darwin.go) 12 | func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 13 | func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 14 | func syscall_syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 15 | func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // 32-bit only 16 | func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 17 | func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 18 | func syscall_syscallPtr(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 19 | 20 | //go:linkname syscall_syscall syscall.syscall 21 | //go:linkname syscall_syscall6 syscall.syscall6 22 | //go:linkname syscall_syscall6X syscall.syscall6X 23 | //go:linkname syscall_syscall9 syscall.syscall9 24 | //go:linkname syscall_rawSyscall syscall.rawSyscall 25 | //go:linkname syscall_rawSyscall6 syscall.rawSyscall6 26 | //go:linkname syscall_syscallPtr syscall.syscallPtr 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build hurd 6 | 7 | package unix 8 | 9 | /* 10 | #include 11 | int ioctl(int, unsigned long int, uintptr_t); 12 | */ 13 | import "C" 14 | 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 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 && go1.9 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/empty.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 !go1.12 6 | 7 | // This file is here to allow bodyless functions with go:linkname for Go 1.11 8 | // and earlier (see https://golang.org/issue/23311). 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build generate 6 | 7 | package windows 8 | 9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && !race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | _ uint32 // pad to 8 byte boundary 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | _ uint32 // pad to 8 byte boundary 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Go 2 | 3 | Go is an open source project. 4 | 5 | It is the work of hundreds of contributors. We appreciate your help! 6 | 7 | ## Filing issues 8 | 9 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: 10 | 11 | 1. What version of Go are you using (`go version`)? 12 | 2. What operating system and processor architecture are you using? 13 | 3. What did you do? 14 | 4. What did you expect to see? 15 | 5. What did you see instead? 16 | 17 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. 18 | The gophers there will answer or ask you to file an issue if you've tripped over a bug. 19 | 20 | ## Contributing code 21 | 22 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) 23 | before sending patches. 24 | 25 | Unless otherwise noted, the Go source files are distributed under 26 | the BSD-style license found in the LICENSE file. 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/term/README.md: -------------------------------------------------------------------------------- 1 | # Go terminal/console support 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/term.svg)](https://pkg.go.dev/golang.org/x/term) 4 | 5 | This repository provides Go terminal and console support packages. 6 | 7 | ## 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 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/blas/blas64/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 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 blas64 provides a simple interface to the float64 BLAS API. 6 | package blas64 // import "gonum.org/v1/gonum/blas/blas64" 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/blas/cblas128/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 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 cblas128 provides a simple interface to the complex128 BLAS API. 6 | package cblas128 // import "gonum.org/v1/gonum/blas/cblas128" 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/blas/gonum/errors.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2015 The Gonum Authors. All rights reserved. 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 gonum 6 | 7 | // Panic strings used during parameter checks. 8 | // This list is duplicated in netlib/blas/netlib. Keep in sync. 9 | const ( 10 | zeroIncX = "blas: zero x index increment" 11 | zeroIncY = "blas: zero y index increment" 12 | 13 | mLT0 = "blas: m < 0" 14 | nLT0 = "blas: n < 0" 15 | kLT0 = "blas: k < 0" 16 | kLLT0 = "blas: kL < 0" 17 | kULT0 = "blas: kU < 0" 18 | 19 | badUplo = "blas: illegal triangle" 20 | badTranspose = "blas: illegal transpose" 21 | badDiag = "blas: illegal diagonal" 22 | badSide = "blas: illegal side" 23 | badFlag = "blas: illegal rotm flag" 24 | 25 | badLdA = "blas: bad leading dimension of A" 26 | badLdB = "blas: bad leading dimension of B" 27 | badLdC = "blas: bad leading dimension of C" 28 | 29 | shortX = "blas: insufficient length of x" 30 | shortY = "blas: insufficient length of y" 31 | shortAP = "blas: insufficient length of ap" 32 | shortA = "blas: insufficient length of a" 33 | shortB = "blas: insufficient length of b" 34 | shortC = "blas: insufficient length of c" 35 | ) 36 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/blas/gonum/gonum.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2015 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:generate ./single_precision.bash 6 | 7 | package gonum 8 | 9 | import ( 10 | "math" 11 | 12 | "gonum.org/v1/gonum/internal/math32" 13 | ) 14 | 15 | type Implementation struct{} 16 | 17 | // [SD]gemm behavior constants. These are kept here to keep them out of the 18 | // way during single precision code generation. 19 | const ( 20 | blockSize = 64 // b x b matrix 21 | minParBlock = 4 // minimum number of blocks needed to go parallel 22 | ) 23 | 24 | func max(a, b int) int { 25 | if a > b { 26 | return a 27 | } 28 | return b 29 | } 30 | 31 | func min(a, b int) int { 32 | if a > b { 33 | return b 34 | } 35 | return a 36 | } 37 | 38 | // blocks returns the number of divisions of the dimension length with the given 39 | // block size. 40 | func blocks(dim, bsize int) int { 41 | return (dim + bsize - 1) / bsize 42 | } 43 | 44 | // dcabs1 returns |real(z)|+|imag(z)|. 45 | func dcabs1(z complex128) float64 { 46 | return math.Abs(real(z)) + math.Abs(imag(z)) 47 | } 48 | 49 | // scabs1 returns |real(z)|+|imag(z)|. 50 | func scabs1(z complex64) float32 { 51 | return math32.Abs(real(z)) + math32.Abs(imag(z)) 52 | } 53 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/blas/gonum/level1float32_dsdot.go: -------------------------------------------------------------------------------- 1 | // Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT. 2 | 3 | // Copyright ©2015 The Gonum 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 | package gonum 8 | 9 | import ( 10 | "gonum.org/v1/gonum/internal/asm/f32" 11 | ) 12 | 13 | // Dsdot computes the dot product of the two vectors 14 | // 15 | // \sum_i x[i]*y[i] 16 | // 17 | // Float32 implementations are autogenerated and not directly tested. 18 | func (Implementation) Dsdot(n int, x []float32, incX int, y []float32, incY int) float64 { 19 | if incX == 0 { 20 | panic(zeroIncX) 21 | } 22 | if incY == 0 { 23 | panic(zeroIncY) 24 | } 25 | if n <= 0 { 26 | if n == 0 { 27 | return 0 28 | } 29 | panic(nLT0) 30 | } 31 | if incX == 1 && incY == 1 { 32 | if len(x) < n { 33 | panic(shortX) 34 | } 35 | if len(y) < n { 36 | panic(shortY) 37 | } 38 | return f32.DdotUnitary(x[:n], y[:n]) 39 | } 40 | var ix, iy int 41 | if incX < 0 { 42 | ix = (-n + 1) * incX 43 | } 44 | if incY < 0 { 45 | iy = (-n + 1) * incY 46 | } 47 | if ix >= len(x) || ix+(n-1)*incX >= len(x) { 48 | panic(shortX) 49 | } 50 | if iy >= len(y) || iy+(n-1)*incY >= len(y) { 51 | panic(shortY) 52 | } 53 | return f32.DdotInc(x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy)) 54 | } 55 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/blas/gonum/level1float32_sdot.go: -------------------------------------------------------------------------------- 1 | // Code generated by "go generate gonum.org/v1/gonum/blas/gonum”; DO NOT EDIT. 2 | 3 | // Copyright ©2015 The Gonum 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 | package gonum 8 | 9 | import ( 10 | "gonum.org/v1/gonum/internal/asm/f32" 11 | ) 12 | 13 | // Sdot computes the dot product of the two vectors 14 | // 15 | // \sum_i x[i]*y[i] 16 | // 17 | // Float32 implementations are autogenerated and not directly tested. 18 | func (Implementation) Sdot(n int, x []float32, incX int, y []float32, incY int) float32 { 19 | if incX == 0 { 20 | panic(zeroIncX) 21 | } 22 | if incY == 0 { 23 | panic(zeroIncY) 24 | } 25 | if n <= 0 { 26 | if n == 0 { 27 | return 0 28 | } 29 | panic(nLT0) 30 | } 31 | if incX == 1 && incY == 1 { 32 | if len(x) < n { 33 | panic(shortX) 34 | } 35 | if len(y) < n { 36 | panic(shortY) 37 | } 38 | return f32.DotUnitary(x[:n], y[:n]) 39 | } 40 | var ix, iy int 41 | if incX < 0 { 42 | ix = (-n + 1) * incX 43 | } 44 | if incY < 0 { 45 | iy = (-n + 1) * incY 46 | } 47 | if ix >= len(x) || ix+(n-1)*incX >= len(x) { 48 | panic(shortX) 49 | } 50 | if iy >= len(y) || iy+(n-1)*incY >= len(y) { 51 | panic(shortY) 52 | } 53 | return f32.DotInc(x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy)) 54 | } 55 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/blas/gonum/level1float64_ddot.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2015 The Gonum Authors. All rights reserved. 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 gonum 6 | 7 | import ( 8 | "gonum.org/v1/gonum/internal/asm/f64" 9 | ) 10 | 11 | // Ddot computes the dot product of the two vectors 12 | // 13 | // \sum_i x[i]*y[i] 14 | func (Implementation) Ddot(n int, x []float64, incX int, y []float64, incY int) float64 { 15 | if incX == 0 { 16 | panic(zeroIncX) 17 | } 18 | if incY == 0 { 19 | panic(zeroIncY) 20 | } 21 | if n <= 0 { 22 | if n == 0 { 23 | return 0 24 | } 25 | panic(nLT0) 26 | } 27 | if incX == 1 && incY == 1 { 28 | if len(x) < n { 29 | panic(shortX) 30 | } 31 | if len(y) < n { 32 | panic(shortY) 33 | } 34 | return f64.DotUnitary(x[:n], y[:n]) 35 | } 36 | var ix, iy int 37 | if incX < 0 { 38 | ix = (-n + 1) * incX 39 | } 40 | if incY < 0 { 41 | iy = (-n + 1) * incY 42 | } 43 | if ix >= len(x) || ix+(n-1)*incX >= len(x) { 44 | panic(shortX) 45 | } 46 | if iy >= len(y) || iy+(n-1)*incY >= len(y) { 47 | panic(shortY) 48 | } 49 | return f64.DotInc(x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy)) 50 | } 51 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/floats/README.md: -------------------------------------------------------------------------------- 1 | # Gonum floats 2 | 3 | [![go.dev reference](https://pkg.go.dev/badge/gonum.org/v1/gonum/floats)](https://pkg.go.dev/gonum.org/v1/gonum/floats) 4 | [![GoDoc](https://godocs.io/gonum.org/v1/gonum/floats?status.svg)](https://godocs.io/gonum.org/v1/gonum/floats) 5 | 6 | Package floats provides a set of helper routines for dealing with slices of float64. 7 | The functions avoid allocations to allow for use within tight loops without garbage collection overhead. 8 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/floats/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 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 floats provides a set of helper routines for dealing with slices 6 | // of float64. The functions avoid allocations to allow for use within tight 7 | // loops without garbage collection overhead. 8 | // 9 | // The convention used is that when a slice is being modified in place, it has 10 | // the name dst. 11 | package floats // import "gonum.org/v1/gonum/floats" 12 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/floats/scalar/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 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 scalar provides a set of helper routines for dealing with float64 values. 6 | package scalar // import "gonum.org/v1/gonum/floats/scalar" 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/graph/.gitignore: -------------------------------------------------------------------------------- 1 | test.out -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/graph/README.md: -------------------------------------------------------------------------------- 1 | # Gonum graph 2 | 3 | [![go.dev reference](https://pkg.go.dev/badge/gonum.org/v1/gonum/graph)](https://pkg.go.dev/gonum.org/v1/gonum/graph) 4 | [![GoDoc](https://godocs.io/gonum.org/v1/gonum/graph?status.svg)](https://godocs.io/gonum.org/v1/gonum/graph) 5 | 6 | This is a generalized graph package for the Go language. 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/graph/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2014 The Gonum Authors. All rights reserved. 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 graph defines graph interfaces. 6 | // 7 | // Routines to test contract compliance by user implemented graph types 8 | // are available in gonum.org/v1/gonum/graph/testgraph. 9 | package graph // import "gonum.org/v1/gonum/graph" 10 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/graph/internal/linear/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 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 linear provides common linear data structures. 6 | package linear // import "gonum.org/v1/gonum/graph/internal/linear" 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/graph/internal/ordered/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 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 ordered provides common sort ordering types. 6 | package ordered // import "gonum.org/v1/gonum/graph/internal/ordered" 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/graph/internal/set/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 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 set provides integer and graph.Node sets. 6 | package set // import "gonum.org/v1/gonum/graph/internal/set" 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/graph/iterator/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2018 The Gonum Authors. All rights reserved. 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 iterator provides node, edge and line iterators. 6 | // 7 | // The iterators provided satisfy the graph.Nodes, graph.Edges and 8 | // graph.Lines interfaces. 9 | package iterator 10 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/graph/iterator/map.s: -------------------------------------------------------------------------------- 1 | // Copyright ©2020 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Empty .s file to allow //go:linkname directives in map.go to work. -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/graph/set/uid/uid.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2014 The Gonum Authors. All rights reserved. 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 uid implements unique ID provision for graphs. 6 | package uid 7 | 8 | import ( 9 | "math" 10 | 11 | "gonum.org/v1/gonum/graph/internal/set" 12 | ) 13 | 14 | // Max is the maximum ID value. 15 | const Max = math.MaxInt64 16 | 17 | // Set implements available ID storage. 18 | type Set struct { 19 | maxID int64 20 | used, free set.Int64s 21 | } 22 | 23 | // NewSet returns a new Set. 24 | func NewSet() *Set { 25 | return &Set{maxID: -1, used: make(set.Int64s), free: make(set.Int64s)} 26 | } 27 | 28 | // NewID returns a new unique ID. The ID returned is not considered used 29 | // until passed in a call to use. 30 | func (s *Set) NewID() int64 { 31 | for id := range s.free { 32 | return id 33 | } 34 | if s.maxID != math.MaxInt64 { 35 | return s.maxID + 1 36 | } 37 | for id := int64(0); id <= s.maxID; id++ { 38 | if !s.used.Has(id) { 39 | return id 40 | } 41 | } 42 | panic("unreachable") 43 | } 44 | 45 | // Use adds the id to the used IDs in the Set. 46 | func (s *Set) Use(id int64) { 47 | s.used.Add(id) 48 | s.free.Remove(id) 49 | if id > s.maxID { 50 | s.maxID = id 51 | } 52 | } 53 | 54 | // Release frees the id for reuse. 55 | func (s *Set) Release(id int64) { 56 | s.free.Add(id) 57 | s.used.Remove(id) 58 | } 59 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/graph/simple/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 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 simple provides a suite of simple graph implementations satisfying 6 | // the gonum/graph interfaces. 7 | // 8 | // All types in simple return the graph.Empty value for empty iterators. 9 | package simple // import "gonum.org/v1/gonum/graph/simple" 10 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/graph/topo/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 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 topo provides graph topology analysis functions. 6 | package topo // import "gonum.org/v1/gonum/graph/topo" 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/graph/topo/non_tomita_choice.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2015 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !tomita 6 | // +build !tomita 7 | 8 | package topo 9 | 10 | const tomitaTanakaTakahashi = false 11 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/graph/topo/tomita_choice.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2015 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build tomita 6 | // +build tomita 7 | 8 | package topo 9 | 10 | const tomitaTanakaTakahashi = true 11 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/graph/traverse/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 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 traverse provides basic graph traversal primitives. 6 | package traverse // import "gonum.org/v1/gonum/graph/traverse" 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/asm/c128/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 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 c128 provides complex128 vector primitives. 6 | package c128 // import "gonum.org/v1/gonum/internal/asm/c128" 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/asm/c128/scal.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2016 The Gonum Authors. All rights reserved. 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 c128 6 | 7 | // ScalUnitaryTo is 8 | // 9 | // for i, v := range x { 10 | // dst[i] = alpha * v 11 | // } 12 | func ScalUnitaryTo(dst []complex128, alpha complex128, x []complex128) { 13 | for i, v := range x { 14 | dst[i] = alpha * v 15 | } 16 | } 17 | 18 | // ScalIncTo is 19 | // 20 | // var idst, ix uintptr 21 | // for i := 0; i < int(n); i++ { 22 | // dst[idst] = alpha * x[ix] 23 | // ix += incX 24 | // idst += incDst 25 | // } 26 | func ScalIncTo(dst []complex128, incDst uintptr, alpha complex128, x []complex128, n, incX uintptr) { 27 | var idst, ix uintptr 28 | for i := 0; i < int(n); i++ { 29 | dst[idst] = alpha * x[ix] 30 | ix += incX 31 | idst += incDst 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/asm/c64/conj.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2015 The Gonum Authors. All rights reserved. 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 c64 6 | 7 | func conj(c complex64) complex64 { return complex(real(c), -imag(c)) } 8 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/asm/c64/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 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 c64 provides complex64 vector primitives. 6 | package c64 // import "gonum.org/v1/gonum/internal/asm/c64" 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/asm/f32/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 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 f32 provides float32 vector primitives. 6 | package f32 // import "gonum.org/v1/gonum/internal/asm/f32" 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/asm/f32/ge_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !noasm && !gccgo && !safe 6 | // +build !noasm,!gccgo,!safe 7 | 8 | package f32 9 | 10 | // Ger performs the rank-one operation 11 | // 12 | // A += alpha * x * yᵀ 13 | // 14 | // where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar. 15 | func Ger(m, n uintptr, alpha float32, 16 | x []float32, incX uintptr, 17 | y []float32, incY uintptr, 18 | a []float32, lda uintptr) 19 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/asm/f32/ge_noasm.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use 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 || noasm || gccgo || safe 6 | // +build !amd64 noasm gccgo safe 7 | 8 | package f32 9 | 10 | // Ger performs the rank-one operation 11 | // 12 | // A += alpha * x * yᵀ 13 | // 14 | // where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar. 15 | func Ger(m, n uintptr, alpha float32, x []float32, incX uintptr, y []float32, incY uintptr, a []float32, lda uintptr) { 16 | 17 | if incX == 1 && incY == 1 { 18 | x = x[:m] 19 | y = y[:n] 20 | for i, xv := range x { 21 | AxpyUnitary(alpha*xv, y, a[uintptr(i)*lda:uintptr(i)*lda+n]) 22 | } 23 | return 24 | } 25 | 26 | var ky, kx uintptr 27 | if int(incY) < 0 { 28 | ky = uintptr(-int(n-1) * int(incY)) 29 | } 30 | if int(incX) < 0 { 31 | kx = uintptr(-int(m-1) * int(incX)) 32 | } 33 | 34 | ix := kx 35 | for i := 0; i < int(m); i++ { 36 | AxpyInc(alpha*x[ix], y, a[uintptr(i)*lda:uintptr(i)*lda+n], uintptr(n), uintptr(incY), 1, uintptr(ky), 0) 37 | ix += incX 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/asm/f32/scal.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2016 The Gonum Authors. All rights reserved. 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 f32 6 | 7 | // ScalUnitary is 8 | // 9 | // for i := range x { 10 | // x[i] *= alpha 11 | // } 12 | func ScalUnitary(alpha float32, x []float32) { 13 | for i := range x { 14 | x[i] *= alpha 15 | } 16 | } 17 | 18 | // ScalUnitaryTo is 19 | // 20 | // for i, v := range x { 21 | // dst[i] = alpha * v 22 | // } 23 | func ScalUnitaryTo(dst []float32, alpha float32, x []float32) { 24 | for i, v := range x { 25 | dst[i] = alpha * v 26 | } 27 | } 28 | 29 | // ScalInc is 30 | // 31 | // var ix uintptr 32 | // for i := 0; i < int(n); i++ { 33 | // x[ix] *= alpha 34 | // ix += incX 35 | // } 36 | func ScalInc(alpha float32, x []float32, n, incX uintptr) { 37 | var ix uintptr 38 | for i := 0; i < int(n); i++ { 39 | x[ix] *= alpha 40 | ix += incX 41 | } 42 | } 43 | 44 | // ScalIncTo is 45 | // 46 | // var idst, ix uintptr 47 | // for i := 0; i < int(n); i++ { 48 | // dst[idst] = alpha * x[ix] 49 | // ix += incX 50 | // idst += incDst 51 | // } 52 | func ScalIncTo(dst []float32, incDst uintptr, alpha float32, x []float32, n, incX uintptr) { 53 | var idst, ix uintptr 54 | for i := 0; i < int(n); i++ { 55 | dst[idst] = alpha * x[ix] 56 | ix += incX 57 | idst += incDst 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/asm/f64/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 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 f64 provides float64 vector primitives. 6 | package f64 // import "gonum.org/v1/gonum/internal/asm/f64" 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/asm/f64/dot.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2015 The Gonum Authors. All rights reserved. 2 | // Use 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 || noasm || gccgo || safe 6 | // +build !amd64 noasm gccgo safe 7 | 8 | package f64 9 | 10 | // DotUnitary is 11 | // 12 | // for i, v := range x { 13 | // sum += y[i] * v 14 | // } 15 | // return sum 16 | func DotUnitary(x, y []float64) (sum float64) { 17 | for i, v := range x { 18 | sum += y[i] * v 19 | } 20 | return sum 21 | } 22 | 23 | // DotInc is 24 | // 25 | // for i := 0; i < int(n); i++ { 26 | // sum += y[iy] * x[ix] 27 | // ix += incX 28 | // iy += incY 29 | // } 30 | // return sum 31 | func DotInc(x, y []float64, n, incX, incY, ix, iy uintptr) (sum float64) { 32 | for i := 0; i < int(n); i++ { 33 | sum += y[iy] * x[ix] 34 | ix += incX 35 | iy += incY 36 | } 37 | return sum 38 | } 39 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/asm/f64/ge_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !noasm && !gccgo && !safe 6 | // +build !noasm,!gccgo,!safe 7 | 8 | package f64 9 | 10 | // Ger performs the rank-one operation 11 | // 12 | // A += alpha * x * yᵀ 13 | // 14 | // where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar. 15 | func Ger(m, n uintptr, alpha float64, x []float64, incX uintptr, y []float64, incY uintptr, a []float64, lda uintptr) 16 | 17 | // GemvN computes 18 | // 19 | // y = alpha * A * x + beta * y 20 | // 21 | // where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars. 22 | func GemvN(m, n uintptr, alpha float64, a []float64, lda uintptr, x []float64, incX uintptr, beta float64, y []float64, incY uintptr) 23 | 24 | // GemvT computes 25 | // 26 | // y = alpha * Aᵀ * x + beta * y 27 | // 28 | // where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars. 29 | func GemvT(m, n uintptr, alpha float64, a []float64, lda uintptr, x []float64, incX uintptr, beta float64, y []float64, incY uintptr) 30 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/cmplx64/abs.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 | // Copyright ©2017 The Gonum Authors. All rights reserved. 6 | // Use of this source code is governed by a BSD-style 7 | // license that can be found in the LICENSE file. 8 | 9 | package cmplx64 10 | 11 | import math "gonum.org/v1/gonum/internal/math32" 12 | 13 | // Abs returns the absolute value (also called the modulus) of x. 14 | func Abs(x complex64) float32 { return math.Hypot(real(x), imag(x)) } 15 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/cmplx64/conj.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 | // Copyright ©2017 The Gonum Authors. All rights reserved. 6 | // Use of this source code is governed by a BSD-style 7 | // license that can be found in the LICENSE file. 8 | 9 | package cmplx64 10 | 11 | // Conj returns the complex conjugate of x. 12 | func Conj(x complex64) complex64 { return complex(real(x), -imag(x)) } 13 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/cmplx64/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 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 cmplx64 provides complex64 versions of standard library math/cmplx 6 | // package routines used by gonum/blas. 7 | package cmplx64 // import "gonum.org/v1/gonum/internal/cmplx64" 8 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/cmplx64/isinf.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 | // Copyright ©2017 The Gonum Authors. All rights reserved. 6 | // Use of this source code is governed by a BSD-style 7 | // license that can be found in the LICENSE file. 8 | 9 | package cmplx64 10 | 11 | import math "gonum.org/v1/gonum/internal/math32" 12 | 13 | // IsInf returns true if either real(x) or imag(x) is an infinity. 14 | func IsInf(x complex64) bool { 15 | if math.IsInf(real(x), 0) || math.IsInf(imag(x), 0) { 16 | return true 17 | } 18 | return false 19 | } 20 | 21 | // Inf returns a complex infinity, complex(+Inf, +Inf). 22 | func Inf() complex64 { 23 | inf := math.Inf(1) 24 | return complex(inf, inf) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/cmplx64/isnan.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 | // Copyright ©2017 The Gonum Authors. All rights reserved. 6 | // Use of this source code is governed by a BSD-style 7 | // license that can be found in the LICENSE file. 8 | 9 | package cmplx64 10 | 11 | import math "gonum.org/v1/gonum/internal/math32" 12 | 13 | // IsNaN returns true if either real(x) or imag(x) is NaN 14 | // and neither is an infinity. 15 | func IsNaN(x complex64) bool { 16 | switch { 17 | case math.IsInf(real(x), 0) || math.IsInf(imag(x), 0): 18 | return false 19 | case math.IsNaN(real(x)) || math.IsNaN(imag(x)): 20 | return true 21 | } 22 | return false 23 | } 24 | 25 | // NaN returns a complex “not-a-number” value. 26 | func NaN() complex64 { 27 | nan := math.NaN() 28 | return complex(nan, nan) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/math32/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 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 math32 provides float32 versions of standard library math package 6 | // routines used by gonum/blas/native. 7 | package math32 // import "gonum.org/v1/gonum/internal/math32" 8 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/math32/signbit.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 | // Copyright ©2017 The Gonum Authors. All rights reserved. 6 | // Use of this source code is governed by a BSD-style 7 | // license that can be found in the LICENSE file. 8 | 9 | package math32 10 | 11 | import "math" 12 | 13 | // Signbit returns true if x is negative or negative zero. 14 | func Signbit(x float32) bool { 15 | return math.Float32bits(x)&(1<<31) != 0 16 | } 17 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/math32/sqrt.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2015 The Gonum Authors. All rights reserved. 2 | // Use 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 && !arm64) || noasm || gccgo || safe 6 | // +build !amd64,!arm64 noasm gccgo safe 7 | 8 | package math32 9 | 10 | import ( 11 | "math" 12 | ) 13 | 14 | // Sqrt returns the square root of x. 15 | // 16 | // Special cases are: 17 | // 18 | // Sqrt(+Inf) = +Inf 19 | // Sqrt(±0) = ±0 20 | // Sqrt(x < 0) = NaN 21 | // Sqrt(NaN) = NaN 22 | func Sqrt(x float32) float32 { 23 | // FIXME(kortschak): Direct translation of the math package 24 | // asm code for 386 fails to build. 25 | return float32(math.Sqrt(float64(x))) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/math32/sqrt_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 | // Copyright ©2015 The Gonum Authors. All rights reserved. 6 | // Use of this source code is governed by a BSD-style 7 | // license that can be found in the LICENSE file. 8 | 9 | //go:build !noasm && !gccgo && !safe 10 | // +build !noasm,!gccgo,!safe 11 | 12 | package math32 13 | 14 | // Sqrt returns the square root of x. 15 | // 16 | // Special cases are: 17 | // 18 | // Sqrt(+Inf) = +Inf 19 | // Sqrt(±0) = ±0 20 | // Sqrt(x < 0) = NaN 21 | // Sqrt(NaN) = NaN 22 | func Sqrt(x float32) float32 23 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/math32/sqrt_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 | // Copyright ©2015 The Gonum Authors. All rights reserved. 6 | // Use of this source code is governed by a BSD-style 7 | // license that can be found in the LICENSE file. 8 | 9 | // +build !noasm,!gccgo,!safe 10 | 11 | #include "textflag.h" 12 | 13 | // func Sqrt(x float32) float32 14 | TEXT ·Sqrt(SB),NOSPLIT,$0 15 | SQRTSS x+0(FP), X0 16 | MOVSS X0, ret+8(FP) 17 | RET 18 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/math32/sqrt_arm64.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 | // Copyright ©2015 The Gonum Authors. All rights reserved. 6 | // Use of this source code is governed by a BSD-style 7 | // license that can be found in the LICENSE file. 8 | 9 | //go:build !noasm && !gccgo && !safe 10 | // +build !noasm,!gccgo,!safe 11 | 12 | package math32 13 | 14 | // Sqrt returns the square root of x. 15 | // 16 | // Special cases are: 17 | // 18 | // Sqrt(+Inf) = +Inf 19 | // Sqrt(±0) = ±0 20 | // Sqrt(x < 0) = NaN 21 | // Sqrt(NaN) = NaN 22 | func Sqrt(x float32) float32 23 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/internal/math32/sqrt_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 | // Copyright ©2020 The Gonum Authors. All rights reserved. 6 | // Use of this source code is governed by a BSD-style 7 | // license that can be found in the LICENSE file. 8 | 9 | // +build !noasm,!gccgo,!safe 10 | 11 | #include "textflag.h" 12 | 13 | // func Sqrt(x float32) float32 14 | TEXT ·Sqrt(SB),NOSPLIT,$0 15 | FMOVS x+0(FP), F0 16 | FSQRTS F0, F0 17 | FMOVS F0, ret+8(FP) 18 | RET 19 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/lapack/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cassava/repoctl/6ab74f4d889aed300c5a2dfd055e491d3592eb1a/vendor/gonum.org/v1/gonum/lapack/.gitignore -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/lapack/README.md: -------------------------------------------------------------------------------- 1 | Gonum LAPACK 2 | ====== 3 | [![go.dev reference](https://pkg.go.dev/badge/gonum.org/v1/gonum/lapack)](https://pkg.go.dev/gonum.org/v1/gonum/lapack) 4 | [![GoDoc](https://godocs.io/gonum.org/v1/gonum/lapack?status.svg)](https://godocs.io/gonum.org/v1/gonum/lapack) 5 | 6 | A collection of packages to provide LAPACK functionality for the Go programming 7 | language (http://golang.org). This provides a partial implementation in native go 8 | and a wrapper using cgo to a c-based implementation. 9 | 10 | ## Installation 11 | 12 | ``` 13 | go get gonum.org/v1/gonum/lapack/... 14 | ``` 15 | 16 | ## Packages 17 | 18 | ### lapack 19 | 20 | Defines the LAPACK API based on http://www.netlib.org/lapack/lapacke.html 21 | 22 | ### lapack/gonum 23 | 24 | Go implementation of the LAPACK API (incomplete, implements the `float64` API). 25 | 26 | ### lapack/lapack64 27 | 28 | Wrappers for an implementation of the double (i.e., `float64`) precision real parts of 29 | the LAPACK API. 30 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/lapack/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2018 The Gonum Authors. All rights reserved. 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 lapack provides interfaces for the LAPACK linear algebra standard. 6 | package lapack // import "gonum.org/v1/gonum/lapack" 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/lapack/gonum/dlae2.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2016 The Gonum Authors. All rights reserved. 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 gonum 6 | 7 | import "math" 8 | 9 | // Dlae2 computes the eigenvalues of a 2×2 symmetric matrix 10 | // 11 | // [a b] 12 | // [b c] 13 | // 14 | // and returns the eigenvalue with the larger absolute value as rt1 and the 15 | // smaller as rt2. 16 | // 17 | // Dlae2 is an internal routine. It is exported for testing purposes. 18 | func (impl Implementation) Dlae2(a, b, c float64) (rt1, rt2 float64) { 19 | sm := a + c 20 | df := a - c 21 | adf := math.Abs(df) 22 | tb := b + b 23 | ab := math.Abs(tb) 24 | acmx := c 25 | acmn := a 26 | if math.Abs(a) > math.Abs(c) { 27 | acmx = a 28 | acmn = c 29 | } 30 | var rt float64 31 | if adf > ab { 32 | rt = adf * math.Sqrt(1+(ab/adf)*(ab/adf)) 33 | } else if adf < ab { 34 | rt = ab * math.Sqrt(1+(adf/ab)*(adf/ab)) 35 | } else { 36 | rt = ab * math.Sqrt2 37 | } 38 | if sm < 0 { 39 | rt1 = 0.5 * (sm - rt) 40 | rt2 = (acmx/rt1)*acmn - (b/rt1)*b 41 | return rt1, rt2 42 | } 43 | if sm > 0 { 44 | rt1 = 0.5 * (sm + rt) 45 | rt2 = (acmx/rt1)*acmn - (b/rt1)*b 46 | return rt1, rt2 47 | } 48 | rt1 = 0.5 * rt 49 | rt2 = -0.5 * rt 50 | return rt1, rt2 51 | } 52 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/lapack/gonum/dlapy2.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2015 The Gonum Authors. All rights reserved. 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 gonum 6 | 7 | import "math" 8 | 9 | // Dlapy2 is the LAPACK version of math.Hypot. 10 | // 11 | // Dlapy2 is an internal routine. It is exported for testing purposes. 12 | func (Implementation) Dlapy2(x, y float64) float64 { 13 | return math.Hypot(x, y) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/lapack/gonum/dlas2.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2015 The Gonum Authors. All rights reserved. 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 gonum 6 | 7 | import "math" 8 | 9 | // Dlas2 computes the singular values of the 2×2 matrix defined by 10 | // 11 | // [F G] 12 | // [0 H] 13 | // 14 | // The smaller and larger singular values are returned in that order. 15 | // 16 | // Dlas2 is an internal routine. It is exported for testing purposes. 17 | func (impl Implementation) Dlas2(f, g, h float64) (ssmin, ssmax float64) { 18 | fa := math.Abs(f) 19 | ga := math.Abs(g) 20 | ha := math.Abs(h) 21 | fhmin := math.Min(fa, ha) 22 | fhmax := math.Max(fa, ha) 23 | if fhmin == 0 { 24 | if fhmax == 0 { 25 | return 0, ga 26 | } 27 | v := math.Min(fhmax, ga) / math.Max(fhmax, ga) 28 | return 0, math.Max(fhmax, ga) * math.Sqrt(1+v*v) 29 | } 30 | if ga < fhmax { 31 | as := 1 + fhmin/fhmax 32 | at := (fhmax - fhmin) / fhmax 33 | au := (ga / fhmax) * (ga / fhmax) 34 | c := 2 / (math.Sqrt(as*as+au) + math.Sqrt(at*at+au)) 35 | return fhmin * c, fhmax / c 36 | } 37 | au := fhmax / ga 38 | if au == 0 { 39 | return fhmin * fhmax / ga, ga 40 | } 41 | as := 1 + fhmin/fhmax 42 | at := (fhmax - fhmin) / fhmax 43 | c := 1 / (math.Sqrt(1+(as*au)*(as*au)) + math.Sqrt(1+(at*au)*(at*au))) 44 | return 2 * (fhmin * c) * au, ga / (c + c) 45 | } 46 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/lapack/gonum/dlasrt.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2015 The Gonum Authors. All rights reserved. 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 gonum 6 | 7 | import ( 8 | "sort" 9 | 10 | "gonum.org/v1/gonum/lapack" 11 | ) 12 | 13 | // Dlasrt sorts the numbers in the input slice d. If s == lapack.SortIncreasing, 14 | // the elements are sorted in increasing order. If s == lapack.SortDecreasing, 15 | // the elements are sorted in decreasing order. For other values of s Dlasrt 16 | // will panic. 17 | // 18 | // Dlasrt is an internal routine. It is exported for testing purposes. 19 | func (impl Implementation) Dlasrt(s lapack.Sort, n int, d []float64) { 20 | switch { 21 | case n < 0: 22 | panic(nLT0) 23 | case len(d) < n: 24 | panic(shortD) 25 | } 26 | 27 | d = d[:n] 28 | switch s { 29 | default: 30 | panic(badSort) 31 | case lapack.SortIncreasing: 32 | sort.Float64s(d) 33 | case lapack.SortDecreasing: 34 | sort.Sort(sort.Reverse(sort.Float64Slice(d))) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/lapack/gonum/dpotri.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2019 The Gonum Authors. All rights reserved. 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 gonum 6 | 7 | import "gonum.org/v1/gonum/blas" 8 | 9 | // Dpotri computes the inverse of a real symmetric positive definite matrix A 10 | // using its Cholesky factorization. 11 | // 12 | // On entry, a contains the triangular factor U or L from the Cholesky 13 | // factorization A = Uᵀ*U or A = L*Lᵀ, as computed by Dpotrf. 14 | // On return, a contains the upper or lower triangle of the (symmetric) 15 | // inverse of A, overwriting the input factor U or L. 16 | func (impl Implementation) Dpotri(uplo blas.Uplo, n int, a []float64, lda int) (ok bool) { 17 | switch { 18 | case uplo != blas.Upper && uplo != blas.Lower: 19 | panic(badUplo) 20 | case n < 0: 21 | panic(nLT0) 22 | case lda < max(1, n): 23 | panic(badLdA) 24 | } 25 | 26 | // Quick return if possible. 27 | if n == 0 { 28 | return true 29 | } 30 | 31 | if len(a) < (n-1)*lda+n { 32 | panic(shortA) 33 | } 34 | 35 | // Invert the triangular Cholesky factor U or L. 36 | ok = impl.Dtrtri(uplo, blas.NonUnit, n, a, lda) 37 | if !ok { 38 | return false 39 | } 40 | 41 | // Form inv(U)*inv(U)ᵀ or inv(L)ᵀ*inv(L). 42 | impl.Dlauum(uplo, n, a, lda) 43 | return true 44 | } 45 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/lapack/gonum/dpttrs.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2023 The Gonum Authors. All rights reserved. 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 gonum 6 | 7 | // Dpttrs solves a tridiagonal system of the form 8 | // 9 | // A * X = B 10 | // 11 | // using the L*D*Lᵀ factorization of A computed by Dpttrf. D is a diagonal 12 | // matrix specified in d, L is a unit bidiagonal matrix whose subdiagonal is 13 | // specified in e, and X and B are n×nrhs matrices. 14 | func (impl Implementation) Dpttrs(n, nrhs int, d, e []float64, b []float64, ldb int) { 15 | switch { 16 | case n < 0: 17 | panic(nLT0) 18 | case nrhs < 0: 19 | panic(nrhsLT0) 20 | case ldb < max(1, nrhs): 21 | panic(badLdB) 22 | } 23 | 24 | // Quick return if possible. 25 | if n == 0 || nrhs == 0 { 26 | return 27 | } 28 | 29 | switch { 30 | case len(d) < n: 31 | panic(shortD) 32 | case len(e) < n-1: 33 | panic(shortE) 34 | case len(b) < (n-1)*ldb+nrhs: 35 | panic(shortB) 36 | } 37 | 38 | nb := 1 39 | if nrhs > 1 { 40 | nb = max(1, impl.Ilaenv(1, "DPTTRS", " ", n, nrhs, -1, -1)) 41 | } 42 | 43 | if nb >= nrhs { 44 | impl.dptts2(n, nrhs, d, e, b, ldb) 45 | } else { 46 | for j := 0; j < nrhs; j += nb { 47 | jb := min(nrhs-j, nb) 48 | impl.dptts2(n, jb, d, e, b[j:], ldb) 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/lapack/gonum/dptts2.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2023 The Gonum Authors. All rights reserved. 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 gonum 6 | 7 | import "gonum.org/v1/gonum/blas/blas64" 8 | 9 | // dptts2 solves a tridiagonal system of the form 10 | // 11 | // A * X = B 12 | // 13 | // using the L*D*Lᵀ factorization of A computed by Dpttrf. D is a diagonal 14 | // matrix specified in d, L is a unit bidiagonal matrix whose subdiagonal is 15 | // specified in e, and X and B are n×nrhs matrices. 16 | func (impl Implementation) dptts2(n, nrhs int, d, e []float64, b []float64, ldb int) { 17 | // Quick return if possible. 18 | if n <= 1 { 19 | if n == 1 { 20 | bi := blas64.Implementation() 21 | bi.Dscal(nrhs, 1/d[0], b, 1) 22 | } 23 | return 24 | } 25 | 26 | // Solve A * X = B using the factorization A = L*D*Lᵀ, overwriting each 27 | // right hand side vector with its solution. 28 | for j := 0; j < nrhs; j++ { 29 | // Solve L * x = b. 30 | for i := 1; i < n; i++ { 31 | b[i*ldb+j] -= b[(i-1)*ldb+j] * e[i-1] 32 | } 33 | // Solve D * Lᵀ * x = b. 34 | b[(n-1)*ldb+j] /= d[n-1] 35 | for i := n - 2; i >= 0; i-- { 36 | b[i*ldb+j] = b[i*ldb+j]/d[i] - b[(i+1)*ldb+j]*e[i] 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/lapack/gonum/iladlc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2015 The Gonum Authors. All rights reserved. 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 gonum 6 | 7 | // Iladlc scans a matrix for its last non-zero column. Returns -1 if the matrix 8 | // is all zeros. 9 | // 10 | // Iladlc is an internal routine. It is exported for testing purposes. 11 | func (Implementation) Iladlc(m, n int, a []float64, lda int) int { 12 | switch { 13 | case m < 0: 14 | panic(mLT0) 15 | case n < 0: 16 | panic(nLT0) 17 | case lda < max(1, n): 18 | panic(badLdA) 19 | } 20 | 21 | if n == 0 || m == 0 { 22 | return -1 23 | } 24 | 25 | if len(a) < (m-1)*lda+n { 26 | panic(shortA) 27 | } 28 | 29 | // Test common case where corner is non-zero. 30 | if a[n-1] != 0 || a[(m-1)*lda+(n-1)] != 0 { 31 | return n - 1 32 | } 33 | 34 | // Scan each row tracking the highest column seen. 35 | highest := -1 36 | for i := 0; i < m; i++ { 37 | for j := n - 1; j >= 0; j-- { 38 | if a[i*lda+j] != 0 { 39 | highest = max(highest, j) 40 | break 41 | } 42 | } 43 | } 44 | return highest 45 | } 46 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/lapack/gonum/iladlr.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2015 The Gonum Authors. All rights reserved. 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 gonum 6 | 7 | // Iladlr scans a matrix for its last non-zero row. Returns -1 if the matrix 8 | // is all zeros. 9 | // 10 | // Iladlr is an internal routine. It is exported for testing purposes. 11 | func (Implementation) Iladlr(m, n int, a []float64, lda int) int { 12 | switch { 13 | case m < 0: 14 | panic(mLT0) 15 | case n < 0: 16 | panic(nLT0) 17 | case lda < max(1, n): 18 | panic(badLdA) 19 | } 20 | 21 | if n == 0 || m == 0 { 22 | return -1 23 | } 24 | 25 | if len(a) < (m-1)*lda+n { 26 | panic(shortA) 27 | } 28 | 29 | // Check the common case where the corner is non-zero 30 | if a[(m-1)*lda] != 0 || a[(m-1)*lda+n-1] != 0 { 31 | return m - 1 32 | } 33 | for i := m - 1; i >= 0; i-- { 34 | for j := 0; j < n; j++ { 35 | if a[i*lda+j] != 0 { 36 | return i 37 | } 38 | } 39 | } 40 | return -1 41 | } 42 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/lapack/lapack64/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2017 The Gonum Authors. All rights reserved. 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 lapack64 provides a set of convenient wrapper functions for LAPACK 6 | // calls, as specified in the netlib standard (www.netlib.org). 7 | // 8 | // The native Go routines are used by default, and the Use function can be used 9 | // to set an alternative implementation. 10 | // 11 | // If the type of matrix (General, Symmetric, etc.) is known and fixed, it is 12 | // used in the wrapper signature. In many cases, however, the type of the matrix 13 | // changes during the call to the routine, for example the matrix is symmetric on 14 | // entry and is triangular on exit. In these cases the correct types should be checked 15 | // in the documentation. 16 | // 17 | // The full set of Lapack functions is very large, and it is not clear that a 18 | // full implementation is desirable, let alone feasible. Please open up an issue 19 | // if there is a specific function you need and/or are willing to implement. 20 | package lapack64 // import "gonum.org/v1/gonum/lapack/lapack64" 21 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/mat/README.md: -------------------------------------------------------------------------------- 1 | # Gonum matrix 2 | 3 | [![go.dev reference](https://pkg.go.dev/badge/gonum.org/v1/gonum/mat)](https://pkg.go.dev/gonum.org/v1/gonum/mat) 4 | [![GoDoc](https://godocs.io/gonum.org/v1/gonum/mat?status.svg)](https://godocs.io/gonum.org/v1/gonum/mat) 5 | 6 | Package mat is a matrix package for the Go language. 7 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/mat/consts.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2016 The Gonum Authors. All rights reserved. 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 mat 6 | 7 | // TriKind represents the triangularity of the matrix. 8 | type TriKind bool 9 | 10 | const ( 11 | // Upper specifies an upper triangular matrix. 12 | Upper TriKind = true 13 | // Lower specifies a lower triangular matrix. 14 | Lower TriKind = false 15 | ) 16 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/mat/offset.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2015 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !safe 6 | // +build !safe 7 | 8 | package mat 9 | 10 | import "unsafe" 11 | 12 | // offset returns the number of float64 values b[0] is after a[0]. 13 | func offset(a, b []float64) int { 14 | if &a[0] == &b[0] { 15 | return 0 16 | } 17 | // This expression must be atomic with respect to GC moves. 18 | // At this stage this is true, because the GC does not 19 | // move. See https://golang.org/issue/12445. 20 | return int(uintptr(unsafe.Pointer(&b[0]))-uintptr(unsafe.Pointer(&a[0]))) / int(unsafe.Sizeof(float64(0))) 21 | } 22 | 23 | // offsetComplex returns the number of complex128 values b[0] is after a[0]. 24 | func offsetComplex(a, b []complex128) int { 25 | if &a[0] == &b[0] { 26 | return 0 27 | } 28 | // This expression must be atomic with respect to GC moves. 29 | // At this stage this is true, because the GC does not 30 | // move. See https://golang.org/issue/12445. 31 | return int(uintptr(unsafe.Pointer(&b[0]))-uintptr(unsafe.Pointer(&a[0]))) / int(unsafe.Sizeof(complex128(0))) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/gonum.org/v1/gonum/mat/offset_appengine.go: -------------------------------------------------------------------------------- 1 | // Copyright ©2015 The Gonum Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build safe 6 | // +build safe 7 | 8 | package mat 9 | 10 | import "reflect" 11 | 12 | var sizeOfFloat64 = int(reflect.TypeOf(float64(0)).Size()) 13 | 14 | // offset returns the number of float64 values b[0] is after a[0]. 15 | func offset(a, b []float64) int { 16 | va0 := reflect.ValueOf(a).Index(0) 17 | vb0 := reflect.ValueOf(b).Index(0) 18 | if va0.Addr() == vb0.Addr() { 19 | return 0 20 | } 21 | // This expression must be atomic with respect to GC moves. 22 | // At this stage this is true, because the GC does not 23 | // move. See https://golang.org/issue/12445. 24 | return int(vb0.UnsafeAddr()-va0.UnsafeAddr()) / sizeOfFloat64 25 | } 26 | 27 | var sizeOfComplex128 = int(reflect.TypeOf(complex128(0)).Size()) 28 | 29 | // offsetComplex returns the number of complex128 values b[0] is after a[0]. 30 | func offsetComplex(a, b []complex128) int { 31 | va0 := reflect.ValueOf(a).Index(0) 32 | vb0 := reflect.ValueOf(b).Index(0) 33 | if va0.Addr() == vb0.Addr() { 34 | return 0 35 | } 36 | // This expression must be atomic with respect to GC moves. 37 | // At this stage this is true, because the GC does not 38 | // move. See https://golang.org/issue/12445. 39 | return int(vb0.UnsafeAddr()-va0.UnsafeAddr()) / sizeOfComplex128 40 | } 41 | --------------------------------------------------------------------------------