├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ └── bug_report.md └── workflows │ └── ci-cd.yml ├── Build ├── buildlinux ├── buildlinux-arm64 ├── buildlinux-x86_64 ├── buildmac ├── buildmac-arm64 ├── buildmac-x86_64 ├── buildwindows ├── buildwindows-arm64 ├── buildwindows-x86_64 ├── curd-windows-build.iss ├── curd.ico ├── curd.jpg ├── mpv.exe.gz ├── mpv.zip ├── release └── requirements.txt ├── LICENSE ├── PKGBUILD ├── README.md ├── VERSION.txt ├── cmd └── curd │ └── main.go ├── flake.lock ├── flake.nix ├── go.mod ├── go.sum ├── internal ├── anilist.go ├── anime_list.go ├── aniskip.go ├── config.go ├── curd.go ├── discord.go ├── episode_list.go ├── episode_url.go ├── filler_list.go ├── globals.go ├── jikan.go ├── links.go ├── localTracking.go ├── player.go ├── rofi.go ├── selection_menu.go ├── structs.go ├── unix_ipc.go └── windows_ipc.go ├── package.nix ├── rofi ├── selectanime.rasi ├── selectanimepreview.rasi └── userinput.rasi └── vendor ├── github.com ├── Microsoft │ └── go-winio │ │ ├── .gitattributes │ │ ├── .golangci.yml │ │ ├── CODEOWNERS │ │ ├── LICENSE │ │ ├── SECURITY.md │ │ ├── backup.go │ │ ├── doc.go │ │ ├── ea.go │ │ ├── file.go │ │ ├── fileinfo.go │ │ ├── hvsock.go │ │ ├── internal │ │ ├── fs │ │ │ ├── doc.go │ │ │ ├── fs.go │ │ │ ├── security.go │ │ │ └── zsyscall_windows.go │ │ ├── socket │ │ │ ├── rawaddr.go │ │ │ ├── socket.go │ │ │ └── zsyscall_windows.go │ │ └── stringbuffer │ │ │ └── wstring.go │ │ ├── pipe.go │ │ ├── pkg │ │ └── guid │ │ │ ├── guid.go │ │ │ ├── guid_nonwindows.go │ │ │ ├── guid_windows.go │ │ │ └── variant_string.go │ │ ├── privilege.go │ │ ├── reparse.go │ │ ├── sd.go │ │ ├── syscall.go │ │ └── zsyscall_windows.go ├── aymanbagabas │ └── go-osc52 │ │ └── v2 │ │ ├── LICENSE │ │ └── osc52.go ├── charmbracelet │ ├── bubbletea │ │ ├── .gitattributes │ │ ├── .golangci-soft.yml │ │ ├── .golangci.yml │ │ ├── .goreleaser.yml │ │ ├── LICENSE │ │ ├── commands.go │ │ ├── exec.go │ │ ├── focus.go │ │ ├── inputreader_other.go │ │ ├── inputreader_windows.go │ │ ├── key.go │ │ ├── key_other.go │ │ ├── key_sequences.go │ │ ├── key_windows.go │ │ ├── logging.go │ │ ├── mouse.go │ │ ├── nil_renderer.go │ │ ├── options.go │ │ ├── renderer.go │ │ ├── screen.go │ │ ├── signals_unix.go │ │ ├── signals_windows.go │ │ ├── standard_renderer.go │ │ ├── tea.go │ │ ├── tea_init.go │ │ ├── tty.go │ │ ├── tty_unix.go │ │ └── tty_windows.go │ ├── lipgloss │ │ ├── .golangci-soft.yml │ │ ├── .golangci.yml │ │ ├── .goreleaser.yml │ │ ├── LICENSE │ │ ├── align.go │ │ ├── ansi_unix.go │ │ ├── ansi_windows.go │ │ ├── borders.go │ │ ├── color.go │ │ ├── get.go │ │ ├── join.go │ │ ├── position.go │ │ ├── renderer.go │ │ ├── runes.go │ │ ├── set.go │ │ ├── size.go │ │ ├── style.go │ │ ├── unset.go │ │ └── whitespace.go │ └── x │ │ ├── ansi │ │ ├── LICENSE │ │ ├── ansi.go │ │ ├── ascii.go │ │ ├── background.go │ │ ├── c0.go │ │ ├── c1.go │ │ ├── charset.go │ │ ├── clipboard.go │ │ ├── color.go │ │ ├── ctrl.go │ │ ├── cursor.go │ │ ├── cwd.go │ │ ├── doc.go │ │ ├── focus.go │ │ ├── graphics.go │ │ ├── hyperlink.go │ │ ├── iterm2.go │ │ ├── keypad.go │ │ ├── kitty.go │ │ ├── kitty │ │ │ ├── decoder.go │ │ │ ├── encoder.go │ │ │ ├── graphics.go │ │ │ └── options.go │ │ ├── method.go │ │ ├── mode.go │ │ ├── modes.go │ │ ├── mouse.go │ │ ├── notification.go │ │ ├── parser.go │ │ ├── parser │ │ │ ├── const.go │ │ │ ├── seq.go │ │ │ └── transition_table.go │ │ ├── parser_decode.go │ │ ├── parser_handler.go │ │ ├── parser_sync.go │ │ ├── passthrough.go │ │ ├── paste.go │ │ ├── reset.go │ │ ├── screen.go │ │ ├── sgr.go │ │ ├── status.go │ │ ├── style.go │ │ ├── termcap.go │ │ ├── title.go │ │ ├── truncate.go │ │ ├── util.go │ │ ├── width.go │ │ ├── winop.go │ │ ├── wrap.go │ │ └── xterm.go │ │ └── term │ │ ├── LICENSE │ │ ├── term.go │ │ ├── term_other.go │ │ ├── term_unix.go │ │ ├── term_unix_bsd.go │ │ ├── term_unix_other.go │ │ ├── term_windows.go │ │ ├── terminal.go │ │ └── util.go ├── erikgeiser │ └── coninput │ │ ├── .golangci.yml │ │ ├── LICENSE │ │ ├── keycodes.go │ │ ├── mode.go │ │ ├── read.go │ │ └── records.go ├── gen2brain │ └── beeep │ │ ├── LICENSE │ │ ├── alert_darwin.go │ │ ├── alert_js.go │ │ ├── alert_unix.go │ │ ├── alert_unsupported.go │ │ ├── alert_windows.go │ │ ├── beeep.go │ │ ├── beep_darwin.go │ │ ├── beep_js.go │ │ ├── beep_unix.go │ │ ├── beep_unsupported.go │ │ ├── beep_windows.go │ │ ├── notify_darwin.go │ │ ├── notify_js.go │ │ ├── notify_unix.go │ │ ├── notify_unix_nodbus.go │ │ ├── notify_unsupported.go │ │ └── notify_windows.go ├── go-toast │ └── toast │ │ ├── LICENSE │ │ ├── readme.md │ │ ├── screenshot-action-centre.png │ │ ├── screenshot-cli.png │ │ ├── screenshot-toast.png │ │ └── toast.go ├── godbus │ └── dbus │ │ └── v5 │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── MAINTAINERS │ │ ├── auth.go │ │ ├── auth_anonymous.go │ │ ├── auth_external.go │ │ ├── auth_sha1.go │ │ ├── call.go │ │ ├── conn.go │ │ ├── conn_darwin.go │ │ ├── conn_other.go │ │ ├── conn_unix.go │ │ ├── conn_windows.go │ │ ├── dbus.go │ │ ├── decoder.go │ │ ├── default_handler.go │ │ ├── doc.go │ │ ├── encoder.go │ │ ├── escape.go │ │ ├── export.go │ │ ├── homedir.go │ │ ├── match.go │ │ ├── message.go │ │ ├── object.go │ │ ├── sequence.go │ │ ├── sequential_handler.go │ │ ├── server_interfaces.go │ │ ├── sig.go │ │ ├── transport_darwin.go │ │ ├── transport_generic.go │ │ ├── transport_nonce_tcp.go │ │ ├── transport_tcp.go │ │ ├── transport_unix.go │ │ ├── transport_unixcred_dragonfly.go │ │ ├── transport_unixcred_freebsd.go │ │ ├── transport_unixcred_linux.go │ │ ├── transport_unixcred_netbsd.go │ │ ├── transport_unixcred_openbsd.go │ │ ├── transport_zos.go │ │ ├── variant.go │ │ ├── variant_lexer.go │ │ └── variant_parser.go ├── hugolgst │ └── rich-go │ │ ├── LICENSE │ │ ├── client │ │ ├── client.go │ │ ├── inputMapper.go │ │ └── types.go │ │ └── ipc │ │ ├── ipc.go │ │ ├── ipc_notwin.go │ │ └── ipc_windows.go ├── lucasb-eyer │ └── go-colorful │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── colorgens.go │ │ ├── colors.go │ │ ├── happy_palettegen.go │ │ ├── hexcolor.go │ │ ├── hsluv-snapshot-rev4.json │ │ ├── hsluv.go │ │ ├── soft_palettegen.go │ │ └── warm_palettegen.go ├── mattn │ ├── go-isatty │ │ ├── LICENSE │ │ ├── doc.go │ │ ├── go.test.sh │ │ ├── isatty_bsd.go │ │ ├── isatty_others.go │ │ ├── isatty_plan9.go │ │ ├── isatty_solaris.go │ │ ├── isatty_tcgets.go │ │ └── isatty_windows.go │ ├── go-localereader │ │ ├── localereader.go │ │ ├── localereader_unix.go │ │ └── localereader_windows.go │ └── go-runewidth │ │ ├── LICENSE │ │ ├── runewidth.go │ │ ├── runewidth_appengine.go │ │ ├── runewidth_js.go │ │ ├── runewidth_posix.go │ │ ├── runewidth_table.go │ │ └── runewidth_windows.go ├── muesli │ ├── ansi │ │ ├── .golangci.yml │ │ ├── LICENSE │ │ ├── ansi.go │ │ ├── buffer.go │ │ ├── compressor │ │ │ └── writer.go │ │ └── writer.go │ ├── cancelreader │ │ ├── .golangci-soft.yml │ │ ├── .golangci.yml │ │ ├── LICENSE │ │ ├── cancelreader.go │ │ ├── cancelreader_bsd.go │ │ ├── cancelreader_default.go │ │ ├── cancelreader_linux.go │ │ ├── cancelreader_select.go │ │ ├── cancelreader_unix.go │ │ └── cancelreader_windows.go │ └── termenv │ │ ├── .golangci-soft.yml │ │ ├── .golangci.yml │ │ ├── LICENSE │ │ ├── ansi_compat.md │ │ ├── ansicolors.go │ │ ├── color.go │ │ ├── constants_linux.go │ │ ├── constants_solaris.go │ │ ├── constants_unix.go │ │ ├── copy.go │ │ ├── hyperlink.go │ │ ├── notification.go │ │ ├── output.go │ │ ├── profile.go │ │ ├── screen.go │ │ ├── style.go │ │ ├── templatehelper.go │ │ ├── termenv.go │ │ ├── termenv_other.go │ │ ├── termenv_posix.go │ │ ├── termenv_solaris.go │ │ ├── termenv_unix.go │ │ └── termenv_windows.go ├── nu7hatch │ └── gouuid │ │ ├── COPYING │ │ └── uuid.go ├── rivo │ └── uniseg │ │ ├── LICENSE.txt │ │ ├── doc.go │ │ ├── eastasianwidth.go │ │ ├── emojipresentation.go │ │ ├── gen_breaktest.go │ │ ├── gen_properties.go │ │ ├── grapheme.go │ │ ├── graphemeproperties.go │ │ ├── graphemerules.go │ │ ├── line.go │ │ ├── lineproperties.go │ │ ├── linerules.go │ │ ├── properties.go │ │ ├── sentence.go │ │ ├── sentenceproperties.go │ │ ├── sentencerules.go │ │ ├── step.go │ │ ├── width.go │ │ ├── word.go │ │ ├── wordproperties.go │ │ └── wordrules.go └── tadvi │ └── systray │ ├── AUTHORS │ ├── LICENSE │ ├── systray_linux.go │ └── systray_windows.go ├── golang.org └── x │ ├── sync │ ├── LICENSE │ ├── PATENTS │ └── errgroup │ │ ├── errgroup.go │ │ ├── go120.go │ │ └── pre_go120.go │ ├── sys │ ├── LICENSE │ ├── PATENTS │ ├── unix │ │ ├── affinity_linux.go │ │ ├── aliases.go │ │ ├── asm_aix_ppc64.s │ │ ├── asm_bsd_386.s │ │ ├── asm_bsd_amd64.s │ │ ├── asm_bsd_arm.s │ │ ├── asm_bsd_arm64.s │ │ ├── asm_bsd_ppc64.s │ │ ├── asm_bsd_riscv64.s │ │ ├── asm_linux_386.s │ │ ├── asm_linux_amd64.s │ │ ├── asm_linux_arm.s │ │ ├── asm_linux_arm64.s │ │ ├── asm_linux_loong64.s │ │ ├── asm_linux_mips64x.s │ │ ├── asm_linux_mipsx.s │ │ ├── asm_linux_ppc64x.s │ │ ├── asm_linux_riscv64.s │ │ ├── asm_linux_s390x.s │ │ ├── asm_openbsd_mips64.s │ │ ├── asm_solaris_amd64.s │ │ ├── asm_zos_s390x.s │ │ ├── auxv.go │ │ ├── auxv_unsupported.go │ │ ├── bluetooth_linux.go │ │ ├── bpxsvc_zos.go │ │ ├── bpxsvc_zos.s │ │ ├── cap_freebsd.go │ │ ├── constants.go │ │ ├── dev_aix_ppc.go │ │ ├── dev_aix_ppc64.go │ │ ├── dev_darwin.go │ │ ├── dev_dragonfly.go │ │ ├── dev_freebsd.go │ │ ├── dev_linux.go │ │ ├── dev_netbsd.go │ │ ├── dev_openbsd.go │ │ ├── dev_zos.go │ │ ├── dirent.go │ │ ├── endian_big.go │ │ ├── endian_little.go │ │ ├── env_unix.go │ │ ├── fcntl.go │ │ ├── fcntl_darwin.go │ │ ├── fcntl_linux_32bit.go │ │ ├── fdset.go │ │ ├── gccgo.go │ │ ├── gccgo_c.c │ │ ├── gccgo_linux_amd64.go │ │ ├── ifreq_linux.go │ │ ├── ioctl_linux.go │ │ ├── ioctl_signed.go │ │ ├── ioctl_unsigned.go │ │ ├── ioctl_zos.go │ │ ├── mkall.sh │ │ ├── mkerrors.sh │ │ ├── mmap_nomremap.go │ │ ├── mremap.go │ │ ├── pagesize_unix.go │ │ ├── pledge_openbsd.go │ │ ├── ptrace_darwin.go │ │ ├── ptrace_ios.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── readdirent_getdents.go │ │ ├── readdirent_getdirentries.go │ │ ├── sockcmsg_dragonfly.go │ │ ├── sockcmsg_linux.go │ │ ├── sockcmsg_unix.go │ │ ├── sockcmsg_unix_other.go │ │ ├── sockcmsg_zos.go │ │ ├── symaddr_zos_s390x.s │ │ ├── syscall.go │ │ ├── syscall_aix.go │ │ ├── syscall_aix_ppc.go │ │ ├── syscall_aix_ppc64.go │ │ ├── syscall_bsd.go │ │ ├── syscall_darwin.go │ │ ├── syscall_darwin_amd64.go │ │ ├── syscall_darwin_arm64.go │ │ ├── syscall_darwin_libSystem.go │ │ ├── syscall_dragonfly.go │ │ ├── syscall_dragonfly_amd64.go │ │ ├── syscall_freebsd.go │ │ ├── syscall_freebsd_386.go │ │ ├── syscall_freebsd_amd64.go │ │ ├── syscall_freebsd_arm.go │ │ ├── syscall_freebsd_arm64.go │ │ ├── syscall_freebsd_riscv64.go │ │ ├── syscall_hurd.go │ │ ├── syscall_hurd_386.go │ │ ├── syscall_illumos.go │ │ ├── syscall_linux.go │ │ ├── syscall_linux_386.go │ │ ├── syscall_linux_alarm.go │ │ ├── syscall_linux_amd64.go │ │ ├── syscall_linux_amd64_gc.go │ │ ├── syscall_linux_arm.go │ │ ├── syscall_linux_arm64.go │ │ ├── syscall_linux_gc.go │ │ ├── syscall_linux_gc_386.go │ │ ├── syscall_linux_gc_arm.go │ │ ├── syscall_linux_gccgo_386.go │ │ ├── syscall_linux_gccgo_arm.go │ │ ├── syscall_linux_loong64.go │ │ ├── syscall_linux_mips64x.go │ │ ├── syscall_linux_mipsx.go │ │ ├── syscall_linux_ppc.go │ │ ├── syscall_linux_ppc64x.go │ │ ├── syscall_linux_riscv64.go │ │ ├── syscall_linux_s390x.go │ │ ├── syscall_linux_sparc64.go │ │ ├── syscall_netbsd.go │ │ ├── syscall_netbsd_386.go │ │ ├── syscall_netbsd_amd64.go │ │ ├── syscall_netbsd_arm.go │ │ ├── syscall_netbsd_arm64.go │ │ ├── syscall_openbsd.go │ │ ├── syscall_openbsd_386.go │ │ ├── syscall_openbsd_amd64.go │ │ ├── syscall_openbsd_arm.go │ │ ├── syscall_openbsd_arm64.go │ │ ├── syscall_openbsd_libc.go │ │ ├── syscall_openbsd_mips64.go │ │ ├── syscall_openbsd_ppc64.go │ │ ├── syscall_openbsd_riscv64.go │ │ ├── syscall_solaris.go │ │ ├── syscall_solaris_amd64.go │ │ ├── syscall_unix.go │ │ ├── syscall_unix_gc.go │ │ ├── syscall_unix_gc_ppc64x.go │ │ ├── syscall_zos_s390x.go │ │ ├── sysvshm_linux.go │ │ ├── sysvshm_unix.go │ │ ├── sysvshm_unix_other.go │ │ ├── timestruct.go │ │ ├── unveil_openbsd.go │ │ ├── vgetrandom_linux.go │ │ ├── vgetrandom_unsupported.go │ │ ├── xattr_bsd.go │ │ ├── zerrors_aix_ppc.go │ │ ├── zerrors_aix_ppc64.go │ │ ├── zerrors_darwin_amd64.go │ │ ├── zerrors_darwin_arm64.go │ │ ├── zerrors_dragonfly_amd64.go │ │ ├── zerrors_freebsd_386.go │ │ ├── zerrors_freebsd_amd64.go │ │ ├── zerrors_freebsd_arm.go │ │ ├── zerrors_freebsd_arm64.go │ │ ├── zerrors_freebsd_riscv64.go │ │ ├── zerrors_linux.go │ │ ├── zerrors_linux_386.go │ │ ├── zerrors_linux_amd64.go │ │ ├── zerrors_linux_arm.go │ │ ├── zerrors_linux_arm64.go │ │ ├── zerrors_linux_loong64.go │ │ ├── zerrors_linux_mips.go │ │ ├── zerrors_linux_mips64.go │ │ ├── zerrors_linux_mips64le.go │ │ ├── zerrors_linux_mipsle.go │ │ ├── zerrors_linux_ppc.go │ │ ├── zerrors_linux_ppc64.go │ │ ├── zerrors_linux_ppc64le.go │ │ ├── zerrors_linux_riscv64.go │ │ ├── zerrors_linux_s390x.go │ │ ├── zerrors_linux_sparc64.go │ │ ├── zerrors_netbsd_386.go │ │ ├── zerrors_netbsd_amd64.go │ │ ├── zerrors_netbsd_arm.go │ │ ├── zerrors_netbsd_arm64.go │ │ ├── zerrors_openbsd_386.go │ │ ├── zerrors_openbsd_amd64.go │ │ ├── zerrors_openbsd_arm.go │ │ ├── zerrors_openbsd_arm64.go │ │ ├── zerrors_openbsd_mips64.go │ │ ├── zerrors_openbsd_ppc64.go │ │ ├── zerrors_openbsd_riscv64.go │ │ ├── zerrors_solaris_amd64.go │ │ ├── zerrors_zos_s390x.go │ │ ├── zptrace_armnn_linux.go │ │ ├── zptrace_linux_arm64.go │ │ ├── zptrace_mipsnn_linux.go │ │ ├── zptrace_mipsnnle_linux.go │ │ ├── zptrace_x86_linux.go │ │ ├── zsymaddr_zos_s390x.s │ │ ├── zsyscall_aix_ppc.go │ │ ├── zsyscall_aix_ppc64.go │ │ ├── zsyscall_aix_ppc64_gc.go │ │ ├── zsyscall_aix_ppc64_gccgo.go │ │ ├── zsyscall_darwin_amd64.go │ │ ├── zsyscall_darwin_amd64.s │ │ ├── zsyscall_darwin_arm64.go │ │ ├── zsyscall_darwin_arm64.s │ │ ├── zsyscall_dragonfly_amd64.go │ │ ├── zsyscall_freebsd_386.go │ │ ├── zsyscall_freebsd_amd64.go │ │ ├── zsyscall_freebsd_arm.go │ │ ├── zsyscall_freebsd_arm64.go │ │ ├── zsyscall_freebsd_riscv64.go │ │ ├── zsyscall_illumos_amd64.go │ │ ├── zsyscall_linux.go │ │ ├── zsyscall_linux_386.go │ │ ├── zsyscall_linux_amd64.go │ │ ├── zsyscall_linux_arm.go │ │ ├── zsyscall_linux_arm64.go │ │ ├── zsyscall_linux_loong64.go │ │ ├── zsyscall_linux_mips.go │ │ ├── zsyscall_linux_mips64.go │ │ ├── zsyscall_linux_mips64le.go │ │ ├── zsyscall_linux_mipsle.go │ │ ├── zsyscall_linux_ppc.go │ │ ├── zsyscall_linux_ppc64.go │ │ ├── zsyscall_linux_ppc64le.go │ │ ├── zsyscall_linux_riscv64.go │ │ ├── zsyscall_linux_s390x.go │ │ ├── zsyscall_linux_sparc64.go │ │ ├── zsyscall_netbsd_386.go │ │ ├── zsyscall_netbsd_amd64.go │ │ ├── zsyscall_netbsd_arm.go │ │ ├── zsyscall_netbsd_arm64.go │ │ ├── zsyscall_openbsd_386.go │ │ ├── zsyscall_openbsd_386.s │ │ ├── zsyscall_openbsd_amd64.go │ │ ├── zsyscall_openbsd_amd64.s │ │ ├── zsyscall_openbsd_arm.go │ │ ├── zsyscall_openbsd_arm.s │ │ ├── zsyscall_openbsd_arm64.go │ │ ├── zsyscall_openbsd_arm64.s │ │ ├── zsyscall_openbsd_mips64.go │ │ ├── zsyscall_openbsd_mips64.s │ │ ├── zsyscall_openbsd_ppc64.go │ │ ├── zsyscall_openbsd_ppc64.s │ │ ├── zsyscall_openbsd_riscv64.go │ │ ├── zsyscall_openbsd_riscv64.s │ │ ├── zsyscall_solaris_amd64.go │ │ ├── zsyscall_zos_s390x.go │ │ ├── zsysctl_openbsd_386.go │ │ ├── zsysctl_openbsd_amd64.go │ │ ├── zsysctl_openbsd_arm.go │ │ ├── zsysctl_openbsd_arm64.go │ │ ├── zsysctl_openbsd_mips64.go │ │ ├── zsysctl_openbsd_ppc64.go │ │ ├── zsysctl_openbsd_riscv64.go │ │ ├── zsysnum_darwin_amd64.go │ │ ├── zsysnum_darwin_arm64.go │ │ ├── zsysnum_dragonfly_amd64.go │ │ ├── zsysnum_freebsd_386.go │ │ ├── zsysnum_freebsd_amd64.go │ │ ├── zsysnum_freebsd_arm.go │ │ ├── zsysnum_freebsd_arm64.go │ │ ├── zsysnum_freebsd_riscv64.go │ │ ├── zsysnum_linux_386.go │ │ ├── zsysnum_linux_amd64.go │ │ ├── zsysnum_linux_arm.go │ │ ├── zsysnum_linux_arm64.go │ │ ├── zsysnum_linux_loong64.go │ │ ├── zsysnum_linux_mips.go │ │ ├── zsysnum_linux_mips64.go │ │ ├── zsysnum_linux_mips64le.go │ │ ├── zsysnum_linux_mipsle.go │ │ ├── zsysnum_linux_ppc.go │ │ ├── zsysnum_linux_ppc64.go │ │ ├── zsysnum_linux_ppc64le.go │ │ ├── zsysnum_linux_riscv64.go │ │ ├── zsysnum_linux_s390x.go │ │ ├── zsysnum_linux_sparc64.go │ │ ├── zsysnum_netbsd_386.go │ │ ├── zsysnum_netbsd_amd64.go │ │ ├── zsysnum_netbsd_arm.go │ │ ├── zsysnum_netbsd_arm64.go │ │ ├── zsysnum_openbsd_386.go │ │ ├── zsysnum_openbsd_amd64.go │ │ ├── zsysnum_openbsd_arm.go │ │ ├── zsysnum_openbsd_arm64.go │ │ ├── zsysnum_openbsd_mips64.go │ │ ├── zsysnum_openbsd_ppc64.go │ │ ├── zsysnum_openbsd_riscv64.go │ │ ├── zsysnum_zos_s390x.go │ │ ├── ztypes_aix_ppc.go │ │ ├── ztypes_aix_ppc64.go │ │ ├── ztypes_darwin_amd64.go │ │ ├── ztypes_darwin_arm64.go │ │ ├── ztypes_dragonfly_amd64.go │ │ ├── ztypes_freebsd_386.go │ │ ├── ztypes_freebsd_amd64.go │ │ ├── ztypes_freebsd_arm.go │ │ ├── ztypes_freebsd_arm64.go │ │ ├── ztypes_freebsd_riscv64.go │ │ ├── ztypes_linux.go │ │ ├── ztypes_linux_386.go │ │ ├── ztypes_linux_amd64.go │ │ ├── ztypes_linux_arm.go │ │ ├── ztypes_linux_arm64.go │ │ ├── ztypes_linux_loong64.go │ │ ├── ztypes_linux_mips.go │ │ ├── ztypes_linux_mips64.go │ │ ├── ztypes_linux_mips64le.go │ │ ├── ztypes_linux_mipsle.go │ │ ├── ztypes_linux_ppc.go │ │ ├── ztypes_linux_ppc64.go │ │ ├── ztypes_linux_ppc64le.go │ │ ├── ztypes_linux_riscv64.go │ │ ├── ztypes_linux_s390x.go │ │ ├── ztypes_linux_sparc64.go │ │ ├── ztypes_netbsd_386.go │ │ ├── ztypes_netbsd_amd64.go │ │ ├── ztypes_netbsd_arm.go │ │ ├── ztypes_netbsd_arm64.go │ │ ├── ztypes_openbsd_386.go │ │ ├── ztypes_openbsd_amd64.go │ │ ├── ztypes_openbsd_arm.go │ │ ├── ztypes_openbsd_arm64.go │ │ ├── ztypes_openbsd_mips64.go │ │ ├── ztypes_openbsd_ppc64.go │ │ ├── ztypes_openbsd_riscv64.go │ │ ├── ztypes_solaris_amd64.go │ │ └── ztypes_zos_s390x.go │ └── windows │ │ ├── aliases.go │ │ ├── dll_windows.go │ │ ├── env_windows.go │ │ ├── eventlog.go │ │ ├── exec_windows.go │ │ ├── memory_windows.go │ │ ├── mkerrors.bash │ │ ├── mkknownfolderids.bash │ │ ├── mksyscall.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── registry │ │ ├── key.go │ │ ├── mksyscall.go │ │ ├── syscall.go │ │ ├── value.go │ │ └── zsyscall_windows.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 │ └── text │ ├── LICENSE │ ├── PATENTS │ └── transform │ └── transform.go ├── gopkg.in └── natefinch │ └── npipe.v2 │ ├── LICENSE.txt │ ├── doc.go │ ├── npipe_windows.go │ ├── znpipe_windows_386.go │ └── znpipe_windows_amd64.go └── modules.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | Build/mpv.exe filter=lfs diff=lfs merge=lfs -text 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug, help wanted 6 | assignees: Wraient 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 16 | **Expected behavior** 17 | A clear and concise description of what you expected to happen. 18 | 19 | **Screenshots** 20 | If applicable, add screenshots to help explain your problem. 21 | 22 | **Environment (please complete the following information):** 23 | - Distro: [e.g. Fedora, Arch] 24 | 25 | **Debug logs** 26 | Debug logs are located at ~/.local/share/curd/debug.log (for Linux) 27 | or C:\.local\share\curd\debug.log (for windows) 28 | 29 | **Optional context** 30 | Add any other context about the problem here. 31 | -------------------------------------------------------------------------------- /Build/buildlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ./Build/buildlinux-arm64 4 | ./Build/buildlinux-x86_64 5 | -------------------------------------------------------------------------------- /Build/buildlinux-arm64: -------------------------------------------------------------------------------- 1 | VERSION=$(cat VERSION.txt) 2 | CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o curd-linux-arm64 -ldflags="-X main.version=${VERSION} -s -w" -trimpath cmd/curd/main.go 3 | if [[ "$GITHUB_EVENT_NAME" == "push" && "$GITHUB_REF" == "refs/heads/main" && "$GITHUB_EVENT_HEAD_COMMIT_MESSAGE" == *"release:"* ]] || [[ "$COMPRESS" == "true" ]]; then 4 | upx --best --ultra-brute curd-linux-arm64 5 | fi -------------------------------------------------------------------------------- /Build/buildlinux-x86_64: -------------------------------------------------------------------------------- 1 | VERSION=$(cat VERSION.txt) 2 | CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o curd-linux-x86_64 -ldflags="-X main.version=${VERSION} -s -w" -trimpath cmd/curd/main.go 3 | if [[ "$GITHUB_EVENT_NAME" == "push" && "$GITHUB_REF" == "refs/heads/main" && "$GITHUB_EVENT_HEAD_COMMIT_MESSAGE" == *"release:"* ]] || [[ "$COMPRESS" == "true" ]]; then 4 | upx --best --ultra-brute curd-linux-x86_64 5 | fi -------------------------------------------------------------------------------- /Build/buildmac: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ./Build/buildmac-arm64 4 | ./Build/buildmac-x86_64 5 | 6 | -------------------------------------------------------------------------------- /Build/buildmac-arm64: -------------------------------------------------------------------------------- 1 | VERSION=$(cat VERSION.txt) 2 | CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o curd-macos-arm64 -ldflags="-X main.version=${VERSION}" cmd/curd/main.go -------------------------------------------------------------------------------- /Build/buildmac-x86_64: -------------------------------------------------------------------------------- 1 | VERSION=$(cat VERSION.txt) 2 | CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o curd-macos-x86_64 -ldflags="-X main.version=${VERSION}" -trimpath cmd/curd/main.go -------------------------------------------------------------------------------- /Build/buildwindows: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Set required Windows build environment variables 4 | export CGO_ENABLED=1 5 | export GOOS=windows 6 | 7 | # Build for ARM64 (Broken due to npipe and rich-go) 8 | # export GOARCH=arm64 9 | # CC=x86_64-w64-mingw32-gcc ./Build/buildwindows-arm64 10 | 11 | # Build for x86_64 12 | export GOARCH=amd64 13 | CC=x86_64-w64-mingw32-gcc ./Build/buildwindows-x86_64 14 | -------------------------------------------------------------------------------- /Build/buildwindows-arm64: -------------------------------------------------------------------------------- 1 | VERSION=$(cat VERSION.txt) 2 | CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -o curd-windows-arm64.exe -ldflags="-X main.version=${VERSION}" cmd/curd/main.go 3 | if [[ "$GITHUB_EVENT_NAME" == "push" && "$GITHUB_REF" == "refs/heads/main" && "$GITHUB_EVENT_HEAD_COMMIT_MESSAGE" == *"release:"* ]] || [[ "$COMPRESS" == "true" ]]; then 4 | upx --best --ultra-brute curd-windows-arm64.exe 5 | fi -------------------------------------------------------------------------------- /Build/buildwindows-x86_64: -------------------------------------------------------------------------------- 1 | VERSION=$(cat VERSION.txt) 2 | CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o curd-windows-x86_64.exe -ldflags="-X main.version=${VERSION}" cmd/curd/main.go 3 | if [[ "$GITHUB_EVENT_NAME" == "push" && "$GITHUB_REF" == "refs/heads/main" && "$GITHUB_EVENT_HEAD_COMMIT_MESSAGE" == *"release:"* ]] || [[ "$COMPRESS" == "true" ]]; then 4 | upx --best --ultra-brute curd-windows-x86_64.exe 5 | fi -------------------------------------------------------------------------------- /Build/curd-windows-build.iss: -------------------------------------------------------------------------------- 1 | [Setup] 2 | AppName=Curd Installer 3 | AppVersion=1.0.8 4 | DefaultDirName={userappdata}\Curd 5 | PrivilegesRequired=lowest 6 | AllowNoIcons=yes 7 | OutputBaseFilename=curd-windows-installer 8 | UsePreviousAppDir=yes 9 | Compression=lzma2 10 | SolidCompression=yes 11 | 12 | [Tasks] 13 | ; Define a task for creating a desktop shortcut 14 | Name: "desktopicon"; Description: "Create a &desktop shortcut"; GroupDescription: "Additional Options"; 15 | 16 | [Files] 17 | ; Copy the Curd executable to the install directory 18 | Source: "..\releases\curd-{#SetupSetting("AppVersion")}\windows\curd-windows-x86_64.exe"; DestDir: "{app}"; DestName: "curd.exe"; Flags: ignoreversion 19 | Source: "mpv\mpv.exe"; DestDir: "{app}\bin"; Flags: ignoreversion 20 | 21 | [Icons] 22 | ; Create the application icon in the Start Menu 23 | Name: "{group}\Curd"; Filename: "{app}\curd.exe" 24 | ; Create a desktop shortcut if the user checked the option 25 | Name: "{userdesktop}\Curd"; Filename: "{app}\curd.exe"; Tasks: desktopicon 26 | -------------------------------------------------------------------------------- /Build/curd.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wraient/curd/5c9285060a189f7de29cfadc258cec5506260225/Build/curd.ico -------------------------------------------------------------------------------- /Build/curd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wraient/curd/5c9285060a189f7de29cfadc258cec5506260225/Build/curd.jpg -------------------------------------------------------------------------------- /Build/mpv.exe.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wraient/curd/5c9285060a189f7de29cfadc258cec5506260225/Build/mpv.exe.gz -------------------------------------------------------------------------------- /Build/mpv.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wraient/curd/5c9285060a189f7de29cfadc258cec5506260225/Build/mpv.zip -------------------------------------------------------------------------------- /Build/requirements.txt: -------------------------------------------------------------------------------- 1 | mingw-w64-gcc # Build arm64 windows binary 2 | llvm-lipo # Build universal macos binary -------------------------------------------------------------------------------- /PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Wraient 2 | pkgname='curd' 3 | pkgver=1.0.3 4 | pkgrel=2 5 | pkgdesc="Watch anime in CLI with AniList Tracking, Discord RPC, Intro/Outro/Filler/Recap Skipping, etc." 6 | arch=('x86_64') 7 | url="https://github.com/Wraient/curd" 8 | license=('GPL') 9 | depends=('mpv' 'rofi' 'ueberzugpp') 10 | source=("$pkgname::https://github.com/Wraient/curd/releases/latest/download/curd") 11 | sha256sums=('SKIP') 12 | 13 | package() { 14 | # Install the precompiled binary into /usr/bin 15 | install -Dm755 "$srcdir/curd" "$pkgdir/usr/bin/curd" 16 | } 17 | 18 | pkgver() { 19 | local ver 20 | ver=$(curl -s --fail "https://api.github.com/repos/Wraient/curd/releases/latest" | jq -r '.tag_name' | sed 's/^v//') 21 | if [ -n "$ver" ]; then 22 | echo "$ver" 23 | else 24 | echo "$pkgver" 25 | fi 26 | } 27 | -------------------------------------------------------------------------------- /VERSION.txt: -------------------------------------------------------------------------------- 1 | 1.1.2 -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "nixpkgs": { 4 | "locked": { 5 | "lastModified": 1737469691, 6 | "narHash": "sha256-nmKOgAU48S41dTPIXAq0AHZSehWUn6ZPrUKijHAMmIk=", 7 | "owner": "NixOS", 8 | "repo": "nixpkgs", 9 | "rev": "9e4d5190a9482a1fb9d18adf0bdb83c6e506eaab", 10 | "type": "github" 11 | }, 12 | "original": { 13 | "owner": "NixOS", 14 | "ref": "nixos-unstable", 15 | "repo": "nixpkgs", 16 | "type": "github" 17 | } 18 | }, 19 | "root": { 20 | "inputs": { 21 | "nixpkgs": "nixpkgs", 22 | "systems": "systems" 23 | } 24 | }, 25 | "systems": { 26 | "locked": { 27 | "lastModified": 1681028828, 28 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 29 | "owner": "nix-systems", 30 | "repo": "default", 31 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 32 | "type": "github" 33 | }, 34 | "original": { 35 | "owner": "nix-systems", 36 | "repo": "default", 37 | "type": "github" 38 | } 39 | } 40 | }, 41 | "root": "root", 42 | "version": 7 43 | } 44 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "Watch anime in cli with Anilist Integration and Discord RPC "; 3 | 4 | inputs = { 5 | nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 | systems.url = "github:nix-systems/default"; 7 | }; 8 | 9 | outputs = { 10 | nixpkgs, 11 | systems, 12 | self, 13 | ... 14 | }: let 15 | eachSystem = nixpkgs.lib.genAttrs (import systems); 16 | in { 17 | packages = eachSystem (system: let 18 | package = nixpkgs.legacyPackages.${system}.callPackage ./package.nix {}; 19 | in { 20 | default = package; 21 | curd = package; 22 | }); 23 | 24 | devShells = eachSystem (system: { 25 | default = nixpkgs.legacyPackages.${system}.mkShellNoCC { 26 | inputsFrom = [self.packages.${system}.default]; 27 | }; 28 | }); 29 | 30 | formatter = eachSystem (system: nixpkgs.legacyPackages.${system}.alejandra); 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /internal/globals.go: -------------------------------------------------------------------------------- 1 | package internal 2 | 3 | var ( 4 | globalAnime *Anime 5 | globalLogFile string 6 | ) 7 | 8 | // SetGlobalAnime sets the global anime reference 9 | func SetGlobalAnime(anime *Anime) { 10 | globalAnime = anime 11 | } 12 | 13 | // GetGlobalAnime gets the global anime reference 14 | func GetGlobalAnime() *Anime { 15 | return globalAnime 16 | } 17 | 18 | // SetGlobalLogFile sets the global log file path 19 | func SetGlobalLogFile(logFile string) { 20 | globalLogFile = logFile 21 | } 22 | 23 | // GetGlobalLogFile gets the global log file path 24 | func GetGlobalLogFile() string { 25 | return globalLogFile 26 | } 27 | -------------------------------------------------------------------------------- /internal/links.go: -------------------------------------------------------------------------------- 1 | package internal 2 | 3 | import "strings" 4 | 5 | // LinkPriorities defines the order of priority for link domains 6 | var LinkPriorities = []string{ 7 | "sharepoint.com", 8 | "wixmp.com", 9 | "dropbox.com", 10 | "wetransfer.com", 11 | "gogoanime.com", 12 | // Add more domains in order of priority 13 | } 14 | 15 | // PrioritizeLink takes an array of links and returns a single link based on priority 16 | func PrioritizeLink(links []string) string { 17 | if len(links) == 0 { 18 | return "" 19 | } 20 | 21 | // Create a map for quick lookup of priorities 22 | priorityMap := make(map[string]int) 23 | for i, p := range LinkPriorities { 24 | priorityMap[p] = len(LinkPriorities) - i // Higher index means higher priority 25 | } 26 | 27 | highestPriority := -1 28 | var bestLink string 29 | 30 | for _, link := range links { 31 | for domain, priority := range priorityMap { 32 | if strings.Contains(link, domain) { 33 | if priority > highestPriority { 34 | highestPriority = priority 35 | bestLink = link 36 | } 37 | break 38 | } 39 | } 40 | } 41 | 42 | // If no priority link found, return the first link 43 | if bestLink == "" { 44 | return links[0] 45 | } 46 | 47 | return bestLink 48 | } 49 | -------------------------------------------------------------------------------- /internal/unix_ipc.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package internal 5 | 6 | import ( 7 | "net" 8 | ) 9 | 10 | func connectToPipe(ipcSocketPath string) (net.Conn, error) { 11 | conn, err := net.Dial("unix", ipcSocketPath) 12 | if err != nil { 13 | return nil, err 14 | } 15 | return conn, nil 16 | } 17 | -------------------------------------------------------------------------------- /internal/windows_ipc.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package internal 5 | 6 | import ( 7 | "net" 8 | 9 | "github.com/Microsoft/go-winio" 10 | ) 11 | 12 | func connectToPipe(ipcSocketPath string) (net.Conn, error) { 13 | conn, err := winio.DialPipe(ipcSocketPath, nil) 14 | if err != nil { 15 | return nil, err 16 | } 17 | return conn, nil 18 | } 19 | -------------------------------------------------------------------------------- /package.nix: -------------------------------------------------------------------------------- 1 | { 2 | buildGoModule, 3 | lib, 4 | makeBinaryWrapper, 5 | mpv, 6 | rofi, 7 | ueberzugpp, 8 | withMpv ? true, 9 | withRofi ? false, 10 | withUeberzugpp ? false, 11 | }: let 12 | inherit (lib) optional optionalString; 13 | 14 | path = 15 | optional withMpv mpv 16 | ++ optional withRofi rofi 17 | ++ optional withUeberzugpp ueberzugpp; 18 | in 19 | buildGoModule { 20 | pname = "curd"; 21 | version = builtins.readFile ./VERSION.txt; 22 | 23 | src = lib.fileset.toSource { 24 | root = ./.; 25 | fileset = lib.fileset.unions [ 26 | ./cmd 27 | ./internal 28 | ./vendor 29 | 30 | ./go.mod 31 | ./go.sum 32 | ]; 33 | }; 34 | 35 | nativeBuildInputs = [makeBinaryWrapper]; 36 | vendorHash = null; 37 | 38 | postFixup = optionalString (builtins.length path > 0) '' 39 | wrapProgram $out/bin/curd --prefix PATH : ${lib.makeBinPath path} 40 | ''; 41 | 42 | meta = { 43 | description = "Watch anime in CLI with AniList Tracking, Discord RPC, and automatic intro/outro skipping"; 44 | homepage = "https://github.com/Wraient/curd"; 45 | license = lib.licenses.gpl3; 46 | platforms = lib.platforms.unix; 47 | maintainers = [lib.maintainers.diniamo]; 48 | mainProgram = "curd"; 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /rofi/userinput.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | font: "Sans 12"; 3 | } 4 | 5 | * { 6 | background-color: rgba(0, 0, 0, 0.7); 7 | text-color: #FFFFFF; 8 | } 9 | 10 | window { 11 | fullscreen: true; 12 | transparency: "real"; 13 | background-color: transparent; 14 | } 15 | 16 | mainbox { 17 | children: [ message, listview, inputbar ]; 18 | padding: 40% 30%; 19 | background-color: transparent; 20 | } 21 | 22 | message { 23 | border: 0; 24 | padding: 10px; 25 | border-radius:20px; 26 | margin: 0 0 20px 0; 27 | font: "Sans Bold 24"; /* Increased font size and made it bold */ 28 | } 29 | 30 | inputbar { 31 | children: [ prompt, entry ]; 32 | background-color: rgba(255, 255, 255, 0.1); 33 | padding: 8px; 34 | border-radius: 4px; 35 | } 36 | 37 | prompt { 38 | padding: 8px; 39 | } 40 | 41 | entry { 42 | padding: 8px; 43 | background-color: transparent; 44 | } 45 | 46 | listview { 47 | lines: 0; 48 | } 49 | 50 | /* Style for the message text specifically */ 51 | textbox { 52 | horizontal-align: 0.5; /* Center the text */ 53 | font: "Sans Bold 24"; /* Match message font */ 54 | background-color: transparent; 55 | } 56 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @microsoft/containerplat 2 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Microsoft 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/doc.go: -------------------------------------------------------------------------------- 1 | // This package provides utilities for efficiently performing Win32 IO operations in Go. 2 | // Currently, this package is provides support for genreal IO and management of 3 | // - named pipes 4 | // - files 5 | // - [Hyper-V sockets] 6 | // 7 | // This code is similar to Go's [net] package, and uses IO completion ports to avoid 8 | // blocking IO on system threads, allowing Go to reuse the thread to schedule other goroutines. 9 | // 10 | // This limits support to Windows Vista and newer operating systems. 11 | // 12 | // Additionally, this package provides support for: 13 | // - creating and managing GUIDs 14 | // - writing to [ETW] 15 | // - opening and manageing VHDs 16 | // - parsing [Windows Image files] 17 | // - auto-generating Win32 API code 18 | // 19 | // [Hyper-V sockets]: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service 20 | // [ETW]: https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/event-tracing-for-windows--etw- 21 | // [Windows Image files]: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/work-with-windows-images 22 | package winio 23 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/internal/fs/doc.go: -------------------------------------------------------------------------------- 1 | // This package contains Win32 filesystem functionality. 2 | package fs 3 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/internal/fs/security.go: -------------------------------------------------------------------------------- 1 | package fs 2 | 3 | // https://learn.microsoft.com/en-us/windows/win32/api/winnt/ne-winnt-security_impersonation_level 4 | type SecurityImpersonationLevel int32 // C default enums underlying type is `int`, which is Go `int32` 5 | 6 | // Impersonation levels 7 | const ( 8 | SecurityAnonymous SecurityImpersonationLevel = 0 9 | SecurityIdentification SecurityImpersonationLevel = 1 10 | SecurityImpersonation SecurityImpersonationLevel = 2 11 | SecurityDelegation SecurityImpersonationLevel = 3 12 | ) 13 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/internal/socket/rawaddr.go: -------------------------------------------------------------------------------- 1 | package socket 2 | 3 | import ( 4 | "unsafe" 5 | ) 6 | 7 | // RawSockaddr allows structs to be used with [Bind] and [ConnectEx]. The 8 | // struct must meet the Win32 sockaddr requirements specified here: 9 | // https://docs.microsoft.com/en-us/windows/win32/winsock/sockaddr-2 10 | // 11 | // Specifically, the struct size must be least larger than an int16 (unsigned short) 12 | // for the address family. 13 | type RawSockaddr interface { 14 | // Sockaddr returns a pointer to the RawSockaddr and its struct size, allowing 15 | // for the RawSockaddr's data to be overwritten by syscalls (if necessary). 16 | // 17 | // It is the callers responsibility to validate that the values are valid; invalid 18 | // pointers or size can cause a panic. 19 | Sockaddr() (unsafe.Pointer, int32, error) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/pkg/guid/guid_nonwindows.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package guid 5 | 6 | // GUID represents a GUID/UUID. It has the same structure as 7 | // golang.org/x/sys/windows.GUID so that it can be used with functions expecting 8 | // that type. It is defined as its own type as that is only available to builds 9 | // targeted at `windows`. The representation matches that used by native Windows 10 | // code. 11 | type GUID struct { 12 | Data1 uint32 13 | Data2 uint16 14 | Data3 uint16 15 | Data4 [8]byte 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/pkg/guid/guid_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package guid 5 | 6 | import "golang.org/x/sys/windows" 7 | 8 | // GUID represents a GUID/UUID. It has the same structure as 9 | // golang.org/x/sys/windows.GUID so that it can be used with functions expecting 10 | // that type. It is defined as its own type so that stringification and 11 | // marshaling can be supported. The representation matches that used by native 12 | // Windows code. 13 | type GUID windows.GUID 14 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/pkg/guid/variant_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=Variant -trimprefix=Variant -linecomment"; DO NOT EDIT. 2 | 3 | package guid 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[VariantUnknown-0] 12 | _ = x[VariantNCS-1] 13 | _ = x[VariantRFC4122-2] 14 | _ = x[VariantMicrosoft-3] 15 | _ = x[VariantFuture-4] 16 | } 17 | 18 | const _Variant_name = "UnknownNCSRFC 4122MicrosoftFuture" 19 | 20 | var _Variant_index = [...]uint8{0, 7, 10, 18, 27, 33} 21 | 22 | func (i Variant) String() string { 23 | if i >= Variant(len(_Variant_index)-1) { 24 | return "Variant(" + strconv.FormatInt(int64(i), 10) + ")" 25 | } 26 | return _Variant_name[_Variant_index[i]:_Variant_index[i+1]] 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/syscall.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | 3 | package winio 4 | 5 | //go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go ./*.go 6 | -------------------------------------------------------------------------------- /vendor/github.com/aymanbagabas/go-osc52/v2/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Ayman Bagabas 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/bubbletea/.gitattributes: -------------------------------------------------------------------------------- 1 | *.golden -text 2 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/bubbletea/.golangci-soft.yml: -------------------------------------------------------------------------------- 1 | run: 2 | tests: false 3 | issues-exit-code: 0 4 | 5 | issues: 6 | include: 7 | - EXC0001 8 | - EXC0005 9 | - EXC0011 10 | - EXC0012 11 | - EXC0013 12 | 13 | max-issues-per-linter: 0 14 | max-same-issues: 0 15 | 16 | linters: 17 | enable: 18 | - exhaustive 19 | - goconst 20 | - godot 21 | - godox 22 | - mnd 23 | - gomoddirectives 24 | - goprintffuncname 25 | - misspell 26 | - nakedret 27 | - nestif 28 | - noctx 29 | - nolintlint 30 | - prealloc 31 | - wrapcheck 32 | 33 | # disable default linters, they are already enabled in .golangci.yml 34 | disable: 35 | - errcheck 36 | - gosimple 37 | - govet 38 | - ineffassign 39 | - staticcheck 40 | - unused 41 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/bubbletea/.golangci.yml: -------------------------------------------------------------------------------- 1 | run: 2 | tests: false 3 | 4 | issues: 5 | include: 6 | - EXC0001 7 | - EXC0005 8 | - EXC0011 9 | - EXC0012 10 | - EXC0013 11 | 12 | max-issues-per-linter: 0 13 | max-same-issues: 0 14 | 15 | linters: 16 | enable: 17 | - bodyclose 18 | - gofumpt 19 | - goimports 20 | - gosec 21 | - nilerr 22 | - revive 23 | - rowserrcheck 24 | - sqlclosecheck 25 | - tparallel 26 | - unconvert 27 | - unparam 28 | - whitespace 29 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/bubbletea/.goreleaser.yml: -------------------------------------------------------------------------------- 1 | # yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json 2 | version: 2 3 | includes: 4 | - from_url: 5 | url: charmbracelet/meta/main/goreleaser-lib.yaml 6 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/bubbletea/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020-2023 Charmbracelet, Inc 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/bubbletea/focus.go: -------------------------------------------------------------------------------- 1 | package tea 2 | 3 | // FocusMsg represents a terminal focus message. 4 | // This occurs when the terminal gains focus. 5 | type FocusMsg struct{} 6 | 7 | // BlurMsg represents a terminal blur message. 8 | // This occurs when the terminal loses focus. 9 | type BlurMsg struct{} 10 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/bubbletea/inputreader_other.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package tea 5 | 6 | import ( 7 | "io" 8 | 9 | "github.com/muesli/cancelreader" 10 | ) 11 | 12 | func newInputReader(r io.Reader) (cancelreader.CancelReader, error) { 13 | return cancelreader.NewReader(r) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/bubbletea/key_other.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package tea 5 | 6 | import ( 7 | "context" 8 | "io" 9 | ) 10 | 11 | func readInputs(ctx context.Context, msgs chan<- Msg, input io.Reader) error { 12 | return readAnsiInputs(ctx, msgs, input) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/bubbletea/nil_renderer.go: -------------------------------------------------------------------------------- 1 | package tea 2 | 3 | type nilRenderer struct{} 4 | 5 | func (n nilRenderer) start() {} 6 | func (n nilRenderer) stop() {} 7 | func (n nilRenderer) kill() {} 8 | func (n nilRenderer) write(_ string) {} 9 | func (n nilRenderer) repaint() {} 10 | func (n nilRenderer) clearScreen() {} 11 | func (n nilRenderer) altScreen() bool { return false } 12 | func (n nilRenderer) enterAltScreen() {} 13 | func (n nilRenderer) exitAltScreen() {} 14 | func (n nilRenderer) showCursor() {} 15 | func (n nilRenderer) hideCursor() {} 16 | func (n nilRenderer) enableMouseCellMotion() {} 17 | func (n nilRenderer) disableMouseCellMotion() {} 18 | func (n nilRenderer) enableMouseAllMotion() {} 19 | func (n nilRenderer) disableMouseAllMotion() {} 20 | func (n nilRenderer) enableBracketedPaste() {} 21 | func (n nilRenderer) disableBracketedPaste() {} 22 | func (n nilRenderer) enableMouseSGRMode() {} 23 | func (n nilRenderer) disableMouseSGRMode() {} 24 | func (n nilRenderer) bracketedPasteActive() bool { return false } 25 | func (n nilRenderer) setWindowTitle(_ string) {} 26 | func (n nilRenderer) reportFocus() bool { return false } 27 | func (n nilRenderer) enableReportFocus() {} 28 | func (n nilRenderer) disableReportFocus() {} 29 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/bubbletea/signals_unix.go: -------------------------------------------------------------------------------- 1 | //go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || aix || zos 2 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris aix zos 3 | 4 | package tea 5 | 6 | import ( 7 | "os" 8 | "os/signal" 9 | "syscall" 10 | ) 11 | 12 | // listenForResize sends messages (or errors) when the terminal resizes. 13 | // Argument output should be the file descriptor for the terminal; usually 14 | // os.Stdout. 15 | func (p *Program) listenForResize(done chan struct{}) { 16 | sig := make(chan os.Signal, 1) 17 | signal.Notify(sig, syscall.SIGWINCH) 18 | 19 | defer func() { 20 | signal.Stop(sig) 21 | close(done) 22 | }() 23 | 24 | for { 25 | select { 26 | case <-p.ctx.Done(): 27 | return 28 | case <-sig: 29 | } 30 | 31 | p.checkResize() 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/bubbletea/signals_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package tea 5 | 6 | // listenForResize is not available on windows because windows does not 7 | // implement syscall.SIGWINCH. 8 | func (p *Program) listenForResize(done chan struct{}) { 9 | close(done) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/bubbletea/tea_init.go: -------------------------------------------------------------------------------- 1 | package tea 2 | 3 | import ( 4 | "github.com/charmbracelet/lipgloss" 5 | ) 6 | 7 | func init() { 8 | // XXX: This is a workaround to make assure that Lip Gloss and Termenv 9 | // query the terminal before any Bubble Tea Program runs and acquires the 10 | // terminal. Without this, Programs that use Lip Gloss/Termenv might hang 11 | // while waiting for a a [termenv.OSCTimeout] while querying the terminal 12 | // for its background/foreground colors. 13 | // 14 | // This happens because Bubble Tea acquires the terminal before termenv 15 | // reads any responses. 16 | // 17 | // Note that this will only affect programs running on the default IO i.e. 18 | // [os.Stdout] and [os.Stdin]. 19 | // 20 | // This workaround will be removed in v2. 21 | _ = lipgloss.HasDarkBackground() 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/bubbletea/tty_unix.go: -------------------------------------------------------------------------------- 1 | //go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || aix || zos 2 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris aix zos 3 | 4 | package tea 5 | 6 | import ( 7 | "fmt" 8 | "os" 9 | "os/signal" 10 | "syscall" 11 | 12 | "github.com/charmbracelet/x/term" 13 | ) 14 | 15 | func (p *Program) initInput() (err error) { 16 | // Check if input is a terminal 17 | if f, ok := p.input.(term.File); ok && term.IsTerminal(f.Fd()) { 18 | p.ttyInput = f 19 | p.previousTtyInputState, err = term.MakeRaw(p.ttyInput.Fd()) 20 | if err != nil { 21 | return fmt.Errorf("error entering raw mode: %w", err) 22 | } 23 | } 24 | 25 | if f, ok := p.output.(term.File); ok && term.IsTerminal(f.Fd()) { 26 | p.ttyOutput = f 27 | } 28 | 29 | return nil 30 | } 31 | 32 | func openInputTTY() (*os.File, error) { 33 | f, err := os.Open("/dev/tty") 34 | if err != nil { 35 | return nil, fmt.Errorf("could not open a new TTY: %w", err) 36 | } 37 | return f, nil 38 | } 39 | 40 | const suspendSupported = true 41 | 42 | // Send SIGTSTP to the entire process group. 43 | func suspendProcess() { 44 | c := make(chan os.Signal, 1) 45 | signal.Notify(c, syscall.SIGCONT) 46 | _ = syscall.Kill(0, syscall.SIGTSTP) 47 | // blocks until a CONT happens... 48 | <-c 49 | } 50 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/lipgloss/.golangci-soft.yml: -------------------------------------------------------------------------------- 1 | run: 2 | tests: false 3 | 4 | issues: 5 | include: 6 | - EXC0001 7 | - EXC0005 8 | - EXC0011 9 | - EXC0012 10 | - EXC0013 11 | 12 | max-issues-per-linter: 0 13 | max-same-issues: 0 14 | 15 | linters: 16 | enable: 17 | - exhaustive 18 | - goconst 19 | - godot 20 | - godox 21 | - mnd 22 | - gomoddirectives 23 | - goprintffuncname 24 | - misspell 25 | - nakedret 26 | - nestif 27 | - noctx 28 | - nolintlint 29 | - prealloc 30 | - wrapcheck 31 | 32 | # disable default linters, they are already enabled in .golangci.yml 33 | disable: 34 | - errcheck 35 | - gosimple 36 | - govet 37 | - ineffassign 38 | - staticcheck 39 | - typecheck 40 | - unused 41 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/lipgloss/.golangci.yml: -------------------------------------------------------------------------------- 1 | run: 2 | tests: false 3 | 4 | issues: 5 | include: 6 | - EXC0001 7 | - EXC0005 8 | - EXC0011 9 | - EXC0012 10 | - EXC0013 11 | 12 | max-issues-per-linter: 0 13 | max-same-issues: 0 14 | 15 | linters: 16 | enable: 17 | - bodyclose 18 | - gofumpt 19 | - goimports 20 | - gosec 21 | - nilerr 22 | - revive 23 | - rowserrcheck 24 | - sqlclosecheck 25 | - tparallel 26 | - unconvert 27 | - unparam 28 | - whitespace 29 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/lipgloss/.goreleaser.yml: -------------------------------------------------------------------------------- 1 | includes: 2 | - from_url: 3 | url: charmbracelet/meta/main/goreleaser-lib.yaml 4 | # yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json 5 | 6 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/lipgloss/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021-2023 Charmbracelet, Inc 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/lipgloss/ansi_unix.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package lipgloss 5 | 6 | // enableLegacyWindowsANSI is only needed on Windows. 7 | func enableLegacyWindowsANSI() {} 8 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/lipgloss/ansi_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package lipgloss 5 | 6 | import ( 7 | "sync" 8 | 9 | "github.com/muesli/termenv" 10 | ) 11 | 12 | var enableANSI sync.Once 13 | 14 | // enableANSIColors enables support for ANSI color sequences in the Windows 15 | // default console (cmd.exe and the PowerShell application). Note that this 16 | // only works with Windows 10. Also note that Windows Terminal supports colors 17 | // by default. 18 | func enableLegacyWindowsANSI() { 19 | enableANSI.Do(func() { 20 | _, _ = termenv.EnableWindowsANSIConsole() 21 | }) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/lipgloss/runes.go: -------------------------------------------------------------------------------- 1 | package lipgloss 2 | 3 | import ( 4 | "strings" 5 | ) 6 | 7 | // StyleRunes apply a given style to runes at the given indices in the string. 8 | // Note that you must provide styling options for both matched and unmatched 9 | // runes. Indices out of bounds will be ignored. 10 | func StyleRunes(str string, indices []int, matched, unmatched Style) string { 11 | // Convert slice of indices to a map for easier lookups 12 | m := make(map[int]struct{}) 13 | for _, i := range indices { 14 | m[i] = struct{}{} 15 | } 16 | 17 | var ( 18 | out strings.Builder 19 | group strings.Builder 20 | style Style 21 | runes = []rune(str) 22 | ) 23 | 24 | for i, r := range runes { 25 | group.WriteRune(r) 26 | 27 | _, matches := m[i] 28 | _, nextMatches := m[i+1] 29 | 30 | if matches != nextMatches || i == len(runes)-1 { 31 | // Flush 32 | if matches { 33 | style = matched 34 | } else { 35 | style = unmatched 36 | } 37 | out.WriteString(style.Render(group.String())) 38 | group.Reset() 39 | } 40 | } 41 | 42 | return out.String() 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/lipgloss/size.go: -------------------------------------------------------------------------------- 1 | package lipgloss 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/charmbracelet/x/ansi" 7 | ) 8 | 9 | // Width returns the cell width of characters in the string. ANSI sequences are 10 | // ignored and characters wider than one cell (such as Chinese characters and 11 | // emojis) are appropriately measured. 12 | // 13 | // You should use this instead of len(string) len([]rune(string) as neither 14 | // will give you accurate results. 15 | func Width(str string) (width int) { 16 | for _, l := range strings.Split(str, "\n") { 17 | w := ansi.StringWidth(l) 18 | if w > width { 19 | width = w 20 | } 21 | } 22 | 23 | return width 24 | } 25 | 26 | // Height returns height of a string in cells. This is done simply by 27 | // counting \n characters. If your strings use \r\n for newlines you should 28 | // convert them to \n first, or simply write a separate function for measuring 29 | // height. 30 | func Height(str string) int { 31 | return strings.Count(str, "\n") + 1 32 | } 33 | 34 | // Size returns the width and height of the string in cells. ANSI sequences are 35 | // ignored and characters wider than one cell (such as Chinese characters and 36 | // emojis) are appropriately measured. 37 | func Size(str string) (width, height int) { 38 | width = Width(str) 39 | height = Height(str) 40 | return width, height 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/ansi/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Charmbracelet, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/ansi/ansi.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | import "io" 4 | 5 | // Execute is a function that "execute" the given escape sequence by writing it 6 | // to the provided output writter. 7 | // 8 | // This is a syntactic sugar over [io.WriteString]. 9 | func Execute(w io.Writer, s string) (int, error) { 10 | return io.WriteString(w, s) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/ansi/ascii.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | const ( 4 | // SP is the space character (Char: \x20). 5 | SP = 0x20 6 | // DEL is the delete character (Caret: ^?, Char: \x7f). 7 | DEL = 0x7F 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/ansi/cwd.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | import ( 4 | "net/url" 5 | "path" 6 | ) 7 | 8 | // NotifyWorkingDirectory returns a sequence that notifies the terminal 9 | // of the current working directory. 10 | // 11 | // OSC 7 ; Pt BEL 12 | // 13 | // Where Pt is a URL in the format "file://[host]/[path]". 14 | // Set host to "localhost" if this is a path on the local computer. 15 | // 16 | // See: https://wezfurlong.org/wezterm/shell-integration.html#osc-7-escape-sequence-to-set-the-working-directory 17 | // See: https://iterm2.com/documentation-escape-codes.html#:~:text=RemoteHost%20and%20CurrentDir%3A-,OSC%207,-%3B%20%5BPs%5D%20ST 18 | func NotifyWorkingDirectory(host string, paths ...string) string { 19 | path := path.Join(paths...) 20 | u := &url.URL{ 21 | Scheme: "file", 22 | Host: host, 23 | Path: path, 24 | } 25 | return "\x1b]7;" + u.String() + "\x07" 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/ansi/doc.go: -------------------------------------------------------------------------------- 1 | // Package ansi defines common ANSI escape sequences based on the ECMA-48 2 | // specs. 3 | // 4 | // All sequences use 7-bit C1 control codes, which are supported by most 5 | // terminal emulators. OSC sequences are terminated by a BEL for wider 6 | // compatibility with terminals. 7 | package ansi 8 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/ansi/focus.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | // Focus is an escape sequence to notify the terminal that it has focus. 4 | // This is used with [FocusEventMode]. 5 | const Focus = "\x1b[I" 6 | 7 | // Blur is an escape sequence to notify the terminal that it has lost focus. 8 | // This is used with [FocusEventMode]. 9 | const Blur = "\x1b[O" 10 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/ansi/hyperlink.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | import "strings" 4 | 5 | // SetHyperlink returns a sequence for starting a hyperlink. 6 | // 7 | // OSC 8 ; Params ; Uri ST 8 | // OSC 8 ; Params ; Uri BEL 9 | // 10 | // To reset the hyperlink, omit the URI. 11 | // 12 | // See: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda 13 | func SetHyperlink(uri string, params ...string) string { 14 | var p string 15 | if len(params) > 0 { 16 | p = strings.Join(params, ":") 17 | } 18 | return "\x1b]8;" + p + ";" + uri + "\x07" 19 | } 20 | 21 | // ResetHyperlink returns a sequence for resetting the hyperlink. 22 | // 23 | // This is equivalent to SetHyperlink("", params...). 24 | // 25 | // See: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda 26 | func ResetHyperlink(params ...string) string { 27 | return SetHyperlink("", params...) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/ansi/iterm2.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | import "fmt" 4 | 5 | // ITerm2 returns a sequence that uses the iTerm2 proprietary protocol. Use the 6 | // iterm2 package for a more convenient API. 7 | // 8 | // OSC 1337 ; key = value ST 9 | // 10 | // Example: 11 | // 12 | // ITerm2(iterm2.File{...}) 13 | // 14 | // See https://iterm2.com/documentation-escape-codes.html 15 | // See https://iterm2.com/documentation-images.html 16 | func ITerm2(data any) string { 17 | return "\x1b]1337;" + fmt.Sprint(data) + "\x07" 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/ansi/keypad.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | // Keypad Application Mode (DECKPAM) is a mode that determines whether the 4 | // keypad sends application sequences or ANSI sequences. 5 | // 6 | // This works like enabling [DECNKM]. 7 | // Use [NumericKeypadMode] to set the numeric keypad mode. 8 | // 9 | // ESC = 10 | // 11 | // See: https://vt100.net/docs/vt510-rm/DECKPAM.html 12 | const ( 13 | KeypadApplicationMode = "\x1b=" 14 | DECKPAM = KeypadApplicationMode 15 | ) 16 | 17 | // Keypad Numeric Mode (DECKPNM) is a mode that determines whether the keypad 18 | // sends application sequences or ANSI sequences. 19 | // 20 | // This works the same as disabling [DECNKM]. 21 | // 22 | // ESC > 23 | // 24 | // See: https://vt100.net/docs/vt510-rm/DECKPNM.html 25 | const ( 26 | KeypadNumericMode = "\x1b>" 27 | DECKPNM = KeypadNumericMode 28 | ) 29 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/ansi/notification.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | // Notify sends a desktop notification using iTerm's OSC 9. 4 | // 5 | // OSC 9 ; Mc ST 6 | // OSC 9 ; Mc BEL 7 | // 8 | // Where Mc is the notification body. 9 | // 10 | // See: https://iterm2.com/documentation-escape-codes.html 11 | func Notify(s string) string { 12 | return "\x1b]9;" + s + "\x07" 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/ansi/parser_sync.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | import ( 4 | "sync" 5 | 6 | "github.com/charmbracelet/x/ansi/parser" 7 | ) 8 | 9 | var parserPool = sync.Pool{ 10 | New: func() any { 11 | p := NewParser() 12 | p.SetParamsSize(parser.MaxParamsSize) 13 | p.SetDataSize(1024 * 1024 * 4) // 4MB of data buffer 14 | return p 15 | }, 16 | } 17 | 18 | // GetParser returns a parser from a sync pool. 19 | func GetParser() *Parser { 20 | return parserPool.Get().(*Parser) 21 | } 22 | 23 | // PutParser returns a parser to a sync pool. The parser is reset 24 | // automatically. 25 | func PutParser(p *Parser) { 26 | p.Reset() 27 | p.dataLen = 0 28 | parserPool.Put(p) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/ansi/paste.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | // BracketedPasteStart is the control sequence to enable bracketed paste mode. 4 | const BracketedPasteStart = "\x1b[200~" 5 | 6 | // BracketedPasteEnd is the control sequence to disable bracketed paste mode. 7 | const BracketedPasteEnd = "\x1b[201~" 8 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/ansi/reset.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | // ResetInitialState (RIS) resets the terminal to its initial state. 4 | // 5 | // ESC c 6 | // 7 | // See: https://vt100.net/docs/vt510-rm/RIS.html 8 | const ( 9 | ResetInitialState = "\x1bc" 10 | RIS = ResetInitialState 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/ansi/termcap.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | import ( 4 | "encoding/hex" 5 | "strings" 6 | ) 7 | 8 | // RequestTermcap (XTGETTCAP) requests Termcap/Terminfo strings. 9 | // 10 | // DCS + q ST 11 | // 12 | // Where is a list of Termcap/Terminfo capabilities, encoded in 2-digit 13 | // hexadecimals, separated by semicolons. 14 | // 15 | // See: https://man7.org/linux/man-pages/man5/terminfo.5.html 16 | // See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands 17 | func XTGETTCAP(caps ...string) string { 18 | if len(caps) == 0 { 19 | return "" 20 | } 21 | 22 | s := "\x1bP+q" 23 | for i, c := range caps { 24 | if i > 0 { 25 | s += ";" 26 | } 27 | s += strings.ToUpper(hex.EncodeToString([]byte(c))) 28 | } 29 | 30 | return s + "\x1b\\" 31 | } 32 | 33 | // RequestTermcap is an alias for [XTGETTCAP]. 34 | func RequestTermcap(caps ...string) string { 35 | return XTGETTCAP(caps...) 36 | } 37 | 38 | // RequestTerminfo is an alias for [XTGETTCAP]. 39 | func RequestTerminfo(caps ...string) string { 40 | return XTGETTCAP(caps...) 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/ansi/title.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | // SetIconNameWindowTitle returns a sequence for setting the icon name and 4 | // window title. 5 | // 6 | // OSC 0 ; title ST 7 | // OSC 0 ; title BEL 8 | // 9 | // See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Operating-System-Commands 10 | func SetIconNameWindowTitle(s string) string { 11 | return "\x1b]0;" + s + "\x07" 12 | } 13 | 14 | // SetIconName returns a sequence for setting the icon name. 15 | // 16 | // OSC 1 ; title ST 17 | // OSC 1 ; title BEL 18 | // 19 | // See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Operating-System-Commands 20 | func SetIconName(s string) string { 21 | return "\x1b]1;" + s + "\x07" 22 | } 23 | 24 | // SetWindowTitle returns a sequence for setting the window title. 25 | // 26 | // OSC 2 ; title ST 27 | // OSC 2 ; title BEL 28 | // 29 | // See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Operating-System-Commands 30 | func SetWindowTitle(s string) string { 31 | return "\x1b]2;" + s + "\x07" 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/term/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Charmbracelet, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/term/term_other.go: -------------------------------------------------------------------------------- 1 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !zos && !windows && !solaris && !plan9 2 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!zos,!windows,!solaris,!plan9 3 | 4 | package term 5 | 6 | import ( 7 | "fmt" 8 | "runtime" 9 | ) 10 | 11 | type state struct{} 12 | 13 | func isTerminal(fd uintptr) bool { 14 | return false 15 | } 16 | 17 | func makeRaw(fd uintptr) (*State, error) { 18 | return nil, fmt.Errorf("terminal: MakeRaw not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 19 | } 20 | 21 | func getState(fd uintptr) (*State, error) { 22 | return nil, fmt.Errorf("terminal: GetState not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 23 | } 24 | 25 | func restore(fd uintptr, state *State) error { 26 | return fmt.Errorf("terminal: Restore not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 27 | } 28 | 29 | func getSize(fd uintptr) (width, height int, err error) { 30 | return 0, 0, fmt.Errorf("terminal: GetSize not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 31 | } 32 | 33 | func setState(fd uintptr, state *State) error { 34 | return fmt.Errorf("terminal: SetState not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 35 | } 36 | 37 | func readPassword(fd uintptr) ([]byte, error) { 38 | return nil, fmt.Errorf("terminal: ReadPassword not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/term/term_unix_bsd.go: -------------------------------------------------------------------------------- 1 | //go:build darwin || dragonfly || freebsd || netbsd || openbsd 2 | // +build darwin dragonfly freebsd netbsd openbsd 3 | 4 | package term 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ( 9 | ioctlReadTermios = unix.TIOCGETA 10 | ioctlWriteTermios = unix.TIOCSETA 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/term/term_unix_other.go: -------------------------------------------------------------------------------- 1 | //go:build aix || linux || solaris || zos 2 | // +build aix linux solaris zos 3 | 4 | package term 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ( 9 | ioctlReadTermios = unix.TCGETS 10 | ioctlWriteTermios = unix.TCSETS 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/term/terminal.go: -------------------------------------------------------------------------------- 1 | package term 2 | 3 | import ( 4 | "io" 5 | ) 6 | 7 | // File represents a file that has a file descriptor and can be read from, 8 | // written to, and closed. 9 | type File interface { 10 | io.ReadWriteCloser 11 | Fd() uintptr 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/x/term/util.go: -------------------------------------------------------------------------------- 1 | package term 2 | 3 | import ( 4 | "io" 5 | "runtime" 6 | ) 7 | 8 | // readPasswordLine reads from reader until it finds \n or io.EOF. 9 | // The slice returned does not include the \n. 10 | // readPasswordLine also ignores any \r it finds. 11 | // Windows uses \r as end of line. So, on Windows, readPasswordLine 12 | // reads until it finds \r and ignores any \n it finds during processing. 13 | func readPasswordLine(reader io.Reader) ([]byte, error) { 14 | var buf [1]byte 15 | var ret []byte 16 | 17 | for { 18 | n, err := reader.Read(buf[:]) 19 | if n > 0 { 20 | switch buf[0] { 21 | case '\b': 22 | if len(ret) > 0 { 23 | ret = ret[:len(ret)-1] 24 | } 25 | case '\n': 26 | if runtime.GOOS != "windows" { 27 | return ret, nil 28 | } 29 | // otherwise ignore \n 30 | case '\r': 31 | if runtime.GOOS == "windows" { 32 | return ret, nil 33 | } 34 | // otherwise ignore \r 35 | default: 36 | ret = append(ret, buf[0]) 37 | } 38 | continue 39 | } 40 | if err != nil { 41 | if err == io.EOF && len(ret) > 0 { 42 | return ret, nil 43 | } 44 | return ret, err 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /vendor/github.com/erikgeiser/coninput/.golangci.yml: -------------------------------------------------------------------------------- 1 | linters: 2 | enable-all: true 3 | disable: 4 | - golint 5 | - interfacer 6 | - scopelint 7 | - maligned 8 | - rowserrcheck 9 | - funlen 10 | - depguard 11 | - goerr113 12 | - exhaustivestruct 13 | - testpackage 14 | - gochecknoglobals 15 | - wrapcheck 16 | - forbidigo 17 | - ifshort 18 | - cyclop 19 | - gomoddirectives 20 | linters-settings: 21 | exhaustive: 22 | default-signifies-exhaustive: true 23 | issues: 24 | exclude-use-default: false 25 | -------------------------------------------------------------------------------- /vendor/github.com/erikgeiser/coninput/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Erik G. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/gen2brain/beeep/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017, Milan Nikolic 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /vendor/github.com/gen2brain/beeep/alert_darwin.go: -------------------------------------------------------------------------------- 1 | //go:build darwin && !linux && !freebsd && !netbsd && !openbsd && !windows && !js 2 | // +build darwin,!linux,!freebsd,!netbsd,!openbsd,!windows,!js 3 | 4 | package beeep 5 | 6 | import ( 7 | "fmt" 8 | "os/exec" 9 | ) 10 | 11 | // Alert displays a desktop notification and plays a default system sound. 12 | func Alert(title, message, appIcon string) error { 13 | osa, err := exec.LookPath("osascript") 14 | if err != nil { 15 | return err 16 | } 17 | 18 | script := fmt.Sprintf("display notification %q with title %q sound name \"default\"", message, title) 19 | cmd := exec.Command(osa, "-e", script) 20 | return cmd.Run() 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/gen2brain/beeep/alert_js.go: -------------------------------------------------------------------------------- 1 | //go:build js 2 | // +build js 3 | 4 | package beeep 5 | 6 | // Alert displays a desktop notification and plays a beep. 7 | func Alert(title, message, appIcon string) error { 8 | if err := Notify(title, message, appIcon); err != nil { 9 | return err 10 | } 11 | return Beep(DefaultFreq, DefaultDuration) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/gen2brain/beeep/alert_unix.go: -------------------------------------------------------------------------------- 1 | //go:build linux || freebsd || netbsd || openbsd || illumos 2 | // +build linux freebsd netbsd openbsd illumos 3 | 4 | package beeep 5 | 6 | // Alert displays a desktop notification and plays a beep. 7 | func Alert(title, message, appIcon string) error { 8 | if err := Notify(title, message, appIcon); err != nil { 9 | return err 10 | } 11 | return Beep(DefaultFreq, DefaultDuration) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/gen2brain/beeep/alert_unsupported.go: -------------------------------------------------------------------------------- 1 | //go:build !linux && !freebsd && !netbsd && !openbsd && !windows && !darwin && !illumos && !js 2 | // +build !linux,!freebsd,!netbsd,!openbsd,!windows,!darwin,!illumos,!js 3 | 4 | package beeep 5 | 6 | // Alert displays a desktop notification and plays a beep. 7 | func Alert(title, message, appIcon string) error { 8 | return ErrUnsupported 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/gen2brain/beeep/alert_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows && !linux && !freebsd && !netbsd && !openbsd && !darwin && !js 2 | // +build windows,!linux,!freebsd,!netbsd,!openbsd,!darwin,!js 3 | 4 | package beeep 5 | 6 | import ( 7 | toast "github.com/go-toast/toast" 8 | ) 9 | 10 | // Alert displays a desktop notification and plays a default system sound. 11 | func Alert(title, message, appIcon string) error { 12 | if isWindows10 { 13 | note := toastNotification(title, message, pathAbs(appIcon)) 14 | note.Audio = toast.Default 15 | return note.Push() 16 | } 17 | 18 | if err := Notify(title, message, appIcon); err != nil { 19 | return err 20 | } 21 | return Beep(DefaultFreq, DefaultDuration) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/gen2brain/beeep/beeep.go: -------------------------------------------------------------------------------- 1 | // Package beeep provides a cross-platform library for sending desktop notifications and beeps. 2 | package beeep 3 | 4 | import ( 5 | "errors" 6 | "path/filepath" 7 | "runtime" 8 | ) 9 | 10 | var ( 11 | // ErrUnsupported is returned when operating system is not supported. 12 | ErrUnsupported = errors.New("beeep: unsupported operating system: " + runtime.GOOS) 13 | ) 14 | 15 | func pathAbs(path string) string { 16 | var err error 17 | var abs string 18 | 19 | if path != "" { 20 | abs, err = filepath.Abs(path) 21 | if err != nil { 22 | abs = path 23 | } 24 | } 25 | 26 | return abs 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/gen2brain/beeep/beep_darwin.go: -------------------------------------------------------------------------------- 1 | //go:build darwin && !linux && !freebsd && !netbsd && !openbsd && !windows && !js 2 | // +build darwin,!linux,!freebsd,!netbsd,!openbsd,!windows,!js 3 | 4 | package beeep 5 | 6 | import ( 7 | "os" 8 | "os/exec" 9 | ) 10 | 11 | var ( 12 | // DefaultFreq - frequency, in Hz, middle A 13 | DefaultFreq = 0.0 14 | // DefaultDuration - duration in milliseconds 15 | DefaultDuration = 0 16 | ) 17 | 18 | // Beep beeps the PC speaker (https://en.wikipedia.org/wiki/PC_speaker). 19 | func Beep(freq float64, duration int) error { 20 | osa, err := exec.LookPath("osascript") 21 | if err != nil { 22 | // Output the only beep we can 23 | _, err = os.Stdout.Write([]byte{7}) 24 | return err 25 | } 26 | 27 | cmd := exec.Command(osa, "-e", `beep`) 28 | return cmd.Run() 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/gen2brain/beeep/beep_unsupported.go: -------------------------------------------------------------------------------- 1 | //go:build !linux && !freebsd && !netbsd && !openbsd && !windows && !darwin && !illumos && !js 2 | // +build !linux,!freebsd,!netbsd,!openbsd,!windows,!darwin,!illumos,!js 3 | 4 | package beeep 5 | 6 | var ( 7 | // DefaultFreq - frequency, in Hz, middle A 8 | DefaultFreq = 0.0 9 | // DefaultDuration - duration in milliseconds 10 | DefaultDuration = 0 11 | ) 12 | 13 | // Beep beeps the PC speaker (https://en.wikipedia.org/wiki/PC_speaker). 14 | func Beep(freq float64, duration int) error { 15 | return ErrUnsupported 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/gen2brain/beeep/beep_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows && !linux && !freebsd && !netbsd && !openbsd && !darwin && !js 2 | // +build windows,!linux,!freebsd,!netbsd,!openbsd,!darwin,!js 3 | 4 | package beeep 5 | 6 | import ( 7 | "syscall" 8 | ) 9 | 10 | var ( 11 | // DefaultFreq - frequency, in Hz, middle A 12 | DefaultFreq = 587.0 13 | // DefaultDuration - duration in milliseconds 14 | DefaultDuration = 500 15 | ) 16 | 17 | // Beep beeps the PC speaker (https://en.wikipedia.org/wiki/PC_speaker). 18 | func Beep(freq float64, duration int) error { 19 | if freq == 0 { 20 | freq = DefaultFreq 21 | } else if freq > 32767 { 22 | freq = 32767 23 | } else if freq < 37 { 24 | freq = DefaultFreq 25 | } 26 | 27 | if duration == 0 { 28 | duration = DefaultDuration 29 | } 30 | 31 | kernel32, _ := syscall.LoadLibrary("kernel32.dll") 32 | beep32, _ := syscall.GetProcAddress(kernel32, "Beep") 33 | 34 | defer syscall.FreeLibrary(kernel32) 35 | 36 | _, _, e := syscall.Syscall(uintptr(beep32), uintptr(2), uintptr(int(freq)), uintptr(duration), 0) 37 | if e != 0 { 38 | return e 39 | } 40 | 41 | return nil 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/gen2brain/beeep/notify_darwin.go: -------------------------------------------------------------------------------- 1 | //go:build darwin && !linux && !freebsd && !netbsd && !openbsd && !windows && !js 2 | // +build darwin,!linux,!freebsd,!netbsd,!openbsd,!windows,!js 3 | 4 | package beeep 5 | 6 | import ( 7 | "fmt" 8 | "os/exec" 9 | ) 10 | 11 | // Notify sends desktop notification. 12 | // 13 | // On macOS this executes AppleScript with `osascript` binary. 14 | func Notify(title, message, appIcon string) error { 15 | osa, err := exec.LookPath("osascript") 16 | if err != nil { 17 | return err 18 | } 19 | 20 | script := fmt.Sprintf("display notification %q with title %q", message, title) 21 | cmd := exec.Command(osa, "-e", script) 22 | return cmd.Run() 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/gen2brain/beeep/notify_js.go: -------------------------------------------------------------------------------- 1 | //go:build js 2 | // +build js 3 | 4 | package beeep 5 | 6 | import ( 7 | "syscall/js" 8 | ) 9 | 10 | // Notify sends desktop notification. 11 | // 12 | // On Web, in Firefox it just works, in Chrome you must call it from some "user gesture" like `onclick`, 13 | // and you must use TLS certificate, it doesn't work with plain http. 14 | func Notify(title, message, appIcon string) (err error) { 15 | defer func() { 16 | e := recover() 17 | 18 | if e == nil { 19 | return 20 | } 21 | 22 | if e, ok := e.(*js.Error); ok { 23 | err = e 24 | } else { 25 | panic(e) 26 | } 27 | }() 28 | 29 | n := js.Global().Get("Notification") 30 | 31 | opts := js.Global().Get("Object").Invoke() 32 | opts.Set("body", message) 33 | opts.Set("icon", pathAbs(appIcon)) 34 | 35 | if n.Get("permission").String() == "granted" { 36 | n.New(js.ValueOf(title), opts) 37 | } else { 38 | var f js.Func 39 | f = js.FuncOf(func(this js.Value, args []js.Value) interface{} { 40 | if args[0].String() == "granted" { 41 | n.New(js.ValueOf(title), opts) 42 | } 43 | f.Release() 44 | return nil 45 | }) 46 | 47 | n.Call("requestPermission", f) 48 | } 49 | 50 | return 51 | } 52 | -------------------------------------------------------------------------------- /vendor/github.com/gen2brain/beeep/notify_unix_nodbus.go: -------------------------------------------------------------------------------- 1 | //go:build (linux && nodbus) || (freebsd && nodbus) || (netbsd && nodbus) || (openbsd && nodbus) || illumos 2 | // +build linux,nodbus freebsd,nodbus netbsd,nodbus openbsd,nodbus illumos 3 | 4 | package beeep 5 | 6 | import ( 7 | "errors" 8 | "os/exec" 9 | ) 10 | 11 | // Notify sends desktop notification. 12 | func Notify(title, message, appIcon string) error { 13 | appIcon = pathAbs(appIcon) 14 | 15 | cmd := func() error { 16 | send, err := exec.LookPath("sw-notify-send") 17 | if err != nil { 18 | send, err = exec.LookPath("notify-send") 19 | if err != nil { 20 | return err 21 | } 22 | } 23 | 24 | c := exec.Command(send, title, message, "-i", appIcon) 25 | return c.Run() 26 | } 27 | 28 | knotify := func() error { 29 | send, err := exec.LookPath("kdialog") 30 | if err != nil { 31 | return err 32 | } 33 | c := exec.Command(send, "--title", title, "--passivepopup", message, "10", "--icon", appIcon) 34 | return c.Run() 35 | } 36 | 37 | err := cmd() 38 | if err != nil { 39 | e := knotify() 40 | if e != nil { 41 | return errors.New("beeep: " + err.Error() + "; " + e.Error()) 42 | } 43 | } 44 | 45 | return nil 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/gen2brain/beeep/notify_unsupported.go: -------------------------------------------------------------------------------- 1 | //go:build !linux && !freebsd && !netbsd && !openbsd && !windows && !darwin && !illumos && !js 2 | // +build !linux,!freebsd,!netbsd,!openbsd,!windows,!darwin,!illumos,!js 3 | 4 | package beeep 5 | 6 | // Notify sends desktop notification. 7 | func Notify(title, message, appIcon string) error { 8 | return ErrUnsupported 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/go-toast/toast/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Jacob Marshall 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /vendor/github.com/go-toast/toast/screenshot-action-centre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wraient/curd/5c9285060a189f7de29cfadc258cec5506260225/vendor/github.com/go-toast/toast/screenshot-action-centre.png -------------------------------------------------------------------------------- /vendor/github.com/go-toast/toast/screenshot-cli.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wraient/curd/5c9285060a189f7de29cfadc258cec5506260225/vendor/github.com/go-toast/toast/screenshot-cli.png -------------------------------------------------------------------------------- /vendor/github.com/go-toast/toast/screenshot-toast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wraient/curd/5c9285060a189f7de29cfadc258cec5506260225/vendor/github.com/go-toast/toast/screenshot-toast.png -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013, Georg Reinke (), Google 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Brandon Philips (@philips) 2 | Brian Waldon (@bcwaldon) 3 | John Southworth (@jsouthworth) 4 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/auth_anonymous.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | // AuthAnonymous returns an Auth that uses the ANONYMOUS mechanism. 4 | func AuthAnonymous() Auth { 5 | return &authAnonymous{} 6 | } 7 | 8 | type authAnonymous struct{} 9 | 10 | func (a *authAnonymous) FirstData() (name, resp []byte, status AuthStatus) { 11 | return []byte("ANONYMOUS"), nil, AuthOk 12 | } 13 | 14 | func (a *authAnonymous) HandleData(data []byte) (resp []byte, status AuthStatus) { 15 | return nil, AuthError 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/auth_external.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "encoding/hex" 5 | ) 6 | 7 | // AuthExternal returns an Auth that authenticates as the given user with the 8 | // EXTERNAL mechanism. 9 | func AuthExternal(user string) Auth { 10 | return authExternal{user} 11 | } 12 | 13 | // AuthExternal implements the EXTERNAL authentication mechanism. 14 | type authExternal struct { 15 | user string 16 | } 17 | 18 | func (a authExternal) FirstData() ([]byte, []byte, AuthStatus) { 19 | b := make([]byte, 2*len(a.user)) 20 | hex.Encode(b, []byte(a.user)) 21 | return []byte("EXTERNAL"), b, AuthOk 22 | } 23 | 24 | func (a authExternal) HandleData(b []byte) ([]byte, AuthStatus) { 25 | return nil, AuthError 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/conn_darwin.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | "os" 7 | "os/exec" 8 | ) 9 | 10 | const defaultSystemBusAddress = "unix:path=/opt/local/var/run/dbus/system_bus_socket" 11 | 12 | func getSessionBusPlatformAddress() (string, error) { 13 | cmd := exec.Command("launchctl", "getenv", "DBUS_LAUNCHD_SESSION_BUS_SOCKET") 14 | b, err := cmd.CombinedOutput() 15 | 16 | if err != nil { 17 | return "", err 18 | } 19 | 20 | if len(b) == 0 { 21 | return "", errors.New("dbus: couldn't determine address of session bus") 22 | } 23 | 24 | return "unix:path=" + string(b[:len(b)-1]), nil 25 | } 26 | 27 | func getSystemBusPlatformAddress() string { 28 | address := os.Getenv("DBUS_LAUNCHD_SESSION_BUS_SOCKET") 29 | if address != "" { 30 | return fmt.Sprintf("unix:path=%s", address) 31 | } 32 | return defaultSystemBusAddress 33 | } 34 | 35 | func tryDiscoverDbusSessionBusAddress() string { 36 | return "" 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/conn_unix.go: -------------------------------------------------------------------------------- 1 | //+build !windows,!solaris,!darwin 2 | 3 | package dbus 4 | 5 | import ( 6 | "os" 7 | ) 8 | 9 | const defaultSystemBusAddress = "unix:path=/var/run/dbus/system_bus_socket" 10 | 11 | func getSystemBusPlatformAddress() string { 12 | address := os.Getenv("DBUS_SYSTEM_BUS_ADDRESS") 13 | if address != "" { 14 | return address 15 | } 16 | return defaultSystemBusAddress 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/conn_windows.go: -------------------------------------------------------------------------------- 1 | //+build windows 2 | 3 | package dbus 4 | 5 | import "os" 6 | 7 | const defaultSystemBusAddress = "tcp:host=127.0.0.1,port=12434" 8 | 9 | func getSystemBusPlatformAddress() string { 10 | address := os.Getenv("DBUS_SYSTEM_BUS_ADDRESS") 11 | if address != "" { 12 | return address 13 | } 14 | return defaultSystemBusAddress 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/homedir.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "os" 5 | "os/user" 6 | ) 7 | 8 | // Get returns the home directory of the current user, which is usually the 9 | // value of HOME environment variable. In case it is not set or empty, os/user 10 | // package is used. 11 | // 12 | // If linking statically with cgo enabled against glibc, make sure the 13 | // osusergo build tag is used. 14 | // 15 | // If needing to do nss lookups, do not disable cgo or set osusergo. 16 | func getHomeDir() string { 17 | homeDir := os.Getenv("HOME") 18 | if homeDir != "" { 19 | return homeDir 20 | } 21 | if u, err := user.Current(); err == nil { 22 | return u.HomeDir 23 | } 24 | return "/" 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/sequence.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | // Sequence represents the value of a monotonically increasing counter. 4 | type Sequence uint64 5 | 6 | const ( 7 | // NoSequence indicates the absence of a sequence value. 8 | NoSequence Sequence = 0 9 | ) 10 | 11 | // sequenceGenerator represents a monotonically increasing counter. 12 | type sequenceGenerator struct { 13 | nextSequence Sequence 14 | } 15 | 16 | func (generator *sequenceGenerator) next() Sequence { 17 | result := generator.nextSequence 18 | generator.nextSequence++ 19 | return result 20 | } 21 | 22 | func newSequenceGenerator() *sequenceGenerator { 23 | return &sequenceGenerator{nextSequence: 1} 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/transport_darwin.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | func (t *unixTransport) SendNullByte() error { 4 | _, err := t.Write([]byte{0}) 5 | return err 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/transport_generic.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "encoding/binary" 5 | "errors" 6 | "io" 7 | "unsafe" 8 | ) 9 | 10 | var nativeEndian binary.ByteOrder 11 | 12 | func detectEndianness() binary.ByteOrder { 13 | var x uint32 = 0x01020304 14 | if *(*byte)(unsafe.Pointer(&x)) == 0x01 { 15 | return binary.BigEndian 16 | } 17 | return binary.LittleEndian 18 | } 19 | 20 | func init() { 21 | nativeEndian = detectEndianness() 22 | } 23 | 24 | type genericTransport struct { 25 | io.ReadWriteCloser 26 | } 27 | 28 | func (t genericTransport) SendNullByte() error { 29 | _, err := t.Write([]byte{0}) 30 | return err 31 | } 32 | 33 | func (t genericTransport) SupportsUnixFDs() bool { 34 | return false 35 | } 36 | 37 | func (t genericTransport) EnableUnixFDs() {} 38 | 39 | func (t genericTransport) ReadMessage() (*Message, error) { 40 | return DecodeMessage(t) 41 | } 42 | 43 | func (t genericTransport) SendMessage(msg *Message) error { 44 | fds, err := msg.CountFds() 45 | if err != nil { 46 | return err 47 | } 48 | if fds != 0 { 49 | return errors.New("dbus: unix fd passing not enabled") 50 | } 51 | return msg.EncodeTo(t, nativeEndian) 52 | } 53 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/transport_nonce_tcp.go: -------------------------------------------------------------------------------- 1 | //+build !windows 2 | 3 | package dbus 4 | 5 | import ( 6 | "errors" 7 | "io/ioutil" 8 | "net" 9 | ) 10 | 11 | func init() { 12 | transports["nonce-tcp"] = newNonceTcpTransport 13 | } 14 | 15 | func newNonceTcpTransport(keys string) (transport, error) { 16 | host := getKey(keys, "host") 17 | port := getKey(keys, "port") 18 | noncefile := getKey(keys, "noncefile") 19 | if host == "" || port == "" || noncefile == "" { 20 | return nil, errors.New("dbus: unsupported address (must set host, port and noncefile)") 21 | } 22 | protocol, err := tcpFamily(keys) 23 | if err != nil { 24 | return nil, err 25 | } 26 | socket, err := net.Dial(protocol, net.JoinHostPort(host, port)) 27 | if err != nil { 28 | return nil, err 29 | } 30 | b, err := ioutil.ReadFile(noncefile) 31 | if err != nil { 32 | return nil, err 33 | } 34 | _, err = socket.Write(b) 35 | if err != nil { 36 | return nil, err 37 | } 38 | return NewConn(socket) 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/transport_tcp.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "errors" 5 | "net" 6 | ) 7 | 8 | func init() { 9 | transports["tcp"] = newTcpTransport 10 | } 11 | 12 | func tcpFamily(keys string) (string, error) { 13 | switch getKey(keys, "family") { 14 | case "": 15 | return "tcp", nil 16 | case "ipv4": 17 | return "tcp4", nil 18 | case "ipv6": 19 | return "tcp6", nil 20 | default: 21 | return "", errors.New("dbus: invalid tcp family (must be ipv4 or ipv6)") 22 | } 23 | } 24 | 25 | func newTcpTransport(keys string) (transport, error) { 26 | host := getKey(keys, "host") 27 | port := getKey(keys, "port") 28 | if host == "" || port == "" { 29 | return nil, errors.New("dbus: unsupported address (must set host and port)") 30 | } 31 | 32 | protocol, err := tcpFamily(keys) 33 | if err != nil { 34 | return nil, err 35 | } 36 | socket, err := net.Dial(protocol, net.JoinHostPort(host, port)) 37 | if err != nil { 38 | return nil, err 39 | } 40 | return NewConn(socket) 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/transport_unixcred_linux.go: -------------------------------------------------------------------------------- 1 | // The UnixCredentials system call is currently only implemented on Linux 2 | // http://golang.org/src/pkg/syscall/sockcmsg_linux.go 3 | // https://golang.org/s/go1.4-syscall 4 | // http://code.google.com/p/go/source/browse/unix/sockcmsg_linux.go?repo=sys 5 | 6 | package dbus 7 | 8 | import ( 9 | "io" 10 | "os" 11 | "syscall" 12 | ) 13 | 14 | func (t *unixTransport) SendNullByte() error { 15 | ucred := &syscall.Ucred{Pid: int32(os.Getpid()), Uid: uint32(os.Getuid()), Gid: uint32(os.Getgid())} 16 | b := syscall.UnixCredentials(ucred) 17 | _, oobn, err := t.UnixConn.WriteMsgUnix([]byte{0}, b, nil) 18 | if err != nil { 19 | return err 20 | } 21 | if oobn != len(b) { 22 | return io.ErrShortWrite 23 | } 24 | return nil 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/transport_unixcred_netbsd.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import "io" 4 | 5 | func (t *unixTransport) SendNullByte() error { 6 | n, _, err := t.UnixConn.WriteMsgUnix([]byte{0}, nil, nil) 7 | if err != nil { 8 | return err 9 | } 10 | if n != 1 { 11 | return io.ErrShortWrite 12 | } 13 | return nil 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/transport_unixcred_openbsd.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import "io" 4 | 5 | func (t *unixTransport) SendNullByte() error { 6 | n, _, err := t.UnixConn.WriteMsgUnix([]byte{0}, nil, nil) 7 | if err != nil { 8 | return err 9 | } 10 | if n != 1 { 11 | return io.ErrShortWrite 12 | } 13 | return nil 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/transport_zos.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | func (t *unixTransport) SendNullByte() error { 4 | _, err := t.Write([]byte{0}) 5 | return err 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/hugolgst/rich-go/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018-present Hugo Lageneste 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/hugolgst/rich-go/ipc/ipc_notwin.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ipc 4 | 5 | import ( 6 | "net" 7 | "time" 8 | ) 9 | 10 | // OpenSocket opens the discord-ipc-0 unix socket 11 | func OpenSocket() error { 12 | sock, err := net.DialTimeout("unix", GetIpcPath()+"/discord-ipc-0", time.Second*2) 13 | if err != nil { 14 | return err 15 | } 16 | 17 | socket = sock 18 | return nil 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/hugolgst/rich-go/ipc/ipc_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ipc 4 | 5 | import ( 6 | npipe "gopkg.in/natefinch/npipe.v2" 7 | "time" 8 | ) 9 | 10 | // OpenSocket opens the discord-ipc-0 named pipe 11 | func OpenSocket() error { 12 | // Connect to the Windows named pipe, this is a well known name 13 | // We use DialTimeout since it will block forever (or very very long) on Windows 14 | // if the pipe is not available (Discord not running) 15 | sock, err := npipe.DialTimeout(`\\.\pipe\discord-ipc-0`, time.Second*2) 16 | if err != nil { 17 | return err 18 | } 19 | 20 | socket = sock 21 | return nil 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/lucasb-eyer/go-colorful/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Lucas Beyer 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /vendor/github.com/lucasb-eyer/go-colorful/happy_palettegen.go: -------------------------------------------------------------------------------- 1 | package colorful 2 | 3 | import ( 4 | "math/rand" 5 | ) 6 | 7 | // Uses the HSV color space to generate colors with similar S,V but distributed 8 | // evenly along their Hue. This is fast but not always pretty. 9 | // If you've got time to spare, use Lab (the non-fast below). 10 | func FastHappyPalette(colorsCount int) (colors []Color) { 11 | colors = make([]Color, colorsCount) 12 | 13 | for i := 0; i < colorsCount; i++ { 14 | colors[i] = Hsv(float64(i)*(360.0/float64(colorsCount)), 0.8+rand.Float64()*0.2, 0.65+rand.Float64()*0.2) 15 | } 16 | return 17 | } 18 | 19 | func HappyPalette(colorsCount int) ([]Color, error) { 20 | pimpy := func(l, a, b float64) bool { 21 | _, c, _ := LabToHcl(l, a, b) 22 | return 0.3 <= c && 0.4 <= l && l <= 0.8 23 | } 24 | return SoftPaletteEx(colorsCount, SoftPaletteSettings{pimpy, 50, true}) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/lucasb-eyer/go-colorful/warm_palettegen.go: -------------------------------------------------------------------------------- 1 | package colorful 2 | 3 | import ( 4 | "math/rand" 5 | ) 6 | 7 | // Uses the HSV color space to generate colors with similar S,V but distributed 8 | // evenly along their Hue. This is fast but not always pretty. 9 | // If you've got time to spare, use Lab (the non-fast below). 10 | func FastWarmPalette(colorsCount int) (colors []Color) { 11 | colors = make([]Color, colorsCount) 12 | 13 | for i := 0; i < colorsCount; i++ { 14 | colors[i] = Hsv(float64(i)*(360.0/float64(colorsCount)), 0.55+rand.Float64()*0.2, 0.35+rand.Float64()*0.2) 15 | } 16 | return 17 | } 18 | 19 | func WarmPalette(colorsCount int) ([]Color, error) { 20 | warmy := func(l, a, b float64) bool { 21 | _, c, _ := LabToHcl(l, a, b) 22 | return 0.1 <= c && c <= 0.4 && 0.2 <= l && l <= 0.5 23 | } 24 | return SoftPaletteEx(colorsCount, SoftPaletteSettings{warmy, 50, true}) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) Yasuhiro MATSUMOTO 2 | 3 | MIT License (Expat) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/doc.go: -------------------------------------------------------------------------------- 1 | // Package isatty implements interface to isatty 2 | package isatty 3 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/go.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -race -coverprofile=profile.out -covermode=atomic "$d" 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_bsd.go: -------------------------------------------------------------------------------- 1 | //go:build (darwin || freebsd || openbsd || netbsd || dragonfly || hurd) && !appengine && !tinygo 2 | // +build darwin freebsd openbsd netbsd dragonfly hurd 3 | // +build !appengine 4 | // +build !tinygo 5 | 6 | package isatty 7 | 8 | import "golang.org/x/sys/unix" 9 | 10 | // IsTerminal return true if the file descriptor is terminal. 11 | func IsTerminal(fd uintptr) bool { 12 | _, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA) 13 | return err == nil 14 | } 15 | 16 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 17 | // terminal. This is also always false on this environment. 18 | func IsCygwinTerminal(fd uintptr) bool { 19 | return false 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_others.go: -------------------------------------------------------------------------------- 1 | //go:build (appengine || js || nacl || tinygo || wasm) && !windows 2 | // +build appengine js nacl tinygo wasm 3 | // +build !windows 4 | 5 | package isatty 6 | 7 | // IsTerminal returns true if the file descriptor is terminal which 8 | // is always false on js and appengine classic which is a sandboxed PaaS. 9 | func IsTerminal(fd uintptr) bool { 10 | return false 11 | } 12 | 13 | // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 14 | // terminal. This is also always false on this environment. 15 | func IsCygwinTerminal(fd uintptr) bool { 16 | return false 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_plan9.go: -------------------------------------------------------------------------------- 1 | //go:build plan9 2 | // +build plan9 3 | 4 | package isatty 5 | 6 | import ( 7 | "syscall" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | func IsTerminal(fd uintptr) bool { 12 | path, err := syscall.Fd2path(int(fd)) 13 | if err != nil { 14 | return false 15 | } 16 | return path == "/dev/cons" || path == "/mnt/term/dev/cons" 17 | } 18 | 19 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 20 | // terminal. This is also always false on this environment. 21 | func IsCygwinTerminal(fd uintptr) bool { 22 | return false 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_solaris.go: -------------------------------------------------------------------------------- 1 | //go:build solaris && !appengine 2 | // +build solaris,!appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | // see: https://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libc/port/gen/isatty.c 12 | func IsTerminal(fd uintptr) bool { 13 | _, err := unix.IoctlGetTermio(int(fd), unix.TCGETA) 14 | return err == nil 15 | } 16 | 17 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 18 | // terminal. This is also always false on this environment. 19 | func IsCygwinTerminal(fd uintptr) bool { 20 | return false 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_tcgets.go: -------------------------------------------------------------------------------- 1 | //go:build (linux || aix || zos) && !appengine && !tinygo 2 | // +build linux aix zos 3 | // +build !appengine 4 | // +build !tinygo 5 | 6 | package isatty 7 | 8 | import "golang.org/x/sys/unix" 9 | 10 | // IsTerminal return true if the file descriptor is terminal. 11 | func IsTerminal(fd uintptr) bool { 12 | _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) 13 | return err == nil 14 | } 15 | 16 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 17 | // terminal. This is also always false on this environment. 18 | func IsCygwinTerminal(fd uintptr) bool { 19 | return false 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-localereader/localereader.go: -------------------------------------------------------------------------------- 1 | package localereader 2 | 3 | import ( 4 | "bytes" 5 | "io" 6 | ) 7 | 8 | func NewReader(r io.Reader) io.Reader { 9 | return newReader(r) 10 | } 11 | 12 | func UTF8(b []byte) ([]byte, error) { 13 | var buf bytes.Buffer 14 | n, err := io.Copy(&buf, newReader(bytes.NewReader(b))) 15 | if err != nil { 16 | return nil, err 17 | } 18 | return buf.Bytes()[:n], nil 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-localereader/localereader_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package localereader 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func newReader(r io.Reader) io.Reader { 10 | return r 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Yasuhiro Matsumoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_appengine.go: -------------------------------------------------------------------------------- 1 | //go:build appengine 2 | // +build appengine 3 | 4 | package runewidth 5 | 6 | // IsEastAsian return true if the current locale is CJK 7 | func IsEastAsian() bool { 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_js.go: -------------------------------------------------------------------------------- 1 | //go:build js && !appengine 2 | // +build js,!appengine 3 | 4 | package runewidth 5 | 6 | func IsEastAsian() bool { 7 | // TODO: Implement this for the web. Detect east asian in a compatible way, and return true. 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows && !appengine 2 | // +build windows,!appengine 3 | 4 | package runewidth 5 | 6 | import ( 7 | "syscall" 8 | ) 9 | 10 | var ( 11 | kernel32 = syscall.NewLazyDLL("kernel32") 12 | procGetConsoleOutputCP = kernel32.NewProc("GetConsoleOutputCP") 13 | ) 14 | 15 | // IsEastAsian return true if the current locale is CJK 16 | func IsEastAsian() bool { 17 | r1, _, _ := procGetConsoleOutputCP.Call() 18 | if r1 == 0 { 19 | return false 20 | } 21 | 22 | switch int(r1) { 23 | case 932, 51932, 936, 949, 950: 24 | return true 25 | } 26 | 27 | return false 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/ansi/.golangci.yml: -------------------------------------------------------------------------------- 1 | run: 2 | tests: false 3 | 4 | issues: 5 | max-issues-per-linter: 0 6 | max-same-issues: 0 7 | 8 | linters: 9 | enable: 10 | - bodyclose 11 | - dupl 12 | - exportloopref 13 | - goconst 14 | - godot 15 | - godox 16 | - goimports 17 | - golint 18 | - goprintffuncname 19 | - gosec 20 | - ifshort 21 | - misspell 22 | - prealloc 23 | - rowserrcheck 24 | - sqlclosecheck 25 | - unconvert 26 | - unparam 27 | - whitespace 28 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/ansi/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Christian Muehlhaeuser 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/ansi/ansi.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | const Marker = '\x1B' 4 | 5 | func IsTerminator(c rune) bool { 6 | return (c >= 0x40 && c <= 0x5a) || (c >= 0x61 && c <= 0x7a) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/ansi/buffer.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | import ( 4 | "bytes" 5 | 6 | "github.com/mattn/go-runewidth" 7 | ) 8 | 9 | // Buffer is a buffer aware of ANSI escape sequences. 10 | type Buffer struct { 11 | bytes.Buffer 12 | } 13 | 14 | // PrintableRuneWidth returns the cell width of all printable runes in the 15 | // buffer. 16 | func (w Buffer) PrintableRuneWidth() int { 17 | return PrintableRuneWidth(w.String()) 18 | } 19 | 20 | // PrintableRuneWidth returns the cell width of the given string. 21 | func PrintableRuneWidth(s string) int { 22 | var n int 23 | var ansi bool 24 | 25 | for _, c := range s { 26 | if c == Marker { 27 | // ANSI escape sequence 28 | ansi = true 29 | } else if ansi { 30 | if IsTerminator(c) { 31 | // ANSI sequence terminated 32 | ansi = false 33 | } 34 | } else { 35 | n += runewidth.RuneWidth(c) 36 | } 37 | } 38 | 39 | return n 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/cancelreader/.golangci-soft.yml: -------------------------------------------------------------------------------- 1 | run: 2 | tests: false 3 | 4 | issues: 5 | include: 6 | - EXC0001 7 | - EXC0005 8 | - EXC0011 9 | - EXC0012 10 | - EXC0013 11 | 12 | max-issues-per-linter: 0 13 | max-same-issues: 0 14 | 15 | linters: 16 | enable: 17 | # - dupl 18 | - exhaustive 19 | # - exhaustivestruct 20 | - goconst 21 | - godot 22 | - godox 23 | - gomnd 24 | - gomoddirectives 25 | - goprintffuncname 26 | - ifshort 27 | # - lll 28 | - misspell 29 | - nakedret 30 | - nestif 31 | - noctx 32 | - nolintlint 33 | - prealloc 34 | - wrapcheck 35 | 36 | # disable default linters, they are already enabled in .golangci.yml 37 | disable: 38 | - deadcode 39 | - errcheck 40 | - gosimple 41 | - govet 42 | - ineffassign 43 | - staticcheck 44 | - structcheck 45 | - typecheck 46 | - unused 47 | - varcheck 48 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/cancelreader/.golangci.yml: -------------------------------------------------------------------------------- 1 | run: 2 | tests: false 3 | 4 | issues: 5 | include: 6 | - EXC0001 7 | - EXC0005 8 | - EXC0011 9 | - EXC0012 10 | - EXC0013 11 | 12 | max-issues-per-linter: 0 13 | max-same-issues: 0 14 | 15 | linters: 16 | enable: 17 | - bodyclose 18 | - exportloopref 19 | - goimports 20 | - gosec 21 | - nilerr 22 | - predeclared 23 | - revive 24 | - rowserrcheck 25 | - sqlclosecheck 26 | - tparallel 27 | - unconvert 28 | - unparam 29 | - whitespace 30 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/cancelreader/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Erik Geiser and Christian Muehlhaeuser 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/cancelreader/cancelreader_default.go: -------------------------------------------------------------------------------- 1 | //go:build !darwin && !windows && !linux && !solaris && !freebsd && !netbsd && !openbsd && !dragonfly 2 | // +build !darwin,!windows,!linux,!solaris,!freebsd,!netbsd,!openbsd,!dragonfly 3 | 4 | package cancelreader 5 | 6 | import "io" 7 | 8 | // NewReader returns a fallbackCancelReader that satisfies the CancelReader but 9 | // does not actually support cancellation. 10 | func NewReader(reader io.Reader) (CancelReader, error) { 11 | return newFallbackCancelReader(reader) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/cancelreader/cancelreader_unix.go: -------------------------------------------------------------------------------- 1 | //go:build solaris 2 | // +build solaris 3 | 4 | package cancelreader 5 | 6 | import ( 7 | "io" 8 | ) 9 | 10 | // NewReader returns a reader and a cancel function. If the input reader is a 11 | // File, the cancel function can be used to interrupt a blocking read call. 12 | // In this case, the cancel function returns true if the call was canceled 13 | // successfully. If the input reader is not a File or the file descriptor 14 | // is 1024 or larger, the cancel function does nothing and always returns false. 15 | // The generic unix implementation is based on the posix select syscall. 16 | func NewReader(reader io.Reader) (CancelReader, error) { 17 | return newSelectCancelReader(reader) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/termenv/.golangci-soft.yml: -------------------------------------------------------------------------------- 1 | run: 2 | tests: false 3 | 4 | issues: 5 | include: 6 | - EXC0001 7 | - EXC0005 8 | - EXC0011 9 | - EXC0012 10 | - EXC0013 11 | 12 | max-issues-per-linter: 0 13 | max-same-issues: 0 14 | 15 | linters: 16 | enable: 17 | # - dupl 18 | - exhaustive 19 | # - exhaustivestruct 20 | - goconst 21 | - godot 22 | - godox 23 | - gomnd 24 | - gomoddirectives 25 | - goprintffuncname 26 | - ifshort 27 | # - lll 28 | - misspell 29 | - nakedret 30 | - nestif 31 | - noctx 32 | - nolintlint 33 | - prealloc 34 | - wrapcheck 35 | 36 | # disable default linters, they are already enabled in .golangci.yml 37 | disable: 38 | - deadcode 39 | - errcheck 40 | - gosimple 41 | - govet 42 | - ineffassign 43 | - staticcheck 44 | - structcheck 45 | - typecheck 46 | - unused 47 | - varcheck 48 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/termenv/.golangci.yml: -------------------------------------------------------------------------------- 1 | run: 2 | tests: false 3 | 4 | issues: 5 | include: 6 | - EXC0001 7 | - EXC0005 8 | - EXC0011 9 | - EXC0012 10 | - EXC0013 11 | 12 | max-issues-per-linter: 0 13 | max-same-issues: 0 14 | 15 | linters: 16 | enable: 17 | - bodyclose 18 | - exportloopref 19 | - goimports 20 | - gosec 21 | - nilerr 22 | - predeclared 23 | - revive 24 | - rowserrcheck 25 | - sqlclosecheck 26 | - tparallel 27 | - unconvert 28 | - unparam 29 | - whitespace 30 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/termenv/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Christian Muehlhaeuser 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/termenv/ansi_compat.md: -------------------------------------------------------------------------------- 1 | ## Change Foreground Color 2 | 3 | This command should enable a blue foreground color: 4 | 5 | ```bash 6 | echo -ne "\033]10;#0000ff\007" 7 | ``` 8 | 9 | ## Change Background Color 10 | 11 | This command should enable a green background color: 12 | 13 | ```bash 14 | echo -ne "\033]11;#00ff00\007" 15 | ``` 16 | 17 | ## Change Cursor Color 18 | 19 | This command should enable a red cursor color: 20 | 21 | ```bash 22 | echo -ne "\033]12;#ff0000\007" 23 | ``` 24 | 25 | ## Query Color Scheme 26 | 27 | These two commands should print out the currently active color scheme: 28 | 29 | ```bash 30 | echo -ne "\033]10;?\033\\" 31 | echo -ne "\033]11;?\033\\" 32 | ``` 33 | 34 | ## Query Cursor Position 35 | 36 | This command should print out the current cursor position: 37 | 38 | ```bash 39 | echo -ne "\033[6n" 40 | ``` 41 | 42 | ## Set Window Title 43 | 44 | This command should set the window title to "Test": 45 | 46 | ```bash 47 | echo -ne "\033]2;Test\007" && sleep 10 48 | ``` 49 | 50 | ## Bracketed paste 51 | 52 | Enter this command, then paste a word from the clipboard. The text 53 | displayed on the terminal should contain the codes `200~` and `201~`: 54 | 55 | ```bash 56 | echo -ne "\033[?2004h" && sleep 10 57 | ``` 58 | 59 | ## Trigger Notification 60 | 61 | This command should trigger a notification: 62 | 63 | ```bash 64 | echo -ne "\033]777;notify;Title;Body\033\\" 65 | ``` 66 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/termenv/constants_linux.go: -------------------------------------------------------------------------------- 1 | package termenv 2 | 3 | import "golang.org/x/sys/unix" 4 | 5 | const ( 6 | tcgetattr = unix.TCGETS 7 | tcsetattr = unix.TCSETS 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/termenv/constants_solaris.go: -------------------------------------------------------------------------------- 1 | package termenv 2 | 3 | import "golang.org/x/sys/unix" 4 | 5 | const ( 6 | tcgetattr = unix.TCGETS 7 | tcsetattr = unix.TCSETS 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/termenv/constants_unix.go: -------------------------------------------------------------------------------- 1 | //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && !solaris && !illumos 2 | // +build darwin dragonfly freebsd netbsd openbsd 3 | // +build !solaris 4 | // +build !illumos 5 | 6 | package termenv 7 | 8 | import "golang.org/x/sys/unix" 9 | 10 | const ( 11 | tcgetattr = unix.TIOCGETA 12 | tcsetattr = unix.TIOCSETA 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/termenv/copy.go: -------------------------------------------------------------------------------- 1 | package termenv 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/aymanbagabas/go-osc52/v2" 7 | ) 8 | 9 | // Copy copies text to clipboard using OSC 52 escape sequence. 10 | func (o Output) Copy(str string) { 11 | s := osc52.New(str) 12 | if strings.HasPrefix(o.environ.Getenv("TERM"), "screen") { 13 | s = s.Screen() 14 | } 15 | _, _ = s.WriteTo(o) 16 | } 17 | 18 | // CopyPrimary copies text to primary clipboard (X11) using OSC 52 escape 19 | // sequence. 20 | func (o Output) CopyPrimary(str string) { 21 | s := osc52.New(str).Primary() 22 | if strings.HasPrefix(o.environ.Getenv("TERM"), "screen") { 23 | s = s.Screen() 24 | } 25 | _, _ = s.WriteTo(o) 26 | } 27 | 28 | // Copy copies text to clipboard using OSC 52 escape sequence. 29 | func Copy(str string) { 30 | output.Copy(str) 31 | } 32 | 33 | // CopyPrimary copies text to primary clipboard (X11) using OSC 52 escape 34 | // sequence. 35 | func CopyPrimary(str string) { 36 | output.CopyPrimary(str) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/termenv/hyperlink.go: -------------------------------------------------------------------------------- 1 | package termenv 2 | 3 | // Hyperlink creates a hyperlink using OSC8. 4 | func Hyperlink(link, name string) string { 5 | return output.Hyperlink(link, name) 6 | } 7 | 8 | // Hyperlink creates a hyperlink using OSC8. 9 | func (o *Output) Hyperlink(link, name string) string { 10 | return OSC + "8;;" + link + ST + name + OSC + "8;;" + ST 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/termenv/notification.go: -------------------------------------------------------------------------------- 1 | package termenv 2 | 3 | // Notify triggers a notification using OSC777. 4 | func Notify(title, body string) { 5 | output.Notify(title, body) 6 | } 7 | 8 | // Notify triggers a notification using OSC777. 9 | func (o *Output) Notify(title, body string) { 10 | _, _ = o.WriteString(OSC + "777;notify;" + title + ";" + body + ST) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/termenv/termenv_other.go: -------------------------------------------------------------------------------- 1 | //go:build js || plan9 || aix 2 | // +build js plan9 aix 3 | 4 | package termenv 5 | 6 | import "io" 7 | 8 | // ColorProfile returns the supported color profile: 9 | // ANSI256 10 | func (o Output) ColorProfile() Profile { 11 | return ANSI256 12 | } 13 | 14 | func (o Output) foregroundColor() Color { 15 | // default gray 16 | return ANSIColor(7) 17 | } 18 | 19 | func (o Output) backgroundColor() Color { 20 | // default black 21 | return ANSIColor(0) 22 | } 23 | 24 | // EnableVirtualTerminalProcessing enables virtual terminal processing on 25 | // Windows for w and returns a function that restores w to its previous state. 26 | // On non-Windows platforms, or if w does not refer to a terminal, then it 27 | // returns a non-nil no-op function and no error. 28 | func EnableVirtualTerminalProcessing(w io.Writer) (func() error, error) { 29 | return func() error { return nil }, nil 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/termenv/termenv_posix.go: -------------------------------------------------------------------------------- 1 | //go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd 2 | // +build darwin dragonfly freebsd linux netbsd openbsd 3 | 4 | package termenv 5 | 6 | import ( 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | func isForeground(fd int) bool { 11 | pgrp, err := unix.IoctlGetInt(fd, unix.TIOCGPGRP) 12 | if err != nil { 13 | return false 14 | } 15 | 16 | return pgrp == unix.Getpgrp() 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/termenv/termenv_solaris.go: -------------------------------------------------------------------------------- 1 | //go:build solaris || illumos 2 | // +build solaris illumos 3 | 4 | package termenv 5 | 6 | import ( 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | func isForeground(fd int) bool { 11 | pgrp, err := unix.IoctlGetInt(fd, unix.TIOCGPGRP) 12 | if err != nil { 13 | return false 14 | } 15 | 16 | g, err := unix.Getpgrp() 17 | if err != nil { 18 | return false 19 | } 20 | 21 | return pgrp == g 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/nu7hatch/gouuid/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (C) 2011 by Krzysztof Kowalik 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 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, 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, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. -------------------------------------------------------------------------------- /vendor/github.com/rivo/uniseg/LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Oliver Kuederle 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/tadvi/systray/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of 'Systray' authors for copyright purposes. 2 | 3 | # Names should be added to this file as 4 | # Name or Organization 5 | # The email address is not required for organizations. 6 | 7 | # Please keep the list sorted. 8 | 9 | # Contributors 10 | # ============ 11 | 12 | Tad Vizbaras 13 | -------------------------------------------------------------------------------- /vendor/github.com/tadvi/systray/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Tad Vizbaras 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/tadvi/systray/systray_linux.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 The Systray Authors. All Rights Reserved. 3 | */ 4 | 5 | package systray 6 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sync/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sync/errgroup/go120.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.20 6 | 7 | package errgroup 8 | 9 | import "context" 10 | 11 | func withCancelCause(parent context.Context) (context.Context, func(error)) { 12 | return context.WithCancelCause(parent) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sync/errgroup/pre_go120.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.20 6 | 7 | package errgroup 8 | 9 | import "context" 10 | 11 | func withCancelCause(parent context.Context) (context.Context, func(error)) { 12 | ctx, cancel := context.WithCancel(parent) 13 | return ctx, func(error) { cancel() } 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/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/auxv.go: -------------------------------------------------------------------------------- 1 | // Copyright 2025 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.21 && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | //go:linkname runtime_getAuxv runtime.getAuxv 15 | func runtime_getAuxv() []uintptr 16 | 17 | // Auxv returns the ELF auxiliary vector as a sequence of key/value pairs. 18 | // The returned slice is always a fresh copy, owned by the caller. 19 | // It returns an error on non-ELF platforms, or if the auxiliary vector cannot be accessed, 20 | // which happens in some locked-down environments and build modes. 21 | func Auxv() ([][2]uintptr, error) { 22 | vec := runtime_getAuxv() 23 | vecLen := len(vec) 24 | 25 | if vecLen == 0 { 26 | return nil, syscall.ENOENT 27 | } 28 | 29 | if vecLen%2 != 0 { 30 | return nil, syscall.EINVAL 31 | } 32 | 33 | result := make([]uintptr, vecLen) 34 | copy(result, vec) 35 | return unsafe.Slice((*[2]uintptr)(unsafe.Pointer(&result[0])), vecLen/2), nil 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/auxv_unsupported.go: -------------------------------------------------------------------------------- 1 | // Copyright 2025 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.21 && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Auxv() ([][2]uintptr, error) { 12 | return nil, syscall.ENOTSUP 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | HCI_CHANNEL_LOGGING = 4 27 | ) 28 | 29 | // Socketoption Level 30 | const ( 31 | SOL_BLUETOOTH = 0x112 32 | SOL_HCI = 0x0 33 | SOL_L2CAP = 0x6 34 | SOL_RFCOMM = 0x12 35 | SOL_SCO = 0x11 36 | ) 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev >> 16) & 0xffff) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32(dev & 0xffff) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | return uint64(((major) << 16) | (minor)) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc64 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev & 0x3fffffff00000000) >> 32) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32((dev & 0x00000000ffffffff) >> 0) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | var DEVNO64 uint64 26 | DEVNO64 = 0x8000000000000000 27 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Dragonfly's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a DragonFlyBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a DragonFlyBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_freebsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in FreeBSD's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a FreeBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a FreeBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a FreeBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_zos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build zos && s390x 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by z/OS. 9 | // 10 | // The information below is extracted and adapted from macros. 11 | 12 | package unix 13 | 14 | // Major returns the major component of a z/OS device number. 15 | func Major(dev uint64) uint32 { 16 | return uint32((dev >> 16) & 0x0000FFFF) 17 | } 18 | 19 | // Minor returns the minor component of a z/OS device number. 20 | func Minor(dev uint64) uint32 { 21 | return uint32(dev & 0x0000FFFF) 22 | } 23 | 24 | // Mkdev returns a z/OS device number generated from the given major and minor 25 | // components. 26 | func Mkdev(major, minor uint32) uint64 { 27 | return (uint64(major) << 16) | uint64(minor) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build dragonfly || freebsd || linux || netbsd 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 12 | // systems by fcntl_linux_32bit.go to be SYS_FCNTL64. 13 | var fcntl64Syscall uintptr = SYS_FCNTL 14 | 15 | func fcntl(fd int, cmd, arg int) (int, error) { 16 | valptr, _, errno := Syscall(fcntl64Syscall, uintptr(fd), uintptr(cmd), uintptr(arg)) 17 | var err error 18 | if errno != 0 { 19 | err = errno 20 | } 21 | return int(valptr), err 22 | } 23 | 24 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 25 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 26 | return fcntl(int(fd), cmd, arg) 27 | } 28 | 29 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 30 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 31 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 32 | if errno == 0 { 33 | return nil 34 | } 35 | return errno 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 11 | return fcntl(int(fd), cmd, arg) 12 | } 13 | 14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) 17 | return err 18 | } 19 | 20 | // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command. 21 | func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error { 22 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore)))) 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fdset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | // Set adds fd to the set fds. 10 | func (fds *FdSet) Set(fd int) { 11 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS)) 12 | } 13 | 14 | // Clear removes fd from the set fds. 15 | func (fds *FdSet) Clear(fd int) { 16 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS)) 17 | } 18 | 19 | // IsSet returns whether fd is in the set fds. 20 | func (fds *FdSet) IsSet(fd int) bool { 21 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0 22 | } 23 | 24 | // Zero clears the set fds. 25 | func (fds *FdSet) Zero() { 26 | for i := range fds.Bits { 27 | fds.Bits[i] = 0 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gccgo && linux && amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mmap_nomremap.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | var mapper = &mmapper{ 10 | active: make(map[*byte][]byte), 11 | mmap: mmap, 12 | munmap: munmap, 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && !ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) error { 10 | return ptrace1(request, pid, addr, data) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_ios.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 10 | return ENOTSUP 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && race) || (linux && race) || (freebsd && race) 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd 6 | 7 | package unix 8 | 9 | // ReadDirent reads directory entries from fd and writes them into buf. 10 | func ReadDirent(fd int, buf []byte) (n int, err error) { 11 | return Getdents(fd, buf) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdirentries.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin || zos 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // ReadDirent reads directory entries from fd and writes them into buf. 12 | func ReadDirent(fd int, buf []byte) (n int, err error) { 13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 15 | // actual system call is getdirentries64, 64 is a good guess. 16 | // TODO(rsc): Can we use a single global basep for all calls? 17 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 18 | return Getdirentries(fd, buf, base) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | // Round the length of a raw sockaddr up to align it properly. 8 | func cmsgAlignOf(salen int) int { 9 | salign := SizeofPtr 10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { 11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires 12 | // 32-bit aligned access to network subsystem. 13 | salign = 4 14 | } 15 | return (salen + salign - 1) & ^(salign - 1) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/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 | import "unsafe" 15 | 16 | func ioctl(fd int, req uint, arg uintptr) (err error) { 17 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) 18 | if r0 == -1 && er != nil { 19 | err = er 20 | } 21 | return 22 | } 23 | 24 | func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { 25 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg))) 26 | if r0 == -1 && er != nil { 27 | err = er 28 | } 29 | return 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && hurd 6 | 7 | package unix 8 | 9 | const ( 10 | TIOCGETA = 0x62251713 11 | ) 12 | 13 | type Winsize struct { 14 | Row uint16 15 | Col uint16 16 | Xpixel uint16 17 | Ypixel uint16 18 | } 19 | 20 | type Termios struct { 21 | Iflag uint32 22 | Oflag uint32 23 | Cflag uint32 24 | Lflag uint32 25 | Cc [20]uint8 26 | Ispeed int32 27 | Ospeed int32 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_alarm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64) 6 | 7 | package unix 8 | 9 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH 10 | // values. 11 | 12 | //sys Alarm(seconds uint) (remaining uint, err error) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && linux && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //go:noescape 12 | func gettimeofday(tv *Timeval) (err syscall.Errno) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc 6 | 7 | package unix 8 | 9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 11 | 12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 13 | // fail. 14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc && 386 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | 15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && gc && linux 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && 386 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | 22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 24 | return int(fd), err 25 | } 26 | 27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 29 | return int(fd), err 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && arm 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm64 && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/386 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/arm the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm64 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build openbsd 6 | 7 | package unix 8 | 9 | import _ "unsafe" 10 | 11 | // Implemented in the runtime package (runtime/sys_openbsd3.go) 12 | func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 13 | func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 14 | func syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 uintptr) (r1, r2 uintptr, err Errno) 15 | func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 16 | func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 17 | 18 | //go:linkname syscall_syscall syscall.syscall 19 | //go:linkname syscall_syscall6 syscall.syscall6 20 | //go:linkname syscall_syscall10 syscall.syscall10 21 | //go:linkname syscall_rawSyscall syscall.rawSyscall 22 | //go:linkname syscall_rawSyscall6 syscall.rawSyscall6 23 | 24 | func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) { 25 | return syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, 0) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | func setTimespec(sec, nsec int64) Timespec { 8 | return Timespec{Sec: sec, Nsec: nsec} 9 | } 10 | 11 | func setTimeval(sec, usec int64) Timeval { 12 | return Timeval{Sec: sec, Usec: usec} 13 | } 14 | 15 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 16 | k.Ident = uint64(fd) 17 | k.Filter = int16(mode) 18 | k.Flags = uint16(flags) 19 | } 20 | 21 | func (iov *Iovec) SetLen(length int) { 22 | iov.Len = uint64(length) 23 | } 24 | 25 | func (msghdr *Msghdr) SetControllen(length int) { 26 | msghdr.Controllen = uint32(length) 27 | } 28 | 29 | func (msghdr *Msghdr) SetIovlen(length int) { 30 | msghdr.Iovlen = uint32(length) 31 | } 32 | 33 | func (cmsg *Cmsghdr) SetLen(length int) { 34 | cmsg.Len = uint32(length) 35 | } 36 | 37 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 38 | // of OpenBSD the syscall is called sysctl instead of __sysctl. 39 | const SYS___SYSCTL = SYS_SYSCTL 40 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ppc64 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/ppc64 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build riscv64 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/riscv64 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (msghdr *Msghdr) SetIovlen(length int) { 22 | msghdr.Iovlen = int32(length) 23 | } 24 | 25 | func (cmsg *Cmsghdr) SetLen(length int) { 26 | cmsg.Len = uint32(length) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 12 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (ppc64le || ppc64) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 12 | return syscall.Syscall(trap, a1, a2, a3) 13 | } 14 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 15 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) 16 | } 17 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 18 | return syscall.RawSyscall(trap, a1, a2, a3) 19 | } 20 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 21 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux 6 | 7 | package unix 8 | 9 | import "runtime" 10 | 11 | // SysvShmCtl performs control operations on the shared memory segment 12 | // specified by id. 13 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 14 | if runtime.GOARCH == "arm" || 15 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" { 16 | cmd |= ipc_64 17 | } 18 | 19 | return shmctl(id, cmd, desc) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && !ios) || zos 6 | 7 | package unix 8 | 9 | // SysvShmCtl performs control operations on the shared memory segment 10 | // specified by id. 11 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 12 | return shmctl(id, cmd, desc) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/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/vgetrandom_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && go1.24 6 | 7 | package unix 8 | 9 | import _ "unsafe" 10 | 11 | //go:linkname vgetrandom runtime.vgetrandom 12 | //go:noescape 13 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux || !go1.24 6 | 7 | package unix 8 | 9 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool) { 10 | return -1, false 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtracePair("arm", "arm64"). DO NOT EDIT. 2 | 3 | //go:build linux && (arm || arm64) 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // PtraceRegsArm is the registers used by arm binaries. 10 | type PtraceRegsArm struct { 11 | Uregs [18]uint32 12 | } 13 | 14 | // PtraceGetRegsArm fetches the registers used by arm binaries. 15 | func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error { 16 | return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout)) 17 | } 18 | 19 | // PtraceSetRegsArm sets the registers used by arm binaries. 20 | func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error { 21 | return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs)) 22 | } 23 | 24 | // PtraceRegsArm64 is the registers used by arm64 binaries. 25 | type PtraceRegsArm64 struct { 26 | Regs [31]uint64 27 | Sp uint64 28 | Pc uint64 29 | Pstate uint64 30 | } 31 | 32 | // PtraceGetRegsArm64 fetches the registers used by arm64 binaries. 33 | func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error { 34 | return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout)) 35 | } 36 | 37 | // PtraceSetRegsArm64 sets the registers used by arm64 binaries. 38 | func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error { 39 | return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs)) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. 2 | 3 | package unix 4 | 5 | import "unsafe" 6 | 7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. 8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { 9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} 10 | return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 11 | } 12 | 13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries. 14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { 15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} 16 | return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | type Errno = syscall.Errno 12 | type SysProcAttr = syscall.SysProcAttr 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mkknownfolderids.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2019 The Go Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style 5 | # license that can be found in the LICENSE file. 6 | 7 | set -e 8 | shopt -s nullglob 9 | 10 | knownfolders="$(printf '%s\n' "/mnt/c/Program Files (x86)/Windows Kits/"/*/Include/*/um/KnownFolders.h | sort -Vr | head -n 1)" 11 | [[ -n $knownfolders ]] || { echo "Unable to find KnownFolders.h" >&2; exit 1; } 12 | 13 | { 14 | echo "// Code generated by 'mkknownfolderids.bash'; DO NOT EDIT." 15 | echo 16 | echo "package windows" 17 | echo "type KNOWNFOLDERID GUID" 18 | echo "var (" 19 | while read -r line; do 20 | [[ $line =~ DEFINE_KNOWN_FOLDER\((FOLDERID_[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+)\) ]] || continue 21 | printf "%s = &KNOWNFOLDERID{0x%08x, 0x%04x, 0x%04x, [8]byte{0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x}}\n" \ 22 | "${BASH_REMATCH[1]}" $(( "${BASH_REMATCH[2]}" )) $(( "${BASH_REMATCH[3]}" )) $(( "${BASH_REMATCH[4]}" )) \ 23 | $(( "${BASH_REMATCH[5]}" )) $(( "${BASH_REMATCH[6]}" )) $(( "${BASH_REMATCH[7]}" )) $(( "${BASH_REMATCH[8]}" )) \ 24 | $(( "${BASH_REMATCH[9]}" )) $(( "${BASH_REMATCH[10]}" )) $(( "${BASH_REMATCH[11]}" )) $(( "${BASH_REMATCH[12]}" )) 25 | done < "$knownfolders" 26 | echo ")" 27 | } | gofmt > "zknownfolderids_windows.go" 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build generate 6 | 7 | package windows 8 | 9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && !race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/registry/mksyscall.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 generate 6 | 7 | package registry 8 | 9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go syscall.go 10 | -------------------------------------------------------------------------------- /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/text/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/gopkg.in/natefinch/npipe.v2/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2013 npipe authors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------------------------------------------------