├── .github ├── FUNDING.yml └── workflows │ └── release.yml ├── .gitignore ├── .golangci.yml ├── .goreleaser.yaml ├── LICENSE ├── README.md ├── cmd └── volgo │ └── main.go ├── go.mod ├── go.sum ├── images ├── demo.gif └── logo.png ├── internal ├── cli │ └── cli.go ├── controller │ └── controller.go └── renderer │ └── renderer.go ├── justfile └── vendor ├── github.com ├── aymanbagabas │ └── go-osc52 │ │ └── v2 │ │ ├── LICENSE │ │ ├── README.md │ │ └── osc52.go ├── charmbracelet │ ├── bubbles │ │ ├── LICENSE │ │ └── progress │ │ │ └── progress.go │ ├── bubbletea │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── .golangci-soft.yml │ │ ├── .golangci.yml │ │ ├── .goreleaser.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── 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 │ ├── harmonica │ │ ├── LICENSE │ │ ├── README.md │ │ ├── harmonica.go │ │ ├── projectile.go │ │ └── spring.go │ ├── lipgloss │ │ ├── .gitignore │ │ ├── .golangci-soft.yml │ │ ├── .golangci.yml │ │ ├── .goreleaser.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── 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 │ │ ├── clipboard.go │ │ ├── color.go │ │ ├── csi.go │ │ ├── ctrl.go │ │ ├── cursor.go │ │ ├── dcs.go │ │ ├── doc.go │ │ ├── hyperlink.go │ │ ├── kitty.go │ │ ├── mode.go │ │ ├── notification.go │ │ ├── osc.go │ │ ├── params.go │ │ ├── parser.go │ │ ├── parser │ │ │ ├── const.go │ │ │ ├── seq.go │ │ │ └── transition_table.go │ │ ├── parser_decode.go │ │ ├── parser_sync.go │ │ ├── passthrough.go │ │ ├── screen.go │ │ ├── sequence.go │ │ ├── style.go │ │ ├── termcap.go │ │ ├── title.go │ │ ├── truncate.go │ │ ├── util.go │ │ ├── width.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 │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── keycodes.go │ │ ├── mode.go │ │ ├── read.go │ │ └── records.go ├── go-ole │ └── go-ole │ │ ├── .travis.yml │ │ ├── ChangeLog.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── com.go │ │ ├── com_func.go │ │ ├── connect.go │ │ ├── constants.go │ │ ├── error.go │ │ ├── error_func.go │ │ ├── error_windows.go │ │ ├── guid.go │ │ ├── iconnectionpoint.go │ │ ├── iconnectionpoint_func.go │ │ ├── iconnectionpoint_windows.go │ │ ├── iconnectionpointcontainer.go │ │ ├── iconnectionpointcontainer_func.go │ │ ├── iconnectionpointcontainer_windows.go │ │ ├── idispatch.go │ │ ├── idispatch_func.go │ │ ├── idispatch_windows.go │ │ ├── ienumvariant.go │ │ ├── ienumvariant_func.go │ │ ├── ienumvariant_windows.go │ │ ├── iinspectable.go │ │ ├── iinspectable_func.go │ │ ├── iinspectable_windows.go │ │ ├── iprovideclassinfo.go │ │ ├── iprovideclassinfo_func.go │ │ ├── iprovideclassinfo_windows.go │ │ ├── itypeinfo.go │ │ ├── itypeinfo_func.go │ │ ├── itypeinfo_windows.go │ │ ├── iunknown.go │ │ ├── iunknown_func.go │ │ ├── iunknown_windows.go │ │ ├── ole.go │ │ ├── safearray.go │ │ ├── safearray_func.go │ │ ├── safearray_windows.go │ │ ├── safearrayconversion.go │ │ ├── safearrayslices.go │ │ ├── utility.go │ │ ├── variables.go │ │ ├── variant.go │ │ ├── variant_386.go │ │ ├── variant_amd64.go │ │ ├── variant_arm.go │ │ ├── variant_arm64.go │ │ ├── variant_date_386.go │ │ ├── variant_date_amd64.go │ │ ├── variant_date_arm.go │ │ ├── variant_date_arm64.go │ │ ├── variant_ppc64le.go │ │ ├── variant_s390x.go │ │ ├── vt_string.go │ │ ├── winrt.go │ │ └── winrt_doc.go ├── itchyny │ └── volume-go │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── volume_darwin.go │ │ ├── volume_linux.go │ │ ├── volume_unix.go │ │ └── volume_windows.go ├── lucasb-eyer │ └── go-colorful │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── 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 │ │ ├── README.md │ │ ├── doc.go │ │ ├── go.test.sh │ │ ├── isatty_bsd.go │ │ ├── isatty_others.go │ │ ├── isatty_plan9.go │ │ ├── isatty_solaris.go │ │ ├── isatty_tcgets.go │ │ └── isatty_windows.go │ ├── go-localereader │ │ ├── README.md │ │ ├── localereader.go │ │ ├── localereader_unix.go │ │ └── localereader_windows.go │ └── go-runewidth │ │ ├── LICENSE │ │ ├── README.md │ │ ├── runewidth.go │ │ ├── runewidth_appengine.go │ │ ├── runewidth_js.go │ │ ├── runewidth_posix.go │ │ ├── runewidth_table.go │ │ └── runewidth_windows.go ├── moutend │ └── go-wca │ │ ├── LICENSE │ │ └── pkg │ │ └── wca │ │ ├── AudioClientProperties.go │ │ ├── GUID.go │ │ ├── IAudioCaptureClient.go │ │ ├── IAudioCaptureClient_func.go │ │ ├── IAudioCaptureClient_windows.go │ │ ├── IAudioClient.go │ │ ├── IAudioClient2.go │ │ ├── IAudioClient2_func.go │ │ ├── IAudioClient2_windows.go │ │ ├── IAudioClient3.go │ │ ├── IAudioClient3_func.go │ │ ├── IAudioClient3_windows.go │ │ ├── IAudioClient_func.go │ │ ├── IAudioClient_windows.go │ │ ├── IAudioEndpointVolume.go │ │ ├── IAudioEndpointVolume_func.go │ │ ├── IAudioEndpointVolume_windows.go │ │ ├── IAudioMeterInformation.go │ │ ├── IAudioMeterInformation_func.go │ │ ├── IAudioMeterInformation_windows.go │ │ ├── IAudioRenderClient.go │ │ ├── IAudioRenderClient_func.go │ │ ├── IAudioRenderClient_windows.go │ │ ├── IAudioSessionControl.go │ │ ├── IAudioSessionControl2.go │ │ ├── IAudioSessionControl2_func.go │ │ ├── IAudioSessionControl2_windows.go │ │ ├── IAudioSessionControl_func.go │ │ ├── IAudioSessionControl_windows.go │ │ ├── IAudioSessionEnumerator.go │ │ ├── IAudioSessionEnumerator_func.go │ │ ├── IAudioSessionEnumerator_windows.go │ │ ├── IAudioSessionEvents.go │ │ ├── IAudioSessionManager.go │ │ ├── IAudioSessionManager2.go │ │ ├── IAudioSessionManager2_func.go │ │ ├── IAudioSessionManager2_windows.go │ │ ├── IAudioSessionManager_func.go │ │ ├── IAudioSessionManager_windows.go │ │ ├── IAudioSessionNotification.go │ │ ├── IAudioVolumeDuckNotification.go │ │ ├── IMMDevice.go │ │ ├── IMMDeviceCollection.go │ │ ├── IMMDeviceCollection_func.go │ │ ├── IMMDeviceCollection_windows.go │ │ ├── IMMDeviceEnumerator.go │ │ ├── IMMDeviceEnumerator_func.go │ │ ├── IMMDeviceEnumerator_windows.go │ │ ├── IMMDevice_func.go │ │ ├── IMMDevice_windows.go │ │ ├── IMMEndpoint.go │ │ ├── IMMEndpoint_func.go │ │ ├── IMMEndpoint_windows.go │ │ ├── IMMNotificationClient.go │ │ ├── IMMNotificationClient_windows.go │ │ ├── IPropertyStore.go │ │ ├── IPropertyStore_func.go │ │ ├── IPropertyStore_windows.go │ │ ├── ISimpleAudioVolume.go │ │ ├── ISimpleAudioVolume_func.go │ │ ├── ISimpleAudioVolume_windows.go │ │ ├── PROPERTYKEY.go │ │ ├── PROPVARIANT.go │ │ ├── PROPVARIANT_func.go │ │ ├── PROPVARIANT_windows.go │ │ ├── WAVEFORMATEX.go │ │ ├── com_func.go │ │ ├── com_windows.go │ │ ├── constants.go │ │ └── types.go ├── muesli │ ├── ansi │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── ansi.go │ │ ├── buffer.go │ │ ├── compressor │ │ │ └── writer.go │ │ └── writer.go │ ├── cancelreader │ │ ├── .gitignore │ │ ├── .golangci-soft.yml │ │ ├── .golangci.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── cancelreader.go │ │ ├── cancelreader_bsd.go │ │ ├── cancelreader_default.go │ │ ├── cancelreader_linux.go │ │ ├── cancelreader_select.go │ │ ├── cancelreader_unix.go │ │ └── cancelreader_windows.go │ └── termenv │ │ ├── .gitignore │ │ ├── .golangci-soft.yml │ │ ├── .golangci.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── 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 └── rivo │ └── uniseg │ ├── LICENSE.txt │ ├── README.md │ ├── doc.go │ ├── eastasianwidth.go │ ├── emojipresentation.go │ ├── gen_breaktest.go │ ├── gen_properties.go │ ├── grapheme.go │ ├── graphemeproperties.go │ ├── graphemerules.go │ ├── line.go │ ├── lineproperties.go │ ├── linerules.go │ ├── properties.go │ ├── sentence.go │ ├── sentenceproperties.go │ ├── sentencerules.go │ ├── step.go │ ├── width.go │ ├── word.go │ ├── wordproperties.go │ └── wordrules.go ├── golang.org └── x │ ├── sync │ ├── LICENSE │ ├── PATENTS │ └── errgroup │ │ ├── errgroup.go │ │ ├── go120.go │ │ └── pre_go120.go │ ├── sys │ ├── LICENSE │ ├── PATENTS │ ├── unix │ │ ├── .gitignore │ │ ├── README.md │ │ ├── affinity_linux.go │ │ ├── aliases.go │ │ ├── asm_aix_ppc64.s │ │ ├── asm_bsd_386.s │ │ ├── asm_bsd_amd64.s │ │ ├── asm_bsd_arm.s │ │ ├── asm_bsd_arm64.s │ │ ├── asm_bsd_ppc64.s │ │ ├── asm_bsd_riscv64.s │ │ ├── asm_linux_386.s │ │ ├── asm_linux_amd64.s │ │ ├── asm_linux_arm.s │ │ ├── asm_linux_arm64.s │ │ ├── asm_linux_loong64.s │ │ ├── asm_linux_mips64x.s │ │ ├── asm_linux_mipsx.s │ │ ├── asm_linux_ppc64x.s │ │ ├── asm_linux_riscv64.s │ │ ├── asm_linux_s390x.s │ │ ├── asm_openbsd_mips64.s │ │ ├── asm_solaris_amd64.s │ │ ├── asm_zos_s390x.s │ │ ├── bluetooth_linux.go │ │ ├── bpxsvc_zos.go │ │ ├── bpxsvc_zos.s │ │ ├── cap_freebsd.go │ │ ├── constants.go │ │ ├── dev_aix_ppc.go │ │ ├── dev_aix_ppc64.go │ │ ├── dev_darwin.go │ │ ├── dev_dragonfly.go │ │ ├── dev_freebsd.go │ │ ├── dev_linux.go │ │ ├── dev_netbsd.go │ │ ├── dev_openbsd.go │ │ ├── dev_zos.go │ │ ├── dirent.go │ │ ├── endian_big.go │ │ ├── endian_little.go │ │ ├── env_unix.go │ │ ├── fcntl.go │ │ ├── fcntl_darwin.go │ │ ├── fcntl_linux_32bit.go │ │ ├── fdset.go │ │ ├── gccgo.go │ │ ├── gccgo_c.c │ │ ├── gccgo_linux_amd64.go │ │ ├── ifreq_linux.go │ │ ├── ioctl_linux.go │ │ ├── ioctl_signed.go │ │ ├── ioctl_unsigned.go │ │ ├── ioctl_zos.go │ │ ├── mkall.sh │ │ ├── mkerrors.sh │ │ ├── mmap_nomremap.go │ │ ├── mremap.go │ │ ├── pagesize_unix.go │ │ ├── pledge_openbsd.go │ │ ├── ptrace_darwin.go │ │ ├── ptrace_ios.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── readdirent_getdents.go │ │ ├── readdirent_getdirentries.go │ │ ├── sockcmsg_dragonfly.go │ │ ├── sockcmsg_linux.go │ │ ├── sockcmsg_unix.go │ │ ├── sockcmsg_unix_other.go │ │ ├── sockcmsg_zos.go │ │ ├── symaddr_zos_s390x.s │ │ ├── syscall.go │ │ ├── syscall_aix.go │ │ ├── syscall_aix_ppc.go │ │ ├── syscall_aix_ppc64.go │ │ ├── syscall_bsd.go │ │ ├── syscall_darwin.go │ │ ├── syscall_darwin_amd64.go │ │ ├── syscall_darwin_arm64.go │ │ ├── syscall_darwin_libSystem.go │ │ ├── syscall_dragonfly.go │ │ ├── syscall_dragonfly_amd64.go │ │ ├── syscall_freebsd.go │ │ ├── syscall_freebsd_386.go │ │ ├── syscall_freebsd_amd64.go │ │ ├── syscall_freebsd_arm.go │ │ ├── syscall_freebsd_arm64.go │ │ ├── syscall_freebsd_riscv64.go │ │ ├── syscall_hurd.go │ │ ├── syscall_hurd_386.go │ │ ├── syscall_illumos.go │ │ ├── syscall_linux.go │ │ ├── syscall_linux_386.go │ │ ├── syscall_linux_alarm.go │ │ ├── syscall_linux_amd64.go │ │ ├── syscall_linux_amd64_gc.go │ │ ├── syscall_linux_arm.go │ │ ├── syscall_linux_arm64.go │ │ ├── syscall_linux_gc.go │ │ ├── syscall_linux_gc_386.go │ │ ├── syscall_linux_gc_arm.go │ │ ├── syscall_linux_gccgo_386.go │ │ ├── syscall_linux_gccgo_arm.go │ │ ├── syscall_linux_loong64.go │ │ ├── syscall_linux_mips64x.go │ │ ├── syscall_linux_mipsx.go │ │ ├── syscall_linux_ppc.go │ │ ├── syscall_linux_ppc64x.go │ │ ├── syscall_linux_riscv64.go │ │ ├── syscall_linux_s390x.go │ │ ├── syscall_linux_sparc64.go │ │ ├── syscall_netbsd.go │ │ ├── syscall_netbsd_386.go │ │ ├── syscall_netbsd_amd64.go │ │ ├── syscall_netbsd_arm.go │ │ ├── syscall_netbsd_arm64.go │ │ ├── syscall_openbsd.go │ │ ├── syscall_openbsd_386.go │ │ ├── syscall_openbsd_amd64.go │ │ ├── syscall_openbsd_arm.go │ │ ├── syscall_openbsd_arm64.go │ │ ├── syscall_openbsd_libc.go │ │ ├── syscall_openbsd_mips64.go │ │ ├── syscall_openbsd_ppc64.go │ │ ├── syscall_openbsd_riscv64.go │ │ ├── syscall_solaris.go │ │ ├── syscall_solaris_amd64.go │ │ ├── syscall_unix.go │ │ ├── syscall_unix_gc.go │ │ ├── syscall_unix_gc_ppc64x.go │ │ ├── syscall_zos_s390x.go │ │ ├── sysvshm_linux.go │ │ ├── sysvshm_unix.go │ │ ├── sysvshm_unix_other.go │ │ ├── timestruct.go │ │ ├── unveil_openbsd.go │ │ ├── vgetrandom_linux.go │ │ ├── vgetrandom_unsupported.go │ │ ├── xattr_bsd.go │ │ ├── zerrors_aix_ppc.go │ │ ├── zerrors_aix_ppc64.go │ │ ├── zerrors_darwin_amd64.go │ │ ├── zerrors_darwin_arm64.go │ │ ├── zerrors_dragonfly_amd64.go │ │ ├── zerrors_freebsd_386.go │ │ ├── zerrors_freebsd_amd64.go │ │ ├── zerrors_freebsd_arm.go │ │ ├── zerrors_freebsd_arm64.go │ │ ├── zerrors_freebsd_riscv64.go │ │ ├── zerrors_linux.go │ │ ├── zerrors_linux_386.go │ │ ├── zerrors_linux_amd64.go │ │ ├── zerrors_linux_arm.go │ │ ├── zerrors_linux_arm64.go │ │ ├── zerrors_linux_loong64.go │ │ ├── zerrors_linux_mips.go │ │ ├── zerrors_linux_mips64.go │ │ ├── zerrors_linux_mips64le.go │ │ ├── zerrors_linux_mipsle.go │ │ ├── zerrors_linux_ppc.go │ │ ├── zerrors_linux_ppc64.go │ │ ├── zerrors_linux_ppc64le.go │ │ ├── zerrors_linux_riscv64.go │ │ ├── zerrors_linux_s390x.go │ │ ├── zerrors_linux_sparc64.go │ │ ├── zerrors_netbsd_386.go │ │ ├── zerrors_netbsd_amd64.go │ │ ├── zerrors_netbsd_arm.go │ │ ├── zerrors_netbsd_arm64.go │ │ ├── zerrors_openbsd_386.go │ │ ├── zerrors_openbsd_amd64.go │ │ ├── zerrors_openbsd_arm.go │ │ ├── zerrors_openbsd_arm64.go │ │ ├── zerrors_openbsd_mips64.go │ │ ├── zerrors_openbsd_ppc64.go │ │ ├── zerrors_openbsd_riscv64.go │ │ ├── zerrors_solaris_amd64.go │ │ ├── zerrors_zos_s390x.go │ │ ├── zptrace_armnn_linux.go │ │ ├── zptrace_linux_arm64.go │ │ ├── zptrace_mipsnn_linux.go │ │ ├── zptrace_mipsnnle_linux.go │ │ ├── zptrace_x86_linux.go │ │ ├── zsymaddr_zos_s390x.s │ │ ├── zsyscall_aix_ppc.go │ │ ├── zsyscall_aix_ppc64.go │ │ ├── zsyscall_aix_ppc64_gc.go │ │ ├── zsyscall_aix_ppc64_gccgo.go │ │ ├── zsyscall_darwin_amd64.go │ │ ├── zsyscall_darwin_amd64.s │ │ ├── zsyscall_darwin_arm64.go │ │ ├── zsyscall_darwin_arm64.s │ │ ├── zsyscall_dragonfly_amd64.go │ │ ├── zsyscall_freebsd_386.go │ │ ├── zsyscall_freebsd_amd64.go │ │ ├── zsyscall_freebsd_arm.go │ │ ├── zsyscall_freebsd_arm64.go │ │ ├── zsyscall_freebsd_riscv64.go │ │ ├── zsyscall_illumos_amd64.go │ │ ├── zsyscall_linux.go │ │ ├── zsyscall_linux_386.go │ │ ├── zsyscall_linux_amd64.go │ │ ├── zsyscall_linux_arm.go │ │ ├── zsyscall_linux_arm64.go │ │ ├── zsyscall_linux_loong64.go │ │ ├── zsyscall_linux_mips.go │ │ ├── zsyscall_linux_mips64.go │ │ ├── zsyscall_linux_mips64le.go │ │ ├── zsyscall_linux_mipsle.go │ │ ├── zsyscall_linux_ppc.go │ │ ├── zsyscall_linux_ppc64.go │ │ ├── zsyscall_linux_ppc64le.go │ │ ├── zsyscall_linux_riscv64.go │ │ ├── zsyscall_linux_s390x.go │ │ ├── zsyscall_linux_sparc64.go │ │ ├── zsyscall_netbsd_386.go │ │ ├── zsyscall_netbsd_amd64.go │ │ ├── zsyscall_netbsd_arm.go │ │ ├── zsyscall_netbsd_arm64.go │ │ ├── zsyscall_openbsd_386.go │ │ ├── zsyscall_openbsd_386.s │ │ ├── zsyscall_openbsd_amd64.go │ │ ├── zsyscall_openbsd_amd64.s │ │ ├── zsyscall_openbsd_arm.go │ │ ├── zsyscall_openbsd_arm.s │ │ ├── zsyscall_openbsd_arm64.go │ │ ├── zsyscall_openbsd_arm64.s │ │ ├── zsyscall_openbsd_mips64.go │ │ ├── zsyscall_openbsd_mips64.s │ │ ├── zsyscall_openbsd_ppc64.go │ │ ├── zsyscall_openbsd_ppc64.s │ │ ├── zsyscall_openbsd_riscv64.go │ │ ├── zsyscall_openbsd_riscv64.s │ │ ├── zsyscall_solaris_amd64.go │ │ ├── zsyscall_zos_s390x.go │ │ ├── zsysctl_openbsd_386.go │ │ ├── zsysctl_openbsd_amd64.go │ │ ├── zsysctl_openbsd_arm.go │ │ ├── zsysctl_openbsd_arm64.go │ │ ├── zsysctl_openbsd_mips64.go │ │ ├── zsysctl_openbsd_ppc64.go │ │ ├── zsysctl_openbsd_riscv64.go │ │ ├── zsysnum_darwin_amd64.go │ │ ├── zsysnum_darwin_arm64.go │ │ ├── zsysnum_dragonfly_amd64.go │ │ ├── zsysnum_freebsd_386.go │ │ ├── zsysnum_freebsd_amd64.go │ │ ├── zsysnum_freebsd_arm.go │ │ ├── zsysnum_freebsd_arm64.go │ │ ├── zsysnum_freebsd_riscv64.go │ │ ├── zsysnum_linux_386.go │ │ ├── zsysnum_linux_amd64.go │ │ ├── zsysnum_linux_arm.go │ │ ├── zsysnum_linux_arm64.go │ │ ├── zsysnum_linux_loong64.go │ │ ├── zsysnum_linux_mips.go │ │ ├── zsysnum_linux_mips64.go │ │ ├── zsysnum_linux_mips64le.go │ │ ├── zsysnum_linux_mipsle.go │ │ ├── zsysnum_linux_ppc.go │ │ ├── zsysnum_linux_ppc64.go │ │ ├── zsysnum_linux_ppc64le.go │ │ ├── zsysnum_linux_riscv64.go │ │ ├── zsysnum_linux_s390x.go │ │ ├── zsysnum_linux_sparc64.go │ │ ├── zsysnum_netbsd_386.go │ │ ├── zsysnum_netbsd_amd64.go │ │ ├── zsysnum_netbsd_arm.go │ │ ├── zsysnum_netbsd_arm64.go │ │ ├── zsysnum_openbsd_386.go │ │ ├── zsysnum_openbsd_amd64.go │ │ ├── zsysnum_openbsd_arm.go │ │ ├── zsysnum_openbsd_arm64.go │ │ ├── zsysnum_openbsd_mips64.go │ │ ├── zsysnum_openbsd_ppc64.go │ │ ├── zsysnum_openbsd_riscv64.go │ │ ├── zsysnum_zos_s390x.go │ │ ├── ztypes_aix_ppc.go │ │ ├── ztypes_aix_ppc64.go │ │ ├── ztypes_darwin_amd64.go │ │ ├── ztypes_darwin_arm64.go │ │ ├── ztypes_dragonfly_amd64.go │ │ ├── ztypes_freebsd_386.go │ │ ├── ztypes_freebsd_amd64.go │ │ ├── ztypes_freebsd_arm.go │ │ ├── ztypes_freebsd_arm64.go │ │ ├── ztypes_freebsd_riscv64.go │ │ ├── ztypes_linux.go │ │ ├── ztypes_linux_386.go │ │ ├── ztypes_linux_amd64.go │ │ ├── ztypes_linux_arm.go │ │ ├── ztypes_linux_arm64.go │ │ ├── ztypes_linux_loong64.go │ │ ├── ztypes_linux_mips.go │ │ ├── ztypes_linux_mips64.go │ │ ├── ztypes_linux_mips64le.go │ │ ├── ztypes_linux_mipsle.go │ │ ├── ztypes_linux_ppc.go │ │ ├── ztypes_linux_ppc64.go │ │ ├── ztypes_linux_ppc64le.go │ │ ├── ztypes_linux_riscv64.go │ │ ├── ztypes_linux_s390x.go │ │ ├── ztypes_linux_sparc64.go │ │ ├── ztypes_netbsd_386.go │ │ ├── ztypes_netbsd_amd64.go │ │ ├── ztypes_netbsd_arm.go │ │ ├── ztypes_netbsd_arm64.go │ │ ├── ztypes_openbsd_386.go │ │ ├── ztypes_openbsd_amd64.go │ │ ├── ztypes_openbsd_arm.go │ │ ├── ztypes_openbsd_arm64.go │ │ ├── ztypes_openbsd_mips64.go │ │ ├── ztypes_openbsd_ppc64.go │ │ ├── ztypes_openbsd_riscv64.go │ │ ├── ztypes_solaris_amd64.go │ │ └── ztypes_zos_s390x.go │ └── windows │ │ ├── aliases.go │ │ ├── dll_windows.go │ │ ├── env_windows.go │ │ ├── eventlog.go │ │ ├── exec_windows.go │ │ ├── memory_windows.go │ │ ├── mkerrors.bash │ │ ├── mkknownfolderids.bash │ │ ├── mksyscall.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── security_windows.go │ │ ├── service.go │ │ ├── setupapi_windows.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_windows.go │ │ ├── types_windows.go │ │ ├── types_windows_386.go │ │ ├── types_windows_amd64.go │ │ ├── types_windows_arm.go │ │ ├── types_windows_arm64.go │ │ ├── zerrors_windows.go │ │ ├── zknownfolderids_windows.go │ │ └── zsyscall_windows.go │ └── text │ ├── LICENSE │ ├── PATENTS │ └── transform │ └── transform.go └── modules.txt /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: elliot40404 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | thanks_dev: # Replace with a single thanks.dev username 15 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: goreleaser 2 | 3 | on: 4 | push: 5 | tags: 6 | - '*' 7 | 8 | permissions: 9 | contents: write 10 | 11 | jobs: 12 | lint: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v3 16 | - uses: actions/setup-go@v4 17 | with: 18 | go-version: stable 19 | - uses: golangci/golangci-lint-action@v3 20 | with: 21 | version: latest 22 | args: --timeout=5m 23 | goreleaser: 24 | runs-on: ubuntu-latest 25 | needs: lint 26 | steps: 27 | - uses: actions/checkout@v3 28 | with: 29 | fetch-depth: 0 30 | - run: git fetch --force --tags 31 | - uses: actions/setup-go@v4 32 | with: 33 | go-version: stable 34 | - uses: goreleaser/goreleaser-action@v4 35 | with: 36 | distribution: goreleaser 37 | version: latest 38 | args: release --clean 39 | env: 40 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 41 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | example.md 3 | dist/ 4 | -------------------------------------------------------------------------------- /.golangci.yml: -------------------------------------------------------------------------------- 1 | run: 2 | concurrency: 8 3 | timeout: 30m 4 | issues-exit-code: 1 5 | tests: true 6 | build-tags: 7 | - integration 8 | modules-download-mode: readonly 9 | allow-parallel-runners: false 10 | 11 | linters: 12 | fast: false 13 | 14 | enable: 15 | - asasalint 16 | - asciicheck 17 | - bidichk 18 | - bodyclose 19 | - contextcheck 20 | - durationcheck 21 | - errcheck 22 | - errname 23 | - errorlint 24 | - gocritic 25 | - godot 26 | - gofmt 27 | - gofumpt 28 | - goimports 29 | - gomoddirectives 30 | - gosec 31 | - gosimple 32 | - govet 33 | - ineffassign 34 | - misspell 35 | - nakedret 36 | - nilerr 37 | - nilnil 38 | - noctx 39 | - nolintlint 40 | - prealloc 41 | - predeclared 42 | - promlinter 43 | - reassign 44 | - revive 45 | - rowserrcheck 46 | - sqlclosecheck 47 | - staticcheck 48 | - stylecheck 49 | - tagliatelle 50 | - tenv 51 | - testableexamples 52 | - thelper 53 | - tparallel 54 | - unconvert 55 | - unparam 56 | - unused 57 | - usestdlibvars 58 | - wastedassign 59 | -------------------------------------------------------------------------------- /.goreleaser.yaml: -------------------------------------------------------------------------------- 1 | # This is an example .goreleaser.yml file with some sensible defaults. 2 | # Make sure to check the documentation at https://goreleaser.com 3 | 4 | # The lines below are called `modelines`. See `:help modeline` 5 | # Feel free to remove those if you don't want/need to use them. 6 | # yaml-language-server: $schema=https://goreleaser.com/static/schema.json 7 | # vim: set ts=2 sw=2 tw=0 fo=cnqoj 8 | 9 | version: 2 10 | 11 | before: 12 | hooks: 13 | - go mod tidy 14 | 15 | builds: 16 | - main: ./cmd/volgo 17 | id: volgo 18 | binary: volgo 19 | env: 20 | - CGO_ENABLED=0 21 | goos: 22 | - linux 23 | - windows 24 | - darwin 25 | goarch: 26 | - "amd64" 27 | 28 | archives: 29 | - format: binary 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Elliot 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 | -------------------------------------------------------------------------------- /cmd/volgo/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | "log/slog" 7 | "os" 8 | 9 | "github.com/elliot40404/volgo/internal/cli" 10 | "github.com/elliot40404/volgo/internal/controller" 11 | "github.com/elliot40404/volgo/internal/renderer" 12 | ) 13 | 14 | func main() { 15 | args, err := cli.ParseArgs() 16 | if err != nil { 17 | if errors.Is(err, cli.ErrHelp) || errors.Is(err, cli.ErrVersion) { 18 | return 19 | } 20 | slog.Error("something went wrong", "error", err) 21 | os.Exit(1) 22 | } 23 | c, err := controller.NewController(args) 24 | if err != nil { 25 | slog.Error("something went wrong", "error", err) 26 | os.Exit(1) 27 | } 28 | if args.Cmd != "" { 29 | output, err := c.Exec() 30 | if err != nil { 31 | slog.Error("something went wrong", "error", err) 32 | os.Exit(1) 33 | } 34 | fmt.Println(output) 35 | return 36 | } 37 | r := renderer.NewRenderer(c) 38 | err = r.Render() 39 | if err != nil { 40 | slog.Error("something went wrong", "error", err) 41 | os.Exit(1) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/elliot40404/volgo 2 | 3 | go 1.23.4 4 | 5 | require ( 6 | github.com/itchyny/volume-go v0.2.2 7 | github.com/moutend/go-wca v0.3.0 // indirect 8 | ) 9 | 10 | require ( 11 | github.com/charmbracelet/bubbles v0.20.0 12 | github.com/charmbracelet/bubbletea v1.2.4 13 | github.com/charmbracelet/lipgloss v1.0.0 14 | ) 15 | 16 | require ( 17 | github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect 18 | github.com/charmbracelet/harmonica v0.2.0 // indirect 19 | github.com/charmbracelet/x/ansi v0.4.5 // indirect 20 | github.com/charmbracelet/x/term v0.2.1 // indirect 21 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect 22 | github.com/go-ole/go-ole v1.2.6 // indirect 23 | github.com/lucasb-eyer/go-colorful v1.2.0 // indirect 24 | github.com/mattn/go-isatty v0.0.20 // indirect 25 | github.com/mattn/go-localereader v0.0.1 // indirect 26 | github.com/mattn/go-runewidth v0.0.16 // indirect 27 | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect 28 | github.com/muesli/cancelreader v0.2.2 // indirect 29 | github.com/muesli/termenv v0.15.2 // indirect 30 | github.com/rivo/uniseg v0.4.7 // indirect 31 | golang.org/x/sync v0.9.0 // indirect 32 | golang.org/x/sys v0.27.0 // indirect 33 | golang.org/x/text v0.3.8 // indirect 34 | ) 35 | -------------------------------------------------------------------------------- /images/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elliot40404/volgo/7abbc878024cabc424e353e2164b635ce6f3519f/images/demo.gif -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elliot40404/volgo/7abbc878024cabc424e353e2164b635ce6f3519f/images/logo.png -------------------------------------------------------------------------------- /justfile: -------------------------------------------------------------------------------- 1 | set windows-shell := ["pwsh.exe", "-NoLogo", "-Command"] 2 | 3 | default: build 4 | 5 | build_cmd := if os() == "windows" { "go build -o ./bin/volgo.exe ./cmd/volgo/" } else { "go build -o ./bin/volgo ./cmd/volgo/" } 6 | 7 | build: clean lint 8 | {{build_cmd}} 9 | 10 | run iter='' cron='': 11 | go run ./cmd/volgo/ {{iter}} "{{cron}}" 12 | 13 | exec iter='' cron='': 14 | ./bin/volgo {{iter}} "{{cron}}" 15 | 16 | 17 | install: 18 | go install ./cmd/volgo/ 19 | 20 | build-run: build exec 21 | 22 | rmcmd := if os() == "windows" { "mkdir ./bin -Force; Remove-Item -Recurse -Force ./bin" } else { "rm -rf ./bin" } 23 | 24 | clean: 25 | {{rmcmd}} 26 | 27 | lint: 28 | golangci-lint run 29 | 30 | lint-fix: 31 | golangci-lint run --fix 32 | 33 | vendor: 34 | go mod tidy 35 | go mod vendor 36 | go mod tidy 37 | 38 | release: 39 | goreleaser release --snapshot --clean 40 | -------------------------------------------------------------------------------- /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/bubbles/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/.gitattributes: -------------------------------------------------------------------------------- 1 | *.golden -text 2 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/bubbletea/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .envrc 3 | 4 | examples/fullscreen/fullscreen 5 | examples/help/help 6 | examples/http/http 7 | examples/list-default/list-default 8 | examples/list-fancy/list-fancy 9 | examples/list-simple/list-simple 10 | examples/mouse/mouse 11 | examples/pager/pager 12 | examples/progress-download/color_vortex.blend 13 | examples/progress-download/progress-download 14 | examples/simple/simple 15 | examples/spinner/spinner 16 | examples/textinput/textinput 17 | examples/textinputs/textinputs 18 | examples/views/views 19 | tutorials/basics/basics 20 | tutorials/commands/commands 21 | .idea 22 | coverage.txt 23 | dist/ 24 | -------------------------------------------------------------------------------- /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/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/harmonica/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 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/harmonica/harmonica.go: -------------------------------------------------------------------------------- 1 | // Package harmonica is a set of physics-based animation tools for 2D and 3D 2 | // applications. There's a spring animation simulator for for smooth, realistic 3 | // motion and a projectile simulator well suited for projectiles and particles. 4 | // 5 | // Example spring usage: 6 | // 7 | // // Run once to initialize. 8 | // spring := NewSpring(FPS(60), 6.0, 0.2) 9 | // 10 | // // Update on every frame. 11 | // pos := 0.0 12 | // velocity := 0.0 13 | // targetPos := 100.0 14 | // someUpdateLoop(func() { 15 | // pos, velocity = spring.Update(pos, velocity, targetPos) 16 | // }) 17 | // 18 | // Example projectile usage: 19 | // 20 | // // Run once to initialize. 21 | // projectile := NewProjectile( 22 | // FPS(60), 23 | // Point{6.0, 100.0, 0.0}, 24 | // Vector{2.0, 0.0, 0.0}, 25 | // Vector{2.0, -9.81, 0.0}, 26 | // ) 27 | // 28 | // // Update on every frame. 29 | // someUpdateLoop(func() { 30 | // pos := projectile.Update() 31 | // }) 32 | package harmonica 33 | -------------------------------------------------------------------------------- /vendor/github.com/charmbracelet/lipgloss/.gitignore: -------------------------------------------------------------------------------- 1 | ssh_example_ed25519* 2 | -------------------------------------------------------------------------------- /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/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/ctrl.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | // RequestXTVersion is a control sequence that requests the terminal's XTVERSION. It responds with a DSR sequence identifying the version. 4 | // 5 | // CSI > Ps q 6 | // DCS > | text ST 7 | // 8 | // See https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-PC-Style-Function-Keys 9 | const RequestXTVersion = "\x1b[>0q" 10 | 11 | // RequestPrimaryDeviceAttributes is a control sequence that requests the 12 | // terminal's primary device attributes (DA1). 13 | // 14 | // CSI c 15 | // 16 | // See https://vt100.net/docs/vt510-rm/DA1.html 17 | const RequestPrimaryDeviceAttributes = "\x1b[c" 18 | -------------------------------------------------------------------------------- /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/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/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/params.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | import ( 4 | "bytes" 5 | ) 6 | 7 | // Params parses and returns a list of control sequence parameters. 8 | // 9 | // Parameters are positive integers separated by semicolons. Empty parameters 10 | // default to zero. Parameters can have sub-parameters separated by colons. 11 | // 12 | // Any non-parameter bytes are ignored. This includes bytes that are not in the 13 | // range of 0x30-0x3B. 14 | // 15 | // See ECMA-48 § 5.4.1. 16 | func Params(p []byte) [][]uint { 17 | if len(p) == 0 { 18 | return [][]uint{} 19 | } 20 | 21 | // Filter out non-parameter bytes i.e. non 0x30-0x3B. 22 | p = bytes.TrimFunc(p, func(r rune) bool { 23 | return r < 0x30 || r > 0x3B 24 | }) 25 | 26 | parts := bytes.Split(p, []byte{';'}) 27 | params := make([][]uint, len(parts)) 28 | for i, part := range parts { 29 | sparts := bytes.Split(part, []byte{':'}) 30 | params[i] = make([]uint, len(sparts)) 31 | for j, spart := range sparts { 32 | params[i][j] = bytesToUint16(spart) 33 | } 34 | } 35 | 36 | return params 37 | } 38 | 39 | func bytesToUint16(b []byte) uint { 40 | var n uint 41 | for _, c := range b { 42 | n = n*10 + uint(c-'0') 43 | } 44 | return n 45 | } 46 | -------------------------------------------------------------------------------- /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 | return NewParser(parser.MaxParamsSize, 1024*1024*4) // 4MB of data buffer 12 | }, 13 | } 14 | 15 | // GetParser returns a parser from a sync pool. 16 | func GetParser() *Parser { 17 | return parserPool.Get().(*Parser) 18 | } 19 | 20 | // PutParser returns a parser to a sync pool. The parser is reset 21 | // automatically. 22 | func PutParser(p *Parser) { 23 | p.Reset() 24 | p.DataLen = 0 25 | parserPool.Put(p) 26 | } 27 | -------------------------------------------------------------------------------- /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 RequestTermcap(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 | -------------------------------------------------------------------------------- /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/ansi/util.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | import ( 4 | "fmt" 5 | "image/color" 6 | ) 7 | 8 | // colorToHexString returns a hex string representation of a color. 9 | func colorToHexString(c color.Color) string { 10 | if c == nil { 11 | return "" 12 | } 13 | shift := func(v uint32) uint32 { 14 | if v > 0xff { 15 | return v >> 8 16 | } 17 | return v 18 | } 19 | r, g, b, _ := c.RGBA() 20 | r, g, b = shift(r), shift(g), shift(b) 21 | return fmt.Sprintf("#%02x%02x%02x", r, g, b) 22 | } 23 | 24 | // rgbToHex converts red, green, and blue values to a hexadecimal value. 25 | // 26 | // hex := rgbToHex(0, 0, 255) // 0x0000FF 27 | func rgbToHex(r, g, b uint32) uint32 { 28 | return r<<16 + g<<8 + b 29 | } 30 | -------------------------------------------------------------------------------- /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_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/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, built with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | # Dependency directories (remove the comment below to include it) 15 | # vendor/ 16 | -------------------------------------------------------------------------------- /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/erikgeiser/coninput/README.md: -------------------------------------------------------------------------------- 1 | # coninput 2 | Go library for input handling using Windows Console API 3 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | go: 5 | - 1.9.x 6 | - 1.10.x 7 | - 1.11.x 8 | - tip 9 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright © 2013-2017 Yasuhiro Matsumoto, 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the “Software”), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 9 | of the Software, and to permit persons to whom the Software is furnished to do 10 | 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/go-ole/go-ole/error_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | // errstr converts error code to string. 6 | func errstr(errno int) string { 7 | return "" 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/error_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ole 4 | 5 | import ( 6 | "fmt" 7 | "syscall" 8 | "unicode/utf16" 9 | ) 10 | 11 | // errstr converts error code to string. 12 | func errstr(errno int) string { 13 | // ask windows for the remaining errors 14 | var flags uint32 = syscall.FORMAT_MESSAGE_FROM_SYSTEM | syscall.FORMAT_MESSAGE_ARGUMENT_ARRAY | syscall.FORMAT_MESSAGE_IGNORE_INSERTS 15 | b := make([]uint16, 300) 16 | n, err := syscall.FormatMessage(flags, 0, uint32(errno), 0, b, nil) 17 | if err != nil { 18 | return fmt.Sprintf("error %d (FormatMessage failed with: %v)", errno, err) 19 | } 20 | // trim terminating \r and \n 21 | for ; n > 0 && (b[n-1] == '\n' || b[n-1] == '\r'); n-- { 22 | } 23 | return string(utf16.Decode(b[:n])) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iconnectionpoint.go: -------------------------------------------------------------------------------- 1 | package ole 2 | 3 | import "unsafe" 4 | 5 | type IConnectionPoint struct { 6 | IUnknown 7 | } 8 | 9 | type IConnectionPointVtbl struct { 10 | IUnknownVtbl 11 | GetConnectionInterface uintptr 12 | GetConnectionPointContainer uintptr 13 | Advise uintptr 14 | Unadvise uintptr 15 | EnumConnections uintptr 16 | } 17 | 18 | func (v *IConnectionPoint) VTable() *IConnectionPointVtbl { 19 | return (*IConnectionPointVtbl)(unsafe.Pointer(v.RawVTable)) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iconnectionpoint_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | import "unsafe" 6 | 7 | func (v *IConnectionPoint) GetConnectionInterface(piid **GUID) int32 { 8 | return int32(0) 9 | } 10 | 11 | func (v *IConnectionPoint) Advise(unknown *IUnknown) (uint32, error) { 12 | return uint32(0), NewError(E_NOTIMPL) 13 | } 14 | 15 | func (v *IConnectionPoint) Unadvise(cookie uint32) error { 16 | return NewError(E_NOTIMPL) 17 | } 18 | 19 | func (v *IConnectionPoint) EnumConnections(p *unsafe.Pointer) (err error) { 20 | return NewError(E_NOTIMPL) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iconnectionpoint_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ole 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | func (v *IConnectionPoint) GetConnectionInterface(piid **GUID) int32 { 11 | // XXX: This doesn't look like it does what it's supposed to 12 | return release((*IUnknown)(unsafe.Pointer(v))) 13 | } 14 | 15 | func (v *IConnectionPoint) Advise(unknown *IUnknown) (cookie uint32, err error) { 16 | hr, _, _ := syscall.Syscall( 17 | v.VTable().Advise, 18 | 3, 19 | uintptr(unsafe.Pointer(v)), 20 | uintptr(unsafe.Pointer(unknown)), 21 | uintptr(unsafe.Pointer(&cookie))) 22 | if hr != 0 { 23 | err = NewError(hr) 24 | } 25 | return 26 | } 27 | 28 | func (v *IConnectionPoint) Unadvise(cookie uint32) (err error) { 29 | hr, _, _ := syscall.Syscall( 30 | v.VTable().Unadvise, 31 | 2, 32 | uintptr(unsafe.Pointer(v)), 33 | uintptr(cookie), 34 | 0) 35 | if hr != 0 { 36 | err = NewError(hr) 37 | } 38 | return 39 | } 40 | 41 | func (v *IConnectionPoint) EnumConnections(p *unsafe.Pointer) error { 42 | return NewError(E_NOTIMPL) 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iconnectionpointcontainer.go: -------------------------------------------------------------------------------- 1 | package ole 2 | 3 | import "unsafe" 4 | 5 | type IConnectionPointContainer struct { 6 | IUnknown 7 | } 8 | 9 | type IConnectionPointContainerVtbl struct { 10 | IUnknownVtbl 11 | EnumConnectionPoints uintptr 12 | FindConnectionPoint uintptr 13 | } 14 | 15 | func (v *IConnectionPointContainer) VTable() *IConnectionPointContainerVtbl { 16 | return (*IConnectionPointContainerVtbl)(unsafe.Pointer(v.RawVTable)) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | func (v *IConnectionPointContainer) EnumConnectionPoints(points interface{}) error { 6 | return NewError(E_NOTIMPL) 7 | } 8 | 9 | func (v *IConnectionPointContainer) FindConnectionPoint(iid *GUID, point **IConnectionPoint) error { 10 | return NewError(E_NOTIMPL) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ole 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | func (v *IConnectionPointContainer) EnumConnectionPoints(points interface{}) error { 11 | return NewError(E_NOTIMPL) 12 | } 13 | 14 | func (v *IConnectionPointContainer) FindConnectionPoint(iid *GUID, point **IConnectionPoint) (err error) { 15 | hr, _, _ := syscall.Syscall( 16 | v.VTable().FindConnectionPoint, 17 | 3, 18 | uintptr(unsafe.Pointer(v)), 19 | uintptr(unsafe.Pointer(iid)), 20 | uintptr(unsafe.Pointer(point))) 21 | if hr != 0 { 22 | err = NewError(hr) 23 | } 24 | return 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/idispatch_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | func getIDsOfName(disp *IDispatch, names []string) ([]int32, error) { 6 | return []int32{}, NewError(E_NOTIMPL) 7 | } 8 | 9 | func getTypeInfoCount(disp *IDispatch) (uint32, error) { 10 | return uint32(0), NewError(E_NOTIMPL) 11 | } 12 | 13 | func getTypeInfo(disp *IDispatch) (*ITypeInfo, error) { 14 | return nil, NewError(E_NOTIMPL) 15 | } 16 | 17 | func invoke(disp *IDispatch, dispid int32, dispatch int16, params ...interface{}) (*VARIANT, error) { 18 | return nil, NewError(E_NOTIMPL) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/ienumvariant.go: -------------------------------------------------------------------------------- 1 | package ole 2 | 3 | import "unsafe" 4 | 5 | type IEnumVARIANT struct { 6 | IUnknown 7 | } 8 | 9 | type IEnumVARIANTVtbl struct { 10 | IUnknownVtbl 11 | Next uintptr 12 | Skip uintptr 13 | Reset uintptr 14 | Clone uintptr 15 | } 16 | 17 | func (v *IEnumVARIANT) VTable() *IEnumVARIANTVtbl { 18 | return (*IEnumVARIANTVtbl)(unsafe.Pointer(v.RawVTable)) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/ienumvariant_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | func (enum *IEnumVARIANT) Clone() (*IEnumVARIANT, error) { 6 | return nil, NewError(E_NOTIMPL) 7 | } 8 | 9 | func (enum *IEnumVARIANT) Reset() error { 10 | return NewError(E_NOTIMPL) 11 | } 12 | 13 | func (enum *IEnumVARIANT) Skip(celt uint) error { 14 | return NewError(E_NOTIMPL) 15 | } 16 | 17 | func (enum *IEnumVARIANT) Next(celt uint) (VARIANT, uint, error) { 18 | return NewVariant(VT_NULL, int64(0)), 0, NewError(E_NOTIMPL) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iinspectable.go: -------------------------------------------------------------------------------- 1 | package ole 2 | 3 | import "unsafe" 4 | 5 | type IInspectable struct { 6 | IUnknown 7 | } 8 | 9 | type IInspectableVtbl struct { 10 | IUnknownVtbl 11 | GetIIds uintptr 12 | GetRuntimeClassName uintptr 13 | GetTrustLevel uintptr 14 | } 15 | 16 | func (v *IInspectable) VTable() *IInspectableVtbl { 17 | return (*IInspectableVtbl)(unsafe.Pointer(v.RawVTable)) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iinspectable_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | func (v *IInspectable) GetIids() ([]*GUID, error) { 6 | return []*GUID{}, NewError(E_NOTIMPL) 7 | } 8 | 9 | func (v *IInspectable) GetRuntimeClassName() (string, error) { 10 | return "", NewError(E_NOTIMPL) 11 | } 12 | 13 | func (v *IInspectable) GetTrustLevel() (uint32, error) { 14 | return uint32(0), NewError(E_NOTIMPL) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iprovideclassinfo.go: -------------------------------------------------------------------------------- 1 | package ole 2 | 3 | import "unsafe" 4 | 5 | type IProvideClassInfo struct { 6 | IUnknown 7 | } 8 | 9 | type IProvideClassInfoVtbl struct { 10 | IUnknownVtbl 11 | GetClassInfo uintptr 12 | } 13 | 14 | func (v *IProvideClassInfo) VTable() *IProvideClassInfoVtbl { 15 | return (*IProvideClassInfoVtbl)(unsafe.Pointer(v.RawVTable)) 16 | } 17 | 18 | func (v *IProvideClassInfo) GetClassInfo() (cinfo *ITypeInfo, err error) { 19 | cinfo, err = getClassInfo(v) 20 | return 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iprovideclassinfo_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | func getClassInfo(disp *IProvideClassInfo) (tinfo *ITypeInfo, err error) { 6 | return nil, NewError(E_NOTIMPL) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iprovideclassinfo_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ole 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | func getClassInfo(disp *IProvideClassInfo) (tinfo *ITypeInfo, err error) { 11 | hr, _, _ := syscall.Syscall( 12 | disp.VTable().GetClassInfo, 13 | 2, 14 | uintptr(unsafe.Pointer(disp)), 15 | uintptr(unsafe.Pointer(&tinfo)), 16 | 0) 17 | if hr != 0 { 18 | err = NewError(hr) 19 | } 20 | return 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/itypeinfo.go: -------------------------------------------------------------------------------- 1 | package ole 2 | 3 | import "unsafe" 4 | 5 | type ITypeInfo struct { 6 | IUnknown 7 | } 8 | 9 | type ITypeInfoVtbl struct { 10 | IUnknownVtbl 11 | GetTypeAttr uintptr 12 | GetTypeComp uintptr 13 | GetFuncDesc uintptr 14 | GetVarDesc uintptr 15 | GetNames uintptr 16 | GetRefTypeOfImplType uintptr 17 | GetImplTypeFlags uintptr 18 | GetIDsOfNames uintptr 19 | Invoke uintptr 20 | GetDocumentation uintptr 21 | GetDllEntry uintptr 22 | GetRefTypeInfo uintptr 23 | AddressOfMember uintptr 24 | CreateInstance uintptr 25 | GetMops uintptr 26 | GetContainingTypeLib uintptr 27 | ReleaseTypeAttr uintptr 28 | ReleaseFuncDesc uintptr 29 | ReleaseVarDesc uintptr 30 | } 31 | 32 | func (v *ITypeInfo) VTable() *ITypeInfoVtbl { 33 | return (*ITypeInfoVtbl)(unsafe.Pointer(v.RawVTable)) 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/itypeinfo_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | func (v *ITypeInfo) GetTypeAttr() (*TYPEATTR, error) { 6 | return nil, NewError(E_NOTIMPL) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/itypeinfo_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ole 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | func (v *ITypeInfo) GetTypeAttr() (tattr *TYPEATTR, err error) { 11 | hr, _, _ := syscall.Syscall( 12 | uintptr(v.VTable().GetTypeAttr), 13 | 2, 14 | uintptr(unsafe.Pointer(v)), 15 | uintptr(unsafe.Pointer(&tattr)), 16 | 0) 17 | if hr != 0 { 18 | err = NewError(hr) 19 | } 20 | return 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iunknown_func.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | func reflectQueryInterface(self interface{}, method uintptr, interfaceID *GUID, obj interface{}) (err error) { 6 | return NewError(E_NOTIMPL) 7 | } 8 | 9 | func queryInterface(unk *IUnknown, iid *GUID) (disp *IDispatch, err error) { 10 | return nil, NewError(E_NOTIMPL) 11 | } 12 | 13 | func addRef(unk *IUnknown) int32 { 14 | return 0 15 | } 16 | 17 | func release(unk *IUnknown) int32 { 18 | return 0 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/iunknown_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ole 4 | 5 | import ( 6 | "reflect" 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | func reflectQueryInterface(self interface{}, method uintptr, interfaceID *GUID, obj interface{}) (err error) { 12 | selfValue := reflect.ValueOf(self).Elem() 13 | objValue := reflect.ValueOf(obj).Elem() 14 | 15 | hr, _, _ := syscall.Syscall( 16 | method, 17 | 3, 18 | selfValue.UnsafeAddr(), 19 | uintptr(unsafe.Pointer(interfaceID)), 20 | objValue.Addr().Pointer()) 21 | if hr != 0 { 22 | err = NewError(hr) 23 | } 24 | return 25 | } 26 | 27 | func queryInterface(unk *IUnknown, iid *GUID) (disp *IDispatch, err error) { 28 | hr, _, _ := syscall.Syscall( 29 | unk.VTable().QueryInterface, 30 | 3, 31 | uintptr(unsafe.Pointer(unk)), 32 | uintptr(unsafe.Pointer(iid)), 33 | uintptr(unsafe.Pointer(&disp))) 34 | if hr != 0 { 35 | err = NewError(hr) 36 | } 37 | return 38 | } 39 | 40 | func addRef(unk *IUnknown) int32 { 41 | ret, _, _ := syscall.Syscall( 42 | unk.VTable().AddRef, 43 | 1, 44 | uintptr(unsafe.Pointer(unk)), 45 | 0, 46 | 0) 47 | return int32(ret) 48 | } 49 | 50 | func release(unk *IUnknown) int32 { 51 | ret, _, _ := syscall.Syscall( 52 | unk.VTable().Release, 53 | 1, 54 | uintptr(unsafe.Pointer(unk)), 55 | 0, 56 | 0) 57 | return int32(ret) 58 | } 59 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/safearray.go: -------------------------------------------------------------------------------- 1 | // Package is meant to retrieve and process safe array data returned from COM. 2 | 3 | package ole 4 | 5 | // SafeArrayBound defines the SafeArray boundaries. 6 | type SafeArrayBound struct { 7 | Elements uint32 8 | LowerBound int32 9 | } 10 | 11 | // SafeArray is how COM handles arrays. 12 | type SafeArray struct { 13 | Dimensions uint16 14 | FeaturesFlag uint16 15 | ElementsSize uint32 16 | LocksAmount uint32 17 | Data uint32 18 | Bounds [16]byte 19 | } 20 | 21 | // SAFEARRAY is obsolete, exists for backwards compatibility. 22 | // Use SafeArray 23 | type SAFEARRAY SafeArray 24 | 25 | // SAFEARRAYBOUND is obsolete, exists for backwards compatibility. 26 | // Use SafeArrayBound 27 | type SAFEARRAYBOUND SafeArrayBound 28 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/safearrayslices.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ole 4 | 5 | import ( 6 | "unsafe" 7 | ) 8 | 9 | func safeArrayFromByteSlice(slice []byte) *SafeArray { 10 | array, _ := safeArrayCreateVector(VT_UI1, 0, uint32(len(slice))) 11 | 12 | if array == nil { 13 | panic("Could not convert []byte to SAFEARRAY") 14 | } 15 | 16 | for i, v := range slice { 17 | safeArrayPutElement(array, int64(i), uintptr(unsafe.Pointer(&v))) 18 | } 19 | return array 20 | } 21 | 22 | func safeArrayFromStringSlice(slice []string) *SafeArray { 23 | array, _ := safeArrayCreateVector(VT_BSTR, 0, uint32(len(slice))) 24 | 25 | if array == nil { 26 | panic("Could not convert []string to SAFEARRAY") 27 | } 28 | // SysAllocStringLen(s) 29 | for i, v := range slice { 30 | safeArrayPutElement(array, int64(i), uintptr(unsafe.Pointer(SysAllocStringLen(v)))) 31 | } 32 | return array 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/variables.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ole 4 | 5 | import ( 6 | "golang.org/x/sys/windows" 7 | ) 8 | 9 | var ( 10 | modcombase = windows.NewLazySystemDLL("combase.dll") 11 | modkernel32 = windows.NewLazySystemDLL("kernel32.dll") 12 | modole32 = windows.NewLazySystemDLL("ole32.dll") 13 | modoleaut32 = windows.NewLazySystemDLL("oleaut32.dll") 14 | moduser32 = windows.NewLazySystemDLL("user32.dll") 15 | ) 16 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/variant_386.go: -------------------------------------------------------------------------------- 1 | // +build 386 2 | 3 | package ole 4 | 5 | type VARIANT struct { 6 | VT VT // 2 7 | wReserved1 uint16 // 4 8 | wReserved2 uint16 // 6 9 | wReserved3 uint16 // 8 10 | Val int64 // 16 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/variant_amd64.go: -------------------------------------------------------------------------------- 1 | // +build amd64 2 | 3 | package ole 4 | 5 | type VARIANT struct { 6 | VT VT // 2 7 | wReserved1 uint16 // 4 8 | wReserved2 uint16 // 6 9 | wReserved3 uint16 // 8 10 | Val int64 // 16 11 | _ [8]byte // 24 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/variant_arm.go: -------------------------------------------------------------------------------- 1 | // +build arm 2 | 3 | package ole 4 | 5 | type VARIANT struct { 6 | VT VT // 2 7 | wReserved1 uint16 // 4 8 | wReserved2 uint16 // 6 9 | wReserved3 uint16 // 8 10 | Val int64 // 16 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/variant_arm64.go: -------------------------------------------------------------------------------- 1 | //go:build arm64 2 | // +build arm64 3 | 4 | package ole 5 | 6 | type VARIANT struct { 7 | VT VT // 2 8 | wReserved1 uint16 // 4 9 | wReserved2 uint16 // 6 10 | wReserved3 uint16 // 8 11 | Val int64 // 16 12 | _ [8]byte // 24 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/variant_date_386.go: -------------------------------------------------------------------------------- 1 | // +build windows,386 2 | 3 | package ole 4 | 5 | import ( 6 | "errors" 7 | "syscall" 8 | "time" 9 | "unsafe" 10 | ) 11 | 12 | // GetVariantDate converts COM Variant Time value to Go time.Time. 13 | func GetVariantDate(value uint64) (time.Time, error) { 14 | var st syscall.Systemtime 15 | v1 := uint32(value) 16 | v2 := uint32(value >> 32) 17 | r, _, _ := procVariantTimeToSystemTime.Call(uintptr(v1), uintptr(v2), uintptr(unsafe.Pointer(&st))) 18 | if r != 0 { 19 | return time.Date(int(st.Year), time.Month(st.Month), int(st.Day), int(st.Hour), int(st.Minute), int(st.Second), int(st.Milliseconds/1000), time.UTC), nil 20 | } 21 | return time.Now(), errors.New("Could not convert to time, passing current time.") 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/variant_date_amd64.go: -------------------------------------------------------------------------------- 1 | // +build windows,amd64 2 | 3 | package ole 4 | 5 | import ( 6 | "errors" 7 | "syscall" 8 | "time" 9 | "unsafe" 10 | ) 11 | 12 | // GetVariantDate converts COM Variant Time value to Go time.Time. 13 | func GetVariantDate(value uint64) (time.Time, error) { 14 | var st syscall.Systemtime 15 | r, _, _ := procVariantTimeToSystemTime.Call(uintptr(value), uintptr(unsafe.Pointer(&st))) 16 | if r != 0 { 17 | return time.Date(int(st.Year), time.Month(st.Month), int(st.Day), int(st.Hour), int(st.Minute), int(st.Second), int(st.Milliseconds/1000), time.UTC), nil 18 | } 19 | return time.Now(), errors.New("Could not convert to time, passing current time.") 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/variant_date_arm.go: -------------------------------------------------------------------------------- 1 | // +build windows,arm 2 | 3 | package ole 4 | 5 | import ( 6 | "errors" 7 | "syscall" 8 | "time" 9 | "unsafe" 10 | ) 11 | 12 | // GetVariantDate converts COM Variant Time value to Go time.Time. 13 | func GetVariantDate(value uint64) (time.Time, error) { 14 | var st syscall.Systemtime 15 | v1 := uint32(value) 16 | v2 := uint32(value >> 32) 17 | r, _, _ := procVariantTimeToSystemTime.Call(uintptr(v1), uintptr(v2), uintptr(unsafe.Pointer(&st))) 18 | if r != 0 { 19 | return time.Date(int(st.Year), time.Month(st.Month), int(st.Day), int(st.Hour), int(st.Minute), int(st.Second), int(st.Milliseconds/1000), time.UTC), nil 20 | } 21 | return time.Now(), errors.New("Could not convert to time, passing current time.") 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/variant_date_arm64.go: -------------------------------------------------------------------------------- 1 | //go:build windows && arm64 2 | // +build windows,arm64 3 | 4 | package ole 5 | 6 | import ( 7 | "errors" 8 | "syscall" 9 | "time" 10 | "unsafe" 11 | ) 12 | 13 | // GetVariantDate converts COM Variant Time value to Go time.Time. 14 | func GetVariantDate(value uint64) (time.Time, error) { 15 | var st syscall.Systemtime 16 | v1 := uint32(value) 17 | v2 := uint32(value >> 32) 18 | r, _, _ := procVariantTimeToSystemTime.Call(uintptr(v1), uintptr(v2), uintptr(unsafe.Pointer(&st))) 19 | if r != 0 { 20 | return time.Date(int(st.Year), time.Month(st.Month), int(st.Day), int(st.Hour), int(st.Minute), int(st.Second), int(st.Milliseconds/1000), time.UTC), nil 21 | } 22 | return time.Now(), errors.New("Could not convert to time, passing current time.") 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/variant_ppc64le.go: -------------------------------------------------------------------------------- 1 | // +build ppc64le 2 | 3 | package ole 4 | 5 | type VARIANT struct { 6 | VT VT // 2 7 | wReserved1 uint16 // 4 8 | wReserved2 uint16 // 6 9 | wReserved3 uint16 // 8 10 | Val int64 // 16 11 | _ [8]byte // 24 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/variant_s390x.go: -------------------------------------------------------------------------------- 1 | // +build s390x 2 | 3 | package ole 4 | 5 | type VARIANT struct { 6 | VT VT // 2 7 | wReserved1 uint16 // 4 8 | wReserved2 uint16 // 6 9 | wReserved3 uint16 // 8 10 | Val int64 // 16 11 | _ [8]byte // 24 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/go-ole/go-ole/winrt_doc.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ole 4 | 5 | // RoInitialize 6 | func RoInitialize(thread_type uint32) (err error) { 7 | return NewError(E_NOTIMPL) 8 | } 9 | 10 | // RoActivateInstance 11 | func RoActivateInstance(clsid string) (ins *IInspectable, err error) { 12 | return nil, NewError(E_NOTIMPL) 13 | } 14 | 15 | // RoGetActivationFactory 16 | func RoGetActivationFactory(clsid string, iid *GUID) (ins *IInspectable, err error) { 17 | return nil, NewError(E_NOTIMPL) 18 | } 19 | 20 | // HString is handle string for pointers. 21 | type HString uintptr 22 | 23 | // NewHString returns a new HString for Go string. 24 | func NewHString(s string) (hstring HString, err error) { 25 | return HString(uintptr(0)), NewError(E_NOTIMPL) 26 | } 27 | 28 | // DeleteHString deletes HString. 29 | func DeleteHString(hstring HString) (err error) { 30 | return NewError(E_NOTIMPL) 31 | } 32 | 33 | // String returns Go string value of HString. 34 | func (h HString) String() string { 35 | return "" 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/itchyny/volume-go/.gitignore: -------------------------------------------------------------------------------- 1 | /volume 2 | /goxz 3 | /CREDITS 4 | *.exe 5 | *.test 6 | *.out 7 | -------------------------------------------------------------------------------- /vendor/github.com/itchyny/volume-go/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017-2022 itchyny 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/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/README.md: -------------------------------------------------------------------------------- 1 | # go-isatty 2 | 3 | [![Godoc Reference](https://godoc.org/github.com/mattn/go-isatty?status.svg)](http://godoc.org/github.com/mattn/go-isatty) 4 | [![Codecov](https://codecov.io/gh/mattn/go-isatty/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-isatty) 5 | [![Coverage Status](https://coveralls.io/repos/github/mattn/go-isatty/badge.svg?branch=master)](https://coveralls.io/github/mattn/go-isatty?branch=master) 6 | [![Go Report Card](https://goreportcard.com/badge/mattn/go-isatty)](https://goreportcard.com/report/mattn/go-isatty) 7 | 8 | isatty for golang 9 | 10 | ## Usage 11 | 12 | ```go 13 | package main 14 | 15 | import ( 16 | "fmt" 17 | "github.com/mattn/go-isatty" 18 | "os" 19 | ) 20 | 21 | func main() { 22 | if isatty.IsTerminal(os.Stdout.Fd()) { 23 | fmt.Println("Is Terminal") 24 | } else if isatty.IsCygwinTerminal(os.Stdout.Fd()) { 25 | fmt.Println("Is Cygwin/MSYS2 Terminal") 26 | } else { 27 | fmt.Println("Is Not Terminal") 28 | } 29 | } 30 | ``` 31 | 32 | ## Installation 33 | 34 | ``` 35 | $ go get github.com/mattn/go-isatty 36 | ``` 37 | 38 | ## License 39 | 40 | MIT 41 | 42 | ## Author 43 | 44 | Yasuhiro Matsumoto (a.k.a mattn) 45 | 46 | ## Thanks 47 | 48 | * k-takata: base idea for IsCygwinTerminal 49 | 50 | https://github.com/k-takata/go-iscygpty 51 | -------------------------------------------------------------------------------- /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/README.md: -------------------------------------------------------------------------------- 1 | # go-localereader 2 | 3 | CodePage decoder for Windows 4 | 5 | ## Usage 6 | 7 | ``` 8 | io.Copy(os.Stdout, localereader.NewAcpReader(bytes.Reader(bytesSjis))) 9 | ``` 10 | 11 | ## Installation 12 | 13 | ``` 14 | $ go get github.com/mattn/go-localereader 15 | ``` 16 | 17 | ## License 18 | 19 | MIT 20 | 21 | ## Author 22 | 23 | Yasuhiro Matsumoto (a.k.a. mattn) 24 | -------------------------------------------------------------------------------- /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/README.md: -------------------------------------------------------------------------------- 1 | go-runewidth 2 | ============ 3 | 4 | [![Build Status](https://github.com/mattn/go-runewidth/workflows/test/badge.svg?branch=master)](https://github.com/mattn/go-runewidth/actions?query=workflow%3Atest) 5 | [![Codecov](https://codecov.io/gh/mattn/go-runewidth/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-runewidth) 6 | [![GoDoc](https://godoc.org/github.com/mattn/go-runewidth?status.svg)](http://godoc.org/github.com/mattn/go-runewidth) 7 | [![Go Report Card](https://goreportcard.com/badge/github.com/mattn/go-runewidth)](https://goreportcard.com/report/github.com/mattn/go-runewidth) 8 | 9 | Provides functions to get fixed width of the character or string. 10 | 11 | Usage 12 | ----- 13 | 14 | ```go 15 | runewidth.StringWidth("つのだ☆HIRO") == 12 16 | ``` 17 | 18 | 19 | Author 20 | ------ 21 | 22 | Yasuhiro Matsumoto 23 | 24 | License 25 | ------- 26 | 27 | under the MIT License: http://mattn.mit-license.org/2013 28 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_appengine.go: -------------------------------------------------------------------------------- 1 | //go:build appengine 2 | // +build appengine 3 | 4 | package runewidth 5 | 6 | // IsEastAsian return true if the current locale is CJK 7 | func IsEastAsian() bool { 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_js.go: -------------------------------------------------------------------------------- 1 | //go:build js && !appengine 2 | // +build js,!appengine 3 | 4 | package runewidth 5 | 6 | func IsEastAsian() bool { 7 | // TODO: Implement this for the web. Detect east asian in a compatible way, and return true. 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows && !appengine 2 | // +build windows,!appengine 3 | 4 | package runewidth 5 | 6 | import ( 7 | "syscall" 8 | ) 9 | 10 | var ( 11 | kernel32 = syscall.NewLazyDLL("kernel32") 12 | procGetConsoleOutputCP = kernel32.NewProc("GetConsoleOutputCP") 13 | ) 14 | 15 | // IsEastAsian return true if the current locale is CJK 16 | func IsEastAsian() bool { 17 | r1, _, _ := procGetConsoleOutputCP.Call() 18 | if r1 == 0 { 19 | return false 20 | } 21 | 22 | switch int(r1) { 23 | case 932, 51932, 936, 949, 950: 24 | return true 25 | } 26 | 27 | return false 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Yoshiyuki Koyanagi 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/moutend/go-wca/pkg/wca/AudioClientProperties.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | type AudioClientProperties struct { 4 | CbSize uint32 5 | BIsOffload bool 6 | AUDIO_STREAM_CATEGORY uint32 7 | AUDCLNT_STREAMOPTIONS uint32 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioCaptureClient.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | import ( 4 | "unsafe" 5 | 6 | "github.com/go-ole/go-ole" 7 | ) 8 | 9 | type IAudioCaptureClient struct { 10 | ole.IUnknown 11 | } 12 | 13 | type IAudioCaptureClientVtbl struct { 14 | ole.IUnknownVtbl 15 | GetBuffer uintptr 16 | ReleaseBuffer uintptr 17 | GetNextPacketSize uintptr 18 | } 19 | 20 | func (v *IAudioCaptureClient) VTable() *IAudioCaptureClientVtbl { 21 | return (*IAudioCaptureClientVtbl)(unsafe.Pointer(v.RawVTable)) 22 | } 23 | 24 | func (v *IAudioCaptureClient) GetBuffer(data **byte, framesToRead, flags *uint32, devicePosition, qpcPosition *uint64) (err error) { 25 | err = accGetBuffer(v, data, framesToRead, flags, devicePosition, qpcPosition) 26 | return 27 | } 28 | 29 | func (v *IAudioCaptureClient) ReleaseBuffer(framesRead uint32) (err error) { 30 | err = accReleaseBuffer(v, framesRead) 31 | return 32 | } 33 | 34 | func (v *IAudioCaptureClient) GetNextPacketSize(framesInNextPacket *uint32) (err error) { 35 | err = accGetNextPacketSize(v, framesInNextPacket) 36 | return 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioCaptureClient_func.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package wca 5 | 6 | import ( 7 | "github.com/go-ole/go-ole" 8 | ) 9 | 10 | func accGetBuffer(acc *IAudioCaptureClient, data **byte, framesToRead, flags *uint32, devicePosition, qpcPosition *uint64) (err error) { 11 | return ole.NewError(ole.E_NOTIMPL) 12 | } 13 | 14 | func accReleaseBuffer(acc *IAudioCaptureClient, framesRead uint32) (err error) { 15 | return ole.NewError(ole.E_NOTIMPL) 16 | } 17 | 18 | func accGetNextPacketSize(acc *IAudioCaptureClient, framesInNextPacket *uint32) (err error) { 19 | return ole.NewError(ole.E_NOTIMPL) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioClient2.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | import ( 4 | "unsafe" 5 | ) 6 | 7 | // IAudioClient2 struct corresponds to IAudioClient2 interface. 8 | // See MSDN's documentation: 9 | // https://msdn.microsoft.com/en-us/library/windows/desktop/hh404179(v=vs.85).aspx 10 | type IAudioClient2 struct { 11 | IAudioClient 12 | } 13 | 14 | type IAudioClient2Vtbl struct { 15 | IAudioClientVtbl 16 | IsOffloadCapable uintptr 17 | SetClientProperties uintptr 18 | GetBufferSizeLimits uintptr 19 | } 20 | 21 | func (v *IAudioClient2) VTable() *IAudioClient2Vtbl { 22 | return (*IAudioClient2Vtbl)(unsafe.Pointer(v.RawVTable)) 23 | } 24 | 25 | func (v *IAudioClient2) IsOffloadCapable(category uint32, isOffloadCapable *bool) (err error) { 26 | err = ac2IsOffloadCapable(v, category, isOffloadCapable) 27 | return 28 | } 29 | 30 | func (v *IAudioClient2) SetClientProperties(properties *AudioClientProperties) (err error) { 31 | err = ac2SetClientProperties(v, properties) 32 | return 33 | } 34 | 35 | func (v *IAudioClient2) GetBufferSizeLimits(wfx *WAVEFORMATEX, isEventDriven bool, minBufferDuration, maxBufferDuration *uint32) (err error) { 36 | err = ac2GetBufferSizeLimits(v, wfx, isEventDriven, minBufferDuration, maxBufferDuration) 37 | return 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioClient2_func.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package wca 5 | 6 | import ( 7 | "github.com/go-ole/go-ole" 8 | ) 9 | 10 | func ac2IsOffloadCapable(ac2 *IAudioClient2, category uint32, isOffloadCapable *bool) (err error) { 11 | return ole.NewError(ole.E_NOTIMPL) 12 | } 13 | 14 | func ac2SetClientProperties(ac2 *IAudioClient2, properties *AudioClientProperties) (err error) { 15 | return ole.NewError(ole.E_NOTIMPL) 16 | } 17 | 18 | func ac2GetBufferSizeLimits(ac2 *IAudioClient2, wfx *WAVEFORMATEX, isEventDriven bool, minBufferDuration, maxBufferDuration *uint32) (err error) { 19 | return ole.NewError(ole.E_NOTIMPL) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioClient3_func.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package wca 5 | 6 | import ( 7 | "github.com/go-ole/go-ole" 8 | ) 9 | 10 | func ac3GetSharedModeEnginePeriod(ac3 *IAudioClient3, wfx *WAVEFORMATEX, defaultPeriodInFrames, fundamentalPeriodInFrames, minPeriodInFrames, maxPeriodInFrames *uint32) (err error) { 11 | return ole.NewError(ole.E_NOTIMPL) 12 | } 13 | 14 | func ac3GetCurrentSharedModeEnginePeriod(ac3 *IAudioClient3, wfx **WAVEFORMATEX, currentPeriodInFrames *uint32) (err error) { 15 | return ole.NewError(ole.E_NOTIMPL) 16 | } 17 | 18 | func ac3InitializeSharedAudioStream(ac3 *IAudioClient3, streamFlags, periodInFrames uint32, wfx *WAVEFORMATEX, audioSessionGUID *ole.GUID) (err error) { 19 | return ole.NewError(ole.E_NOTIMPL) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioMeterInformation.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | import ( 4 | "unsafe" 5 | 6 | "github.com/go-ole/go-ole" 7 | ) 8 | 9 | type IAudioMeterInformation struct { 10 | ole.IUnknown 11 | } 12 | 13 | type IAudioMeterInformationVtbl struct { 14 | ole.IUnknownVtbl 15 | GetPeakValue uintptr 16 | GetChannelsPeakValues uintptr 17 | GetMeteringChannelCount uintptr 18 | QueryHardwareSupport uintptr 19 | } 20 | 21 | func (v *IAudioMeterInformation) VTable() *IAudioMeterInformationVtbl { 22 | return (*IAudioMeterInformationVtbl)(unsafe.Pointer(v.RawVTable)) 23 | } 24 | 25 | func (v *IAudioMeterInformation) GetPeakValue(peak *float32) (err error) { 26 | err = amiGetPeakValue(v, peak) 27 | return 28 | } 29 | 30 | func (v *IAudioMeterInformation) GetMeteringChannelCount(count *uint32) (err error) { 31 | err = amiGetMeteringChannelCount(v, count) 32 | return 33 | } 34 | 35 | func (v *IAudioMeterInformation) GetChannelsPeakValues(count uint32, peaks []float32) (err error) { 36 | err = amiGetChannelsPeakValues(v, count, peaks) 37 | return 38 | } 39 | 40 | func (v *IAudioMeterInformation) QueryHardwareSupport(response *uint32) (err error) { 41 | err = amiQueryHardwareSupport(v, response) 42 | return 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioMeterInformation_func.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package wca 5 | 6 | import ( 7 | "github.com/go-ole/go-ole" 8 | ) 9 | 10 | func amiGetPeakValue(ami *IAudioMeterInformation, peak *float32) (err error) { 11 | return ole.NewError(ole.E_NOTIMPL) 12 | } 13 | 14 | func amiGetChannelsPeakValues(ami *IAudioMeterInformation, peak *float32) (err error) { 15 | return ole.NewError(ole.E_NOTIMPL) 16 | } 17 | 18 | func amiGetMeteringChannelCount(ami *IAudioMeterInformation, peak *float32) (err error) { 19 | return ole.NewError(ole.E_NOTIMPL) 20 | } 21 | 22 | func amiQueryHardwareSupport(ami *IAudioMeterInformation, peak *float32) (err error) { 23 | return ole.NewError(ole.E_NOTIMPL) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioRenderClient.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | import ( 4 | "unsafe" 5 | 6 | "github.com/go-ole/go-ole" 7 | ) 8 | 9 | type IAudioRenderClient struct { 10 | ole.IUnknown 11 | } 12 | 13 | type IAudioRenderClientVtbl struct { 14 | ole.IUnknownVtbl 15 | GetBuffer uintptr 16 | ReleaseBuffer uintptr 17 | } 18 | 19 | func (v *IAudioRenderClient) VTable() *IAudioRenderClientVtbl { 20 | return (*IAudioRenderClientVtbl)(unsafe.Pointer(v.RawVTable)) 21 | } 22 | 23 | func (v *IAudioRenderClient) GetBuffer(requiredFrameSize uint32, data **byte) (err error) { 24 | err = arcGetBuffer(v, requiredFrameSize, data) 25 | return 26 | } 27 | 28 | func (v *IAudioRenderClient) ReleaseBuffer(writtenFrameSize, flag uint32) (err error) { 29 | err = arcReleaseBuffer(v, writtenFrameSize, flag) 30 | return 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioRenderClient_func.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package wca 5 | 6 | import ( 7 | "github.com/go-ole/go-ole" 8 | ) 9 | 10 | func arcGetBuffer(arc *IAudioRenderClient, requiredBufferSize uint32, data **byte) (err error) { 11 | return ole.NewError(ole.E_NOTIMPL) 12 | } 13 | 14 | func arcReleaseBuffer(arc *IAudioRenderClient, writtenBufferSize, flag uint32) (err error) { 15 | return ole.NewError(ole.E_NOTIMPL) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioRenderClient_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package wca 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | 10 | "github.com/go-ole/go-ole" 11 | ) 12 | 13 | func arcGetBuffer(arc *IAudioRenderClient, requiredBufferSize uint32, data **byte) (err error) { 14 | hr, _, _ := syscall.Syscall( 15 | arc.VTable().GetBuffer, 16 | 3, 17 | uintptr(unsafe.Pointer(arc)), 18 | uintptr(requiredBufferSize), 19 | uintptr(unsafe.Pointer(data))) 20 | if hr != 0 { 21 | err = ole.NewError(hr) 22 | } 23 | return 24 | } 25 | 26 | func arcReleaseBuffer(arc *IAudioRenderClient, writtenBufferSize, flag uint32) (err error) { 27 | hr, _, _ := syscall.Syscall( 28 | arc.VTable().ReleaseBuffer, 29 | 3, 30 | uintptr(unsafe.Pointer(arc)), 31 | uintptr(writtenBufferSize), 32 | uintptr(flag)) 33 | if hr != 0 { 34 | err = ole.NewError(hr) 35 | } 36 | return 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioSessionControl2_func.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package wca 5 | 6 | import "github.com/go-ole/go-ole" 7 | 8 | func asc2GetSessionIdentifier(asc2 *IAudioSessionControl2, retVal *string) (err error) { 9 | return ole.NewError(ole.E_NOTIMPL) 10 | } 11 | 12 | func asc2GetSessionInstanceIdentifier(asc2 *IAudioSessionControl2, retVal *string) (err error) { 13 | return ole.NewError(ole.E_NOTIMPL) 14 | } 15 | 16 | func asc2GetProcessId(asc2 *IAudioSessionControl2, retVal *uint32) (err error) { 17 | return ole.NewError(ole.E_NOTIMPL) 18 | } 19 | 20 | func asc2IsSystemSoundsSession(asc2 *IAudioSessionControl2) (err error) { 21 | return ole.NewError(ole.E_NOTIMPL) 22 | } 23 | 24 | func asc2SetDuckingPreference(asc2 *IAudioSessionControl2, optOut bool) (err error) { 25 | return ole.NewError(ole.E_NOTIMPL) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioSessionEnumerator.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | import ( 4 | "unsafe" 5 | 6 | "github.com/go-ole/go-ole" 7 | ) 8 | 9 | type IAudioSessionEnumerator struct { 10 | ole.IUnknown 11 | } 12 | 13 | type IAudioSessionEnumeratorVtbl struct { 14 | ole.IUnknownVtbl 15 | GetCount uintptr 16 | GetSession uintptr 17 | } 18 | 19 | func (v *IAudioSessionEnumerator) VTable() *IAudioSessionEnumeratorVtbl { 20 | return (*IAudioSessionEnumeratorVtbl)(unsafe.Pointer(v.RawVTable)) 21 | } 22 | 23 | func (v *IAudioSessionEnumerator) GetCount(sessionCount *int) (err error) { 24 | err = aseGetCount(v, sessionCount) 25 | return 26 | } 27 | 28 | func (v *IAudioSessionEnumerator) GetSession(sessionCount int, session **IAudioSessionControl) (err error) { 29 | err = aseGetSession(v, sessionCount, session) 30 | return 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioSessionEnumerator_func.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package wca 5 | 6 | import "github.com/go-ole/go-ole" 7 | 8 | func aseGetCount(ase *IAudioSessionEnumerator, sessionCount *int) (err error) { 9 | return ole.NewError(ole.E_NOTIMPL) 10 | } 11 | 12 | func aseGetSession(ase *IAudioSessionEnumerator, sessionCount int, session **IAudioSessionControl) (err error) { 13 | return ole.NewError(ole.E_NOTIMPL) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioSessionEnumerator_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package wca 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | 10 | "github.com/go-ole/go-ole" 11 | ) 12 | 13 | func aseGetCount(ase *IAudioSessionEnumerator, sessionCount *int) (err error) { 14 | hr, _, _ := syscall.Syscall( 15 | ase.VTable().GetCount, 16 | 2, 17 | uintptr(unsafe.Pointer(ase)), 18 | uintptr(unsafe.Pointer(sessionCount)), 19 | 0) 20 | if hr != 0 { 21 | err = ole.NewError(hr) 22 | } 23 | return 24 | } 25 | 26 | func aseGetSession(ase *IAudioSessionEnumerator, sessionCount int, session **IAudioSessionControl) (err error) { 27 | hr, _, _ := syscall.Syscall( 28 | ase.VTable().GetSession, 29 | 3, 30 | uintptr(unsafe.Pointer(ase)), 31 | uintptr(sessionCount), 32 | uintptr(unsafe.Pointer(session))) 33 | if hr != 0 { 34 | err = ole.NewError(hr) 35 | } 36 | return 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioSessionEvents.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | type IAudioSessionEvents struct { 4 | VTable *IAudioSessionEventsVtbl 5 | } 6 | 7 | type IAudioSessionEventsVtbl struct { 8 | QueryInterface uintptr 9 | AddRef uintptr 10 | Release uintptr 11 | OnDisplayNameChanged uintptr 12 | OnIconPathChanged uintptr 13 | OnSimpleVolumeChanged uintptr 14 | OnChannelVolumeChanged uintptr 15 | OnGroupingParamChanged uintptr 16 | OnStateChanged uintptr 17 | OnSessionDisconnected uintptr 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioSessionManager.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | import ( 4 | "unsafe" 5 | 6 | "github.com/go-ole/go-ole" 7 | ) 8 | 9 | type IAudioSessionManager struct { 10 | ole.IUnknown 11 | } 12 | 13 | type IAudioSessionManagerVtbl struct { 14 | ole.IUnknownVtbl 15 | GetAudioSessionControl uintptr 16 | GetSimpleAudioVolume uintptr 17 | } 18 | 19 | func (v *IAudioSessionManager) VTable() *IAudioSessionManagerVtbl { 20 | return (*IAudioSessionManagerVtbl)(unsafe.Pointer(v.RawVTable)) 21 | } 22 | 23 | func (v *IAudioSessionManager) GetAudioSessionControl(audioSessionGUID *ole.GUID, streamFlags uint32, sessionControl **IAudioSessionControl) (err error) { 24 | err = asmGetAudioSessionControl(v, audioSessionGUID, streamFlags, sessionControl) 25 | return 26 | } 27 | 28 | func (v *IAudioSessionManager) GetSimpleAudioVolume(audioSessionGUID *ole.GUID, streamFlags uint32, audioVolume **ISimpleAudioVolume) (err error) { 29 | err = asmGetSimpleAudioVolume(v, audioSessionGUID, streamFlags, audioVolume) 30 | return 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioSessionManager2_func.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package wca 5 | 6 | import "github.com/go-ole/go-ole" 7 | 8 | func asm2GetSessionEnumerator(asm2 *IAudioSessionManager2, sessionEnum **IAudioSessionEnumerator) (err error) { 9 | return ole.NewError(ole.E_NOTIMPL) 10 | } 11 | 12 | func asm2RegisterSessionNotification(asm2 *IAudioSessionManager2, sessionNotification *IAudioSessionNotification) (err error) { 13 | return ole.NewError(ole.E_NOTIMPL) 14 | } 15 | 16 | func asm2UnregisterSessionNotification(asm2 *IAudioSessionManager2, sessionNotification *IAudioSessionNotification) (err error) { 17 | return ole.NewError(ole.E_NOTIMPL) 18 | } 19 | 20 | func asm2RegisterDuckNotification(asm2 *IAudioSessionManager2, sessionID *string, duckNotification *IAudioVolumeDuckNotification) (err error) { 21 | return ole.NewError(ole.E_NOTIMPL) 22 | } 23 | 24 | func asm2UnregisterDuckNotification(asm2 *IAudioSessionManager2, duckNotification *IAudioVolumeDuckNotification) (err error) { 25 | return ole.NewError(ole.E_NOTIMPL) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioSessionManager_func.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package wca 5 | 6 | import "github.com/go-ole/go-ole" 7 | 8 | func asmGetAudioSessionControl(asm *IAudioSessionManager, audioSessionGUID *ole.GUID, streamFlags uint32, sessionControl **IAudioSessionControl) (err error) { 9 | return ole.NewError(ole.E_NOTIMPL) 10 | } 11 | 12 | func asmGetSimpleAudioVolume(asm *IAudioSessionManager, audioSessionGUID *ole.GUID, streamFlags uint32, audioVolume **ISimpleAudioVolume) (err error) { 13 | return ole.NewError(ole.E_NOTIMPL) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioSessionManager_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package wca 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | 10 | "github.com/go-ole/go-ole" 11 | ) 12 | 13 | func asmGetAudioSessionControl(asm *IAudioSessionManager, audioSessionGUID *ole.GUID, streamFlags uint32, sessionControl **IAudioSessionControl) (err error) { 14 | hr, _, _ := syscall.Syscall6( 15 | asm.VTable().GetAudioSessionControl, 16 | 4, 17 | uintptr(unsafe.Pointer(asm)), 18 | uintptr(unsafe.Pointer(audioSessionGUID)), 19 | uintptr(streamFlags), 20 | uintptr(unsafe.Pointer(sessionControl)), 21 | 0, 22 | 0) 23 | if hr != 0 { 24 | err = ole.NewError(hr) 25 | } 26 | return 27 | } 28 | 29 | func asmGetSimpleAudioVolume(asm *IAudioSessionManager, audioSessionGUID *ole.GUID, streamFlags uint32, audioVolume **ISimpleAudioVolume) (err error) { 30 | hr, _, _ := syscall.Syscall6( 31 | asm.VTable().GetSimpleAudioVolume, 32 | 4, 33 | uintptr(unsafe.Pointer(asm)), 34 | uintptr(unsafe.Pointer(audioSessionGUID)), 35 | uintptr(streamFlags), 36 | uintptr(unsafe.Pointer(audioVolume)), 37 | 0, 38 | 0) 39 | if hr != 0 { 40 | err = ole.NewError(hr) 41 | } 42 | return 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioSessionNotification.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | type IAudioSessionNotification struct { 4 | VTable *IAudioSessionEventsVtbl 5 | } 6 | 7 | type IAudioSessionNotificationVtbl struct { 8 | QueryInterface uintptr 9 | AddRef uintptr 10 | Release uintptr 11 | OnSessionCreated uintptr 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IAudioVolumeDuckNotification.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | type IAudioVolumeDuckNotification struct { 4 | VTable *IAudioSessionEventsVtbl 5 | } 6 | 7 | type IAudioVolumeDuckNotificationVtbl struct { 8 | QueryInterface uintptr 9 | AddRef uintptr 10 | Release uintptr 11 | OnVolumeDuckNotification uintptr 12 | OnVolumeUnduckNotification uintptr 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IMMDevice.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | import ( 4 | "unsafe" 5 | 6 | "github.com/go-ole/go-ole" 7 | ) 8 | 9 | type IMMDevice struct { 10 | ole.IUnknown 11 | } 12 | 13 | type IMMDeviceVtbl struct { 14 | ole.IUnknownVtbl 15 | Activate uintptr 16 | OpenPropertyStore uintptr 17 | GetId uintptr 18 | GetState uintptr 19 | } 20 | 21 | func (v *IMMDevice) VTable() *IMMDeviceVtbl { 22 | return (*IMMDeviceVtbl)(unsafe.Pointer(v.RawVTable)) 23 | } 24 | 25 | func (v *IMMDevice) Activate(refIID *ole.GUID, ctx uint32, param, obj interface{}) (err error) { 26 | err = mmdActivate(v, refIID, ctx, param, obj) 27 | return 28 | } 29 | 30 | func (v *IMMDevice) OpenPropertyStore(storageMode uint32, ps **IPropertyStore) (err error) { 31 | err = mmdOpenPropertyStore(v, storageMode, ps) 32 | return 33 | } 34 | 35 | func (v *IMMDevice) GetId(strId *string) (err error) { 36 | err = mmdGetId(v, strId) 37 | return 38 | } 39 | 40 | func (v *IMMDevice) GetState(state *uint32) (err error) { 41 | err = mmdGetState(v, state) 42 | return 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IMMDeviceCollection.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | import ( 4 | "unsafe" 5 | 6 | "github.com/go-ole/go-ole" 7 | ) 8 | 9 | type IMMDeviceCollection struct { 10 | ole.IUnknown 11 | } 12 | 13 | type IMMDeviceCollectionVtbl struct { 14 | ole.IUnknownVtbl 15 | GetCount uintptr 16 | Item uintptr 17 | } 18 | 19 | func (v *IMMDeviceCollection) VTable() *IMMDeviceCollectionVtbl { 20 | return (*IMMDeviceCollectionVtbl)(unsafe.Pointer(v.RawVTable)) 21 | } 22 | 23 | func (v *IMMDeviceCollection) GetCount(count *uint32) (err error) { 24 | err = mmdcGetCount(v, count) 25 | return 26 | } 27 | 28 | func (v *IMMDeviceCollection) Item(id uint32, mmd **IMMDevice) (err error) { 29 | err = mmdcItem(v, id, mmd) 30 | return 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IMMDeviceCollection_func.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package wca 5 | 6 | import ( 7 | "github.com/go-ole/go-ole" 8 | ) 9 | 10 | func mmdcGetCount(dc *IMMDeviceCollection, count *uint32) (err error) { 11 | return ole.NewError(ole.E_NOTIMPL) 12 | } 13 | 14 | func mmdcItem(dc *IMMDeviceCollection, id uint32, mmd **IMMDevice) (err error) { 15 | return ole.NewError(ole.E_NOTIMPL) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IMMDeviceCollection_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package wca 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | 10 | "github.com/go-ole/go-ole" 11 | ) 12 | 13 | func mmdcGetCount(dc *IMMDeviceCollection, count *uint32) (err error) { 14 | hr, _, _ := syscall.Syscall( 15 | dc.VTable().GetCount, 16 | 2, 17 | uintptr(unsafe.Pointer(dc)), 18 | uintptr(unsafe.Pointer(count)), 19 | 0) 20 | if hr != 0 { 21 | err = ole.NewError(hr) 22 | } 23 | return 24 | } 25 | 26 | func mmdcItem(dc *IMMDeviceCollection, id uint32, mmd **IMMDevice) (err error) { 27 | hr, _, _ := syscall.Syscall( 28 | dc.VTable().Item, 29 | 3, 30 | uintptr(unsafe.Pointer(dc)), 31 | uintptr(id), 32 | uintptr(unsafe.Pointer(mmd))) 33 | if hr != 0 { 34 | err = ole.NewError(hr) 35 | } 36 | return 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IMMDeviceEnumerator_func.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package wca 5 | 6 | import ( 7 | "github.com/go-ole/go-ole" 8 | ) 9 | 10 | func mmdeEnumAudioEndpoints(mmde *IMMDeviceEnumerator, eDataFlow, stateMask uint32, dc **IMMDeviceCollection) (err error) { 11 | return ole.NewError(ole.E_NOTIMPL) 12 | } 13 | 14 | func mmdeGetDefaultAudioEndpoint(mmde *IMMDeviceEnumerator, eDataFlow, stateMask uint32, mmd **IMMDevice) (err error) { 15 | return ole.NewError(ole.E_NOTIMPL) 16 | } 17 | 18 | func mmdeGetDevice() (err error) { 19 | return ole.NewError(ole.E_NOTIMPL) 20 | } 21 | 22 | func mmdeRegisterEndpointNotificationCallback(mmde *IMMDeviceEnumerator, mmnc *IMMNotificationClient) (err error) { 23 | return ole.NewError(ole.E_NOTIMPL) 24 | } 25 | 26 | func mmdeUnregisterEndpointNotificationCallback(mmde *IMMDeviceEnumerator, mmnc *IMMNotificationClient) (err error) { 27 | return ole.NewError(ole.E_NOTIMPL) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IMMDevice_func.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package wca 5 | 6 | import ( 7 | "github.com/go-ole/go-ole" 8 | ) 9 | 10 | func mmdActivate(mmd *IMMDevice, refIID *ole.GUID, ctx uint32, prop, obj interface{}) (err error) { 11 | return ole.NewError(ole.E_NOTIMPL) 12 | } 13 | 14 | func mmdOpenPropertyStore(mmd *IMMDevice, storageMode uint32, ps **IPropertyStore) (err error) { 15 | return ole.NewError(ole.E_NOTIMPL) 16 | } 17 | 18 | func mmdGetId(mmd *IMMDevice, strId *string) (err error) { 19 | return ole.NewError(ole.E_NOTIMPL) 20 | } 21 | 22 | func mmdGetState(mmd *IMMDevice, state *uint32) (err error) { 23 | return ole.NewError(ole.E_NOTIMPL) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IMMEndpoint.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | import ( 4 | "unsafe" 5 | 6 | "github.com/go-ole/go-ole" 7 | ) 8 | 9 | type IMMEndpoint struct { 10 | ole.IUnknown 11 | } 12 | 13 | type IMMEndpointVtbl struct { 14 | ole.IUnknownVtbl 15 | GetDataFlow uintptr 16 | } 17 | 18 | func (v *IMMEndpoint) VTable() *IMMEndpointVtbl { 19 | return (*IMMEndpointVtbl)(unsafe.Pointer(v.RawVTable)) 20 | } 21 | 22 | func (v *IMMEndpoint) GetDataFlow(eDataFlow *uint32) (err error) { 23 | err = mmeGetDataFlow(v, eDataFlow) 24 | return 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IMMEndpoint_func.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package wca 5 | 6 | import ( 7 | "github.com/go-ole/go-ole" 8 | ) 9 | 10 | func mmeGetDataFlow(mme *IMMEndpoint, eDataFlow *uint32) (err error) { 11 | return ole.NewError(ole.E_NOTIMPL) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IMMEndpoint_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package wca 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | 10 | "github.com/go-ole/go-ole" 11 | ) 12 | 13 | func mmeGetDataFlow(mme *IMMEndpoint, eDataFlow *uint32) (err error) { 14 | hr, _, _ := syscall.Syscall( 15 | mme.VTable().GetDataFlow, 16 | 2, 17 | uintptr(unsafe.Pointer(mme)), 18 | uintptr(unsafe.Pointer(eDataFlow)), 19 | 0) 20 | if hr != 0 { 21 | err = ole.NewError(hr) 22 | } 23 | return 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IMMNotificationClient.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | import ( 4 | "github.com/go-ole/go-ole" 5 | ) 6 | 7 | type IMMNotificationClientCallback struct { 8 | OnDefaultDeviceChanged func(flow EDataFlow, role ERole, pwstrDeviceId string) error 9 | OnDeviceAdded func(pwstrDeviceId string) error 10 | OnDeviceRemoved func(pwstrDeviceId string) error 11 | OnDeviceStateChanged func(pwstrDeviceId string, dwNewState uint64) error 12 | OnPropertyValueChanged func(pwstrDeviceId string, key uint64) error 13 | } 14 | 15 | type IMMNotificationClient struct { 16 | vTable *IMMNotificationClientVtbl 17 | refCount int 18 | callback IMMNotificationClientCallback 19 | } 20 | 21 | type IMMNotificationClientVtbl struct { 22 | ole.IUnknownVtbl 23 | 24 | OnDeviceStateChanged uintptr 25 | OnDeviceAdded uintptr 26 | OnDeviceRemoved uintptr 27 | OnDefaultDeviceChanged uintptr 28 | OnPropertyValueChanged uintptr 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IPropertyStore.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | import ( 4 | "unsafe" 5 | 6 | "github.com/go-ole/go-ole" 7 | ) 8 | 9 | type IPropertyStore struct { 10 | ole.IUnknown 11 | } 12 | 13 | type IPropertyStoreVtbl struct { 14 | ole.IUnknownVtbl 15 | GetCount uintptr 16 | GetAt uintptr 17 | GetValue uintptr 18 | SetValue uintptr 19 | Commit uintptr 20 | } 21 | 22 | func (v *IPropertyStore) VTable() *IPropertyStoreVtbl { 23 | return (*IPropertyStoreVtbl)(unsafe.Pointer(v.RawVTable)) 24 | } 25 | 26 | func (v *IPropertyStore) GetCount(count *uint32) (err error) { 27 | err = psGetCount(v, count) 28 | return 29 | } 30 | 31 | func (v *IPropertyStore) GetAt(iProp uint32, pkey *PROPERTYKEY) error { 32 | return psGetAt(v, iProp, pkey) 33 | } 34 | 35 | func (v *IPropertyStore) GetValue(key *PROPERTYKEY, pv *PROPVARIANT) (err error) { 36 | err = psGetValue(v, key, pv) 37 | return 38 | } 39 | 40 | func (v *IPropertyStore) SetValue() (err error) { 41 | err = psSetValue() 42 | return 43 | } 44 | 45 | func (v *IPropertyStore) Commit() (err error) { 46 | err = psCommit() 47 | return 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IPropertyStore_func.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package wca 5 | 6 | import ( 7 | "github.com/go-ole/go-ole" 8 | ) 9 | 10 | func psGetCount(ps *IPropertyStore, count *uint32) (err error) { 11 | return ole.NewError(ole.E_NOTIMPL) 12 | } 13 | 14 | func psGetAt(ps *IPropertyStore, iProp uint32, pkey *PROPERTYKEY) (err error) { 15 | return ole.NewError(ole.E_NOTIMPL) 16 | } 17 | 18 | func psGetValue(ps *IPropertyStore, key *PROPERTYKEY, pv *PROPVARIANT) (err error) { 19 | return ole.NewError(ole.E_NOTIMPL) 20 | } 21 | 22 | func psSetValue() (err error) { 23 | return ole.NewError(ole.E_NOTIMPL) 24 | } 25 | 26 | func psCommit() (err error) { 27 | return ole.NewError(ole.E_NOTIMPL) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/IPropertyStore_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package wca 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | 10 | "github.com/go-ole/go-ole" 11 | ) 12 | 13 | func psGetCount(ps *IPropertyStore, count *uint32) (err error) { 14 | hr, _, _ := syscall.Syscall( 15 | ps.VTable().GetCount, 16 | 2, 17 | uintptr(unsafe.Pointer(ps)), 18 | uintptr(unsafe.Pointer(count)), 19 | 0) 20 | if hr != 0 { 21 | err = ole.NewError(hr) 22 | } 23 | return 24 | } 25 | 26 | func psGetAt(ps *IPropertyStore, iProp uint32, pkey *PROPERTYKEY) (err error) { 27 | hr, _, _ := syscall.Syscall( 28 | ps.VTable().GetAt, 29 | 3, 30 | uintptr(unsafe.Pointer(ps)), 31 | uintptr(iProp), 32 | uintptr(unsafe.Pointer(pkey))) 33 | if hr != 0 { 34 | err = ole.NewError(hr) 35 | } 36 | return 37 | } 38 | 39 | func psGetValue(ps *IPropertyStore, key *PROPERTYKEY, pv *PROPVARIANT) (err error) { 40 | hr, _, _ := syscall.Syscall( 41 | ps.VTable().GetValue, 42 | 3, 43 | uintptr(unsafe.Pointer(ps)), 44 | uintptr(unsafe.Pointer(key)), 45 | uintptr(unsafe.Pointer(pv))) 46 | if hr != 0 { 47 | err = ole.NewError(hr) 48 | } 49 | return 50 | } 51 | 52 | func psSetValue() (err error) { 53 | return ole.NewError(ole.E_NOTIMPL) 54 | } 55 | 56 | func psCommit() (err error) { 57 | return ole.NewError(ole.E_NOTIMPL) 58 | } 59 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/ISimpleAudioVolume.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | import ( 4 | "unsafe" 5 | 6 | "github.com/go-ole/go-ole" 7 | ) 8 | 9 | type ISimpleAudioVolume struct { 10 | ole.IUnknown 11 | } 12 | 13 | type ISimpleAudioVolumeVtbl struct { 14 | ole.IUnknownVtbl 15 | SetMasterVolume uintptr 16 | GetMasterVolume uintptr 17 | SetMute uintptr 18 | GetMute uintptr 19 | } 20 | 21 | func (v *ISimpleAudioVolume) VTable() *ISimpleAudioVolumeVtbl { 22 | return (*ISimpleAudioVolumeVtbl)(unsafe.Pointer(v.RawVTable)) 23 | } 24 | 25 | func (v *ISimpleAudioVolume) SetMasterVolume(level float32, eventContext *ole.GUID) (err error) { 26 | err = savSetMasterVolume(v, level, eventContext) 27 | return 28 | } 29 | 30 | func (v *ISimpleAudioVolume) GetMasterVolume(level *float32) (err error) { 31 | err = savGetMasterVolume(v, level) 32 | return 33 | } 34 | 35 | func (v *ISimpleAudioVolume) SetMute(mute bool, eventContext *ole.GUID) (err error) { 36 | err = savSetMute(v, mute, eventContext) 37 | return 38 | } 39 | 40 | func (v *ISimpleAudioVolume) GetMute(mute *bool) (err error) { 41 | err = savGetMute(v, mute) 42 | return 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/ISimpleAudioVolume_func.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package wca 5 | 6 | import "github.com/go-ole/go-ole" 7 | 8 | func savSetMasterVolume(sav *ISimpleAudioVolume, level float32, eventContext *ole.GUID) (err error) { 9 | return ole.NewError(ole.E_NOTIMPL) 10 | } 11 | 12 | func savGetMasterVolume(sav *ISimpleAudioVolume, level *float32) (err error) { 13 | return ole.NewError(ole.E_NOTIMPL) 14 | } 15 | 16 | func savSetMute(sav *ISimpleAudioVolume, mute bool, eventContext *ole.GUID) (err error) { 17 | return ole.NewError(ole.E_NOTIMPL) 18 | } 19 | 20 | func savGetMute(sav *ISimpleAudioVolume, mute *bool) (err error) { 21 | return ole.NewError(ole.E_NOTIMPL) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/PROPVARIANT.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | import "github.com/go-ole/go-ole" 4 | 5 | type PROPVARIANT struct { 6 | ole.VARIANT 7 | } 8 | 9 | func (v PROPVARIANT) String() string { 10 | return pvString(v.Val) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/PROPVARIANT_func.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package wca 5 | 6 | func pvString(v int64) (s string) { 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/PROPVARIANT_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package wca 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | 10 | "github.com/go-ole/go-ole" 11 | ) 12 | 13 | func pvString(v int64) (s string) { 14 | var us []uint16 15 | var i uint32 16 | var start = unsafe.Pointer(uintptr(v)) 17 | for { 18 | u := *(*uint16)(unsafe.Pointer(uintptr(start) + 2*uintptr(i))) 19 | if u == 0 { 20 | break 21 | } 22 | us = append(us, u) 23 | i++ 24 | } 25 | s = syscall.UTF16ToString(us) 26 | ole.CoTaskMemFree(uintptr(v)) 27 | return 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/WAVEFORMATEX.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | type WAVEFORMATEX struct { 4 | WFormatTag uint16 5 | NChannels uint16 6 | NSamplesPerSec uint32 7 | NAvgBytesPerSec uint32 8 | NBlockAlign uint16 9 | WBitsPerSample uint16 10 | CbSize uint16 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/com_func.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package wca 5 | 6 | import ( 7 | "github.com/go-ole/go-ole" 8 | ) 9 | 10 | func CreateEventExA(securityAttributes, name, flag, desiredAccess uint32) (err error) { 11 | return ole.NewError(ole.E_NOTIMPL) 12 | } 13 | 14 | func CloseHandle(hObject uintptr) (err error) { 15 | return ole.NewError(ole.E_NOTIMPL) 16 | } 17 | 18 | func CoCreateInstance(clsid *ole.GUID, punk uintptr, clsctx uint32, iid *ole.GUID, obj interface{}) (err error) { 19 | return ole.NewError(ole.E_NOTIMPL) 20 | } 21 | 22 | func WaitForSingleObject(handle uintptr, milliseconds uint32) (dword uint32) { 23 | return 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/moutend/go-wca/pkg/wca/types.go: -------------------------------------------------------------------------------- 1 | package wca 2 | 3 | // ERole represents ERole enumeration. 4 | // 5 | // For more details, visit the MSDN. 6 | // 7 | // https://docs.microsoft.com/en-us/windows/win32/api/mmdeviceapi/ne-mmdeviceapi-erole 8 | type ERole uint64 9 | 10 | // EDataFlow represents EDataFlow enumeration. 11 | // 12 | // For more details, visit the MSDN. 13 | // 14 | // https://docs.microsoft.com/en-us/windows/win32/api/mmdeviceapi/ne-mmdeviceapi-edataflow 15 | type EDataFlow uint64 16 | 17 | // REFERENCE_TIME represents REFERENCE_TIME data type. 18 | // 19 | // For more details, visit the MSDN. 20 | // 21 | // https://docs.microsoft.com/en-us/windows/win32/directshow/reference-time 22 | type REFERENCE_TIME int64 23 | -------------------------------------------------------------------------------- /vendor/github.com/muesli/ansi/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, built with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | # Dependency directories (remove the comment below to include it) 15 | # vendor/ 16 | -------------------------------------------------------------------------------- /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/README.md: -------------------------------------------------------------------------------- 1 | # ansi 2 | 3 | [![Latest Release](https://img.shields.io/github/release/muesli/ansi.svg)](https://github.com/muesli/ansi/releases) 4 | [![Build Status](https://github.com/muesli/ansi/workflows/build/badge.svg)](https://github.com/muesli/ansi/actions) 5 | [![Coverage Status](https://coveralls.io/repos/github/muesli/ansi/badge.svg?branch=master)](https://coveralls.io/github/muesli/ansi?branch=master) 6 | [![Go ReportCard](https://goreportcard.com/badge/muesli/ansi)](https://goreportcard.com/report/muesli/ansi) 7 | [![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](https://pkg.go.dev/github.com/muesli/ansi) 8 | 9 | Raw ANSI sequence helpers 10 | 11 | ## ANSI Writer 12 | 13 | ```go 14 | import "github.com/muesli/ansi" 15 | 16 | w := ansi.Writer{Forward: os.Stdout} 17 | w.Write([]byte("\x1b[31mHello, world!\x1b[0m")) 18 | w.Close() 19 | ``` 20 | 21 | ## Compressor 22 | 23 | The ANSI compressor eliminates unnecessary/redundant ANSI sequences. 24 | 25 | ```go 26 | import "github.com/muesli/ansi/compressor" 27 | 28 | w := compressor.Writer{Forward: os.Stdout} 29 | w.Write([]byte("\x1b[31mHello, world!\x1b[0m")) 30 | w.Close() 31 | ``` 32 | -------------------------------------------------------------------------------- /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/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, built with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | # Dependency directories (remove the comment below to include it) 15 | # vendor/ 16 | -------------------------------------------------------------------------------- /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/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, built with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | # Dependency directories (remove the comment below to include it) 15 | # vendor/ 16 | -------------------------------------------------------------------------------- /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/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/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/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/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | type Signal = syscall.Signal 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for 386 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-28 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for AMD64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for ARM BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-28 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 21 | B syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 24 | B syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 27 | B syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for ARM64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ppc64, BSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for RISCV64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_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_ppc64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (ppc64 || ppc64le) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 17 | BL runtime·entersyscall(SB) 18 | MOVD a1+8(FP), R3 19 | MOVD a2+16(FP), R4 20 | MOVD a3+24(FP), R5 21 | MOVD R0, R6 22 | MOVD R0, R7 23 | MOVD R0, R8 24 | MOVD trap+0(FP), R9 // syscall entry 25 | SYSCALL R9 26 | MOVD R3, r1+32(FP) 27 | MOVD R4, r2+40(FP) 28 | BL runtime·exitsyscall(SB) 29 | RET 30 | 31 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 32 | MOVD a1+8(FP), R3 33 | MOVD a2+16(FP), R4 34 | MOVD a3+24(FP), R5 35 | MOVD R0, R6 36 | MOVD R0, R7 37 | MOVD R0, R8 38 | MOVD trap+0(FP), R9 // syscall entry 39 | SYSCALL R9 40 | MOVD R3, r1+32(FP) 41 | MOVD R4, r2+40(FP) 42 | RET 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_riscv64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build riscv64 && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for linux/riscv64. 11 | // 12 | // Where available, just jump to package syscall's implementation of 13 | // these functions. 14 | 15 | TEXT ·Syscall(SB),NOSPLIT,$0-56 16 | JMP syscall·Syscall(SB) 17 | 18 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 19 | JMP syscall·Syscall6(SB) 20 | 21 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 22 | CALL runtime·entersyscall(SB) 23 | MOV a1+8(FP), A0 24 | MOV a2+16(FP), A1 25 | MOV a3+24(FP), A2 26 | MOV trap+0(FP), A7 // syscall entry 27 | ECALL 28 | MOV A0, r1+32(FP) // r1 29 | MOV A1, r2+40(FP) // r2 30 | CALL runtime·exitsyscall(SB) 31 | RET 32 | 33 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 34 | JMP syscall·RawSyscall(SB) 35 | 36 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 37 | JMP syscall·RawSyscall6(SB) 38 | 39 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 40 | MOV a1+8(FP), A0 41 | MOV a2+16(FP), A1 42 | MOV a3+24(FP), A2 43 | MOV trap+0(FP), A7 // syscall entry 44 | ECALL 45 | MOV A0, r1+32(FP) 46 | MOV A1, r2+40(FP) 47 | RET 48 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for mips64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | HCI_CHANNEL_LOGGING = 4 27 | ) 28 | 29 | // Socketoption Level 30 | const ( 31 | SOL_BLUETOOTH = 0x112 32 | SOL_HCI = 0x0 33 | SOL_L2CAP = 0x6 34 | SOL_RFCOMM = 0x12 35 | SOL_SCO = 0x11 36 | ) 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev >> 16) & 0xffff) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32(dev & 0xffff) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | return uint64(((major) << 16) | (minor)) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc64 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev & 0x3fffffff00000000) >> 32) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32((dev & 0x00000000ffffffff) >> 0) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | var DEVNO64 uint64 26 | DEVNO64 = 0x8000000000000000 27 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Dragonfly's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a DragonFlyBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a DragonFlyBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_freebsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in FreeBSD's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a FreeBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a FreeBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a FreeBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_zos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build zos && s390x 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by z/OS. 9 | // 10 | // The information below is extracted and adapted from macros. 11 | 12 | package unix 13 | 14 | // Major returns the major component of a z/OS device number. 15 | func Major(dev uint64) uint32 { 16 | return uint32((dev >> 16) & 0x0000FFFF) 17 | } 18 | 19 | // Minor returns the minor component of a z/OS device number. 20 | func Minor(dev uint64) uint32 { 21 | return uint32(dev & 0x0000FFFF) 22 | } 23 | 24 | // Mkdev returns a z/OS device number generated from the given major and minor 25 | // components. 26 | func Mkdev(major, minor uint32) uint64 { 27 | return (uint64(major) << 16) | uint64(minor) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build dragonfly || freebsd || linux || netbsd 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 12 | // systems by fcntl_linux_32bit.go to be SYS_FCNTL64. 13 | var fcntl64Syscall uintptr = SYS_FCNTL 14 | 15 | func fcntl(fd int, cmd, arg int) (int, error) { 16 | valptr, _, errno := Syscall(fcntl64Syscall, uintptr(fd), uintptr(cmd), uintptr(arg)) 17 | var err error 18 | if errno != 0 { 19 | err = errno 20 | } 21 | return int(valptr), err 22 | } 23 | 24 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 25 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 26 | return fcntl(int(fd), cmd, arg) 27 | } 28 | 29 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 30 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 31 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 32 | if errno == 0 { 33 | return nil 34 | } 35 | return errno 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 11 | return fcntl(int(fd), cmd, arg) 12 | } 13 | 14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) 17 | return err 18 | } 19 | 20 | // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command. 21 | func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error { 22 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore)))) 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fdset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | // Set adds fd to the set fds. 10 | func (fds *FdSet) Set(fd int) { 11 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS)) 12 | } 13 | 14 | // Clear removes fd from the set fds. 15 | func (fds *FdSet) Clear(fd int) { 16 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS)) 17 | } 18 | 19 | // IsSet returns whether fd is in the set fds. 20 | func (fds *FdSet) IsSet(fd int) bool { 21 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0 22 | } 23 | 24 | // Zero clears the set fds. 25 | func (fds *FdSet) Zero() { 26 | for i := range fds.Bits { 27 | fds.Bits[i] = 0 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gccgo && linux && amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mmap_nomremap.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | var mapper = &mmapper{ 10 | active: make(map[*byte][]byte), 11 | mmap: mmap, 12 | munmap: munmap, 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && !ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) error { 10 | return ptrace1(request, pid, addr, data) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_ios.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 10 | return ENOTSUP 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && race) || (linux && race) || (freebsd && race) 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd 6 | 7 | package unix 8 | 9 | // ReadDirent reads directory entries from fd and writes them into buf. 10 | func ReadDirent(fd int, buf []byte) (n int, err error) { 11 | return Getdents(fd, buf) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdirentries.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin || zos 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // ReadDirent reads directory entries from fd and writes them into buf. 12 | func ReadDirent(fd int, buf []byte) (n int, err error) { 13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 15 | // actual system call is getdirentries64, 64 is a good guess. 16 | // TODO(rsc): Can we use a single global basep for all calls? 17 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 18 | return Getdirentries(fd, buf, base) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | // Round the length of a raw sockaddr up to align it properly. 8 | func cmsgAlignOf(salen int) int { 9 | salign := SizeofPtr 10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { 11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires 12 | // 32-bit aligned access to network subsystem. 13 | salign = 4 14 | } 15 | return (salen + salign - 1) & ^(salign - 1) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin 6 | 7 | package unix 8 | 9 | import _ "unsafe" 10 | 11 | // Implemented in the runtime package (runtime/sys_darwin.go) 12 | func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 13 | func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 14 | func syscall_syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 15 | func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // 32-bit only 16 | func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 17 | func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 18 | func syscall_syscallPtr(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 19 | 20 | //go:linkname syscall_syscall syscall.syscall 21 | //go:linkname syscall_syscall6 syscall.syscall6 22 | //go:linkname syscall_syscall6X syscall.syscall6X 23 | //go:linkname syscall_syscall9 syscall.syscall9 24 | //go:linkname syscall_rawSyscall syscall.rawSyscall 25 | //go:linkname syscall_rawSyscall6 syscall.rawSyscall6 26 | //go:linkname syscall_syscallPtr syscall.syscallPtr 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build hurd 6 | 7 | package unix 8 | 9 | /* 10 | #include 11 | int ioctl(int, unsigned long int, uintptr_t); 12 | */ 13 | import "C" 14 | import "unsafe" 15 | 16 | func ioctl(fd int, req uint, arg uintptr) (err error) { 17 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) 18 | if r0 == -1 && er != nil { 19 | err = er 20 | } 21 | return 22 | } 23 | 24 | func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { 25 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg))) 26 | if r0 == -1 && er != nil { 27 | err = er 28 | } 29 | return 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && hurd 6 | 7 | package unix 8 | 9 | const ( 10 | TIOCGETA = 0x62251713 11 | ) 12 | 13 | type Winsize struct { 14 | Row uint16 15 | Col uint16 16 | Xpixel uint16 17 | Ypixel uint16 18 | } 19 | 20 | type Termios struct { 21 | Iflag uint32 22 | Oflag uint32 23 | Cflag uint32 24 | Lflag uint32 25 | Cc [20]uint8 26 | Ispeed int32 27 | Ospeed int32 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_alarm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64) 6 | 7 | package unix 8 | 9 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH 10 | // values. 11 | 12 | //sys Alarm(seconds uint) (remaining uint, err error) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && linux && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //go:noescape 12 | func gettimeofday(tv *Timeval) (err syscall.Errno) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc 6 | 7 | package unix 8 | 9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 11 | 12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 13 | // fail. 14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc && 386 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | 15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && gc && linux 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && 386 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | 22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 24 | return int(fd), err 25 | } 26 | 27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 29 | return int(fd), err 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && arm 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm64 && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/386 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/arm the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm64 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build openbsd 6 | 7 | package unix 8 | 9 | import _ "unsafe" 10 | 11 | // Implemented in the runtime package (runtime/sys_openbsd3.go) 12 | func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 13 | func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 14 | func syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 uintptr) (r1, r2 uintptr, err Errno) 15 | func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 16 | func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 17 | 18 | //go:linkname syscall_syscall syscall.syscall 19 | //go:linkname syscall_syscall6 syscall.syscall6 20 | //go:linkname syscall_syscall10 syscall.syscall10 21 | //go:linkname syscall_rawSyscall syscall.rawSyscall 22 | //go:linkname syscall_rawSyscall6 syscall.rawSyscall6 23 | 24 | func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) { 25 | return syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, 0) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | func setTimespec(sec, nsec int64) Timespec { 8 | return Timespec{Sec: sec, Nsec: nsec} 9 | } 10 | 11 | func setTimeval(sec, usec int64) Timeval { 12 | return Timeval{Sec: sec, Usec: usec} 13 | } 14 | 15 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 16 | k.Ident = uint64(fd) 17 | k.Filter = int16(mode) 18 | k.Flags = uint16(flags) 19 | } 20 | 21 | func (iov *Iovec) SetLen(length int) { 22 | iov.Len = uint64(length) 23 | } 24 | 25 | func (msghdr *Msghdr) SetControllen(length int) { 26 | msghdr.Controllen = uint32(length) 27 | } 28 | 29 | func (msghdr *Msghdr) SetIovlen(length int) { 30 | msghdr.Iovlen = uint32(length) 31 | } 32 | 33 | func (cmsg *Cmsghdr) SetLen(length int) { 34 | cmsg.Len = uint32(length) 35 | } 36 | 37 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 38 | // of OpenBSD the syscall is called sysctl instead of __sysctl. 39 | const SYS___SYSCTL = SYS_SYSCTL 40 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ppc64 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/ppc64 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build riscv64 && openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = uint32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | 39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 40 | // of openbsd/riscv64 the syscall is called sysctl instead of __sysctl. 41 | const SYS___SYSCTL = SYS_SYSCTL 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (msghdr *Msghdr) SetIovlen(length int) { 22 | msghdr.Iovlen = int32(length) 23 | } 24 | 25 | func (cmsg *Cmsghdr) SetLen(length int) { 26 | cmsg.Len = uint32(length) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 12 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (ppc64le || ppc64) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 12 | return syscall.Syscall(trap, a1, a2, a3) 13 | } 14 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 15 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) 16 | } 17 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 18 | return syscall.RawSyscall(trap, a1, a2, a3) 19 | } 20 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 21 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux 6 | 7 | package unix 8 | 9 | import "runtime" 10 | 11 | // SysvShmCtl performs control operations on the shared memory segment 12 | // specified by id. 13 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 14 | if runtime.GOARCH == "arm" || 15 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" { 16 | cmd |= ipc_64 17 | } 18 | 19 | return shmctl(id, cmd, desc) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && !ios) || zos 6 | 7 | package unix 8 | 9 | // SysvShmCtl performs control operations on the shared memory segment 10 | // specified by id. 11 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 12 | return shmctl(id, cmd, desc) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/vgetrandom_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && go1.24 6 | 7 | package unix 8 | 9 | import _ "unsafe" 10 | 11 | //go:linkname vgetrandom runtime.vgetrandom 12 | //go:noescape 13 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux || !go1.24 6 | 7 | package unix 8 | 9 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool) { 10 | return -1, false 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. 2 | 3 | package unix 4 | 5 | import "unsafe" 6 | 7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. 8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { 9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} 10 | return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 11 | } 12 | 13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries. 14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { 15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} 16 | return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | type Errno = syscall.Errno 12 | type SysProcAttr = syscall.SysProcAttr 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build generate 6 | 7 | package windows 8 | 9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && !race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | _ uint32 // pad to 8 byte boundary 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | _ uint32 // pad to 8 byte boundary 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | --------------------------------------------------------------------------------