Showing preview only (8,327K chars total). Download the full file or copy to clipboard to get everything.
Repository: cjbassi/gotop
Branch: master
Commit: 65d76af83079
Files: 654
Total size: 7.8 MB
Directory structure:
gitextract_yfe3udwr/
├── .github/
│ └── ISSUE_TEMPLATE/
│ ├── bug_report.md
│ └── other.md
├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── LICENSE
├── Makefile
├── README.md
├── assets/
│ └── logo/
│ └── credits.md
├── build/
│ └── nfpm.yml
├── ci/
│ └── script.sh
├── colorschemes/
│ ├── default.go
│ ├── default.json
│ ├── default_dark.go
│ ├── monokai.go
│ ├── solarized.go
│ ├── template.go
│ └── vice.go
├── go.mod
├── go.sum
├── main.go
├── scripts/
│ └── download.sh
├── snap/
│ └── snapcraft.yaml
├── src/
│ ├── logging/
│ │ ├── logging_arm64.go
│ │ └── logging_other.go
│ ├── termui/
│ │ ├── drawille-go/
│ │ │ ├── LICENSE.md
│ │ │ ├── README.md
│ │ │ └── drawille.go
│ │ ├── linegraph.go
│ │ ├── sparkline.go
│ │ └── table.go
│ ├── utils/
│ │ ├── bytes.go
│ │ ├── conversions.go
│ │ ├── math.go
│ │ └── xdg.go
│ └── widgets/
│ ├── battery.go
│ ├── cpu.go
│ ├── disk.go
│ ├── help.go
│ ├── include/
│ │ ├── smc.c
│ │ └── smc.h
│ ├── mem.go
│ ├── mem_freebsd.go
│ ├── mem_other.go
│ ├── net.go
│ ├── proc.go
│ ├── proc_freebsd.go
│ ├── proc_linux.go
│ ├── proc_other.go
│ ├── proc_windows.go
│ ├── statusbar.go
│ ├── temp.go
│ ├── temp_darwin.go
│ ├── temp_freebsd.go
│ ├── temp_linux.go
│ ├── temp_openbsd.go
│ └── temp_windows.go
└── vendor/
├── github.com/
│ ├── StackExchange/
│ │ └── wmi/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── swbemservices.go
│ │ └── wmi.go
│ ├── cjbassi/
│ │ └── drawille-go/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── drawille.go
│ ├── distatus/
│ │ └── battery/
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE.md
│ │ ├── README.md
│ │ ├── battery.go
│ │ ├── battery_darwin.go
│ │ ├── battery_freebsd_dragonfly_.go
│ │ ├── battery_linux.go
│ │ ├── battery_netbsd.go
│ │ ├── battery_openbsd.go
│ │ ├── battery_solaris.go
│ │ ├── battery_windows.go
│ │ ├── errors.go
│ │ └── ioctl.go
│ ├── docopt/
│ │ └── docopt.go/
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── doc.go
│ │ ├── docopt.go
│ │ ├── error.go
│ │ ├── opts.go
│ │ ├── pattern.go
│ │ ├── test_golang.docopt
│ │ ├── testcases.docopt
│ │ └── token.go
│ ├── gizak/
│ │ └── termui/
│ │ └── v3/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── alignment.go
│ │ ├── backend.go
│ │ ├── block.go
│ │ ├── buffer.go
│ │ ├── canvas.go
│ │ ├── doc.go
│ │ ├── events.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── grid.go
│ │ ├── render.go
│ │ ├── style.go
│ │ ├── style_parser.go
│ │ ├── symbols.go
│ │ ├── symbols_other.go
│ │ ├── symbols_windows.go
│ │ ├── theme.go
│ │ └── utils.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
│ │ ├── oleutil/
│ │ │ ├── connection.go
│ │ │ ├── connection_func.go
│ │ │ ├── connection_windows.go
│ │ │ ├── go-get.go
│ │ │ └── oleutil.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_s390x.go
│ │ ├── vt_string.go
│ │ ├── winrt.go
│ │ └── winrt_doc.go
│ ├── mattn/
│ │ └── go-runewidth/
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.mkd
│ │ ├── runewidth.go
│ │ ├── runewidth_appengine.go
│ │ ├── runewidth_js.go
│ │ ├── runewidth_posix.go
│ │ └── runewidth_windows.go
│ ├── mitchellh/
│ │ └── go-wordwrap/
│ │ ├── LICENSE.md
│ │ ├── README.md
│ │ ├── go.mod
│ │ └── wordwrap.go
│ ├── nsf/
│ │ └── termbox-go/
│ │ ├── AUTHORS
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── api.go
│ │ ├── api_common.go
│ │ ├── api_windows.go
│ │ ├── collect_terminfo.py
│ │ ├── escwait.go
│ │ ├── escwait_darwin.go
│ │ ├── syscalls.go
│ │ ├── syscalls_darwin.go
│ │ ├── syscalls_darwin_amd64.go
│ │ ├── syscalls_dragonfly.go
│ │ ├── syscalls_freebsd.go
│ │ ├── syscalls_linux.go
│ │ ├── syscalls_netbsd.go
│ │ ├── syscalls_openbsd.go
│ │ ├── syscalls_windows.go
│ │ ├── termbox.go
│ │ ├── termbox_common.go
│ │ ├── termbox_windows.go
│ │ ├── terminfo.go
│ │ └── terminfo_builtin.go
│ └── shirou/
│ ├── gopsutil/
│ │ ├── LICENSE
│ │ ├── cpu/
│ │ │ ├── cpu.go
│ │ │ ├── cpu_darwin.go
│ │ │ ├── cpu_darwin_cgo.go
│ │ │ ├── cpu_darwin_nocgo.go
│ │ │ ├── cpu_fallback.go
│ │ │ ├── cpu_freebsd.go
│ │ │ ├── cpu_freebsd_386.go
│ │ │ ├── cpu_freebsd_amd64.go
│ │ │ ├── cpu_linux.go
│ │ │ ├── cpu_openbsd.go
│ │ │ ├── cpu_solaris.go
│ │ │ └── cpu_windows.go
│ │ ├── disk/
│ │ │ ├── disk.go
│ │ │ ├── disk_darwin.go
│ │ │ ├── disk_darwin.h
│ │ │ ├── disk_darwin_386.go
│ │ │ ├── disk_darwin_amd64.go
│ │ │ ├── disk_darwin_arm64.go
│ │ │ ├── disk_darwin_cgo.go
│ │ │ ├── disk_darwin_nocgo.go
│ │ │ ├── disk_fallback.go
│ │ │ ├── disk_freebsd.go
│ │ │ ├── disk_freebsd_386.go
│ │ │ ├── disk_freebsd_amd64.go
│ │ │ ├── disk_linux.go
│ │ │ ├── disk_openbsd.go
│ │ │ ├── disk_openbsd_amd64.go
│ │ │ ├── disk_solaris.go
│ │ │ ├── disk_unix.go
│ │ │ ├── disk_windows.go
│ │ │ ├── types_freebsd.go
│ │ │ └── types_openbsd.go
│ │ ├── host/
│ │ │ ├── host.go
│ │ │ ├── host_darwin.go
│ │ │ ├── host_darwin_386.go
│ │ │ ├── host_darwin_amd64.go
│ │ │ ├── host_fallback.go
│ │ │ ├── host_freebsd.go
│ │ │ ├── host_freebsd_386.go
│ │ │ ├── host_freebsd_amd64.go
│ │ │ ├── host_freebsd_arm.go
│ │ │ ├── host_linux.go
│ │ │ ├── host_linux_386.go
│ │ │ ├── host_linux_amd64.go
│ │ │ ├── host_linux_arm.go
│ │ │ ├── host_linux_arm64.go
│ │ │ ├── host_linux_mips.go
│ │ │ ├── host_linux_mips64.go
│ │ │ ├── host_linux_mips64le.go
│ │ │ ├── host_linux_mipsle.go
│ │ │ ├── host_linux_ppc64le.go
│ │ │ ├── host_linux_s390x.go
│ │ │ ├── host_openbsd.go
│ │ │ ├── host_openbsd_amd64.go
│ │ │ ├── host_solaris.go
│ │ │ ├── host_windows.go
│ │ │ ├── types_darwin.go
│ │ │ ├── types_freebsd.go
│ │ │ ├── types_linux.go
│ │ │ └── types_openbsd.go
│ │ ├── internal/
│ │ │ └── common/
│ │ │ ├── binary.go
│ │ │ ├── common.go
│ │ │ ├── common_darwin.go
│ │ │ ├── common_freebsd.go
│ │ │ ├── common_linux.go
│ │ │ ├── common_openbsd.go
│ │ │ ├── common_unix.go
│ │ │ └── common_windows.go
│ │ ├── mem/
│ │ │ ├── mem.go
│ │ │ ├── mem_darwin.go
│ │ │ ├── mem_darwin_cgo.go
│ │ │ ├── mem_darwin_nocgo.go
│ │ │ ├── mem_fallback.go
│ │ │ ├── mem_freebsd.go
│ │ │ ├── mem_linux.go
│ │ │ ├── mem_openbsd.go
│ │ │ ├── mem_openbsd_amd64.go
│ │ │ ├── mem_solaris.go
│ │ │ ├── mem_windows.go
│ │ │ └── types_openbsd.go
│ │ ├── net/
│ │ │ ├── net.go
│ │ │ ├── net_darwin.go
│ │ │ ├── net_fallback.go
│ │ │ ├── net_freebsd.go
│ │ │ ├── net_linux.go
│ │ │ ├── net_openbsd.go
│ │ │ ├── net_unix.go
│ │ │ └── net_windows.go
│ │ └── process/
│ │ ├── process.go
│ │ ├── process_darwin.go
│ │ ├── process_darwin_386.go
│ │ ├── process_darwin_amd64.go
│ │ ├── process_fallback.go
│ │ ├── process_freebsd.go
│ │ ├── process_freebsd_386.go
│ │ ├── process_freebsd_amd64.go
│ │ ├── process_freebsd_arm.go
│ │ ├── process_linux.go
│ │ ├── process_openbsd.go
│ │ ├── process_openbsd_amd64.go
│ │ ├── process_posix.go
│ │ ├── process_windows.go
│ │ ├── process_windows_386.go
│ │ ├── process_windows_amd64.go
│ │ ├── types_darwin.go
│ │ ├── types_freebsd.go
│ │ └── types_openbsd.go
│ └── w32/
│ ├── AUTHORS
│ ├── LICENSE
│ ├── README.md
│ ├── advapi32.go
│ ├── comctl32.go
│ ├── comdlg32.go
│ ├── constants.go
│ ├── dwmapi.go
│ ├── gdi32.go
│ ├── gdiplus.go
│ ├── idispatch.go
│ ├── istream.go
│ ├── iunknown.go
│ ├── kernel32.go
│ ├── ole32.go
│ ├── oleaut32.go
│ ├── opengl32.go
│ ├── psapi.go
│ ├── shell32.go
│ ├── typedef.go
│ ├── user32.go
│ ├── utils.go
│ └── vars.go
├── golang.org/
│ └── x/
│ └── sys/
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── unix/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── affinity_linux.go
│ │ ├── aliases.go
│ │ ├── asm_aix_ppc64.s
│ │ ├── asm_darwin_386.s
│ │ ├── asm_darwin_amd64.s
│ │ ├── asm_darwin_arm.s
│ │ ├── asm_darwin_arm64.s
│ │ ├── asm_dragonfly_amd64.s
│ │ ├── asm_freebsd_386.s
│ │ ├── asm_freebsd_amd64.s
│ │ ├── asm_freebsd_arm.s
│ │ ├── asm_freebsd_arm64.s
│ │ ├── asm_linux_386.s
│ │ ├── asm_linux_amd64.s
│ │ ├── asm_linux_arm.s
│ │ ├── asm_linux_arm64.s
│ │ ├── asm_linux_mips64x.s
│ │ ├── asm_linux_mipsx.s
│ │ ├── asm_linux_ppc64x.s
│ │ ├── asm_linux_s390x.s
│ │ ├── asm_netbsd_386.s
│ │ ├── asm_netbsd_amd64.s
│ │ ├── asm_netbsd_arm.s
│ │ ├── asm_openbsd_386.s
│ │ ├── asm_openbsd_amd64.s
│ │ ├── asm_openbsd_arm.s
│ │ ├── asm_solaris_amd64.s
│ │ ├── bluetooth_linux.go
│ │ ├── cap_freebsd.go
│ │ ├── constants.go
│ │ ├── dev_aix_ppc.go
│ │ ├── dev_aix_ppc64.go
│ │ ├── dev_darwin.go
│ │ ├── dev_dragonfly.go
│ │ ├── dev_freebsd.go
│ │ ├── dev_linux.go
│ │ ├── dev_netbsd.go
│ │ ├── dev_openbsd.go
│ │ ├── dirent.go
│ │ ├── endian_big.go
│ │ ├── endian_little.go
│ │ ├── env_unix.go
│ │ ├── errors_freebsd_386.go
│ │ ├── errors_freebsd_amd64.go
│ │ ├── errors_freebsd_arm.go
│ │ ├── fcntl.go
│ │ ├── fcntl_darwin.go
│ │ ├── fcntl_linux_32bit.go
│ │ ├── gccgo.go
│ │ ├── gccgo_c.c
│ │ ├── gccgo_linux_amd64.go
│ │ ├── ioctl.go
│ │ ├── mkall.sh
│ │ ├── mkasm_darwin.go
│ │ ├── mkerrors.sh
│ │ ├── mkpost.go
│ │ ├── mksyscall.go
│ │ ├── mksyscall_aix_ppc.go
│ │ ├── mksyscall_aix_ppc64.pl
│ │ ├── mksyscall_solaris.pl
│ │ ├── mksysctl_openbsd.pl
│ │ ├── mksysnum.go
│ │ ├── openbsd_pledge.go
│ │ ├── openbsd_unveil.go
│ │ ├── pagesize_unix.go
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── sockcmsg_linux.go
│ │ ├── sockcmsg_unix.go
│ │ ├── str.go
│ │ ├── syscall.go
│ │ ├── syscall_aix.go
│ │ ├── syscall_aix_ppc.go
│ │ ├── syscall_aix_ppc64.go
│ │ ├── syscall_bsd.go
│ │ ├── syscall_darwin.go
│ │ ├── syscall_darwin_386.go
│ │ ├── syscall_darwin_amd64.go
│ │ ├── syscall_darwin_arm.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_linux.go
│ │ ├── syscall_linux_386.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_gccgo_386.go
│ │ ├── syscall_linux_gccgo_arm.go
│ │ ├── syscall_linux_mips64x.go
│ │ ├── syscall_linux_mipsx.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_openbsd.go
│ │ ├── syscall_openbsd_386.go
│ │ ├── syscall_openbsd_amd64.go
│ │ ├── syscall_openbsd_arm.go
│ │ ├── syscall_solaris.go
│ │ ├── syscall_solaris_amd64.go
│ │ ├── syscall_unix.go
│ │ ├── syscall_unix_gc.go
│ │ ├── syscall_unix_gc_ppc64x.go
│ │ ├── timestruct.go
│ │ ├── types_aix.go
│ │ ├── types_darwin.go
│ │ ├── types_dragonfly.go
│ │ ├── types_freebsd.go
│ │ ├── types_netbsd.go
│ │ ├── types_openbsd.go
│ │ ├── types_solaris.go
│ │ ├── xattr_bsd.go
│ │ ├── zerrors_aix_ppc.go
│ │ ├── zerrors_aix_ppc64.go
│ │ ├── zerrors_darwin_386.go
│ │ ├── zerrors_darwin_amd64.go
│ │ ├── zerrors_darwin_arm.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_linux_386.go
│ │ ├── zerrors_linux_amd64.go
│ │ ├── zerrors_linux_arm.go
│ │ ├── zerrors_linux_arm64.go
│ │ ├── zerrors_linux_mips.go
│ │ ├── zerrors_linux_mips64.go
│ │ ├── zerrors_linux_mips64le.go
│ │ ├── zerrors_linux_mipsle.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_openbsd_386.go
│ │ ├── zerrors_openbsd_amd64.go
│ │ ├── zerrors_openbsd_arm.go
│ │ ├── zerrors_solaris_amd64.go
│ │ ├── zptrace386_linux.go
│ │ ├── zptracearm_linux.go
│ │ ├── zptracemips_linux.go
│ │ ├── zptracemipsle_linux.go
│ │ ├── zsyscall_aix_ppc.go
│ │ ├── zsyscall_aix_ppc64.go
│ │ ├── zsyscall_aix_ppc64_gc.go
│ │ ├── zsyscall_aix_ppc64_gccgo.go
│ │ ├── zsyscall_darwin_386.1_11.go
│ │ ├── zsyscall_darwin_386.go
│ │ ├── zsyscall_darwin_386.s
│ │ ├── zsyscall_darwin_amd64.1_11.go
│ │ ├── zsyscall_darwin_amd64.go
│ │ ├── zsyscall_darwin_amd64.s
│ │ ├── zsyscall_darwin_arm.1_11.go
│ │ ├── zsyscall_darwin_arm.go
│ │ ├── zsyscall_darwin_arm.s
│ │ ├── zsyscall_darwin_arm64.1_11.go
│ │ ├── 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_linux_386.go
│ │ ├── zsyscall_linux_amd64.go
│ │ ├── zsyscall_linux_arm.go
│ │ ├── zsyscall_linux_arm64.go
│ │ ├── zsyscall_linux_mips.go
│ │ ├── zsyscall_linux_mips64.go
│ │ ├── zsyscall_linux_mips64le.go
│ │ ├── zsyscall_linux_mipsle.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_openbsd_386.go
│ │ ├── zsyscall_openbsd_amd64.go
│ │ ├── zsyscall_openbsd_arm.go
│ │ ├── zsyscall_solaris_amd64.go
│ │ ├── zsysctl_openbsd_386.go
│ │ ├── zsysctl_openbsd_amd64.go
│ │ ├── zsysctl_openbsd_arm.go
│ │ ├── zsysnum_darwin_386.go
│ │ ├── zsysnum_darwin_amd64.go
│ │ ├── zsysnum_darwin_arm.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_linux_386.go
│ │ ├── zsysnum_linux_amd64.go
│ │ ├── zsysnum_linux_arm.go
│ │ ├── zsysnum_linux_arm64.go
│ │ ├── zsysnum_linux_mips.go
│ │ ├── zsysnum_linux_mips64.go
│ │ ├── zsysnum_linux_mips64le.go
│ │ ├── zsysnum_linux_mipsle.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_openbsd_386.go
│ │ ├── zsysnum_openbsd_amd64.go
│ │ ├── zsysnum_openbsd_arm.go
│ │ ├── ztypes_aix_ppc.go
│ │ ├── ztypes_aix_ppc64.go
│ │ ├── ztypes_darwin_386.go
│ │ ├── ztypes_darwin_amd64.go
│ │ ├── ztypes_darwin_arm.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_linux_386.go
│ │ ├── ztypes_linux_amd64.go
│ │ ├── ztypes_linux_arm.go
│ │ ├── ztypes_linux_arm64.go
│ │ ├── ztypes_linux_mips.go
│ │ ├── ztypes_linux_mips64.go
│ │ ├── ztypes_linux_mips64le.go
│ │ ├── ztypes_linux_mipsle.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_openbsd_386.go
│ │ ├── ztypes_openbsd_amd64.go
│ │ ├── ztypes_openbsd_arm.go
│ │ └── ztypes_solaris_amd64.go
│ └── windows/
│ ├── aliases.go
│ ├── asm_windows_386.s
│ ├── asm_windows_amd64.s
│ ├── asm_windows_arm.s
│ ├── dll_windows.go
│ ├── env_windows.go
│ ├── eventlog.go
│ ├── exec_windows.go
│ ├── memory_windows.go
│ ├── mksyscall.go
│ ├── race.go
│ ├── race0.go
│ ├── security_windows.go
│ ├── service.go
│ ├── str.go
│ ├── syscall.go
│ ├── syscall_windows.go
│ ├── types_windows.go
│ ├── types_windows_386.go
│ ├── types_windows_amd64.go
│ ├── types_windows_arm.go
│ └── zsyscall_windows.go
├── howett.net/
│ └── plist/
│ ├── .gitlab-ci.yml
│ ├── LICENSE
│ ├── README.md
│ ├── bplist.go
│ ├── bplist_generator.go
│ ├── bplist_parser.go
│ ├── decode.go
│ ├── doc.go
│ ├── encode.go
│ ├── fuzz.go
│ ├── go.mod
│ ├── marshal.go
│ ├── must.go
│ ├── plist.go
│ ├── plist_types.go
│ ├── text_generator.go
│ ├── text_parser.go
│ ├── text_tables.go
│ ├── typeinfo.go
│ ├── unmarshal.go
│ ├── util.go
│ ├── xml_generator.go
│ ├── xml_parser.go
│ ├── zerocopy.go
│ └── zerocopy_appengine.go
└── modules.txt
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Template to report bugs.
---
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Also please test using the latest build to make sure your issue has not already been fixed. -->
Required information:
- gotop version (`gotop -V`):
- The output of `uname -a`:
- Terminal emulator (e.g. iTerm or gnome terminal):
- Any relevenat hardware info:
- tmux version if using tmux:
Also please copy or attach `~/.local/state/gotop/errors.log` if it exists and contains logs:
================================================
FILE: .github/ISSUE_TEMPLATE/other.md
================================================
---
name: Other
about: No template.
---
================================================
FILE: .gitignore
================================================
dist/
gotop*
# snap packaging specific
/parts/
/prime/
/stage/
/*.snap
/snap/.snapcraft/
/*_source.tar.bz2
================================================
FILE: .travis.yml
================================================
language: go
go:
- 1.11.x
git:
depth: 1
env:
global:
- NAME=gotop
matrix:
include:
# Linux
- env: _GOOS=linux _GOARCH=amd64
os: linux
- env: _GOOS=linux _GOARCH=386
os: linux
- env: _GOOS=linux _GOARCH=arm GOARM=5
os: linux
- env: _GOOS=linux _GOARCH=arm GOARM=6
os: linux
- env: _GOOS=linux _GOARCH=arm GOARM=7
os: linux
- env: _GOOS=linux _GOARCH=arm64
os: linux
# OSX
- env: _GOOS=darwin _GOARCH=amd64
os: osx
install: true
script: ./ci/script.sh
deploy:
provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file: "./dist/*"
skip_cleanup: true
on:
tags: true
if: tag IS present
notifications:
email:
on_success: never
================================================
FILE: CHANGELOG.md
================================================
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
> **Types of changes**:
>
> - **Added**: for new features.
> - **Changed**: for changes in existing functionality.
> - **Deprecated**: for soon-to-be removed features.
> - **Removed**: for now removed features.
> - **Fixed**: for any bug fixes.
> - **Security**: in case of vulnerabilities.
## [Unreleased]
### Added
- Add cli option to select network interface [#20] [#144]
- Add snap package [#119] [#120] [#121]
- Process list scroll indicator [#127] [#130]
- Preliminary OpenBSD support [#112] [#117] [#118]
### Fixed
- Fix process localization issues on macOS [#124]
- Fix miscellaneous issues on FreeBSD [#134] [#145]
- Fix spelling of "Tx" to "TX" [#129]
- Rerender statusbar on every tick [#128]
## [3.0.0] - 2019-02-22
### Added
- Add vice colorscheme [#115]
### Changed
- Change `-v` cli option to `-V` for version
- Revert back to using the XDG spec on macOS
### Fixed
- WIP fix disk I/O statistics [#114] [#116]
## [2.0.2] - 2019-02-16
### Fixed
- Fix processes on macOS not showing when there's a space in the command name [#107] [#109]
[#134]: https://github.com/cjbassi/gotop/issues/134
[#127]: https://github.com/cjbassi/gotop/issues/127
[#124]: https://github.com/cjbassi/gotop/issues/124
[#119]: https://github.com/cjbassi/gotop/issues/119
[#118]: https://github.com/cjbassi/gotop/issues/118
[#117]: https://github.com/cjbassi/gotop/issues/117
[#114]: https://github.com/cjbassi/gotop/issues/114
[#107]: https://github.com/cjbassi/gotop/issues/107
[#20]: https://github.com/cjbassi/gotop/issues/20
[#145]: https://github.com/cjbassi/gotop/pull/145
[#144]: https://github.com/cjbassi/gotop/pull/144
[#130]: https://github.com/cjbassi/gotop/pull/130
[#129]: https://github.com/cjbassi/gotop/pull/129
[#128]: https://github.com/cjbassi/gotop/pull/128
[#121]: https://github.com/cjbassi/gotop/pull/121
[#120]: https://github.com/cjbassi/gotop/pull/120
[#116]: https://github.com/cjbassi/gotop/pull/116
[#115]: https://github.com/cjbassi/gotop/pull/115
[#112]: https://github.com/cjbassi/gotop/pull/112
[#109]: https://github.com/cjbassi/gotop/pull/109
[Unreleased]: https://github.com/cjbassi/gotop/compare/3.0.0...HEAD
[3.0.0]: https://github.com/cjbassi/gotop/compare/2.0.2...3.0.0
[2.0.2]: https://github.com/cjbassi/gotop/compare/2.0.1...2.0.2
================================================
FILE: LICENSE
================================================
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.
================================================
FILE: Makefile
================================================
# builds .rpm and .deb packages
# requires dockerd to be running
# builds the packages for amd64
VERSION=$(shell go run main.go -V)
ARCHIVE="gotop_$(VERSION)_linux_amd64"
.PHONY: all
all: dist/gotop.rpm dist/gotop.deb
dist/gotop:
@GOOS=linux GOARCH=amd64 go build -o $@
dist:
@mkdir $@
dist/gotop.rpm: dist dist/gotop
@docker run --rm \
-v "$(PWD)/build:/tmp/build" \
-v "$(PWD)/dist:/tmp/dist" \
-e "VERSION=$(VERSION)" \
goreleaser/nfpm pkg \
--config /tmp/build/nfpm.yml \
--target /tmp/dist/$(ARCHIVE).rpm
dist/gotop.deb: dist dist/gotop
@docker run --rm \
-v "$(PWD)/build:/tmp/build" \
-v "$(PWD)/dist:/tmp/dist" \
-e "VERSION=$(VERSION)" \
goreleaser/nfpm pkg \
--config /tmp/build/nfpm.yml \
--target /tmp/dist/$(ARCHIVE).deb
.PHONY: clean
clean:
@-rm -rf dist
================================================
FILE: README.md
================================================
### **NO LONGER MAINTAINED.** A maintained fork of gotop exists at https://github.com/xxxserxxx/gotop.
<div align="center">
<a href="./assets/logo">
<img src="./assets/logo/logo.png" width="20%" />
</a>
<br><br>
Another terminal based graphical activity monitor, inspired by [gtop](https://github.com/aksakalli/gtop) and [vtop](https://github.com/MrRio/vtop), this time written in [Go](https://golang.org/)!
<img src="./assets/demos/demo.gif" />
<img src="./assets/screenshots/minimal.png" width="96%" />
</div>
## Installation
Working and tested on Linux, FreeBSD and macOS. Windows support is planned. OpenBSD works with some caveats.
### Source
```bash
go get github.com/cjbassi/gotop
```
### Prebuilt binaries
**Note**: Doesn't require Go.
Clone the repo and then run [scripts/download.sh](./scripts/download.sh) to download the correct binary for your system from the [releases tab](https://github.com/cjbassi/gotop/releases):
```bash
git clone --depth 1 https://github.com/cjbassi/gotop /tmp/gotop
/tmp/gotop/scripts/download.sh
```
Then move `gotop` into your `$PATH` somewhere.
### Arch Linux
Install `gotop`, `gotop-bin`, or `gotop-git` from the AUR.
### FreeBSD
```bash
pkg install gotop
```
### Homebrew
```bash
brew tap cjbassi/gotop
brew install gotop
```
### Snap
```bash
snap install gotop-cjbassi
```
**Note**: You may need to enable certain permissions for all of the widgets to work:
```bash
snap connect gotop-cjbassi:hardware-observe
snap connect gotop-cjbassi:mount-observe
snap connect gotop-cjbassi:system-observe
```
## Usage
### Keybinds
- Quit: `q` or `<C-c>`
- Process navigation
- `k` and `<Up>`: up
- `j` and `<Down`: down
- `<C-u>`: half page up
- `<C-d>`: half page down
- `<C-b>`: full page up
- `<C-f>`: full page down
- `gg` and `<Home>`: jump to top
- `G` and `<End>`: jump to bottom
- Process actions:
- `<Tab>`: toggle process grouping
- `dd`: kill selected process or group of processes
- Process sorting
- `c`: CPU
- `m`: Mem
- `p`: PID
- CPU and Mem graph scaling:
- `h`: scale in
- `l`: scale out
- `?`: toggles keybind help menu
### Mouse
- click to select process
- mouse wheel to scroll through processes
### Colorschemes
gotop ships with a few colorschemes which can be set with the `-c` flag followed by the name of one. You can find all the colorschemes in the [colorschemes folder](./colorschemes).
To make a custom colorscheme, check out the [template](./colorschemes/template.go) for instructions and then use [default.json](./colorschemes/default.json) as a starter. Then put the file at `~/.config/gotop/<name>.json` and load it with `gotop -c <name>`. Colorschemes PR's are welcome!
### CLI Options
`-c`, `--color=NAME` Set a colorscheme.
`-m`, `--minimal` Only show CPU, Mem and Process widgets.
`-r`, `--rate=RATE` Number of times per second to update CPU and Mem widgets [default: 1].
`-V`, `--version` Print version and exit.
`-p`, `--percpu` Show each CPU in the CPU widget.
`-a`, `--averagecpu` Show average CPU in the CPU widget.
`-s`, `--statusbar` Show a statusbar with the time.
`-b`, `--battery` Show battery level widget (`minimal` turns off). [preview](./assets/screenshots/battery.png)
`-i`, `--interface=NAME` Select network interface [default: all].
## Built With
- [gizak/termui](https://github.com/gizak/termui)
- [nsf/termbox](https://github.com/nsf/termbox-go)
- [exrook/drawille-go](https://github.com/exrook/drawille-go)
- [shirou/gopsutil](https://github.com/shirou/gopsutil)
- [goreleaser/nfpm](https://github.com/goreleaser/nfpm)
- [distatus/battery](https://github.com/distatus/battery)
## Stargazers over time
[](https://starcharts.herokuapp.com/cjbassi/gotop)
================================================
FILE: assets/logo/credits.md
================================================
Logo created and contributed by [mdnazmulhasan27771](https://github.com/mdnazmulhasan27771)
================================================
FILE: build/nfpm.yml
================================================
name: "gotop"
arch: "amd64"
platform: "linux"
version: "v${VERSION}"
section: "default"
priority: "extra"
maintainer: "Caleb Bassi <calebjbassi@gmail.com>"
description: |
A terminal based graphical activity monitor inspired by gtop and vtop
vendor: "Caleb Bassi"
homepage: "https://github.com/cjbassi/gotop"
license: "GNU Affero General Public License v3.0"
bindir: "/usr/local/bin"
files:
/tmp/dist/gotop: "/usr/local/bin/gotop"
================================================
FILE: ci/script.sh
================================================
#!/usr/bin/env bash
function main {
# Check if any command failed
ERROR=false
GOARCH=${_GOARCH}
GOOS=${_GOOS}
if [[ ! ${GOARCH} ]]; then
exit
fi
env GOOS=${GOOS} GOARCH=${GOARCH} GOARM=${GOARM} go build -o ${NAME} || ERROR=true
mkdir -p dist
if [[ ${GOARCH} == "arm64" ]]; then
FILE=${NAME}_${TRAVIS_BRANCH}_${GOOS}_arm8
else
FILE=${NAME}_${TRAVIS_BRANCH}_${GOOS}_${GOARCH}${GOARM}
fi
tar -czf dist/${FILE}.tgz ${NAME} || ERROR=true
if [[ ${GOOS} == "linux" && ${GOARCH} == "amd64" ]]; then
make all || ERROR=true
rm dist/gotop
fi
if [ ${ERROR} == "true" ]; then
exit 1
fi
}
main
================================================
FILE: colorschemes/default.go
================================================
package colorschemes
var Default = Colorscheme{
Fg: 7,
Bg: -1,
BorderLabel: 7,
BorderLine: 6,
CPULines: []int{4, 3, 2, 1, 5, 6, 7, 8},
BattLines: []int{4, 3, 2, 1, 5, 6, 7, 8},
MainMem: 5,
SwapMem: 11,
ProcCursor: 4,
Sparkline: 4,
DiskBar: 7,
TempLow: 2,
TempHigh: 1,
}
================================================
FILE: colorschemes/default.json
================================================
// Example json file to put in `~/.config/gotop/{name}.json` and load with
// `gotop -c {name}`. MUST DELETE THESE COMMENTS AND RENAME FILE in order to load.
{
"Fg": 7,
"Bg": -1,
"BorderLabel": 7,
"BorderLine": 6,
"CPULines": [4, 3, 2, 1, 5, 6, 7, 8],
"BattLines": [4, 3, 2, 1, 5, 6, 7, 8],
"MainMem": 5,
"SwapMem": 11,
"ProcCursor": 4,
"Sparkline": 4,
"DiskBar": 7,
"TempLow": 2,
"TempHigh": 1
}
================================================
FILE: colorschemes/default_dark.go
================================================
package colorschemes
var DefaultDark = Colorscheme{
Fg: 235,
Bg: -1,
BorderLabel: 235,
BorderLine: 6,
CPULines: []int{4, 3, 2, 1, 5, 6, 7, 8},
BattLines: []int{4, 3, 2, 1, 5, 6, 7, 8},
MainMem: 5,
SwapMem: 3,
ProcCursor: 33,
Sparkline: 4,
DiskBar: 252,
TempLow: 2,
TempHigh: 1,
}
================================================
FILE: colorschemes/monokai.go
================================================
package colorschemes
var Monokai = Colorscheme{
Fg: 249,
Bg: -1,
BorderLabel: 249,
BorderLine: 239,
CPULines: []int{81, 70, 208, 197, 249, 141, 221, 186},
BattLines: []int{81, 70, 208, 197, 249, 141, 221, 186},
MainMem: 208,
SwapMem: 186,
ProcCursor: 197,
Sparkline: 81,
DiskBar: 102,
TempLow: 70,
TempHigh: 208,
}
================================================
FILE: colorschemes/solarized.go
================================================
package colorschemes
var Solarized = Colorscheme{
Fg: 250,
Bg: -1,
BorderLabel: 250,
BorderLine: 37,
CPULines: []int{61, 33, 37, 64, 125, 160, 166, 136},
BattLines: []int{61, 33, 37, 64, 125, 160, 166, 136},
MainMem: 125,
SwapMem: 166,
ProcCursor: 136,
Sparkline: 33,
DiskBar: 245,
TempLow: 64,
TempHigh: 160,
}
================================================
FILE: colorschemes/template.go
================================================
package colorschemes
/*
The standard 256 terminal colors are supported.
-1 = clear
You can combine a color with 'Bold', 'Underline', or 'Reverse' by using bitwise OR ('|') and the name of the Color.
For example, to get Bold red Labels, you would do 'Labels: 2 | Bold'.
Once you've created a colorscheme, add an entry for it in the `handleColorscheme` function in 'main.go'.
*/
const (
Bold int = 1 << (iota + 9)
Underline
Reverse
)
type Colorscheme struct {
Name string
Author string
Fg int
Bg int
BorderLabel int
BorderLine int
// should add at least 8 here
CPULines []int
BattLines []int
MainMem int
SwapMem int
ProcCursor int
Sparkline int
DiskBar int
// colors the temperature number a different color if it's over a certain threshold
TempLow int
TempHigh int
}
================================================
FILE: colorschemes/vice.go
================================================
package colorschemes
var Vice = Colorscheme{
Fg: 231,
Bg: -1,
BorderLabel: 123,
BorderLine: 102,
CPULines: []int{212, 218, 123, 159, 229, 158, 183, 146},
BattLines: []int{212, 218, 123, 159, 229, 158, 183, 146},
MainMem: 201,
SwapMem: 97,
ProcCursor: 159,
Sparkline: 183,
DiskBar: 158,
TempLow: 49,
TempHigh: 197,
}
================================================
FILE: go.mod
================================================
module github.com/cjbassi/gotop
require (
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/distatus/battery v0.9.0
github.com/docopt/docopt.go v0.0.0-20180111231733-ee0de3bc6815
github.com/gizak/termui/v3 v3.0.0
github.com/go-ole/go-ole v1.2.1 // indirect
github.com/mattn/go-runewidth v0.0.4 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/shirou/gopsutil v2.18.11+incompatible
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect
github.com/stretchr/testify v1.2.2 // indirect
golang.org/x/sys v0.0.0-20190116161447-11f53e031339 // indirect
howett.net/plist v0.0.0-20181124034731-591f970eefbb // indirect
)
================================================
FILE: go.sum
================================================
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8=
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
github.com/cjbassi/drawille-go v0.0.0-20190126131713-27dc511fe6fd h1:XtfPmj9tQRilnrEmI1HjQhxXWRhEM+m8CACtaMJE/kM=
github.com/cjbassi/drawille-go v0.0.0-20190126131713-27dc511fe6fd/go.mod h1:vjcQJUZJYD3MeVGhtZXSMnCHfUNZxsyYzJt90eCYxK4=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/distatus/battery v0.9.0 h1:8NS5o00/j3Oh2xgocA6pQROTp5guoR+s8CZlWzHC4QM=
github.com/distatus/battery v0.9.0/go.mod h1:gGO7GxHTi1zlRT+cAj8uGG0/8HFiqAeH0TJvoipnuPs=
github.com/docopt/docopt.go v0.0.0-20180111231733-ee0de3bc6815 h1:HMAfwOa33y82IaQEKQDfUCiwNlxtM1iw7HLM9ru0RNc=
github.com/docopt/docopt.go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:l7JNRynTRuqe45tpIyItHNqZWTxywYjp87MWTOnU5cg=
github.com/gizak/termui/v3 v3.0.0 h1:NYTUG6ig/sJK05O5FyhWemwlVPO8ilNpvS/PgRtrKAE=
github.com/gizak/termui/v3 v3.0.0/go.mod h1:uinu2dMdtMI+FTIdEFUJQT5y+KShnhQRshvPblXq3lY=
github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E=
github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/mattn/go-runewidth v0.0.2 h1:UnlwIPBGaTZfPQ6T1IGzPI0EkYAQmT9fAEJ/poFC63o=
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y=
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM=
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4=
github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d h1:x3S6kxmy49zXVVyhcnrFqxvNVCBPb2KZ9hV2RBdS840=
github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/shirou/gopsutil v2.18.11+incompatible h1:PMFTKnFTr/YTRW5rbLK4vWALV3a+IGXse5nvhSjztmg=
github.com/shirou/gopsutil v2.18.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 h1:udFKJ0aHUL60LboW/A+DfgoHVedieIzIXE8uylPue0U=
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/arch v0.0.0-20181203225421-5a4828bb7045 h1:Pn8fQdvx+z1avAi7fdM2kRYWQNxGlavNDSyzrQg2SsU=
golang.org/x/arch v0.0.0-20181203225421-5a4828bb7045/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8=
golang.org/x/sys v0.0.0-20190116161447-11f53e031339 h1:g/Jesu8+QLnA0CPzF3E1pURg0Byr7i6jLoX5sqjcAh0=
golang.org/x/sys v0.0.0-20190116161447-11f53e031339/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
howett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqpnJdvzuiHsl/dnxl11M=
howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0=
================================================
FILE: main.go
================================================
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"os"
"os/signal"
"path/filepath"
"sort"
"strconv"
"syscall"
"time"
docopt "github.com/docopt/docopt.go"
ui "github.com/gizak/termui/v3"
"github.com/cjbassi/gotop/colorschemes"
"github.com/cjbassi/gotop/src/logging"
"github.com/cjbassi/gotop/src/utils"
w "github.com/cjbassi/gotop/src/widgets"
)
const (
appName = "gotop"
version = "3.0.0"
graphHorizontalScaleDelta = 3
)
var (
configDir = utils.GetConfigDir(appName)
logDir = utils.GetLogDir(appName)
logPath = filepath.Join(logDir, "errors.log")
stderrLogger = log.New(os.Stderr, "", 0)
graphHorizontalScale = 7
helpVisible = false
colorscheme = colorschemes.Default
updateInterval = time.Second
minimalMode = false
averageLoad = false
percpuLoad = false
tempScale = w.Celcius
battery = false
statusbar = false
netInterface = w.NET_INTERFACE_ALL
cpu *w.CpuWidget
batt *w.BatteryWidget
mem *w.MemWidget
proc *w.ProcWidget
net *w.NetWidget
disk *w.DiskWidget
temp *w.TempWidget
help *w.HelpMenu
grid *ui.Grid
bar *w.StatusBar
)
func parseArgs() error {
usage := `
Usage: gotop [options]
Options:
-c, --color=NAME Set a colorscheme.
-h, --help Show this screen.
-m, --minimal Only show CPU, Mem and Process widgets.
-r, --rate=RATE Number of times per second to update CPU and Mem widgets [default: 1].
-V, --version Print version and exit.
-p, --percpu Show each CPU in the CPU widget.
-a, --averagecpu Show average CPU in the CPU widget.
-f, --fahrenheit Show temperatures in fahrenheit.
-s, --statusbar Show a statusbar with the time.
-b, --battery Show battery level widget ('minimal' turns off).
-i, --interface=NAME Select network interface [default: all].
Colorschemes:
default
default-dark (for white background)
solarized
monokai
vice
`
args, err := docopt.ParseArgs(usage, os.Args[1:], version)
if err != nil {
return err
}
if val, _ := args["--color"]; val != nil {
if err := handleColorscheme(val.(string)); err != nil {
return err
}
}
averageLoad, _ = args["--averagecpu"].(bool)
percpuLoad, _ = args["--percpu"].(bool)
battery, _ = args["--battery"].(bool)
minimalMode, _ = args["--minimal"].(bool)
statusbar, _ = args["--statusbar"].(bool)
rateStr, _ := args["--rate"].(string)
rate, err := strconv.ParseFloat(rateStr, 64)
if err != nil {
return fmt.Errorf("invalid rate parameter")
}
if rate < 1 {
updateInterval = time.Second * time.Duration(1/rate)
} else {
updateInterval = time.Second / time.Duration(rate)
}
fahrenheit, _ := args["--fahrenheit"].(bool)
if fahrenheit {
tempScale = w.Fahrenheit
}
netInterface, _ = args["--interface"].(string)
return nil
}
func handleColorscheme(cs string) error {
switch cs {
case "default":
colorscheme = colorschemes.Default
case "solarized":
colorscheme = colorschemes.Solarized
case "monokai":
colorscheme = colorschemes.Monokai
case "vice":
colorscheme = colorschemes.Vice
case "default-dark":
colorscheme = colorschemes.DefaultDark
default:
custom, err := getCustomColorscheme(cs)
if err != nil {
return err
}
colorscheme = custom
}
return nil
}
// getCustomColorscheme tries to read a custom json colorscheme from <configDir>/<name>.json
func getCustomColorscheme(name string) (colorschemes.Colorscheme, error) {
var colorscheme colorschemes.Colorscheme
filePath := filepath.Join(configDir, name+".json")
dat, err := ioutil.ReadFile(filePath)
if err != nil {
return colorscheme, fmt.Errorf("failed to read colorscheme file: %v", err)
}
err = json.Unmarshal(dat, &colorscheme)
if err != nil {
return colorscheme, fmt.Errorf("failed to parse colorscheme file: %v", err)
}
return colorscheme, nil
}
func setupGrid() {
grid = ui.NewGrid()
if minimalMode {
grid.Set(
ui.NewRow(1.0/2, cpu),
ui.NewRow(1.0/2,
ui.NewCol(1.0/2, mem),
ui.NewCol(1.0/2, proc),
),
)
} else {
var cpuRow ui.GridItem
if battery {
cpuRow = ui.NewRow(1.0/3,
ui.NewCol(2.0/3, cpu),
ui.NewCol(1.0/3, batt),
)
} else {
cpuRow = ui.NewRow(1.0/3, cpu)
}
grid.Set(
cpuRow,
ui.NewRow(1.0/3,
ui.NewCol(1.0/3,
ui.NewRow(1.0/2, disk),
ui.NewRow(1.0/2, temp),
),
ui.NewCol(2.0/3, mem),
),
ui.NewRow(1.0/3,
ui.NewCol(1.0/2, net),
ui.NewCol(1.0/2, proc),
),
)
}
}
func setDefaultTermuiColors() {
ui.Theme.Default = ui.NewStyle(ui.Color(colorscheme.Fg), ui.Color(colorscheme.Bg))
ui.Theme.Block.Title = ui.NewStyle(ui.Color(colorscheme.BorderLabel), ui.Color(colorscheme.Bg))
ui.Theme.Block.Border = ui.NewStyle(ui.Color(colorscheme.BorderLine), ui.Color(colorscheme.Bg))
}
func setWidgetColors() {
mem.LineColors["Main"] = ui.Color(colorscheme.MainMem)
mem.LineColors["Swap"] = ui.Color(colorscheme.SwapMem)
proc.CursorColor = ui.Color(colorscheme.ProcCursor)
var keys []string
for key := range cpu.Data {
keys = append(keys, key)
}
sort.Strings(keys)
i := 0
for _, v := range keys {
if i >= len(colorscheme.CPULines) {
// assuming colorscheme for CPU lines is not empty
i = 0
}
c := colorscheme.CPULines[i]
cpu.LineColors[v] = ui.Color(c)
i++
}
if !minimalMode {
if battery {
var battKeys []string
for key := range batt.Data {
battKeys = append(battKeys, key)
}
sort.Strings(battKeys)
i = 0 // Re-using variable from CPU
for _, v := range battKeys {
if i >= len(colorscheme.BattLines) {
// assuming colorscheme for battery lines is not empty
i = 0
}
c := colorscheme.BattLines[i]
batt.LineColors[v] = ui.Color(c)
i++
}
}
temp.TempLowColor = ui.Color(colorscheme.TempLow)
temp.TempHighColor = ui.Color(colorscheme.TempHigh)
net.Lines[0].LineColor = ui.Color(colorscheme.Sparkline)
net.Lines[0].TitleColor = ui.Color(colorscheme.BorderLabel)
net.Lines[1].LineColor = ui.Color(colorscheme.Sparkline)
net.Lines[1].TitleColor = ui.Color(colorscheme.BorderLabel)
}
}
func initWidgets() {
cpu = w.NewCpuWidget(updateInterval, graphHorizontalScale, averageLoad, percpuLoad)
mem = w.NewMemWidget(updateInterval, graphHorizontalScale)
proc = w.NewProcWidget()
help = w.NewHelpMenu()
if !minimalMode {
if battery {
batt = w.NewBatteryWidget(graphHorizontalScale)
}
net = w.NewNetWidget(netInterface)
disk = w.NewDiskWidget()
temp = w.NewTempWidget(tempScale)
}
if statusbar {
bar = w.NewStatusBar()
}
}
func eventLoop() {
drawTicker := time.NewTicker(updateInterval).C
// handles kill signal sent to gotop
sigTerm := make(chan os.Signal, 2)
signal.Notify(sigTerm, os.Interrupt, syscall.SIGTERM)
uiEvents := ui.PollEvents()
previousKey := ""
for {
select {
case <-sigTerm:
return
case <-drawTicker:
if !helpVisible {
ui.Render(grid)
if statusbar {
ui.Render(bar)
}
}
case e := <-uiEvents:
switch e.ID {
case "q", "<C-c>":
return
case "?":
helpVisible = !helpVisible
case "<Resize>":
payload := e.Payload.(ui.Resize)
termWidth, termHeight := payload.Width, payload.Height
if statusbar {
grid.SetRect(0, 0, termWidth, termHeight-1)
bar.SetRect(0, termHeight-1, termWidth, termHeight)
} else {
grid.SetRect(0, 0, payload.Width, payload.Height)
}
help.Resize(payload.Width, payload.Height)
ui.Clear()
}
if helpVisible {
switch e.ID {
case "?":
ui.Clear()
ui.Render(help)
case "<Escape>":
helpVisible = false
ui.Render(grid)
case "<Resize>":
ui.Render(help)
}
} else {
switch e.ID {
case "?":
ui.Render(grid)
case "h":
graphHorizontalScale += graphHorizontalScaleDelta
cpu.HorizontalScale = graphHorizontalScale
mem.HorizontalScale = graphHorizontalScale
ui.Render(cpu, mem)
case "l":
if graphHorizontalScale > graphHorizontalScaleDelta {
graphHorizontalScale -= graphHorizontalScaleDelta
cpu.HorizontalScale = graphHorizontalScale
mem.HorizontalScale = graphHorizontalScale
ui.Render(cpu, mem)
}
case "<Resize>":
ui.Render(grid)
if statusbar {
ui.Render(bar)
}
case "<MouseLeft>":
payload := e.Payload.(ui.Mouse)
proc.HandleClick(payload.X, payload.Y)
ui.Render(proc)
case "k", "<Up>", "<MouseWheelUp>":
proc.ScrollUp()
ui.Render(proc)
case "j", "<Down>", "<MouseWheelDown>":
proc.ScrollDown()
ui.Render(proc)
case "<Home>":
proc.ScrollTop()
ui.Render(proc)
case "g":
if previousKey == "g" {
proc.ScrollTop()
ui.Render(proc)
}
case "G", "<End>":
proc.ScrollBottom()
ui.Render(proc)
case "<C-d>":
proc.ScrollHalfPageDown()
ui.Render(proc)
case "<C-u>":
proc.ScrollHalfPageUp()
ui.Render(proc)
case "<C-f>":
proc.ScrollPageDown()
ui.Render(proc)
case "<C-b>":
proc.ScrollPageUp()
ui.Render(proc)
case "d":
if previousKey == "d" {
proc.KillProc()
}
case "<Tab>":
proc.ToggleShowingGroupedProcs()
ui.Render(proc)
case "m", "c", "p":
proc.ChangeProcSortMethod(w.ProcSortMethod(e.ID))
ui.Render(proc)
}
if previousKey == e.ID {
previousKey = ""
} else {
previousKey = e.ID
}
}
}
}
}
func setupLogfile() (*os.File, error) {
// create the log directory
if err := os.MkdirAll(logDir, 0755); err != nil {
return nil, fmt.Errorf("failed to make the log directory: %v", err)
}
// open the log file
logfile, err := os.OpenFile(logPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0660)
if err != nil {
return nil, fmt.Errorf("failed to open log file: %v", err)
}
// log time, filename, and line number
log.SetFlags(log.Ltime | log.Lshortfile)
// log to file
log.SetOutput(logfile)
return logfile, nil
}
func main() {
if err := parseArgs(); err != nil {
stderrLogger.Fatalf("failed to parse cli args: %v", err)
}
logfile, err := setupLogfile()
if err != nil {
stderrLogger.Fatalf("failed to setup log file: %v", err)
}
defer logfile.Close()
if err := ui.Init(); err != nil {
stderrLogger.Fatalf("failed to initialize termui: %v", err)
}
defer ui.Close()
logging.StderrToLogfile(logfile)
setDefaultTermuiColors() // done before initializing widgets to allow inheriting colors
initWidgets()
setWidgetColors()
setupGrid()
termWidth, termHeight := ui.TerminalDimensions()
if statusbar {
grid.SetRect(0, 0, termWidth, termHeight-1)
} else {
grid.SetRect(0, 0, termWidth, termHeight)
}
help.Resize(termWidth, termHeight)
ui.Render(grid)
if statusbar {
bar.SetRect(0, termHeight-1, termWidth, termHeight)
ui.Render(bar)
}
eventLoop()
}
================================================
FILE: scripts/download.sh
================================================
#!/usr/bin/env bash
# https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c
function get_latest_release {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
function download {
RELEASE=$(get_latest_release 'cjbassi/gotop')
ARCHIVE=gotop_${RELEASE}_${1}.tgz
curl -LO https://github.com/cjbassi/gotop/releases/download/${RELEASE}/${ARCHIVE}
tar xf ${ARCHIVE}
rm ${ARCHIVE}
}
function main {
ARCH=$(uname -sm)
case "${ARCH}" in
# order matters
Darwin\ *64) download darwin_amd64 ;;
Darwin\ *86) download darwin_386 ;;
Linux\ armv5*) download linux_arm5 ;;
Linux\ armv6*) download linux_arm6 ;;
Linux\ armv7*) download linux_arm7 ;;
Linux\ armv8*) download linux_arm8 ;;
Linux\ aarch64*) download linux_arm8 ;;
Linux\ *64) download linux_amd64 ;;
Linux\ *86) download linux_386 ;;
*)
echo "\
No binary found for your system.
Feel free to request that we prebuild one that works on your system."
exit 1
;;
esac
}
main
================================================
FILE: snap/snapcraft.yaml
================================================
name: gotop-cjbassi
base: core18
version: determined-by-version-script
version-script: git describe --always --tags --dirty
summary: A terminal based graphical activity monitor inspired by gtop and vtop
description: |
Another terminal based graphical activity monitor, inspired by [gtop](https://github.com/aksakalli/gtop) and [vtop](https://github.com/MrRio/vtop), this time written in [Go](https://golang.org/)!
grade: stable
confinement: strict
icon: assets/logo.png
license: AGPL-3.0
parts:
gotop:
source: .
plugin: go
go-importpath: github.com/cjbassi/gotop
build-packages:
- git-core
- gcc
plugs:
# Required by the "Temperatures" widget
hardware-observe:
# Required by the "Disk Usage" widget
mount-observe:
# Required by the "Processes" widget
system-observe:
apps:
gotop-cjbassi:
command: bin/gotop
environment:
LANG: C.UTF-8
LC_ALL: C.UTF-8
================================================
FILE: src/logging/logging_arm64.go
================================================
package logging
import (
"os"
"syscall"
)
func StderrToLogfile(logfile *os.File) {
syscall.Dup3(int(logfile.Fd()), 2, 0)
}
================================================
FILE: src/logging/logging_other.go
================================================
// +build !arm64
package logging
import (
"os"
"syscall"
)
func StderrToLogfile(logfile *os.File) {
syscall.Dup2(int(logfile.Fd()), 2)
}
================================================
FILE: src/termui/drawille-go/LICENSE.md
================================================
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.
================================================
FILE: src/termui/drawille-go/README.md
================================================
GO-DRAWILLE
===========
Drawing in the terminal with Unicode Braille characters.
A [go](https://golang.org) port of [asciimoo's](https://github.com/asciimoo) [drawille](https://github.com/asciimoo/drawille)
### LICENSE
```
drawille-go is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
drawille-go is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with drawille-go. If not, see < http://www.gnu.org/licenses/ >.
(C) 2014 by Adam Tauber, <asciimoo@gmail.com>
(C) 2014 by Jacob Hughes, <exrook.j@gmail.com>
```
================================================
FILE: src/termui/drawille-go/drawille.go
================================================
package drawille
//import "code.google.com/p/goncurses"
import "math"
var pixel_map = [4][2]int{
{0x1, 0x8},
{0x2, 0x10},
{0x4, 0x20},
{0x40, 0x80}}
// Braille chars start at 0x2800
var braille_char_offset = 0x2800
func getPixel(y, x int) int {
var cy, cx int
if y >= 0 {
cy = y % 4
} else {
cy = 3 + ((y + 1) % 4)
}
if x >= 0 {
cx = x % 2
} else {
cx = 1 + ((x + 1) % 2)
}
return pixel_map[cy][cx]
}
type Canvas struct {
LineEnding string
chars map[int]map[int]int
}
// Make a new canvas
func NewCanvas() Canvas {
c := Canvas{LineEnding: "\n"}
c.Clear()
return c
}
func (c Canvas) MaxY() int {
max := 0
for k, _ := range c.chars {
if k > max {
max = k
}
}
return max * 4
}
func (c Canvas) MinY() int {
min := 0
for k, _ := range c.chars {
if k < min {
min = k
}
}
return min * 4
}
func (c Canvas) MaxX() int {
max := 0
for _, v := range c.chars {
for k, _ := range v {
if k > max {
max = k
}
}
}
return max * 2
}
func (c Canvas) MinX() int {
min := 0
for _, v := range c.chars {
for k, _ := range v {
if k < min {
min = k
}
}
}
return min * 2
}
// Clear all pixels
func (c *Canvas) Clear() {
c.chars = make(map[int]map[int]int)
}
// Convert x,y to cols, rows
func (c Canvas) get_pos(x, y int) (int, int) {
return (x / 2), (y / 4)
}
// Set a pixel of c
func (c *Canvas) Set(x, y int) {
px, py := c.get_pos(x, y)
if m := c.chars[py]; m == nil {
c.chars[py] = make(map[int]int)
}
val := c.chars[py][px]
mapv := getPixel(y, x)
c.chars[py][px] = val | mapv
}
// Unset a pixel of c
func (c *Canvas) UnSet(x, y int) {
px, py := c.get_pos(x, y)
x, y = int(math.Abs(float64(x))), int(math.Abs(float64(y)))
if m := c.chars[py]; m == nil {
c.chars[py] = make(map[int]int)
}
c.chars[py][px] = c.chars[py][px] &^ getPixel(y, x)
}
// Toggle a point
func (c *Canvas) Toggle(x, y int) {
px, py := c.get_pos(x, y)
if (c.chars[py][px] & getPixel(y, x)) != 0 {
c.UnSet(x, y)
} else {
c.Set(x, y)
}
}
// Set text to the given coordinates
func (c *Canvas) SetText(x, y int, text string) {
x, y = x/2, y/4
if m := c.chars[y]; m == nil {
c.chars[y] = make(map[int]int)
}
for i, char := range text {
c.chars[y][x+i] = int(char) - braille_char_offset
}
}
// Get pixel at the given coordinates
func (c Canvas) Get(x, y int) bool {
dot_index := pixel_map[y%4][x%2]
x, y = x/2, y/4
char := c.chars[y][x]
return (char & dot_index) != 0
}
// GetScreenCharacter gets character at the given screen coordinates
func (c Canvas) GetScreenCharacter(x, y int) rune {
return rune(c.chars[y][x] + braille_char_offset)
}
// GetCharacter gets character for the given pixel
func (c Canvas) GetCharacter(x, y int) rune {
return c.GetScreenCharacter(x/4, y/4)
}
// Rows retrieves the rows from a given view
func (c Canvas) Rows(minX, minY, maxX, maxY int) []string {
minrow, maxrow := minY/4, (maxY)/4
mincol, maxcol := minX/2, (maxX)/2
ret := make([]string, 0)
for rownum := minrow; rownum < (maxrow + 1); rownum = rownum + 1 {
row := ""
for x := mincol; x < (maxcol + 1); x = x + 1 {
char := c.chars[rownum][x]
row += string(rune(char + braille_char_offset))
}
ret = append(ret, row)
}
return ret
}
// Frame retrieves a string representation of the frame at the given parameters
func (c Canvas) Frame(minX, minY, maxX, maxY int) string {
var ret string
for _, row := range c.Rows(minX, minY, maxX, maxY) {
ret += row
ret += c.LineEnding
}
return ret
}
func (c Canvas) String() string {
return c.Frame(c.MinX(), c.MinY(), c.MaxX(), c.MaxY())
}
type Point struct {
X, Y int
}
// Line returns []Point where each Point is a dot in the line
func Line(x1, y1, x2, y2 int) []Point {
xdiff := abs(x1 - x2)
ydiff := abs(y2 - y1)
var xdir, ydir int
if x1 <= x2 {
xdir = 1
} else {
xdir = -1
}
if y1 <= y2 {
ydir = 1
} else {
ydir = -1
}
r := max(xdiff, ydiff)
points := make([]Point, r+1)
for i := 0; i <= r; i++ {
x, y := x1, y1
if ydiff != 0 {
y += (i * ydiff) / (r * ydir)
}
if xdiff != 0 {
x += (i * xdiff) / (r * xdir)
}
points[i] = Point{x, y}
}
return points
}
// DrawLine draws a line onto the Canvas
func (c *Canvas) DrawLine(x1, y1, x2, y2 int) {
for _, p := range Line(x1, y1, x2, y2) {
c.Set(p.X, p.Y)
}
}
func (c *Canvas) DrawPolygon(center_x, center_y, sides, radius float64) {
degree := 360 / sides
for n := 0; n < int(sides); n = n + 1 {
a := float64(n) * degree
b := float64(n+1) * degree
x1 := int(center_x + (math.Cos(radians(a)) * (radius/2 + 1)))
y1 := int(center_y + (math.Sin(radians(a)) * (radius/2 + 1)))
x2 := int(center_x + (math.Cos(radians(b)) * (radius/2 + 1)))
y2 := int(center_y + (math.Sin(radians(b)) * (radius/2 + 1)))
c.DrawLine(x1, y1, x2, y2)
}
}
func radians(d float64) float64 {
return d * (math.Pi / 180)
}
func round(x float64) int {
return int(x + 0.5)
}
func min(x, y int) int {
if x < y {
return x
}
return y
}
func max(x, y int) int {
if x > y {
return x
}
return y
}
func abs(x int) int {
if x < 0 {
return x * -1
}
return x
}
================================================
FILE: src/termui/linegraph.go
================================================
package termui
import (
"image"
"sort"
drawille "github.com/cjbassi/gotop/src/termui/drawille-go"
. "github.com/gizak/termui/v3"
)
// LineGraph implements a line graph of data points.
type LineGraph struct {
*Block
Data map[string][]float64
Labels map[string]string
HorizontalScale int
LineColors map[string]Color
DefaultLineColor Color
}
func NewLineGraph() *LineGraph {
return &LineGraph{
Block: NewBlock(),
Data: make(map[string][]float64),
Labels: make(map[string]string),
HorizontalScale: 5,
LineColors: make(map[string]Color),
}
}
func (self *LineGraph) Draw(buf *Buffer) {
self.Block.Draw(buf)
// we render each data point on to the canvas then copy over the braille to the buffer at the end
// fyi braille characters have 2x4 dots for each character
c := drawille.NewCanvas()
// used to keep track of the braille colors until the end when we render the braille to the buffer
colors := make([][]Color, self.Inner.Dx()+2)
for i := range colors {
colors[i] = make([]Color, self.Inner.Dy()+2)
}
// sort the series so that overlapping data will overlap the same way each time
seriesList := make([]string, len(self.Data))
i := 0
for seriesName := range self.Data {
seriesList[i] = seriesName
i++
}
sort.Strings(seriesList)
// draw lines in reverse order so that the first color defined in the colorscheme is on top
for i := len(seriesList) - 1; i >= 0; i-- {
seriesName := seriesList[i]
seriesData := self.Data[seriesName]
seriesLineColor, ok := self.LineColors[seriesName]
if !ok {
seriesLineColor = self.DefaultLineColor
}
// coordinates of last point
lastY, lastX := -1, -1
// assign colors to `colors` and lines/points to the canvas
for i := len(seriesData) - 1; i >= 0; i-- {
x := ((self.Inner.Dx() + 1) * 2) - 1 - (((len(seriesData) - 1) - i) * self.HorizontalScale)
y := ((self.Inner.Dy() + 1) * 4) - 1 - int((float64((self.Inner.Dy())*4)-1)*(seriesData[i]/100))
if x < 0 {
// render the line to the last point up to the wall
if x > 0-self.HorizontalScale {
for _, p := range drawille.Line(lastX, lastY, x, y) {
if p.X > 0 {
c.Set(p.X, p.Y)
colors[p.X/2][p.Y/4] = seriesLineColor
}
}
}
break
}
if lastY == -1 { // if this is the first point
c.Set(x, y)
colors[x/2][y/4] = seriesLineColor
} else {
c.DrawLine(lastX, lastY, x, y)
for _, p := range drawille.Line(lastX, lastY, x, y) {
colors[p.X/2][p.Y/4] = seriesLineColor
}
}
lastX, lastY = x, y
}
// copy braille and colors to buffer
for y, line := range c.Rows(c.MinX(), c.MinY(), c.MaxX(), c.MaxY()) {
for x, char := range line {
x /= 3 // idk why but it works
if x == 0 {
continue
}
if char != 10240 { // empty braille character
buf.SetCell(
NewCell(char, NewStyle(colors[x][y])),
image.Pt(self.Inner.Min.X+x-1, self.Inner.Min.Y+y-1),
)
}
}
}
}
// renders key/label ontop
for i, seriesName := range seriesList {
if i+2 > self.Inner.Dy() {
continue
}
seriesLineColor, ok := self.LineColors[seriesName]
if !ok {
seriesLineColor = self.DefaultLineColor
}
// render key ontop, but let braille be drawn over space characters
str := seriesName + " " + self.Labels[seriesName]
for k, char := range str {
if char != ' ' {
buf.SetCell(
NewCell(char, NewStyle(seriesLineColor)),
image.Pt(self.Inner.Min.X+2+k, self.Inner.Min.Y+i+1),
)
}
}
}
}
================================================
FILE: src/termui/sparkline.go
================================================
package termui
import (
"image"
"log"
. "github.com/gizak/termui/v3"
)
// Sparkline is like: ▅▆▂▂▅▇▂▂▃▆▆▆▅▃. The data points should be non-negative integers.
type Sparkline struct {
Data []int
Title1 string
Title2 string
TitleColor Color
LineColor Color
}
// SparklineGroup is a renderable widget which groups together the given sparklines.
type SparklineGroup struct {
*Block
Lines []*Sparkline
}
// Add appends a given Sparkline to the *SparklineGroup.
func (self *SparklineGroup) Add(sl Sparkline) {
self.Lines = append(self.Lines, &sl)
}
// NewSparkline returns an unrenderable single sparkline that intended to be added into a SparklineGroup.
func NewSparkline() *Sparkline {
return &Sparkline{}
}
// NewSparklineGroup return a new *SparklineGroup with given Sparklines, you can always add a new Sparkline later.
func NewSparklineGroup(ss ...*Sparkline) *SparklineGroup {
return &SparklineGroup{
Block: NewBlock(),
Lines: ss,
}
}
func (self *SparklineGroup) Draw(buf *Buffer) {
self.Block.Draw(buf)
lc := len(self.Lines) // lineCount
// renders each sparkline and its titles
for i, line := range self.Lines {
// prints titles
title1Y := self.Inner.Min.Y + 1 + (self.Inner.Dy()/lc)*i
title2Y := self.Inner.Min.Y + 2 + (self.Inner.Dy()/lc)*i
title1 := TrimString(line.Title1, self.Inner.Dx())
title2 := TrimString(line.Title2, self.Inner.Dx())
if self.Inner.Dy() > 5 {
buf.SetString(
title1,
NewStyle(line.TitleColor, ColorClear, ModifierBold),
image.Pt(self.Inner.Min.X, title1Y),
)
}
if self.Inner.Dy() > 6 {
buf.SetString(
title2,
NewStyle(line.TitleColor, ColorClear, ModifierBold),
image.Pt(self.Inner.Min.X, title2Y),
)
}
sparkY := (self.Inner.Dy() / lc) * (i + 1)
// finds max data in current view used for relative heights
max := 1
for i := len(line.Data) - 1; i >= 0 && self.Inner.Dx()-((len(line.Data)-1)-i) >= 1; i-- {
if line.Data[i] > max {
max = line.Data[i]
}
}
// prints sparkline
for x := self.Inner.Dx(); x >= 1; x-- {
char := BARS[1]
if (self.Inner.Dx() - x) < len(line.Data) {
offset := self.Inner.Dx() - x
curItem := line.Data[(len(line.Data)-1)-offset]
percent := float64(curItem) / float64(max)
index := int(percent*float64(len(BARS)-2)) + 1
if index < 1 || index >= len(BARS) {
log.Printf(
"invalid sparkline data value. index: %v, percent: %v, curItem: %v, offset: %v",
index, percent, curItem, offset,
)
} else {
char = BARS[index]
}
}
buf.SetCell(
NewCell(char, NewStyle(line.LineColor)),
image.Pt(self.Inner.Min.X+x-1, self.Inner.Min.Y+sparkY-1),
)
}
}
}
================================================
FILE: src/termui/table.go
================================================
package termui
import (
"fmt"
"image"
"log"
"strings"
. "github.com/gizak/termui/v3"
)
type Table struct {
*Block
Header []string
Rows [][]string
ColWidths []int
ColGap int
PadLeft int
ShowCursor bool
CursorColor Color
ShowLocation bool
UniqueCol int // the column used to uniquely identify each table row
SelectedItem string // used to keep the cursor on the correct item if the data changes
SelectedRow int
TopRow int // used to indicate where in the table we are scrolled at
ColResizer func()
}
// NewTable returns a new Table instance
func NewTable() *Table {
return &Table{
Block: NewBlock(),
SelectedRow: 0,
TopRow: 0,
UniqueCol: 0,
ColResizer: func() {},
}
}
func (self *Table) Draw(buf *Buffer) {
self.Block.Draw(buf)
if self.ShowLocation {
self.drawLocation(buf)
}
self.ColResizer()
// finds exact column starting position
colXPos := []int{}
cur := 1 + self.PadLeft
for _, w := range self.ColWidths {
colXPos = append(colXPos, cur)
cur += w
cur += self.ColGap
}
// prints header
for i, h := range self.Header {
width := self.ColWidths[i]
if width == 0 {
continue
}
// don't render column if it doesn't fit in widget
if width > (self.Inner.Dx()-colXPos[i])+1 {
continue
}
buf.SetString(
h,
NewStyle(Theme.Default.Fg, ColorClear, ModifierBold),
image.Pt(self.Inner.Min.X+colXPos[i]-1, self.Inner.Min.Y),
)
}
if self.TopRow < 0 {
log.Printf("table widget TopRow value less than 0. TopRow: %v", self.TopRow)
return
}
// prints each row
for rowNum := self.TopRow; rowNum < self.TopRow+self.Inner.Dy()-1 && rowNum < len(self.Rows); rowNum++ {
row := self.Rows[rowNum]
y := (rowNum + 2) - self.TopRow
// prints cursor
style := NewStyle(Theme.Default.Fg)
if self.ShowCursor {
if (self.SelectedItem == "" && rowNum == self.SelectedRow) || (self.SelectedItem != "" && self.SelectedItem == row[self.UniqueCol]) {
style.Fg = self.CursorColor
style.Modifier = ModifierReverse
for _, width := range self.ColWidths {
if width == 0 {
continue
}
buf.SetString(
strings.Repeat(" ", self.Inner.Dx()),
style,
image.Pt(self.Inner.Min.X, self.Inner.Min.Y+y-1),
)
}
self.SelectedItem = row[self.UniqueCol]
self.SelectedRow = rowNum
}
}
// prints each col of the row
for i, width := range self.ColWidths {
if width == 0 {
continue
}
// don't render column if width is greater than distance to end of widget
if width > (self.Inner.Dx()-colXPos[i])+1 {
continue
}
r := TrimString(row[i], width)
buf.SetString(
r,
style,
image.Pt(self.Inner.Min.X+colXPos[i]-1, self.Inner.Min.Y+y-1),
)
}
}
}
func (self *Table) drawLocation(buf *Buffer) {
total := len(self.Rows)
topRow := self.TopRow + 1
bottomRow := self.TopRow + self.Inner.Dy() - 1
if bottomRow > total {
bottomRow = total
}
loc := fmt.Sprintf(" %d - %d of %d ", topRow, bottomRow, total)
width := len(loc)
buf.SetString(loc, self.TitleStyle, image.Pt(self.Max.X-width-2, self.Min.Y))
}
// Scrolling ///////////////////////////////////////////////////////////////////
// calcPos is used to calculate the cursor position and the current view into the table.
func (self *Table) calcPos() {
self.SelectedItem = ""
if self.SelectedRow < 0 {
self.SelectedRow = 0
}
if self.SelectedRow < self.TopRow {
self.TopRow = self.SelectedRow
}
if self.SelectedRow > len(self.Rows)-1 {
self.SelectedRow = len(self.Rows) - 1
}
if self.SelectedRow > self.TopRow+(self.Inner.Dy()-2) {
self.TopRow = self.SelectedRow - (self.Inner.Dy() - 2)
}
}
func (self *Table) ScrollUp() {
self.SelectedRow--
self.calcPos()
}
func (self *Table) ScrollDown() {
self.SelectedRow++
self.calcPos()
}
func (self *Table) ScrollTop() {
self.SelectedRow = 0
self.calcPos()
}
func (self *Table) ScrollBottom() {
self.SelectedRow = len(self.Rows) - 1
self.calcPos()
}
func (self *Table) ScrollHalfPageUp() {
self.SelectedRow = self.SelectedRow - (self.Inner.Dy()-2)/2
self.calcPos()
}
func (self *Table) ScrollHalfPageDown() {
self.SelectedRow = self.SelectedRow + (self.Inner.Dy()-2)/2
self.calcPos()
}
func (self *Table) ScrollPageUp() {
self.SelectedRow -= (self.Inner.Dy() - 2)
self.calcPos()
}
func (self *Table) ScrollPageDown() {
self.SelectedRow += (self.Inner.Dy() - 2)
self.calcPos()
}
func (self *Table) HandleClick(x, y int) {
x = x - self.Min.X
y = y - self.Min.Y
if (x > 0 && x <= self.Inner.Dx()) && (y > 0 && y <= self.Inner.Dy()) {
self.SelectedRow = (self.TopRow + y) - 2
self.calcPos()
}
}
================================================
FILE: src/utils/bytes.go
================================================
package utils
import (
"math"
)
var (
KB = uint64(math.Pow(2, 10))
MB = uint64(math.Pow(2, 20))
GB = uint64(math.Pow(2, 30))
TB = uint64(math.Pow(2, 40))
)
func CelsiusToFahrenheit(c int) int {
return c*9/5 + 32
}
func BytesToKB(b uint64) float64 {
return float64(b) / float64(KB)
}
func BytesToMB(b uint64) float64 {
return float64(b) / float64(MB)
}
func BytesToGB(b uint64) float64 {
return float64(b) / float64(GB)
}
func BytesToTB(b uint64) float64 {
return float64(b) / float64(TB)
}
func ConvertBytes(b uint64) (float64, string) {
switch {
case b < KB:
return float64(b), "B"
case b < MB:
return BytesToKB(b), "KB"
case b < GB:
return BytesToMB(b), "MB"
case b < TB:
return BytesToGB(b), "GB"
default:
return BytesToTB(b), "TB"
}
}
================================================
FILE: src/utils/conversions.go
================================================
package utils
import (
"strings"
)
func ConvertLocalizedString(s string) string {
if strings.ContainsAny(s, ",") {
return strings.Replace(s, ",", ".", 1)
} else {
return s
}
}
================================================
FILE: src/utils/math.go
================================================
package utils
func MaxInt(a, b int) int {
if a > b {
return a
}
return b
}
================================================
FILE: src/utils/xdg.go
================================================
package utils
import (
"os"
"path/filepath"
)
func GetConfigDir(name string) string {
var basedir string
if env := os.Getenv("XDG_CONFIG_HOME"); env != "" {
basedir = env
} else {
basedir = filepath.Join(os.Getenv("HOME"), ".config")
}
return filepath.Join(basedir, name)
}
func GetLogDir(name string) string {
var basedir string
if env := os.Getenv("XDG_STATE_HOME"); env != "" {
basedir = env
} else {
basedir = filepath.Join(os.Getenv("HOME"), ".local", "state")
}
return filepath.Join(basedir, name)
}
================================================
FILE: src/widgets/battery.go
================================================
package widgets
import (
"fmt"
"log"
"math"
"strconv"
"time"
"github.com/distatus/battery"
ui "github.com/cjbassi/gotop/src/termui"
)
type BatteryWidget struct {
*ui.LineGraph
updateInterval time.Duration
}
func NewBatteryWidget(horizontalScale int) *BatteryWidget {
self := &BatteryWidget{
LineGraph: ui.NewLineGraph(),
updateInterval: time.Minute,
}
self.Title = " Battery Status "
self.HorizontalScale = horizontalScale
// intentional duplicate
// adds 2 datapoints to the graph, otherwise the dot is difficult to see
self.update()
self.update()
go func() {
for range time.NewTicker(self.updateInterval).C {
self.Lock()
self.update()
self.Unlock()
}
}()
return self
}
func makeId(i int) string {
return "Batt" + strconv.Itoa(i)
}
func (self *BatteryWidget) update() {
batteries, err := battery.GetAll()
if err != nil {
log.Printf("failed to get battery info: %v", err)
return
}
for i, battery := range batteries {
id := makeId(i)
percentFull := math.Abs(battery.Current/battery.Full) * 100.0
self.Data[id] = append(self.Data[id], percentFull)
self.Labels[id] = fmt.Sprintf("%3.0f%% %.0f/%.0f", percentFull, math.Abs(battery.Current), math.Abs(battery.Full))
}
}
================================================
FILE: src/widgets/cpu.go
================================================
package widgets
import (
"fmt"
"log"
"sync"
"time"
psCpu "github.com/shirou/gopsutil/cpu"
ui "github.com/cjbassi/gotop/src/termui"
)
type CpuWidget struct {
*ui.LineGraph
CpuCount int
ShowAverageLoad bool
ShowPerCpuLoad bool
updateInterval time.Duration
formatString string
updateLock sync.Mutex
}
func NewCpuWidget(updateInterval time.Duration, horizontalScale int, showAverageLoad bool, showPerCpuLoad bool) *CpuWidget {
cpuCount, err := psCpu.Counts(false)
if err != nil {
log.Printf("failed to get CPU count from gopsutil: %v", err)
}
formatString := "CPU%1d"
if cpuCount > 10 {
formatString = "CPU%02d"
}
self := &CpuWidget{
LineGraph: ui.NewLineGraph(),
CpuCount: cpuCount,
updateInterval: updateInterval,
ShowAverageLoad: showAverageLoad,
ShowPerCpuLoad: showPerCpuLoad,
formatString: formatString,
}
self.Title = " CPU Usage "
self.HorizontalScale = horizontalScale
if !(self.ShowAverageLoad || self.ShowPerCpuLoad) {
if self.CpuCount <= 8 {
self.ShowPerCpuLoad = true
} else {
self.ShowAverageLoad = true
}
}
if self.ShowAverageLoad {
self.Data["AVRG"] = []float64{0}
}
if self.ShowPerCpuLoad {
for i := 0; i < int(self.CpuCount); i++ {
key := fmt.Sprintf(formatString, i)
self.Data[key] = []float64{0}
}
}
self.update()
go func() {
for range time.NewTicker(self.updateInterval).C {
self.update()
}
}()
return self
}
func (self *CpuWidget) update() {
if self.ShowAverageLoad {
go func() {
percent, err := psCpu.Percent(self.updateInterval, false)
if err != nil {
log.Printf("failed to get average CPU usage percent from gopsutil: %v. self.updateInterval: %v. percpu: %v", err, self.updateInterval, false)
} else {
self.Lock()
defer self.Unlock()
self.updateLock.Lock()
defer self.updateLock.Unlock()
self.Data["AVRG"] = append(self.Data["AVRG"], percent[0])
self.Labels["AVRG"] = fmt.Sprintf("%3.0f%%", percent[0])
}
}()
}
if self.ShowPerCpuLoad {
go func() {
percents, err := psCpu.Percent(self.updateInterval, true)
if err != nil {
log.Printf("failed to get CPU usage percents from gopsutil: %v. self.updateInterval: %v. percpu: %v", err, self.updateInterval, true)
} else {
if len(percents) != int(self.CpuCount) {
log.Printf("error: number of CPU usage percents from gopsutil doesn't match CPU count. percents: %v. self.Count: %v", percents, self.CpuCount)
} else {
self.Lock()
defer self.Unlock()
self.updateLock.Lock()
defer self.updateLock.Unlock()
for i, percent := range percents {
key := fmt.Sprintf(self.formatString, i)
self.Data[key] = append(self.Data[key], percent)
self.Labels[key] = fmt.Sprintf("%3.0f%%", percent)
}
}
}
}()
}
}
================================================
FILE: src/widgets/disk.go
================================================
package widgets
import (
"fmt"
"log"
"sort"
"strings"
"time"
psDisk "github.com/shirou/gopsutil/disk"
ui "github.com/cjbassi/gotop/src/termui"
"github.com/cjbassi/gotop/src/utils"
)
type Partition struct {
Device string
MountPoint string
BytesRead uint64
BytesWritten uint64
BytesReadRecently string
BytesWrittenRecently string
UsedPercent uint32
Free string
}
type DiskWidget struct {
*ui.Table
updateInterval time.Duration
Partitions map[string]*Partition
}
func NewDiskWidget() *DiskWidget {
self := &DiskWidget{
Table: ui.NewTable(),
updateInterval: time.Second,
Partitions: make(map[string]*Partition),
}
self.Title = " Disk Usage "
self.Header = []string{"Disk", "Mount", "Used", "Free", "R/s", "W/s"}
self.ColGap = 2
self.ColResizer = func() {
self.ColWidths = []int{
utils.MaxInt(4, (self.Inner.Dx()-29)/2),
utils.MaxInt(5, (self.Inner.Dx()-29)/2),
4, 5, 5, 5,
}
}
self.update()
go func() {
for range time.NewTicker(self.updateInterval).C {
self.Lock()
self.update()
self.Unlock()
}
}()
return self
}
func (self *DiskWidget) update() {
partitions, err := psDisk.Partitions(false)
if err != nil {
log.Printf("failed to get disk partitions from gopsutil: %v", err)
return
}
// add partition if it's new
for _, partition := range partitions {
// don't show loop devices
if strings.HasPrefix(partition.Device, "/dev/loop") {
continue
}
// don't show docker container filesystems
if strings.HasPrefix(partition.Mountpoint, "/var/lib/docker/") {
continue
}
// check if partition doesn't already exist in our list
if _, ok := self.Partitions[partition.Device]; !ok {
self.Partitions[partition.Device] = &Partition{
Device: partition.Device,
MountPoint: partition.Mountpoint,
}
}
}
// delete a partition if it no longer exists
toDelete := []string{}
for device := range self.Partitions {
exists := false
for _, partition := range partitions {
if device == partition.Device {
exists = true
break
}
}
if !exists {
toDelete = append(toDelete, device)
}
}
for _, device := range toDelete {
delete(self.Partitions, device)
}
// updates partition info
for _, partition := range self.Partitions {
usage, err := psDisk.Usage(partition.MountPoint)
if err != nil {
log.Printf("failed to get partition usage statistics from gopsutil: %v. partition: %v", err, partition)
continue
}
partition.UsedPercent = uint32(usage.UsedPercent)
bytesFree, magnitudeFree := utils.ConvertBytes(usage.Free)
partition.Free = fmt.Sprintf("%3d%s", uint64(bytesFree), magnitudeFree)
ioCounters, err := psDisk.IOCounters(partition.Device)
if err != nil {
log.Printf("failed to get partition read/write info from gopsutil: %v. partition: %v", err, partition)
continue
}
ioCounter := ioCounters[strings.Replace(partition.Device, "/dev/", "", -1)]
bytesRead, bytesWritten := ioCounter.ReadBytes, ioCounter.WriteBytes
if partition.BytesRead != 0 { // if this isn't the first update
bytesReadRecently := bytesRead - partition.BytesRead
bytesWrittenRecently := bytesWritten - partition.BytesWritten
readFloat, readMagnitude := utils.ConvertBytes(bytesReadRecently)
writeFloat, writeMagnitude := utils.ConvertBytes(bytesWrittenRecently)
bytesReadRecently, bytesWrittenRecently = uint64(readFloat), uint64(writeFloat)
partition.BytesReadRecently = fmt.Sprintf("%d%s", bytesReadRecently, readMagnitude)
partition.BytesWrittenRecently = fmt.Sprintf("%d%s", bytesWrittenRecently, writeMagnitude)
} else {
partition.BytesReadRecently = fmt.Sprintf("%d%s", 0, "B")
partition.BytesWrittenRecently = fmt.Sprintf("%d%s", 0, "B")
}
partition.BytesRead, partition.BytesWritten = bytesRead, bytesWritten
}
// converts self.Partitions into self.Rows which is a [][]String
sortedPartitions := []string{}
for seriesName := range self.Partitions {
sortedPartitions = append(sortedPartitions, seriesName)
}
sort.Strings(sortedPartitions)
self.Rows = make([][]string, len(self.Partitions))
for i, key := range sortedPartitions {
partition := self.Partitions[key]
self.Rows[i] = make([]string, 6)
self.Rows[i][0] = strings.Replace(strings.Replace(partition.Device, "/dev/", "", -1), "mapper/", "", -1)
self.Rows[i][1] = partition.MountPoint
self.Rows[i][2] = fmt.Sprintf("%d%%", partition.UsedPercent)
self.Rows[i][3] = partition.Free
self.Rows[i][4] = partition.BytesReadRecently
self.Rows[i][5] = partition.BytesWrittenRecently
}
}
================================================
FILE: src/widgets/help.go
================================================
package widgets
import (
"image"
"strings"
ui "github.com/gizak/termui/v3"
)
const KEYBINDS = `
Quit: q or <C-c>
Process navigation
- k and <Up>: up
- j and <Down>: down
- <C-u>: half page up
- <C-d>: half page down
- <C-b>: full page up
- <C-f>: full page down
- gg and <Home>: jump to top
- G and <End>: jump to bottom
Process actions:
- <Tab>: toggle process grouping
- dd: kill selected process or group of processes
Process sorting
- c: CPU
- m: Mem
- p: PID
CPU and Mem graph scaling:
- h: scale in
- l: scale out
`
type HelpMenu struct {
ui.Block
}
func NewHelpMenu() *HelpMenu {
return &HelpMenu{
Block: *ui.NewBlock(),
}
}
func (self *HelpMenu) Resize(termWidth, termHeight int) {
var textWidth = 0
for _, line := range strings.Split(KEYBINDS, "\n") {
textWidth = maxInt(len(line), textWidth)
}
textWidth += 2
textHeight := 22
x := (termWidth - textWidth) / 2
y := (termHeight - textHeight) / 2
self.Block.SetRect(x, y, textWidth+x, textHeight+y)
}
func (self *HelpMenu) Draw(buf *ui.Buffer) {
self.Block.Draw(buf)
for y, line := range strings.Split(KEYBINDS, "\n") {
for x, rune := range line {
buf.SetCell(
ui.NewCell(rune, ui.NewStyle(7)),
image.Pt(self.Inner.Min.X+x, self.Inner.Min.Y+y-1),
)
}
}
}
func maxInt(a int, b int) int {
if a > b {
return a
}
return b
}
================================================
FILE: src/widgets/include/smc.c
================================================
/*
* Apple System Management Controller (SMC) API from user space for Intel based
* Macs. Works by talking to the AppleSMC.kext (kernel extension), the driver
* for the SMC.
*
* smc.c
* libsmc
*
* Copyright (C) 2014 beltex <https://github.com/beltex>
*
* Based off of fork from:
* osx-cpu-temp <https://github.com/lavoiesl/osx-cpu-temp>
*
* With credits to:
*
* Copyright (C) 2006 devnull
* Apple System Management Control (SMC) Tool
*
* Copyright (C) 2006 Hendrik Holtmann
* smcFanControl <https://github.com/hholtmann/smcFanControl>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <stdio.h>
#include <string.h>
#include "smc.h"
//------------------------------------------------------------------------------
// MARK: MACROS
//------------------------------------------------------------------------------
/**
Name of the SMC IOService as seen in the IORegistry. You can view it either via
command line with ioreg or through the IORegistryExplorer app (found on Apple's
developer site - Hardware IO Tools for Xcode)
*/
#define IOSERVICE_SMC "AppleSMC"
/**
IOService for getting machine model name
*/
#define IOSERVICE_MODEL "IOPlatformExpertDevice"
/**
SMC data types - 4 byte multi-character constants
Sources: See TMP SMC keys in smc.h
http://stackoverflow.com/questions/22160746/fpe2-and-sp78-data-types
*/
#define DATA_TYPE_UINT8 "ui8 "
#define DATA_TYPE_UINT16 "ui16"
#define DATA_TYPE_UINT32 "ui32"
#define DATA_TYPE_FLAG "flag"
#define DATA_TYPE_FPE2 "fpe2"
#define DATA_TYPE_SFDS "{fds"
#define DATA_TYPE_SP78 "sp78"
//------------------------------------------------------------------------------
// MARK: GLOBAL VARS
//------------------------------------------------------------------------------
/**
Our connection to the SMC
*/
static io_connect_t conn;
/**
Number of characters in an SMC key
*/
static const int SMC_KEY_SIZE = 4;
/**
Number of characters in a data type "key" returned from the SMC. See data type
macros.
*/
static const int DATA_TYPE_SIZE = 4;
//------------------------------------------------------------------------------
// MARK: ENUMS
//------------------------------------------------------------------------------
/**
Defined by AppleSMC.kext. See SMCParamStruct.
These are SMC specific return codes
*/
typedef enum {
kSMCSuccess = 0,
kSMCError = 1,
kSMCKeyNotFound = 0x84
} kSMC_t;
/**
Defined by AppleSMC.kext. See SMCParamStruct.
Function selectors. Used to tell the SMC which function inside it to call.
*/
typedef enum {
kSMCUserClientOpen = 0,
kSMCUserClientClose = 1,
kSMCHandleYPCEvent = 2,
kSMCReadKey = 5,
kSMCWriteKey = 6,
kSMCGetKeyCount = 7,
kSMCGetKeyFromIndex = 8,
kSMCGetKeyInfo = 9
} selector_t;
//------------------------------------------------------------------------------
// MARK: STRUCTS
//------------------------------------------------------------------------------
/**
Defined by AppleSMC.kext. See SMCParamStruct.
*/
typedef struct {
unsigned char major;
unsigned char minor;
unsigned char build;
unsigned char reserved;
unsigned short release;
} SMCVersion;
/**
Defined by AppleSMC.kext. See SMCParamStruct.
*/
typedef struct {
uint16_t version;
uint16_t length;
uint32_t cpuPLimit;
uint32_t gpuPLimit;
uint32_t memPLimit;
} SMCPLimitData;
/**
Defined by AppleSMC.kext. See SMCParamStruct.
- dataSize : How many values written to SMCParamStruct.bytes
- dataType : Type of data written to SMCParamStruct.bytes. This lets us know how
to interpret it (translate it to human readable)
*/
typedef struct {
IOByteCount dataSize;
uint32_t dataType;
uint8_t dataColors;
} SMCKeyInfoData;
/**
Defined by AppleSMC.kext.
This is the predefined struct that must be passed to communicate with the
AppleSMC driver. While the driver is closed source, the definition of this
struct happened to appear in the Apple PowerManagement project at around
version 211, and soon after disappeared. It can be seen in the PrivateLib.c
file under pmconfigd.
https://www.opensource.apple.com/source/PowerManagement/PowerManagement-211/
*/
typedef struct {
uint32_t key;
SMCVersion vers;
SMCPLimitData pLimitData;
SMCKeyInfoData keyInfo;
uint8_t result;
uint8_t status;
uint8_t data8;
uint32_t data32;
uint8_t bytes[32];
} SMCParamStruct;
/**
Used for returning data from the SMC.
*/
typedef struct {
uint8_t data[32];
uint32_t dataType;
uint32_t dataSize;
kSMC_t kSMC;
} smc_return_t;
//------------------------------------------------------------------------------
// MARK: HELPERS - TYPE CONVERSION
//------------------------------------------------------------------------------
/**
Convert data from SMC of fpe2 type to human readable.
:param: data Data from the SMC to be converted. Assumed data size of 2.
:returns: Converted data
*/
static unsigned int from_fpe2(uint8_t data[32])
{
unsigned int ans = 0;
// Data type for fan calls - fpe2
// This is assumend to mean floating point, with 2 exponent bits
// http://stackoverflow.com/questions/22160746/fpe2-and-sp78-data-types
ans += data[0] << 6;
ans += data[1] << 2;
return ans;
}
/**
Convert to fpe2 data type to be passed to SMC.
:param: val Value to convert
:param: data Pointer to data array to place result
*/
static void to_fpe2(unsigned int val, uint8_t *data)
{
data[0] = val >> 6;
data[1] = (val << 2) ^ (data[0] << 8);
}
/**
Convert SMC key to uint32_t. This must be done to pass it to the SMC.
:param: key The SMC key to convert
:returns: uint32_t translation.
Returns zero if key is not 4 characters in length.
*/
static uint32_t to_uint32_t(char *key)
{
uint32_t ans = 0;
uint32_t shift = 24;
// SMC key is expected to be 4 bytes - thus 4 chars
if (strlen(key) != SMC_KEY_SIZE) {
return 0;
}
for (int i = 0; i < SMC_KEY_SIZE; i++) {
ans += key[i] << shift;
shift -= 8;
}
return ans;
}
/**
For converting the dataType return from the SMC to human readable 4 byte
multi-character constant.
*/
static void to_string(uint32_t val, char *dataType)
{
int shift = 24;
for (int i = 0; i < DATA_TYPE_SIZE; i++) {
// To get each char, we shift it into the lower 8 bits, and then & by
// 255 to insolate it
dataType[i] = (val >> shift) & 0xff;
shift -= 8;
}
}
//------------------------------------------------------------------------------
// MARK: HELPERS - TMP CONVERSION
//------------------------------------------------------------------------------
/**
Celsius to Fahrenheit
*/
static double to_fahrenheit(double tmp)
{
// http://en.wikipedia.org/wiki/Fahrenheit#Definition_and_conversions
return (tmp * 1.8) + 32;
}
/**
Celsius to Kelvin
*/
static double to_kelvin(double tmp)
{
// http://en.wikipedia.org/wiki/Kelvin
return tmp + 273.15;
}
//------------------------------------------------------------------------------
// MARK: "PRIVATE" FUNCTIONS
//------------------------------------------------------------------------------
/**
Make a call to the SMC
:param: inputStruct Struct that holds data telling the SMC what you want
:param: outputStruct Struct holding the SMC's response
:returns: I/O Kit return code
*/
static kern_return_t call_smc(SMCParamStruct *inputStruct,
SMCParamStruct *outputStruct)
{
kern_return_t result;
size_t inputStructCnt = sizeof(SMCParamStruct);
size_t outputStructCnt = sizeof(SMCParamStruct);
result = IOConnectCallStructMethod(conn, kSMCHandleYPCEvent,
inputStruct,
inputStructCnt,
outputStruct,
&outputStructCnt);
if (result != kIOReturnSuccess) {
// IOReturn error code lookup. See "Accessing Hardware From Applications
// -> Handling Errors" Apple doc
result = err_get_code(result);
}
return result;
}
/**
Read data from the SMC
:param: key The SMC key
*/
static kern_return_t read_smc(char *key, smc_return_t *result_smc)
{
kern_return_t result;
SMCParamStruct inputStruct;
SMCParamStruct outputStruct;
memset(&inputStruct, 0, sizeof(SMCParamStruct));
memset(&outputStruct, 0, sizeof(SMCParamStruct));
memset(result_smc, 0, sizeof(smc_return_t));
// First call to AppleSMC - get key info
inputStruct.key = to_uint32_t(key);
inputStruct.data8 = kSMCGetKeyInfo;
result = call_smc(&inputStruct, &outputStruct);
result_smc->kSMC = outputStruct.result;
if (result != kIOReturnSuccess || outputStruct.result != kSMCSuccess) {
return result;
}
// Store data for return
result_smc->dataSize = outputStruct.keyInfo.dataSize;
result_smc->dataType = outputStruct.keyInfo.dataType;
// Second call to AppleSMC - now we can get the data
inputStruct.keyInfo.dataSize = outputStruct.keyInfo.dataSize;
inputStruct.data8 = kSMCReadKey;
result = call_smc(&inputStruct, &outputStruct);
result_smc->kSMC = outputStruct.result;
if (result != kIOReturnSuccess || outputStruct.result != kSMCSuccess) {
return result;
}
memcpy(result_smc->data, outputStruct.bytes, sizeof(outputStruct.bytes));
return result;
}
/**
Write data to the SMC.
:returns: IOReturn IOKit return code
*/
static kern_return_t write_smc(char *key, smc_return_t *result_smc)
{
kern_return_t result;
SMCParamStruct inputStruct;
SMCParamStruct outputStruct;
memset(&inputStruct, 0, sizeof(SMCParamStruct));
memset(&outputStruct, 0, sizeof(SMCParamStruct));
// First call to AppleSMC - get key info
inputStruct.key = to_uint32_t(key);
inputStruct.data8 = kSMCGetKeyInfo;
result = call_smc(&inputStruct, &outputStruct);
result_smc->kSMC = outputStruct.result;
if (result != kIOReturnSuccess || outputStruct.result != kSMCSuccess) {
return result;
}
// Check data is correct
if (result_smc->dataSize != outputStruct.keyInfo.dataSize ||
result_smc->dataType != outputStruct.keyInfo.dataType) {
return kIOReturnBadArgument;
}
// Second call to AppleSMC - now we can write the data
inputStruct.data8 = kSMCWriteKey;
inputStruct.keyInfo.dataSize = outputStruct.keyInfo.dataSize;
// Set data to write
memcpy(inputStruct.bytes, result_smc->data, sizeof(result_smc->data));
result = call_smc(&inputStruct, &outputStruct);
result_smc->kSMC = outputStruct.result;
return result;
}
/**
Get the model name of the machine.
*/
static kern_return_t get_machine_model(io_name_t model)
{
io_service_t service;
kern_return_t result;
service = IOServiceGetMatchingService(kIOMasterPortDefault,
IOServiceMatching(IOSERVICE_MODEL));
if (service == 0) {
printf("ERROR: %s NOT FOUND\n", IOSERVICE_MODEL);
return kIOReturnError;
}
// Get the model name
result = IORegistryEntryGetName(service, model);
IOObjectRelease(service);
return result;
}
//------------------------------------------------------------------------------
// MARK: "PUBLIC" FUNCTIONS
//------------------------------------------------------------------------------
kern_return_t open_smc(void)
{
kern_return_t result;
io_service_t service;
service = IOServiceGetMatchingService(kIOMasterPortDefault,
IOServiceMatching(IOSERVICE_SMC));
if (service == 0) {
// NOTE: IOServiceMatching documents 0 on failure
printf("ERROR: %s NOT FOUND\n", IOSERVICE_SMC);
return kIOReturnError;
}
result = IOServiceOpen(service, mach_task_self(), 0, &conn);
IOObjectRelease(service);
return result;
}
kern_return_t close_smc(void)
{
return IOServiceClose(conn);
}
bool is_key_valid(char *key)
{
bool ans = false;
kern_return_t result;
smc_return_t result_smc;
if (strlen(key) != SMC_KEY_SIZE) {
printf("ERROR: Invalid key size - must be 4 chars\n");
return ans;
}
// Try a read and see if it succeeds
result = read_smc(key, &result_smc);
if (result == kIOReturnSuccess && result_smc.kSMC == kSMCSuccess) {
ans = true;
}
return ans;
}
double get_tmp(char *key, tmp_unit_t unit)
{
kern_return_t result;
smc_return_t result_smc;
result = read_smc(key, &result_smc);
if (!(result == kIOReturnSuccess &&
result_smc.dataSize == 2 &&
result_smc.dataType == to_uint32_t(DATA_TYPE_SP78))) {
// Error
return 0.0;
}
// TODO: Create from_sp78() convert function
double tmp = result_smc.data[0];
switch (unit) {
case CELSIUS:
break;
case FAHRENHEIT:
tmp = to_fahrenheit(tmp);
break;
case KELVIN:
tmp = to_kelvin(tmp);
break;
}
return tmp;
}
bool is_battery_powered(void)
{
kern_return_t result;
smc_return_t result_smc;
result = read_smc(BATT_PWR, &result_smc);
if (!(result == kIOReturnSuccess &&
result_smc.dataSize == 1 &&
result_smc.dataType == to_uint32_t(DATA_TYPE_FLAG))) {
// Error
return false;
}
return result_smc.data[0];
}
bool is_optical_disk_drive_full(void)
{
kern_return_t result;
smc_return_t result_smc;
result = read_smc(ODD_FULL, &result_smc);
if (!(result == kIOReturnSuccess &&
result_smc.dataSize == 1 &&
result_smc.dataType == to_uint32_t(DATA_TYPE_FLAG))) {
// Error
return false;
}
return result_smc.data[0];
}
//------------------------------------------------------------------------------
// MARK: FAN FUNCTIONS
//------------------------------------------------------------------------------
bool get_fan_name(unsigned int fan_num, fan_name_t name)
{
char key[5];
kern_return_t result;
smc_return_t result_smc;
sprintf(key, "F%dID", fan_num);
result = read_smc(key, &result_smc);
if (!(result == kIOReturnSuccess &&
result_smc.dataSize == 16 &&
result_smc.dataType == to_uint32_t(DATA_TYPE_SFDS))) {
return false;
}
/*
We know the data size is 16 bytes and the type is "{fds", a custom
struct defined by the AppleSMC.kext. See TMP enum sources for the
struct.
The last 12 bytes contain the name of the fan, an array of chars, hence
the loop range.
*/
int index = 0;
for (int i = 4; i < 16; i++) {
// Check if at the end (name may not be full 12 bytes)
// Could check for 0 (null), but instead we check for 32 (space). This
// is a hack to remove whitespace. :)
if (result_smc.data[i] == 32) {
break;
}
name[index] = result_smc.data[i];
index++;
}
return true;
}
int get_num_fans(void)
{
kern_return_t result;
smc_return_t result_smc;
result = read_smc(NUM_FANS, &result_smc);
if (!(result == kIOReturnSuccess &&
result_smc.dataSize == 1 &&
result_smc.dataType == to_uint32_t(DATA_TYPE_UINT8))) {
// Error
return -1;
}
return result_smc.data[0];
}
unsigned int get_fan_rpm(unsigned int fan_num)
{
char key[5];
kern_return_t result;
smc_return_t result_smc;
sprintf(key, "F%dAc", fan_num);
result = read_smc(key, &result_smc);
if (!(result == kIOReturnSuccess &&
result_smc.dataSize == 2 &&
result_smc.dataType == to_uint32_t(DATA_TYPE_FPE2))) {
// Error
return 0;
}
return from_fpe2(result_smc.data);
}
bool set_fan_min_rpm(unsigned int fan_num, unsigned int rpm, bool auth)
{
// TODO: Add rpm val safety check
char key[5];
bool ans = false;
kern_return_t result;
smc_return_t result_smc;
memset(&result_smc, 0, sizeof(smc_return_t));
// TODO: Don't use magic number
result_smc.dataSize = 2;
result_smc.dataType = to_uint32_t(DATA_TYPE_FPE2);
to_fpe2(rpm, result_smc.data);
sprintf(key, "F%dMn", fan_num);
result = write_smc(key, &result_smc);
if (result == kIOReturnSuccess && result_smc.kSMC == kSMCSuccess) {
ans = true;
}
return ans;
}
================================================
FILE: src/widgets/include/smc.h
================================================
/*
* Apple System Management Controller (SMC) API from user space for Intel based
* Macs. Works by talking to the AppleSMC.kext (kernel extension), the driver
* for the SMC.
*
* smc.h
* libsmc
*
* Copyright (C) 2014 beltex <https://github.com/beltex>
*
* Based off of fork from:
* osx-cpu-temp <https://github.com/lavoiesl/osx-cpu-temp>
*
* With credits to:
*
* Copyright (C) 2006 devnull
* Apple System Management Control (SMC) Tool
*
* Copyright (C) 2006 Hendrik Holtmann
* smcFanControl <https://github.com/hholtmann/smcFanControl>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <IOKit/IOKitLib.h>
//------------------------------------------------------------------------------
// MARK: MACROS
//------------------------------------------------------------------------------
/**
SMC keys for temperature sensors - 4 byte multi-character constants
Not applicable to all Mac's of course. In adition, the definition of the codes
may not be 100% accurate necessarily. Finally, list is incomplete.
Presumed letter translations:
- T = Temperature (if first char)
- C = CPU
- G = GPU
- P = Proximity
- D = Diode
- H = Heatsink
Sources:
- https://www.apple.com/downloads/dashboard/status/istatpro.html
- https://github.com/hholtmann/smcFanControl
- https://github.com/jedda/OSX-Monitoring-Tools
- http://www.parhelia.ch/blog/statics/k3_keys.html
*/
#define AMBIENT_AIR_0 "TA0P"
#define AMBIENT_AIR_1 "TA1P"
#define CPU_0_DIODE "TC0D"
#define CPU_0_HEATSINK "TC0H"
#define CPU_0_PROXIMITY "TC0P"
#define ENCLOSURE_BASE_0 "TB0T"
#define ENCLOSURE_BASE_1 "TB1T"
#define ENCLOSURE_BASE_2 "TB2T"
#define ENCLOSURE_BASE_3 "TB3T"
#define GPU_0_DIODE "TG0D"
#define GPU_0_HEATSINK "TG0H"
#define GPU_0_PROXIMITY "TG0P"
#define HARD_DRIVE_BAY "TH0P"
#define MEMORY_SLOT_0 "TM0S"
#define MEMORY_SLOTS_PROXIMITY "TM0P"
#define NORTHBRIDGE "TN0H"
#define NORTHBRIDGE_DIODE "TN0D"
#define NORTHBRIDGE_PROXIMITY "TN0P"
#define THUNDERBOLT_0 "TI0P"
#define THUNDERBOLT_1 "TI1P"
#define WIRELESS_MODULE "TW0P"
/**
SMC keys for fans - 4 byte multi-character constants
Number of fans on Macs vary of course, thus not all keys will be applicable.
Presumed letter translations:
- F = Fan
- Ac = Acutal
- Mn = Min
- Mx = Max
- Sf = Safe
- Tg = Target
Sources: See TMP SMC keys
*/
#define FAN_0 "F0Ac"
#define FAN_0_MIN_RPM "F0Mn"
#define FAN_0_MAX_RPM "F0Mx"
#define FAN_0_SAFE_RPM "F0Sf"
#define FAN_0_TARGET_RPM "F0Tg"
#define FAN_1 "F1Ac"
#define FAN_1_MIN_RPM "F1Mn"
#define FAN_1_MAX_RPM "F1Mx"
#define FAN_1_SAFE_RPM "F1Sf"
#define FAN_1_TARGET_RPM "F1Tg"
#define FAN_2 "F2Ac"
#define FAN_2_MIN_RPM "F2Mn"
#define FAN_2_MAX_RPM "F2Mx"
#define FAN_2_SAFE_RPM "F2Sf"
#define FAN_2_TARGET_RPM "F2Tg"
#define NUM_FANS "FNum"
#define FORCE_BITS "FS! "
/**
Misc SMC keys - 4 byte multi-character constants
Sources: See TMP SMC keys
*/
#define BATT_PWR "BATP"
#define NUM_KEYS "#KEY"
#define ODD_FULL "MSDI"
//------------------------------------------------------------------------------
// MARK: TYPES
//------------------------------------------------------------------------------
typedef char fan_name_t[13];
//------------------------------------------------------------------------------
// MARK: ENUMS
//------------------------------------------------------------------------------
typedef enum {
CELSIUS,
FAHRENHEIT,
KELVIN
} tmp_unit_t;
//------------------------------------------------------------------------------
// MARK: PROTOTYPES
//------------------------------------------------------------------------------
/**
Open a connection to the SMC
:returns: kIOReturnSuccess on successful connection to the SMC.
*/
kern_return_t open_smc(void);
/**
Close connection to the SMC
:returns: kIOReturnSuccess on successful close of connection to the SMC.
*/
kern_return_t close_smc(void);
/**
Check if an SMC key is valid. Useful for determining if a certain machine has
particular sensor or fan for example.
:param: key The SMC key to check. 4 byte multi-character constant. Must be 4
characters in length.
:returns: True if the key is found, false otherwise
*/
bool is_key_valid(char *key);
/**
Get the current temperature from a sensor
:param: key The temperature sensor to read from
:param: unit The unit for the temperature value.
:returns: Temperature of sensor. If the sensor is not found, or an error
occurs, return will be zero
*/
double get_tmp(char *key, tmp_unit_t unit);
/**
Is the machine being powered by the battery?
:returns: True if it is, false otherwise
*/
bool is_battery_powered(void);
/**
Is there a CD in the optical disk drive (ODD)?
:returns: True if there is, false otherwise
*/
bool is_optical_disk_drive_full(void);
/**
Get the name of a fan.
:param: fanNum The number of the fan to check
:param: name The name of the fan. Return will be empty on error.
:returns: True if successful, false otherwise.
*/
bool get_fan_name(unsigned int fan_num, fan_name_t name);
/**
Get the number of fans on this machine.
:returns: The number of fans. If an error occurs, return will be -1.
*/
int get_num_fans(void);
/**
Get the current speed (RPM - revolutions per minute) of a fan.
:param: fan_num The number of the fan to check
:returns: The fan RPM. If the fan is not found, or an error occurs, return
will be zero
*/
UInt get_fan_rpm(UInt fan_num);
/**
Set the minimum speed (RPM - revolutions per minute) of a fan. This method
requires root privileges. By minimum we mean that OS X can interject and
raise the fan speed if needed, however it will not go below this.
WARNING: You are playing with hardware here, BE CAREFUL.
:param: fan_num The number of the fan to set
:param: rpm The speed you would like to set the fan to.
:param: auth Should the function do authentication?
:return: True if successful, false otherwise
*/
bool set_fan_min_rpm(unsigned int fan_num, unsigned int rpm, bool auth);
================================================
FILE: src/widgets/mem.go
================================================
package widgets
import (
"fmt"
"log"
"time"
psMem "github.com/shirou/gopsutil/mem"
ui "github.com/cjbassi/gotop/src/termui"
"github.com/cjbassi/gotop/src/utils"
)
type MemWidget struct {
*ui.LineGraph
updateInterval time.Duration
}
type MemoryInfo struct {
Total uint64
Used uint64
UsedPercent float64
}
func (self *MemWidget) renderMemInfo(line string, memoryInfo MemoryInfo) {
self.Data[line] = append(self.Data[line], memoryInfo.UsedPercent)
memoryTotalBytes, memoryTotalMagnitude := utils.ConvertBytes(memoryInfo.Total)
memoryUsedBytes, memoryUsedMagnitude := utils.ConvertBytes(memoryInfo.Used)
self.Labels[line] = fmt.Sprintf("%3.0f%% %5.1f%s/%.0f%s",
memoryInfo.UsedPercent,
memoryUsedBytes,
memoryUsedMagnitude,
memoryTotalBytes,
memoryTotalMagnitude,
)
}
func (self *MemWidget) updateMainMemory() {
mainMemory, err := psMem.VirtualMemory()
if err != nil {
log.Printf("failed to get main memory info from gopsutil: %v", err)
} else {
self.renderMemInfo("Main", MemoryInfo{
Total: mainMemory.Total,
Used: mainMemory.Used,
UsedPercent: mainMemory.UsedPercent,
})
}
}
func NewMemWidget(updateInterval time.Duration, horizontalScale int) *MemWidget {
self := &MemWidget{
LineGraph: ui.NewLineGraph(),
updateInterval: updateInterval,
}
self.Title = " Memory Usage "
self.HorizontalScale = horizontalScale
self.Data["Main"] = []float64{0}
self.Data["Swap"] = []float64{0}
self.updateMainMemory()
self.updateSwapMemory()
go func() {
for range time.NewTicker(self.updateInterval).C {
self.Lock()
self.updateMainMemory()
self.updateSwapMemory()
self.Unlock()
}
}()
return self
}
================================================
FILE: src/widgets/mem_freebsd.go
================================================
package widgets
import (
"fmt"
"log"
"os/exec"
"strconv"
"strings"
"github.com/cjbassi/gotop/src/utils"
)
func convert(s []string) (MemoryInfo, error) {
total, err := strconv.ParseUint(s[0], 10, 64)
if err != nil {
return MemoryInfo{}, fmt.Errorf("int converion failed %v", err)
}
used, err := strconv.ParseUint(s[1], 10, 64)
if err != nil {
return MemoryInfo{}, fmt.Errorf("int converion failed %v", err)
}
percentage, err := strconv.ParseFloat(strings.TrimSuffix(s[2], "%"), 64)
if err != nil {
return MemoryInfo{}, fmt.Errorf("float converion failed %v", err)
}
return MemoryInfo{
Total: total * utils.KB,
Used: used * utils.KB,
UsedPercent: percentage,
}, nil
}
func gatherSwapInfo() (MemoryInfo, error) {
cmd := "swapinfo -k|sed -n '1!p'|awk '{print $2,$3,$5}'"
output, err := exec.Command("sh", "-c", cmd).Output()
if err != nil {
if err != nil {
return MemoryInfo{}, fmt.Errorf("command failed %v", err)
}
}
ss := strings.Split(strings.TrimSuffix(string(output), "\n"), " ")
return convert(ss)
}
func (self *MemWidget) updateSwapMemory() {
swapMemory, err := gatherSwapInfo()
if err != nil {
log.Printf("failed to get swap memory info from gopsutil: %v", err)
} else {
self.renderMemInfo("Swap", MemoryInfo{
Total: swapMemory.Total,
Used: swapMemory.Used,
UsedPercent: swapMemory.UsedPercent,
})
}
}
================================================
FILE: src/widgets/mem_other.go
================================================
// +build !freebsd
package widgets
import (
"log"
psMem "github.com/shirou/gopsutil/mem"
)
func (self *MemWidget) updateSwapMemory() {
swapMemory, err := psMem.SwapMemory()
if err != nil {
log.Printf("failed to get swap memory info from gopsutil: %v", err)
} else {
self.renderMemInfo("Swap", MemoryInfo{
Total: swapMemory.Total,
Used: swapMemory.Used,
UsedPercent: swapMemory.UsedPercent,
})
}
}
================================================
FILE: src/widgets/net.go
================================================
package widgets
import (
"fmt"
"log"
"time"
psNet "github.com/shirou/gopsutil/net"
ui "github.com/cjbassi/gotop/src/termui"
"github.com/cjbassi/gotop/src/utils"
)
const (
NET_INTERFACE_ALL = "all"
NET_INTERFACE_VPN = "tun0"
)
type NetInterface string
type NetWidget struct {
*ui.SparklineGroup
updateInterval time.Duration
// used to calculate recent network activity
totalBytesRecv uint64
totalBytesSent uint64
NetInterface string
}
func NewNetWidget(netInterface string) *NetWidget {
recvSparkline := ui.NewSparkline()
recvSparkline.Data = []int{}
sentSparkline := ui.NewSparkline()
sentSparkline.Data = []int{}
spark := ui.NewSparklineGroup(recvSparkline, sentSparkline)
self := &NetWidget{
SparklineGroup: spark,
updateInterval: time.Second,
NetInterface: netInterface,
}
self.Title = " Network Usage "
if netInterface != "all" {
self.Title = fmt.Sprintf(" Network Usage: %s ", netInterface)
}
self.update()
go func() {
for range time.NewTicker(self.updateInterval).C {
self.Lock()
self.update()
self.Unlock()
}
}()
return self
}
func (self *NetWidget) update() {
interfaces, err := psNet.IOCounters(true)
if err != nil {
log.Printf("failed to get network activity from gopsutil: %v", err)
return
}
var totalBytesRecv uint64
var totalBytesSent uint64
for _, _interface := range interfaces {
// ignore VPN interface or filter interface by name
if ((self.NetInterface == NET_INTERFACE_ALL) && (_interface.Name != NET_INTERFACE_VPN)) || (_interface.Name == self.NetInterface) {
totalBytesRecv += _interface.BytesRecv
totalBytesSent += _interface.BytesSent
}
}
var recentBytesRecv uint64
var recentBytesSent uint64
if self.totalBytesRecv != 0 { // if this isn't the first update
recentBytesRecv = totalBytesRecv - self.totalBytesRecv
recentBytesSent = totalBytesSent - self.totalBytesSent
if int(recentBytesRecv) < 0 {
log.Printf("error: negative value for recently received network data from gopsutil. recentBytesRecv: %v", recentBytesRecv)
// recover from error
recentBytesRecv = 0
}
if int(recentBytesSent) < 0 {
log.Printf("error: negative value for recently sent network data from gopsutil. recentBytesSent: %v", recentBytesSent)
// recover from error
recentBytesSent = 0
}
self.Lines[0].Data = append(self.Lines[0].Data, int(recentBytesRecv))
self.Lines[1].Data = append(self.Lines[1].Data, int(recentBytesSent))
}
// used in later calls to update
self.totalBytesRecv = totalBytesRecv
self.totalBytesSent = totalBytesSent
// render widget titles
for i := 0; i < 2; i++ {
total, label, recent := func() (uint64, string, uint64) {
if i == 0 {
return totalBytesRecv, "RX", recentBytesRecv
}
return totalBytesSent, "TX", recentBytesSent
}()
recentConverted, unitRecent := utils.ConvertBytes(uint64(recent))
totalConverted, unitTotal := utils.ConvertBytes(uint64(total))
self.Lines[i].Title1 = fmt.Sprintf(" Total %s: %5.1f %s", label, totalConverted, unitTotal)
self.Lines[i].Title2 = fmt.Sprintf(" %s/s: %9.1f %2s/s", label, recentConverted, unitRecent)
}
}
================================================
FILE: src/widgets/proc.go
================================================
package widgets
import (
"fmt"
"log"
"os/exec"
"sort"
"strconv"
"time"
psCPU "github.com/shirou/gopsutil/cpu"
ui "github.com/cjbassi/gotop/src/termui"
"github.com/cjbassi/gotop/src/utils"
)
const (
UP_ARROW = "▲"
DOWN_ARROW = "▼"
)
type ProcSortMethod string
const (
ProcSortCpu ProcSortMethod = "c"
ProcSortMem = "m"
ProcSortPid = "p"
)
type Proc struct {
Pid int
CommandName string
FullCommand string
Cpu float64
Mem float64
}
type ProcWidget struct {
*ui.Table
cpuCount int
updateInterval time.Duration
sortMethod ProcSortMethod
groupedProcs []Proc
ungroupedProcs []Proc
showGroupedProcs bool
}
func NewProcWidget() *ProcWidget {
cpuCount, err := psCPU.Counts(false)
if err != nil {
log.Printf("failed to get CPU count from gopsutil: %v", err)
}
self := &ProcWidget{
Table: ui.NewTable(),
updateInterval: time.Second,
cpuCount: cpuCount,
sortMethod: ProcSortCpu,
showGroupedProcs: true,
}
self.Title = " Processes "
self.ShowCursor = true
self.ShowLocation = true
self.ColGap = 3
self.PadLeft = 2
self.ColResizer = func() {
self.ColWidths = []int{
5, utils.MaxInt(self.Inner.Dx()-26, 10), 4, 4,
}
}
self.UniqueCol = 0
if self.showGroupedProcs {
self.UniqueCol = 1
}
self.update()
go func() {
for range time.NewTicker(self.updateInterval).C {
self.Lock()
self.update()
self.Unlock()
}
}()
return self
}
func (self *ProcWidget) update() {
procs, err := getProcs()
if err != nil {
log.Printf("failed to retrieve processes: %v", err)
return
}
// have to iterate over the entry number in order to modify the array in place
for i := range procs {
procs[i].Cpu /= float64(self.cpuCount)
}
self.ungroupedProcs = procs
self.groupedProcs = groupProcs(procs)
self.sortProcs()
self.convertProcsToTableRows()
}
// sortProcs sorts either the grouped or ungrouped []Process based on the sortMethod.
// Called with every update, when the sort method is changed, and when processes are grouped and ungrouped.
func (self *ProcWidget) sortProcs() {
self.Header = []string{"Count", "Command", "CPU%", "Mem%"}
if !self.showGroupedProcs {
self.Header[0] = "PID"
}
var procs *[]Proc
if self.showGroupedProcs {
procs = &self.groupedProcs
} else {
procs = &self.ungroupedProcs
}
switch self.sortMethod {
case ProcSortCpu:
sort.Sort(sort.Reverse(SortProcsByCpu(*procs)))
self.Header[2] += DOWN_ARROW
case ProcSortPid:
if self.showGroupedProcs {
sort.Sort(sort.Reverse(SortProcsByPid(*procs)))
} else {
sort.Sort(SortProcsByPid(*procs))
}
self.Header[0] += DOWN_ARROW
case ProcSortMem:
sort.Sort(sort.Reverse(SortProcsByMem(*procs)))
self.Header[3] += DOWN_ARROW
}
}
// convertProcsToTableRows converts a []Proc to a [][]string and sets it to the table Rows
func (self *ProcWidget) convertProcsToTableRows() {
var procs *[]Proc
if self.showGroupedProcs {
procs = &self.groupedProcs
} else {
procs = &self.ungroupedProcs
}
strings := make([][]string, len(*procs))
for i := range *procs {
strings[i] = make([]string, 4)
strings[i][0] = strconv.Itoa(int((*procs)[i].Pid))
if self.showGroupedProcs {
strings[i][1] = (*procs)[i].CommandName
} else {
strings[i][1] = (*procs)[i].FullCommand
}
strings[i][2] = fmt.Sprintf("%4s", strconv.FormatFloat((*procs)[i].Cpu, 'f', 1, 64))
strings[i][3] = fmt.Sprintf("%4s", strconv.FormatFloat(float64((*procs)[i].Mem), 'f', 1, 64))
}
self.Rows = strings
}
func (self *ProcWidget) ChangeProcSortMethod(method ProcSortMethod) {
if self.sortMethod != method {
self.sortMethod = method
self.ScrollTop()
self.sortProcs()
self.convertProcsToTableRows()
}
}
func (self *ProcWidget) ToggleShowingGroupedProcs() {
self.showGroupedProcs = !self.showGroupedProcs
if self.showGroupedProcs {
self.UniqueCol = 1
} else {
self.UniqueCol = 0
}
self.ScrollTop()
self.sortProcs()
self.convertProcsToTableRows()
}
// KillProc kills a process or group of processes depending on if we're displaying the processes grouped or not.
func (self *ProcWidget) KillProc() {
self.SelectedItem = ""
command := "kill"
if self.UniqueCol == 1 {
command = "pkill"
}
cmd := exec.Command(command, self.Rows[self.SelectedRow][self.UniqueCol])
cmd.Start()
cmd.Wait()
}
// groupProcs groupes a []Proc based on command name.
// The first field changes from PID to count.
// Cpu and Mem are added together for each Proc.
func groupProcs(procs []Proc) []Proc {
groupedProcsMap := make(map[string]Proc)
for _, proc := range procs {
val, ok := groupedProcsMap[proc.CommandName]
if ok {
groupedProcsMap[proc.CommandName] = Proc{
val.Pid + 1,
val.CommandName,
"",
val.Cpu + proc.Cpu,
val.Mem + proc.Mem,
}
} else {
groupedProcsMap[proc.CommandName] = Proc{
1,
proc.CommandName,
"",
proc.Cpu,
proc.Mem,
}
}
}
groupedProcsList := make([]Proc, len(groupedProcsMap))
i := 0
for _, val := range groupedProcsMap {
groupedProcsList[i] = val
i++
}
return groupedProcsList
}
// []Proc Sorting //////////////////////////////////////////////////////////////
type SortProcsByCpu []Proc
// Len implements Sort interface
func (self SortProcsByCpu) Len() int {
return len(self)
}
// Swap implements Sort interface
func (self SortProcsByCpu) Swap(i, j int) {
self[i], self[j] = self[j], self[i]
}
// Less implements Sort interface
func (self SortProcsByCpu) Less(i, j int) bool {
return self[i].Cpu < self[j].Cpu
}
type SortProcsByPid []Proc
// Len implements Sort interface
func (self SortProcsByPid) Len() int {
return len(self)
}
// Swap implements Sort interface
func (self SortProcsByPid) Swap(i, j int) {
self[i], self[j] = self[j], self[i]
}
// Less implements Sort interface
func (self SortProcsByPid) Less(i, j int) bool {
return self[i].Pid < self[j].Pid
}
type SortProcsByMem []Proc
// Len implements Sort interface
func (self SortProcsByMem) Len() int {
return len(self)
}
// Swap implements Sort interface
func (self SortProcsByMem) Swap(i, j int) {
self[i], self[j] = self[j], self[i]
}
// Less implements Sort interface
func (self SortProcsByMem) Less(i, j int) bool {
return self[i].Mem < self[j].Mem
}
================================================
FILE: src/widgets/proc_freebsd.go
================================================
package widgets
import (
"encoding/json"
"fmt"
"log"
"os/exec"
"strconv"
"strings"
"github.com/cjbassi/gotop/src/utils"
)
type processList struct {
ProcessInformation struct {
Process []struct {
Pid string `json:"pid"`
Comm string `json:"command"`
Cpu string `json:"percent-cpu" `
Mem string `json:"percent-memory" `
Args string `json:"arguments" `
} `json:"process"`
} `json:"process-information"`
}
func getProcs() ([]Proc, error) {
output, err := exec.Command("ps", "-axo pid,comm,%cpu,%mem,args", "--libxo", "json").Output()
if err != nil {
return nil, fmt.Errorf("failed to execute 'ps' command: %v", err)
}
list := processList{}
err = json.Unmarshal(output, &list)
if err != nil {
return nil, fmt.Errorf("failed to unmarshal json. %s", err)
}
procs := []Proc{}
for _, process := range list.ProcessInformation.Process {
if process.Comm == "idle" {
continue
}
pid, err := strconv.Atoi(strings.TrimSpace(process.Pid))
if err != nil {
log.Printf("failed to convert first field to int: %v. split: %v", err, process)
}
cpu, err := strconv.ParseFloat(utils.ConvertLocalizedString(process.Cpu), 32)
if err != nil {
log.Printf("failed to convert third field to float: %v. split: %v", err, process)
}
mem, err := strconv.ParseFloat(utils.ConvertLocalizedString(process.Mem), 32)
if err != nil {
log.Printf("failed to convert fourth field to float: %v. split: %v", err, process)
}
proc := Proc{
Pid: pid,
CommandName: process.Comm,
Cpu: cpu,
Mem: mem,
FullCommand: process.Args,
}
procs = append(procs, proc)
}
return procs, nil
}
================================================
FILE: src/widgets/proc_linux.go
================================================
package widgets
import (
"fmt"
"log"
"os/exec"
"strconv"
"strings"
)
func getProcs() ([]Proc, error) {
output, err := exec.Command("ps", "-axo", "pid:10,comm:50,pcpu:5,pmem:5,args").Output()
if err != nil {
return nil, fmt.Errorf("failed to execute 'ps' command: %v", err)
}
// converts to []string, removing trailing newline and header
linesOfProcStrings := strings.Split(strings.TrimSuffix(string(output), "\n"), "\n")[1:]
procs := []Proc{}
for _, line := range linesOfProcStrings {
pid, err := strconv.Atoi(strings.TrimSpace(line[0:10]))
if err != nil {
log.Printf("failed to convert PID to int: %v. line: %v", err, line)
}
cpu, err := strconv.ParseFloat(strings.TrimSpace(line[63:68]), 64)
if err != nil {
log.Printf("failed to convert CPU usage to float: %v. line: %v", err, line)
}
mem, err := strconv.ParseFloat(strings.TrimSpace(line[69:74]), 64)
if err != nil {
log.Printf("failed to convert Mem usage to float: %v. line: %v", err, line)
}
proc := Proc{
Pid: pid,
CommandName: strings.TrimSpace(line[11:61]),
FullCommand: line[74:],
Cpu: cpu,
Mem: mem,
}
procs = append(procs, proc)
}
return procs, nil
}
================================================
FILE: src/widgets/proc_other.go
================================================
// +build darwin openbsd
package widgets
import (
"fmt"
"log"
"os/exec"
"strconv"
"strings"
"github.com/cjbassi/gotop/src/utils"
)
const (
// Define column widths for ps output used in Procs()
five = "12345"
ten = five + five
fifty = ten + ten + ten + ten + ten
)
func getProcs() ([]Proc, error) {
keywords := fmt.Sprintf("pid=%s,comm=%s,pcpu=%s,pmem=%s,args", ten, fifty, five, five)
output, err := exec.Command("ps", "-caxo", keywords).Output()
if err != nil {
return nil, fmt.Errorf("failed to execute 'ps' command: %v", err)
}
// converts to []string and removes the header
linesOfProcStrings := strings.Split(strings.TrimSpace(string(output)), "\n")[1:]
procs := []Proc{}
for _, line := range linesOfProcStrings {
pid, err := strconv.Atoi(strings.TrimSpace(line[0:10]))
if err != nil {
log.Printf("failed to convert first field to int: %v. split: %v", err, line)
}
cpu, err := strconv.ParseFloat(utils.ConvertLocalizedString(strings.TrimSpace(line[63:68])), 64)
if err != nil {
log.Printf("failed to convert third field to float: %v. split: %v", err, line)
}
mem, err := strconv.ParseFloat(utils.ConvertLocalizedString(strings.TrimSpace(line[69:74])), 64)
if err != nil {
log.Printf("failed to convert fourth field to float: %v. split: %v", err, line)
}
proc := Proc{
Pid: pid,
CommandName: strings.TrimSpace(line[11:61]),
Cpu: cpu,
Mem: mem,
FullCommand: line[74:],
}
procs = append(procs, proc)
}
return procs, nil
}
================================================
FILE: src/widgets/proc_windows.go
================================================
package widgets
import (
"fmt"
"log"
psProc "github.com/shirou/gopsutil/process"
)
func getProcs() ([]Proc, error) {
psProcs, err := psProc.Processes()
if err != nil {
return nil, fmt.Errorf("failed to get processes from gopsutil: %v", err)
}
procs := make([]Proc, len(psProcs))
for i, psProc := range psProcs {
pid := psProc.Pid
command, err := psProc.Name()
if err != nil {
log.Printf("failed to get process command from gopsutil: %v. psProc: %v. i: %v. pid: %v", err, psProc, i, pid)
}
cpu, err := psProc.CPUPercent()
if err != nil {
log.Printf("failed to get process cpu usage from gopsutil: %v. psProc: %v. i: %v. pid: %v", err, psProc, i, pid)
}
mem, err := psProc.MemoryPercent()
if err != nil {
log.Printf("failed to get process memeory usage from gopsutil: %v. psProc: %v. i: %v. pid: %v", err, psProc, i, pid)
}
procs[i] = Proc{
Pid: int(pid),
CommandName: command,
Cpu: cpu,
Mem: float64(mem),
// getting command args using gopsutil's Cmdline and CmdlineSlice wasn't
// working the last time I tried it, so we're just reusing 'command'
FullCommand: command,
}
}
return procs, nil
}
================================================
FILE: src/widgets/statusbar.go
================================================
package widgets
import (
"image"
"log"
"os"
"time"
ui "github.com/gizak/termui/v3"
)
type StatusBar struct {
ui.Block
}
func NewStatusBar() *StatusBar {
self := &StatusBar{*ui.NewBlock()}
self.Border = false
return self
}
func (self *StatusBar) Draw(buf *ui.Buffer) {
self.Block.Draw(buf)
hostname, err := os.Hostname()
if err != nil {
log.Printf("could not get hostname: %v", err)
return
}
buf.SetString(
hostname,
ui.NewStyle(ui.ColorWhite),
image.Pt(self.Inner.Min.X, self.Inner.Min.Y+(self.Inner.Dy()/2)),
)
currentTime := time.Now()
formattedTime := currentTime.Format("15:04:05")
buf.SetString(
formattedTime,
ui.NewStyle(ui.ColorWhite),
image.Pt(
self.Inner.Min.X+(self.Inner.Dx()/2)-len(formattedTime)/2,
self.Inner.Min.Y+(self.Inner.Dy()/2),
),
)
buf.SetString(
"gotop",
ui.NewStyle(ui.ColorWhite),
image.Pt(
self.Inner.Max.X-6,
self.Inner.Min.Y+(self.Inner.Dy()/2),
),
)
}
================================================
FILE: src/widgets/temp.go
================================================
package widgets
import (
"fmt"
"image"
"sort"
"time"
ui "github.com/gizak/termui/v3"
"github.com/cjbassi/gotop/src/utils"
)
type TempScale int
const (
Celcius TempScale = 0
Fahrenheit = 1
)
type TempWidget struct {
*ui.Block // inherits from Block instead of a premade Widget
updateInterval time.Duration
Data map[string]int
TempThreshold int
TempLowColor ui.Color
TempHighColor ui.Color
TempScale TempScale
}
func NewTempWidget(tempScale TempScale) *TempWidget {
self := &TempWidget{
Block: ui.NewBlock(),
updateInterval: time.Second * 5,
Data: make(map[string]int),
TempThreshold: 80,
TempScale: tempScale,
}
self.Title = " Temperatures "
if tempScale == Fahrenheit {
self.TempThreshold = utils.CelsiusToFahrenheit(self.TempThreshold)
}
self.update()
go func() {
for range time.NewTicker(self.updateInterval).C {
self.Lock()
self.update()
self.Unlock()
}
}()
return self
}
// Custom Draw method instead of inheriting from a generic Widget.
func (self *TempWidget) Draw(buf *ui.Buffer) {
self.Block.Draw(buf)
var keys []string
for key := range self.Data {
keys = append(keys, key)
}
sort.Strings(keys)
for y, key := range keys {
if y+1 > self.Inner.Dy() {
break
}
var fg ui.Color
if self.Data[key] < self.TempThreshold {
fg = self.TempLowColor
} else {
fg = self.TempHighColor
}
s := ui.TrimString(key, (self.Inner.Dx() - 4))
buf.SetString(s,
ui.Theme.Default,
image.Pt(self.Inner.Min.X, self.Inner.Min.Y+y),
)
switch self.TempScale {
case Fahrenheit:
buf.SetString(
fmt.Sprintf("%3dF", self.Data[key]),
ui.NewStyle(fg),
image.Pt(self.Inner.Max.X-4, self.Inner.Min.Y+y),
)
case Celcius:
buf.SetString(
fmt.Sprintf("%3dC", self.Data[key]),
ui.NewStyle(fg),
image.Pt(self.Inner.Max.X-4, self.Inner.Min.Y+y),
)
}
}
}
================================================
FILE: src/widgets/temp_darwin.go
================================================
package widgets
// #cgo LDFLAGS: -framework IOKit
// #include "include/smc.c"
import "C"
import (
"log"
"github.com/cjbassi/gotop/src/utils"
)
type TemperatureStat struct {
SensorKey string `json:"sensorKey"`
Temperature float64 `json:"sensorTemperature"`
}
func SensorsTemperatures() ([]TemperatureStat, error) {
temperatureKeys := map[string]string{
C.AMBIENT_AIR_0: "ambient_air_0",
C.AMBIENT_AIR_1: "ambient_air_1",
C.CPU_0_DIODE: "cpu_0_diode",
C.CPU_0_HEATSINK: "cpu_0_heatsink",
C.CPU_0_PROXIMITY: "cpu_0_proximity",
C.ENCLOSURE_BASE_0: "enclosure_base_0",
C.ENCLOSURE_BASE_1: "enclosure_base_1",
C.ENCLOSURE_BASE_2: "enclosure_base_2",
C.ENCLOSURE_BASE_3: "enclosure_base_3",
C.GPU_0_DIODE: "gpu_0_diode",
C.GPU_0_HEATSINK: "gpu_0_heatsink",
C.GPU_0_PROXIMITY: "gpu_0_proximity",
C.HARD_DRIVE_BAY: "hard_drive_bay",
C.MEMORY_SLOT_0: "memory_slot_0",
C.MEMORY_SLOTS_PROXIMITY: "memory_slots_proximity",
C.NORTHBRIDGE: "northbridge",
C.NORTHBRIDGE_DIODE: "northbridge_diode",
C.NORTHBRIDGE_PROXIMITY: "northbridge_proximity",
C.THUNDERBOLT_0: "thunderbolt_0",
C.THUNDERBOLT_1: "thunderbolt_1",
C.WIRELESS_MODULE: "wireless_module",
}
var temperatures []TemperatureStat
C.open_smc()
defer C.close_smc()
for key, val := range temperatureKeys {
temperatures = append(temperatures, TemperatureStat{
SensorKey: val,
Temperature: float64(C.get_tmp(C.CString(key), C.CELSIUS)),
})
}
return temperatures, nil
}
func (self *TempWidget) update() {
sensors, err := SensorsTemperatures()
if err != nil {
log.Printf("failed to get sensors from CGO: %v", err)
return
}
for _, sensor := range sensors {
if sensor.Temperature != 0 {
switch self.TempScale {
case Fahrenheit:
self.Data[sensor.SensorKey] = utils.CelsiusToFahrenheit(int(sensor.Temperature))
case Celcius:
self.Data[sensor.SensorKey] = int(sensor.Temperature)
}
}
}
}
================================================
FILE: src/widgets/temp_freebsd.go
================================================
package widgets
import (
"fmt"
"log"
"os/exec"
"strconv"
"strings"
"github.com/cjbassi/gotop/src/utils"
)
var sensorOIDS = map[string]string{
"dev.cpu.0.temperature": "CPU 0 ",
"hw.acpi.thermal.tz0.temperature": "Thermal zone 0",
}
type sensorMeasurement struct {
name string
temperature float64
}
func removeUnusedChars(s string) string {
s1 := strings.Replace(s, "C", "", 1)
s2 := strings.TrimSuffix(s1, "\n")
return s2
}
func refineOutput(output []byte) (float64, error) {
convertedOutput := utils.ConvertLocalizedString(removeUnusedChars(string(output)))
value, err := strconv.ParseFloat(convertedOutput, 64)
if err != nil {
return 0, err
}
return value, nil
}
func collectSensors() ([]sensorMeasurement, error) {
var measurements []sensorMeasurement
for k, v := range sensorOIDS {
output, err := exec.Command("sysctl", "-n", k).Output()
if err != nil {
return nil, fmt.Errorf("failed to execute 'sysctl' command: %v", err)
}
value, err := refineOutput(output)
if err != nil {
return nil, fmt.Errorf("failed to execute 'sysctl' command: %v", err)
}
measurements = append(measurements, sensorMeasurement{v, value})
}
return measurements, nil
}
func (self *TempWidget) update() {
sensors, err := collectSensors()
if err != nil {
log.Printf("error recieved from gopsutil: %v", err)
}
for _, sensor := range sensors {
switch self.TempScale {
case Fahrenheit:
self.Data[sensor.name] = utils.CelsiusToFahrenheit(int(sensor.temperature))
case Celcius:
self.Data[sensor.name] = int(sensor.temperature)
}
}
}
================================================
FILE: src/widgets/temp_linux.go
================================================
package widgets
import (
"log"
"strings"
psHost "github.com/shirou/gopsutil/host"
"github.com/cjbassi/gotop/src/utils"
)
func (self *TempWidget) update() {
sensors, err := psHost.SensorsTemperatures()
if err != nil {
log.Printf("error recieved from gopsutil: %v", err)
}
for _, sensor := range sensors {
// only sensors with input in their name are giving us live temp info
if strings.Contains(sensor.SensorKey, "input") && sensor.Temperature != 0 {
// removes '_input' from the end of the sensor name
label := sensor.SensorKey[:strings.Index(sensor.SensorKey, "_input")]
switch self.TempScale {
case Fahrenheit:
self.Data[label] = utils.CelsiusToFahrenheit(int(sensor.Temperature))
case Celcius:
self.Data[label] = int(sensor.Temperature)
}
}
}
}
================================================
FILE: src/widgets/temp_openbsd.go
================================================
package widgets
// loosely based on https://github.com/openbsd/src/blob/master/sbin/sysctl/sysctl.c#L2517
// #include <sys/time.h>
// #include <sys/sysctl.h>
// #include <sys/sensors.h>
import "C"
import (
"strconv"
"syscall"
"unsafe"
"github.com/cjbassi/gotop/src/utils"
)
func (self *TempWidget) getTemp(mib []C.int, mlen int, snsrdev *C.struct_sensordev, index int) {
switch mlen {
case 4:
k := mib[3]
var numt C.int
for numt = 0; numt < snsrdev.maxnumt[k]; numt++ {
mib[4] = numt
self.getTemp(mib, mlen+1, snsrdev, int(numt))
}
case 5:
var snsr C.struct_sensor
var slen C.size_t = C.sizeof_struct_sensor
if v, _ := C.sysctl(&mib[0], 5, unsafe.Pointer(&snsr), &slen, nil, 0); v == -1 {
return
}
if slen > 0 && (snsr.flags&C.SENSOR_FINVALID) == 0 {
key := C.GoString(&snsrdev.xname[0]) + ".temp" + strconv.Itoa(index)
temp := int((snsr.value - 273150000.0) / 1000000.0)
switch self.TempScale {
case Fahrenheit:
self.Data[key] = utils.CelsiusToFahrenheit(temp)
case Celcius:
self.Data[key] = temp
}
}
}
}
func (self *TempWidget) update() {
mib := []C.int{0, 1, 2, 3, 4}
var snsrdev C.struct_sensordev
var len C.ulong = C.sizeof_struct_sensordev
mib[0] = C.CTL_HW
mib[1] = C.HW_SENSORS
mib[3] = C.SENSOR_TEMP
var i C.int
for i = 0; ; i++ {
mib[2] = i
if v, e := C.sysctl(&mib[0], 3, unsafe.Pointer(&snsrdev), &len, nil, 0); v == -1 {
if e == syscall.ENXIO {
continue
}
if e == syscall.ENOENT {
break
}
}
self.getTemp(mib, 4, &snsrdev, 0)
}
}
================================================
FILE: src/widgets/temp_windows.go
================================================
package widgets
import (
"log"
psHost "github.com/shirou/gopsutil/host"
"github.com/cjbassi/gotop/src/utils"
)
func (self *TempWidget) update() {
sensors, err := psHost.SensorsTemperatures()
if err != nil {
log.Printf("failed to get sensors from gopsutil: %v", err)
return
}
for _, sensor := range sensors {
if sensor.Temperature != 0 {
switch self.TempScale {
case Fahrenheit:
self.Data[sensor.SensorKey] = utils.CelsiusToFahrenheit(int(sensor.Temperature))
case Celcius:
self.Data[sensor.SensorKey] = int(sensor.Temperature)
}
}
}
}
================================================
FILE: vendor/github.com/StackExchange/wmi/LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2013 Stack Exchange
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:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
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.
================================================
FILE: vendor/github.com/StackExchange/wmi/README.md
================================================
wmi
===
Package wmi provides a WQL interface to Windows WMI.
Note: It interfaces with WMI on the local machine, therefore it only runs on Windows.
================================================
FILE: vendor/github.com/StackExchange/wmi/swbemservices.go
================================================
// +build windows
package wmi
import (
"fmt"
"reflect"
"runtime"
"sync"
"github.com/go-ole/go-ole"
"github.com/go-ole/go-ole/oleutil"
)
// SWbemServices is used to access wmi. See https://msdn.microsoft.com/en-us/library/aa393719(v=vs.85).aspx
type SWbemServices struct {
//TODO: track namespace. Not sure if we can re connect to a different namespace using the same instance
cWMIClient *Client //This could also be an embedded struct, but then we would need to branch on Client vs SWbemServices in the Query method
sWbemLocatorIUnknown *ole.IUnknown
sWbemLocatorIDispatch *ole.IDispatch
queries chan *queryRequest
closeError chan error
lQueryorClose sync.Mutex
}
type queryRequest struct {
query string
dst interface{}
args []interface{}
finished chan error
}
// InitializeSWbemServices will return a new SWbemServices object that can be used to query WMI
func InitializeSWbemServices(c *Client, connectServerArgs ...interface{}) (*SWbemServices, error) {
//fmt.Println("InitializeSWbemServices: Starting")
//TODO: implement connectServerArgs as optional argument for init with connectServer call
s := new(SWbemServices)
s.cWMIClient = c
s.queries = make(chan *queryRequest)
initError := make(chan error)
go s.process(initError)
err, ok := <-initError
if ok {
return nil, err //Send error to caller
}
//fmt.Println("InitializeSWbemServices: Finished")
return s, nil
}
// Close will clear and release all of the SWbemServices resources
func (s *SWbemServices) Close() error {
s.lQueryorClose.Lock()
if s == nil || s.sWbemLocatorIDispatch == nil {
s.lQueryorClose.Unlock()
return fmt.Errorf("SWbemServices is not Initialized")
}
if s.queries == nil {
s.lQueryorClose.Unlock()
return fmt.Errorf("SWbemServices has been closed")
}
//fmt.Println("Close: sending close request")
var result error
ce := make(chan error)
s.closeError = ce //Race condition if multiple callers to close. May need to lock here
close(s.queries) //Tell background to shut things down
s.lQueryorClose.Unlock()
err, ok := <-ce
if ok {
result = err
}
//fmt.Println("Close: finished")
return result
}
func (s *SWbemServices) process(initError chan error) {
//fmt.Println("process: starting background thread initialization")
//All OLE/WMI calls must happen on the same initialized thead, so lock this goroutine
runtime.LockOSThread()
defer runtime.LockOSThread()
err := ole.CoInitializeEx(0, ole.COINIT_MULTITHREADED)
if err != nil {
oleCode := err.(*ole.OleError).Code()
if oleCode != ole.S_OK && oleCode != S_FALSE {
initError <- fmt.Errorf("ole.CoInitializeEx error: %v", err)
return
}
}
defer ole.CoUninitialize()
unknown, err := oleutil.CreateObject("WbemScripting.SWbemLocator")
if err != nil {
initError <- fmt.Errorf("CreateObject SWbemLocator error: %v", err)
return
} else if unknown == nil {
initError <- ErrNilCreateObject
return
}
defer unknown.Release()
s.sWbemLocatorIUnknown = unknown
dispatch, err := s.sWbemLocatorIUnknown.QueryInterface(ole.IID_IDispatch)
if err != nil {
initError <- fmt.Errorf("SWbemLocator QueryInterface error: %v", err)
return
}
defer dispatch.Release()
s.sWbemLocatorIDispatch = dispatch
// we can't do the ConnectServer call outside the loop unless we find a way to track and re-init the connectServerArgs
//fmt.Println("process: initialized. closing initError")
close(initError)
//fmt.Println("process: waiting for queries")
for q := range s.queries {
//fmt.Printf("process: new query: len(query)=%d\n", len(q.query))
errQuery := s.queryBackground(q)
//fmt.Println("process: s.queryBackground finished")
if errQuery != nil {
q.finished <- errQuery
}
close(q.finished)
}
//fmt.Println("process: queries channel closed")
s.queries = nil //set channel to nil so we know it is closed
//TODO: I think the Release/Clear calls can panic if things are in a bad state.
//TODO: May need to recover from panics and send error to method caller instead.
close(s.closeError)
}
// Query runs the WQL query using a SWbemServices instance and appends the values to dst.
//
// dst must have type *[]S or *[]*S, for some struct type S. Fields selected in
// the query must have the same name in dst. Supported types are all signed and
// unsigned integers, time.Time, string, bool, or a pointer to one of those.
// Array types are not supported.
//
// By default, the local machine and default namespace are used. These can be
// changed using connectServerArgs. See
// http://msdn.microsoft.com/en-us/library/aa393720.aspx for details.
func (s *SWbemServices) Query(query string, dst interface{}, connectServerArgs ...interface{}) error {
s.lQueryorClose.Lock()
if s == nil || s.sWbemLocatorIDispatch == nil {
s.lQueryorClose.Unlock()
return fmt.Errorf("SWbemServices is not Initialized")
}
if s.queries == nil {
s.lQueryorClose.Unlock()
return fmt.Errorf("SWbemServices has been closed")
}
//fmt.Println("Query: Sending query request")
qr := queryRequest{
query: query,
dst: dst,
args: connectServerArgs,
finished: make(chan error),
}
s.queries <- &qr
s.lQueryorClose.Unlock()
err, ok := <-qr.finished
if ok {
//fmt.Println("Query: Finished with error")
return err //Send error to caller
}
//fmt.Println("Query: Finished")
return nil
}
func (s *SWbemServices) queryBackground(q *queryRequest) error {
if s == nil || s.sWbemLocatorIDispatch == nil {
return fmt.Errorf("SWbemServices is not Initialized")
}
wmi := s.sWbemLocatorIDispatch //Should just rename in the code, but this will help as we break things apart
//fmt.Println("queryBackground: Starting")
dv := reflect.ValueOf(q.dst)
if dv.Kind() != reflect.Ptr || dv.IsNil() {
return ErrInvalidEntityType
}
dv = dv.Elem()
mat, elemType := checkMultiArg(dv)
if mat == multiArgTypeInvalid {
return ErrInvalidEntityType
}
// service is a SWbemServices
serviceRaw, err := oleutil.CallMethod(wmi, "ConnectServer", q.args...)
if err != nil {
return err
}
service := serviceRaw.ToIDispatch()
defer serviceRaw.Clear()
// result is a SWBemObjectSet
resultRaw, err := oleutil.CallMethod(service, "ExecQuery", q.query)
if err != nil {
return err
}
result := resultRaw.ToIDispatch()
defer resultRaw.Clear()
count, err := oleInt64(result, "Count")
if err != nil {
return err
}
enumProperty, err := result.GetProperty("_NewEnum")
if err != nil {
return err
}
defer enumProperty.Clear()
enum, err := enumProperty.ToIUnknown().IEnumVARIANT(ole.IID_IEnumVariant)
if err != nil {
return err
}
if enum == nil {
return fmt.Errorf("can't get IEnumVARIANT, enum is nil")
}
defer enum.Release()
// Initialize a slice with Count capacity
dv.Set(reflect.MakeSlice(dv.Type(), 0, int(count)))
var errFieldMismatch error
for itemRaw, length, err := enum.Next(1); length > 0; itemRaw, length, err = enum.Next(1) {
if err != nil {
return err
}
err := func() error {
// item is a SWbemObject, but really a Win32_Process
item := itemRaw.ToIDispatch()
defer item.Release()
ev := reflect.New(elemType)
if err = s.cWMIClient.loadEntity(ev.Interface(), item); err != nil {
if _, ok := err.(*ErrFieldMismatch); ok {
// We continue loading entities even in the face of field mismatch errors.
// If we encounter any other error, that other error is returned. Otherwise,
// an ErrFieldMismatch is returned.
errFieldMismatch = err
} else {
return err
}
}
if mat != multiArgTypeStructPtr {
ev = ev.Elem()
}
dv.Set(reflect.Append(dv, ev))
return nil
}()
if err != nil {
return err
}
}
//fmt.Println("queryBackground: Finished")
return errFieldMismatch
}
================================================
FILE: vendor/github.com/StackExchange/wmi/wmi.go
================================================
// +build windows
/*
Package wmi provides a WQL interface for WMI on Windows.
Example code to print names of running processes:
type Win32_Process struct {
Name string
}
func main() {
var dst []Win32_Process
q := wmi.CreateQuery(&dst, "")
err := wmi.Query(q, &dst)
if err != nil {
log.Fatal(err)
}
for i, v := range dst {
println(i, v.Name)
}
}
*/
package wmi
import (
"bytes"
"errors"
"fmt"
"log"
"os"
"reflect"
"runtime"
"strconv"
"strings"
"sync"
"time"
"github.com/go-ole/go-ole"
"github.com/go-ole/go-ole/oleutil"
)
var l = log.New(os.Stdout, "", log.LstdFlags)
var (
ErrInvalidEntityType = errors.New("wmi: invalid entity type")
// ErrNilCreateObject is the error returned if CreateObject returns nil even
// if the error was nil.
ErrNilCreateObject = errors.New("wmi: create object returned nil")
lock sync.Mutex
)
// S_FALSE is returned by CoInitializeEx if it was already called on this thread.
const S_FALSE = 0x00000001
// QueryNamespace invokes Query with the given namespace on the local machine.
func QueryNamespace(query string, dst interface{}, namespace string) error {
return Query(query, dst, nil, namespace)
}
// Query runs the WQL query and appends the values to dst.
//
// dst must have type *[]S or *[]*S, for some struct type S. Fields selected in
// the query must have the same name in dst. Supported types are all signed and
// unsigned integers, time.Time, string, bool, or a pointer to one of those.
// Array types are not supported.
//
// By default, the local machine and default namespace are used. These can be
// changed using connectServerArgs. See
// http://msdn.microsoft.com/en-us/library/aa393720.aspx for details.
//
// Query is a wrapper around DefaultClient.Query.
func Query(query string, dst interface{}, connectServerArgs ...interface{}) error {
if DefaultClient.SWbemServicesClient == nil {
return DefaultClient.Query(query, dst, connectServerArgs...)
}
return DefaultClient.SWbemServicesClient.Query(query, dst, connectServerArgs...)
}
// A Client is an WMI query client.
gitextract_yfe3udwr/
├── .github/
│ └── ISSUE_TEMPLATE/
│ ├── bug_report.md
│ └── other.md
├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── LICENSE
├── Makefile
├── README.md
├── assets/
│ └── logo/
│ └── credits.md
├── build/
│ └── nfpm.yml
├── ci/
│ └── script.sh
├── colorschemes/
│ ├── default.go
│ ├── default.json
│ ├── default_dark.go
│ ├── monokai.go
│ ├── solarized.go
│ ├── template.go
│ └── vice.go
├── go.mod
├── go.sum
├── main.go
├── scripts/
│ └── download.sh
├── snap/
│ └── snapcraft.yaml
├── src/
│ ├── logging/
│ │ ├── logging_arm64.go
│ │ └── logging_other.go
│ ├── termui/
│ │ ├── drawille-go/
│ │ │ ├── LICENSE.md
│ │ │ ├── README.md
│ │ │ └── drawille.go
│ │ ├── linegraph.go
│ │ ├── sparkline.go
│ │ └── table.go
│ ├── utils/
│ │ ├── bytes.go
│ │ ├── conversions.go
│ │ ├── math.go
│ │ └── xdg.go
│ └── widgets/
│ ├── battery.go
│ ├── cpu.go
│ ├── disk.go
│ ├── help.go
│ ├── include/
│ │ ├── smc.c
│ │ └── smc.h
│ ├── mem.go
│ ├── mem_freebsd.go
│ ├── mem_other.go
│ ├── net.go
│ ├── proc.go
│ ├── proc_freebsd.go
│ ├── proc_linux.go
│ ├── proc_other.go
│ ├── proc_windows.go
│ ├── statusbar.go
│ ├── temp.go
│ ├── temp_darwin.go
│ ├── temp_freebsd.go
│ ├── temp_linux.go
│ ├── temp_openbsd.go
│ └── temp_windows.go
└── vendor/
├── github.com/
│ ├── StackExchange/
│ │ └── wmi/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── swbemservices.go
│ │ └── wmi.go
│ ├── cjbassi/
│ │ └── drawille-go/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── drawille.go
│ ├── distatus/
│ │ └── battery/
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE.md
│ │ ├── README.md
│ │ ├── battery.go
│ │ ├── battery_darwin.go
│ │ ├── battery_freebsd_dragonfly_.go
│ │ ├── battery_linux.go
│ │ ├── battery_netbsd.go
│ │ ├── battery_openbsd.go
│ │ ├── battery_solaris.go
│ │ ├── battery_windows.go
│ │ ├── errors.go
│ │ └── ioctl.go
│ ├── docopt/
│ │ └── docopt.go/
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── doc.go
│ │ ├── docopt.go
│ │ ├── error.go
│ │ ├── opts.go
│ │ ├── pattern.go
│ │ ├── test_golang.docopt
│ │ ├── testcases.docopt
│ │ └── token.go
│ ├── gizak/
│ │ └── termui/
│ │ └── v3/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── alignment.go
│ │ ├── backend.go
│ │ ├── block.go
│ │ ├── buffer.go
│ │ ├── canvas.go
│ │ ├── doc.go
│ │ ├── events.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── grid.go
│ │ ├── render.go
│ │ ├── style.go
│ │ ├── style_parser.go
│ │ ├── symbols.go
│ │ ├── symbols_other.go
│ │ ├── symbols_windows.go
│ │ ├── theme.go
│ │ └── utils.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
│ │ ├── oleutil/
│ │ │ ├── connection.go
│ │ │ ├── connection_func.go
│ │ │ ├── connection_windows.go
│ │ │ ├── go-get.go
│ │ │ └── oleutil.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_s390x.go
│ │ ├── vt_string.go
│ │ ├── winrt.go
│ │ └── winrt_doc.go
│ ├── mattn/
│ │ └── go-runewidth/
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.mkd
│ │ ├── runewidth.go
│ │ ├── runewidth_appengine.go
│ │ ├── runewidth_js.go
│ │ ├── runewidth_posix.go
│ │ └── runewidth_windows.go
│ ├── mitchellh/
│ │ └── go-wordwrap/
│ │ ├── LICENSE.md
│ │ ├── README.md
│ │ ├── go.mod
│ │ └── wordwrap.go
│ ├── nsf/
│ │ └── termbox-go/
│ │ ├── AUTHORS
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── api.go
│ │ ├── api_common.go
│ │ ├── api_windows.go
│ │ ├── collect_terminfo.py
│ │ ├── escwait.go
│ │ ├── escwait_darwin.go
│ │ ├── syscalls.go
│ │ ├── syscalls_darwin.go
│ │ ├── syscalls_darwin_amd64.go
│ │ ├── syscalls_dragonfly.go
│ │ ├── syscalls_freebsd.go
│ │ ├── syscalls_linux.go
│ │ ├── syscalls_netbsd.go
│ │ ├── syscalls_openbsd.go
│ │ ├── syscalls_windows.go
│ │ ├── termbox.go
│ │ ├── termbox_common.go
│ │ ├── termbox_windows.go
│ │ ├── terminfo.go
│ │ └── terminfo_builtin.go
│ └── shirou/
│ ├── gopsutil/
│ │ ├── LICENSE
│ │ ├── cpu/
│ │ │ ├── cpu.go
│ │ │ ├── cpu_darwin.go
│ │ │ ├── cpu_darwin_cgo.go
│ │ │ ├── cpu_darwin_nocgo.go
│ │ │ ├── cpu_fallback.go
│ │ │ ├── cpu_freebsd.go
│ │ │ ├── cpu_freebsd_386.go
│ │ │ ├── cpu_freebsd_amd64.go
│ │ │ ├── cpu_linux.go
│ │ │ ├── cpu_openbsd.go
│ │ │ ├── cpu_solaris.go
│ │ │ └── cpu_windows.go
│ │ ├── disk/
│ │ │ ├── disk.go
│ │ │ ├── disk_darwin.go
│ │ │ ├── disk_darwin.h
│ │ │ ├── disk_darwin_386.go
│ │ │ ├── disk_darwin_amd64.go
│ │ │ ├── disk_darwin_arm64.go
│ │ │ ├── disk_darwin_cgo.go
│ │ │ ├── disk_darwin_nocgo.go
│ │ │ ├── disk_fallback.go
│ │ │ ├── disk_freebsd.go
│ │ │ ├── disk_freebsd_386.go
│ │ │ ├── disk_freebsd_amd64.go
│ │ │ ├── disk_linux.go
│ │ │ ├── disk_openbsd.go
│ │ │ ├── disk_openbsd_amd64.go
│ │ │ ├── disk_solaris.go
│ │ │ ├── disk_unix.go
│ │ │ ├── disk_windows.go
│ │ │ ├── types_freebsd.go
│ │ │ └── types_openbsd.go
│ │ ├── host/
│ │ │ ├── host.go
│ │ │ ├── host_darwin.go
│ │ │ ├── host_darwin_386.go
│ │ │ ├── host_darwin_amd64.go
│ │ │ ├── host_fallback.go
│ │ │ ├── host_freebsd.go
│ │ │ ├── host_freebsd_386.go
│ │ │ ├── host_freebsd_amd64.go
│ │ │ ├── host_freebsd_arm.go
│ │ │ ├── host_linux.go
│ │ │ ├── host_linux_386.go
│ │ │ ├── host_linux_amd64.go
│ │ │ ├── host_linux_arm.go
│ │ │ ├── host_linux_arm64.go
│ │ │ ├── host_linux_mips.go
│ │ │ ├── host_linux_mips64.go
│ │ │ ├── host_linux_mips64le.go
│ │ │ ├── host_linux_mipsle.go
│ │ │ ├── host_linux_ppc64le.go
│ │ │ ├── host_linux_s390x.go
│ │ │ ├── host_openbsd.go
│ │ │ ├── host_openbsd_amd64.go
│ │ │ ├── host_solaris.go
│ │ │ ├── host_windows.go
│ │ │ ├── types_darwin.go
│ │ │ ├── types_freebsd.go
│ │ │ ├── types_linux.go
│ │ │ └── types_openbsd.go
│ │ ├── internal/
│ │ │ └── common/
│ │ │ ├── binary.go
│ │ │ ├── common.go
│ │ │ ├── common_darwin.go
│ │ │ ├── common_freebsd.go
│ │ │ ├── common_linux.go
│ │ │ ├── common_openbsd.go
│ │ │ ├── common_unix.go
│ │ │ └── common_windows.go
│ │ ├── mem/
│ │ │ ├── mem.go
│ │ │ ├── mem_darwin.go
│ │ │ ├── mem_darwin_cgo.go
│ │ │ ├── mem_darwin_nocgo.go
│ │ │ ├── mem_fallback.go
│ │ │ ├── mem_freebsd.go
│ │ │ ├── mem_linux.go
│ │ │ ├── mem_openbsd.go
│ │ │ ├── mem_openbsd_amd64.go
│ │ │ ├── mem_solaris.go
│ │ │ ├── mem_windows.go
│ │ │ └── types_openbsd.go
│ │ ├── net/
│ │ │ ├── net.go
│ │ │ ├── net_darwin.go
│ │ │ ├── net_fallback.go
│ │ │ ├── net_freebsd.go
│ │ │ ├── net_linux.go
│ │ │ ├── net_openbsd.go
│ │ │ ├── net_unix.go
│ │ │ └── net_windows.go
│ │ └── process/
│ │ ├── process.go
│ │ ├── process_darwin.go
│ │ ├── process_darwin_386.go
│ │ ├── process_darwin_amd64.go
│ │ ├── process_fallback.go
│ │ ├── process_freebsd.go
│ │ ├── process_freebsd_386.go
│ │ ├── process_freebsd_amd64.go
│ │ ├── process_freebsd_arm.go
│ │ ├── process_linux.go
│ │ ├── process_openbsd.go
│ │ ├── process_openbsd_amd64.go
│ │ ├── process_posix.go
│ │ ├── process_windows.go
│ │ ├── process_windows_386.go
│ │ ├── process_windows_amd64.go
│ │ ├── types_darwin.go
│ │ ├── types_freebsd.go
│ │ └── types_openbsd.go
│ └── w32/
│ ├── AUTHORS
│ ├── LICENSE
│ ├── README.md
│ ├── advapi32.go
│ ├── comctl32.go
│ ├── comdlg32.go
│ ├── constants.go
│ ├── dwmapi.go
│ ├── gdi32.go
│ ├── gdiplus.go
│ ├── idispatch.go
│ ├── istream.go
│ ├── iunknown.go
│ ├── kernel32.go
│ ├── ole32.go
│ ├── oleaut32.go
│ ├── opengl32.go
│ ├── psapi.go
│ ├── shell32.go
│ ├── typedef.go
│ ├── user32.go
│ ├── utils.go
│ └── vars.go
├── golang.org/
│ └── x/
│ └── sys/
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── unix/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── affinity_linux.go
│ │ ├── aliases.go
│ │ ├── asm_aix_ppc64.s
│ │ ├── asm_darwin_386.s
│ │ ├── asm_darwin_amd64.s
│ │ ├── asm_darwin_arm.s
│ │ ├── asm_darwin_arm64.s
│ │ ├── asm_dragonfly_amd64.s
│ │ ├── asm_freebsd_386.s
│ │ ├── asm_freebsd_amd64.s
│ │ ├── asm_freebsd_arm.s
│ │ ├── asm_freebsd_arm64.s
│ │ ├── asm_linux_386.s
│ │ ├── asm_linux_amd64.s
│ │ ├── asm_linux_arm.s
│ │ ├── asm_linux_arm64.s
│ │ ├── asm_linux_mips64x.s
│ │ ├── asm_linux_mipsx.s
│ │ ├── asm_linux_ppc64x.s
│ │ ├── asm_linux_s390x.s
│ │ ├── asm_netbsd_386.s
│ │ ├── asm_netbsd_amd64.s
│ │ ├── asm_netbsd_arm.s
│ │ ├── asm_openbsd_386.s
│ │ ├── asm_openbsd_amd64.s
│ │ ├── asm_openbsd_arm.s
│ │ ├── asm_solaris_amd64.s
│ │ ├── bluetooth_linux.go
│ │ ├── cap_freebsd.go
│ │ ├── constants.go
│ │ ├── dev_aix_ppc.go
│ │ ├── dev_aix_ppc64.go
│ │ ├── dev_darwin.go
│ │ ├── dev_dragonfly.go
│ │ ├── dev_freebsd.go
│ │ ├── dev_linux.go
│ │ ├── dev_netbsd.go
│ │ ├── dev_openbsd.go
│ │ ├── dirent.go
│ │ ├── endian_big.go
│ │ ├── endian_little.go
│ │ ├── env_unix.go
│ │ ├── errors_freebsd_386.go
│ │ ├── errors_freebsd_amd64.go
│ │ ├── errors_freebsd_arm.go
│ │ ├── fcntl.go
│ │ ├── fcntl_darwin.go
│ │ ├── fcntl_linux_32bit.go
│ │ ├── gccgo.go
│ │ ├── gccgo_c.c
│ │ ├── gccgo_linux_amd64.go
│ │ ├── ioctl.go
│ │ ├── mkall.sh
│ │ ├── mkasm_darwin.go
│ │ ├── mkerrors.sh
│ │ ├── mkpost.go
│ │ ├── mksyscall.go
│ │ ├── mksyscall_aix_ppc.go
│ │ ├── mksyscall_aix_ppc64.pl
│ │ ├── mksyscall_solaris.pl
│ │ ├── mksysctl_openbsd.pl
│ │ ├── mksysnum.go
│ │ ├── openbsd_pledge.go
│ │ ├── openbsd_unveil.go
│ │ ├── pagesize_unix.go
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── sockcmsg_linux.go
│ │ ├── sockcmsg_unix.go
│ │ ├── str.go
│ │ ├── syscall.go
│ │ ├── syscall_aix.go
│ │ ├── syscall_aix_ppc.go
│ │ ├── syscall_aix_ppc64.go
│ │ ├── syscall_bsd.go
│ │ ├── syscall_darwin.go
│ │ ├── syscall_darwin_386.go
│ │ ├── syscall_darwin_amd64.go
│ │ ├── syscall_darwin_arm.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_linux.go
│ │ ├── syscall_linux_386.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_gccgo_386.go
│ │ ├── syscall_linux_gccgo_arm.go
│ │ ├── syscall_linux_mips64x.go
│ │ ├── syscall_linux_mipsx.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_openbsd.go
│ │ ├── syscall_openbsd_386.go
│ │ ├── syscall_openbsd_amd64.go
│ │ ├── syscall_openbsd_arm.go
│ │ ├── syscall_solaris.go
│ │ ├── syscall_solaris_amd64.go
│ │ ├── syscall_unix.go
│ │ ├── syscall_unix_gc.go
│ │ ├── syscall_unix_gc_ppc64x.go
│ │ ├── timestruct.go
│ │ ├── types_aix.go
│ │ ├── types_darwin.go
│ │ ├── types_dragonfly.go
│ │ ├── types_freebsd.go
│ │ ├── types_netbsd.go
│ │ ├── types_openbsd.go
│ │ ├── types_solaris.go
│ │ ├── xattr_bsd.go
│ │ ├── zerrors_aix_ppc.go
│ │ ├── zerrors_aix_ppc64.go
│ │ ├── zerrors_darwin_386.go
│ │ ├── zerrors_darwin_amd64.go
│ │ ├── zerrors_darwin_arm.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_linux_386.go
│ │ ├── zerrors_linux_amd64.go
│ │ ├── zerrors_linux_arm.go
│ │ ├── zerrors_linux_arm64.go
│ │ ├── zerrors_linux_mips.go
│ │ ├── zerrors_linux_mips64.go
│ │ ├── zerrors_linux_mips64le.go
│ │ ├── zerrors_linux_mipsle.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_openbsd_386.go
│ │ ├── zerrors_openbsd_amd64.go
│ │ ├── zerrors_openbsd_arm.go
│ │ ├── zerrors_solaris_amd64.go
│ │ ├── zptrace386_linux.go
│ │ ├── zptracearm_linux.go
│ │ ├── zptracemips_linux.go
│ │ ├── zptracemipsle_linux.go
│ │ ├── zsyscall_aix_ppc.go
│ │ ├── zsyscall_aix_ppc64.go
│ │ ├── zsyscall_aix_ppc64_gc.go
│ │ ├── zsyscall_aix_ppc64_gccgo.go
│ │ ├── zsyscall_darwin_386.1_11.go
│ │ ├── zsyscall_darwin_386.go
│ │ ├── zsyscall_darwin_386.s
│ │ ├── zsyscall_darwin_amd64.1_11.go
│ │ ├── zsyscall_darwin_amd64.go
│ │ ├── zsyscall_darwin_amd64.s
│ │ ├── zsyscall_darwin_arm.1_11.go
│ │ ├── zsyscall_darwin_arm.go
│ │ ├── zsyscall_darwin_arm.s
│ │ ├── zsyscall_darwin_arm64.1_11.go
│ │ ├── 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_linux_386.go
│ │ ├── zsyscall_linux_amd64.go
│ │ ├── zsyscall_linux_arm.go
│ │ ├── zsyscall_linux_arm64.go
│ │ ├── zsyscall_linux_mips.go
│ │ ├── zsyscall_linux_mips64.go
│ │ ├── zsyscall_linux_mips64le.go
│ │ ├── zsyscall_linux_mipsle.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_openbsd_386.go
│ │ ├── zsyscall_openbsd_amd64.go
│ │ ├── zsyscall_openbsd_arm.go
│ │ ├── zsyscall_solaris_amd64.go
│ │ ├── zsysctl_openbsd_386.go
│ │ ├── zsysctl_openbsd_amd64.go
│ │ ├── zsysctl_openbsd_arm.go
│ │ ├── zsysnum_darwin_386.go
│ │ ├── zsysnum_darwin_amd64.go
│ │ ├── zsysnum_darwin_arm.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_linux_386.go
│ │ ├── zsysnum_linux_amd64.go
│ │ ├── zsysnum_linux_arm.go
│ │ ├── zsysnum_linux_arm64.go
│ │ ├── zsysnum_linux_mips.go
│ │ ├── zsysnum_linux_mips64.go
│ │ ├── zsysnum_linux_mips64le.go
│ │ ├── zsysnum_linux_mipsle.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_openbsd_386.go
│ │ ├── zsysnum_openbsd_amd64.go
│ │ ├── zsysnum_openbsd_arm.go
│ │ ├── ztypes_aix_ppc.go
│ │ ├── ztypes_aix_ppc64.go
│ │ ├── ztypes_darwin_386.go
│ │ ├── ztypes_darwin_amd64.go
│ │ ├── ztypes_darwin_arm.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_linux_386.go
│ │ ├── ztypes_linux_amd64.go
│ │ ├── ztypes_linux_arm.go
│ │ ├── ztypes_linux_arm64.go
│ │ ├── ztypes_linux_mips.go
│ │ ├── ztypes_linux_mips64.go
│ │ ├── ztypes_linux_mips64le.go
│ │ ├── ztypes_linux_mipsle.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_openbsd_386.go
│ │ ├── ztypes_openbsd_amd64.go
│ │ ├── ztypes_openbsd_arm.go
│ │ └── ztypes_solaris_amd64.go
│ └── windows/
│ ├── aliases.go
│ ├── asm_windows_386.s
│ ├── asm_windows_amd64.s
│ ├── asm_windows_arm.s
│ ├── dll_windows.go
│ ├── env_windows.go
│ ├── eventlog.go
│ ├── exec_windows.go
│ ├── memory_windows.go
│ ├── mksyscall.go
│ ├── race.go
│ ├── race0.go
│ ├── security_windows.go
│ ├── service.go
│ ├── str.go
│ ├── syscall.go
│ ├── syscall_windows.go
│ ├── types_windows.go
│ ├── types_windows_386.go
│ ├── types_windows_amd64.go
│ ├── types_windows_arm.go
│ └── zsyscall_windows.go
├── howett.net/
│ └── plist/
│ ├── .gitlab-ci.yml
│ ├── LICENSE
│ ├── README.md
│ ├── bplist.go
│ ├── bplist_generator.go
│ ├── bplist_parser.go
│ ├── decode.go
│ ├── doc.go
│ ├── encode.go
│ ├── fuzz.go
│ ├── go.mod
│ ├── marshal.go
│ ├── must.go
│ ├── plist.go
│ ├── plist_types.go
│ ├── text_generator.go
│ ├── text_parser.go
│ ├── text_tables.go
│ ├── typeinfo.go
│ ├── unmarshal.go
│ ├── util.go
│ ├── xml_generator.go
│ ├── xml_parser.go
│ ├── zerocopy.go
│ └── zerocopy_appengine.go
└── modules.txt
Showing preview only (7,989K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (101823 symbols across 534 files)
FILE: colorschemes/template.go
constant Bold (line 15) | Bold int = 1 << (iota + 9)
constant Underline (line 16) | Underline
constant Reverse (line 17) | Reverse
type Colorscheme (line 20) | type Colorscheme struct
FILE: main.go
constant appName (line 26) | appName = "gotop"
constant version (line 27) | version = "3.0.0"
constant graphHorizontalScaleDelta (line 29) | graphHorizontalScaleDelta = 3
function parseArgs (line 64) | func parseArgs() error {
function handleColorscheme (line 126) | func handleColorscheme(cs string) error {
function getCustomColorscheme (line 149) | func getCustomColorscheme(name string) (colorschemes.Colorscheme, error) {
function setupGrid (line 163) | func setupGrid() {
function setDefaultTermuiColors (line 201) | func setDefaultTermuiColors() {
function setWidgetColors (line 207) | func setWidgetColors() {
function initWidgets (line 258) | func initWidgets() {
function eventLoop (line 276) | func eventLoop() {
function setupLogfile (line 405) | func setupLogfile() (*os.File, error) {
function main (line 424) | func main() {
FILE: src/logging/logging_arm64.go
function StderrToLogfile (line 8) | func StderrToLogfile(logfile *os.File) {
FILE: src/logging/logging_other.go
function StderrToLogfile (line 10) | func StderrToLogfile(logfile *os.File) {
FILE: src/termui/drawille-go/drawille.go
function getPixel (line 15) | func getPixel(y, x int) int {
type Canvas (line 30) | type Canvas struct
method MaxY (line 42) | func (c Canvas) MaxY() int {
method MinY (line 52) | func (c Canvas) MinY() int {
method MaxX (line 62) | func (c Canvas) MaxX() int {
method MinX (line 74) | func (c Canvas) MinX() int {
method Clear (line 87) | func (c *Canvas) Clear() {
method get_pos (line 92) | func (c Canvas) get_pos(x, y int) (int, int) {
method Set (line 97) | func (c *Canvas) Set(x, y int) {
method UnSet (line 108) | func (c *Canvas) UnSet(x, y int) {
method Toggle (line 118) | func (c *Canvas) Toggle(x, y int) {
method SetText (line 128) | func (c *Canvas) SetText(x, y int, text string) {
method Get (line 139) | func (c Canvas) Get(x, y int) bool {
method GetScreenCharacter (line 147) | func (c Canvas) GetScreenCharacter(x, y int) rune {
method GetCharacter (line 152) | func (c Canvas) GetCharacter(x, y int) rune {
method Rows (line 157) | func (c Canvas) Rows(minX, minY, maxX, maxY int) []string {
method Frame (line 174) | func (c Canvas) Frame(minX, minY, maxX, maxY int) string {
method String (line 183) | func (c Canvas) String() string {
method DrawLine (line 227) | func (c *Canvas) DrawLine(x1, y1, x2, y2 int) {
method DrawPolygon (line 233) | func (c *Canvas) DrawPolygon(center_x, center_y, sides, radius float64) {
function NewCanvas (line 36) | func NewCanvas() Canvas {
type Point (line 187) | type Point struct
function Line (line 192) | func Line(x1, y1, x2, y2 int) []Point {
function radians (line 248) | func radians(d float64) float64 {
function round (line 252) | func round(x float64) int {
function min (line 256) | func min(x, y int) int {
function max (line 263) | func max(x, y int) int {
function abs (line 270) | func abs(x int) int {
FILE: src/termui/linegraph.go
type LineGraph (line 12) | type LineGraph struct
method Draw (line 37) | func (self *LineGraph) Draw(buf *Buffer) {
function NewLineGraph (line 24) | func NewLineGraph() *LineGraph {
FILE: src/termui/sparkline.go
type Sparkline (line 11) | type Sparkline struct
type SparklineGroup (line 20) | type SparklineGroup struct
method Add (line 26) | func (self *SparklineGroup) Add(sl Sparkline) {
method Draw (line 43) | func (self *SparklineGroup) Draw(buf *Buffer) {
function NewSparkline (line 31) | func NewSparkline() *Sparkline {
function NewSparklineGroup (line 36) | func NewSparklineGroup(ss ...*Sparkline) *SparklineGroup {
FILE: src/termui/table.go
type Table (line 12) | type Table struct
method Draw (line 46) | func (self *Table) Draw(buf *Buffer) {
method drawLocation (line 131) | func (self *Table) drawLocation(buf *Buffer) {
method calcPos (line 148) | func (self *Table) calcPos() {
method ScrollUp (line 166) | func (self *Table) ScrollUp() {
method ScrollDown (line 171) | func (self *Table) ScrollDown() {
method ScrollTop (line 176) | func (self *Table) ScrollTop() {
method ScrollBottom (line 181) | func (self *Table) ScrollBottom() {
method ScrollHalfPageUp (line 186) | func (self *Table) ScrollHalfPageUp() {
method ScrollHalfPageDown (line 191) | func (self *Table) ScrollHalfPageDown() {
method ScrollPageUp (line 196) | func (self *Table) ScrollPageUp() {
method ScrollPageDown (line 201) | func (self *Table) ScrollPageDown() {
method HandleClick (line 206) | func (self *Table) HandleClick(x, y int) {
function NewTable (line 36) | func NewTable() *Table {
FILE: src/utils/bytes.go
function CelsiusToFahrenheit (line 14) | func CelsiusToFahrenheit(c int) int {
function BytesToKB (line 18) | func BytesToKB(b uint64) float64 {
function BytesToMB (line 22) | func BytesToMB(b uint64) float64 {
function BytesToGB (line 26) | func BytesToGB(b uint64) float64 {
function BytesToTB (line 30) | func BytesToTB(b uint64) float64 {
function ConvertBytes (line 34) | func ConvertBytes(b uint64) (float64, string) {
FILE: src/utils/conversions.go
function ConvertLocalizedString (line 7) | func ConvertLocalizedString(s string) string {
FILE: src/utils/math.go
function MaxInt (line 3) | func MaxInt(a, b int) int {
FILE: src/utils/xdg.go
function GetConfigDir (line 8) | func GetConfigDir(name string) string {
function GetLogDir (line 18) | func GetLogDir(name string) string {
FILE: src/widgets/battery.go
type BatteryWidget (line 15) | type BatteryWidget struct
method update (line 48) | func (self *BatteryWidget) update() {
function NewBatteryWidget (line 20) | func NewBatteryWidget(horizontalScale int) *BatteryWidget {
function makeId (line 44) | func makeId(i int) string {
FILE: src/widgets/cpu.go
type CpuWidget (line 14) | type CpuWidget struct
method update (line 74) | func (self *CpuWidget) update() {
function NewCpuWidget (line 24) | func NewCpuWidget(updateInterval time.Duration, horizontalScale int, sho...
FILE: src/widgets/disk.go
type Partition (line 16) | type Partition struct
type DiskWidget (line 27) | type DiskWidget struct
method update (line 63) | func (self *DiskWidget) update() {
function NewDiskWidget (line 33) | func NewDiskWidget() *DiskWidget {
FILE: src/widgets/help.go
constant KEYBINDS (line 10) | KEYBINDS = `
type HelpMenu (line 37) | type HelpMenu struct
method Resize (line 47) | func (self *HelpMenu) Resize(termWidth, termHeight int) {
method Draw (line 60) | func (self *HelpMenu) Draw(buf *ui.Buffer) {
function NewHelpMenu (line 41) | func NewHelpMenu() *HelpMenu {
function maxInt (line 73) | func maxInt(a int, b int) int {
FILE: src/widgets/include/smc.c
type kSMC_t (line 111) | typedef enum {
type selector_t (line 123) | typedef enum {
type SMCVersion (line 143) | typedef struct {
type SMCPLimitData (line 155) | typedef struct {
type SMCKeyInfoData (line 171) | typedef struct {
type SMCParamStruct (line 189) | typedef struct {
type smc_return_t (line 205) | typedef struct {
function from_fpe2 (line 224) | static unsigned int from_fpe2(uint8_t data[32])
function to_fpe2 (line 244) | static void to_fpe2(unsigned int val, uint8_t *data)
function to_uint32_t (line 258) | static uint32_t to_uint32_t(char *key)
function to_string (line 281) | static void to_string(uint32_t val, char *dataType)
function to_fahrenheit (line 302) | static double to_fahrenheit(double tmp)
function to_kelvin (line 312) | static double to_kelvin(double tmp)
function kern_return_t (line 331) | static kern_return_t call_smc(SMCParamStruct *inputStruct,
function kern_return_t (line 359) | static kern_return_t read_smc(char *key, smc_return_t *result_smc)
function kern_return_t (line 407) | static kern_return_t write_smc(char *key, smc_return_t *result_smc)
function kern_return_t (line 450) | static kern_return_t get_machine_model(io_name_t model)
function kern_return_t (line 476) | kern_return_t open_smc(void)
function kern_return_t (line 497) | kern_return_t close_smc(void)
function is_key_valid (line 503) | bool is_key_valid(char *key)
function get_tmp (line 525) | double get_tmp(char *key, tmp_unit_t unit)
function is_battery_powered (line 557) | bool is_battery_powered(void)
function is_optical_disk_drive_full (line 575) | bool is_optical_disk_drive_full(void)
function get_fan_name (line 598) | bool get_fan_name(unsigned int fan_num, fan_name_t name)
function get_num_fans (line 639) | int get_num_fans(void)
function get_fan_rpm (line 657) | unsigned int get_fan_rpm(unsigned int fan_num)
function set_fan_min_rpm (line 677) | bool set_fan_min_rpm(unsigned int fan_num, unsigned int rpm, bool auth)
FILE: src/widgets/include/smc.h
type tmp_unit_t (line 148) | typedef enum {
FILE: src/widgets/mem.go
type MemWidget (line 14) | type MemWidget struct
method renderMemInfo (line 25) | func (self *MemWidget) renderMemInfo(line string, memoryInfo MemoryInf...
method updateMainMemory (line 38) | func (self *MemWidget) updateMainMemory() {
type MemoryInfo (line 19) | type MemoryInfo struct
function NewMemWidget (line 51) | func NewMemWidget(updateInterval time.Duration, horizontalScale int) *Me...
FILE: src/widgets/mem_freebsd.go
function convert (line 13) | func convert(s []string) (MemoryInfo, error) {
function gatherSwapInfo (line 36) | func gatherSwapInfo() (MemoryInfo, error) {
method updateSwapMemory (line 50) | func (self *MemWidget) updateSwapMemory() {
FILE: src/widgets/mem_other.go
method updateSwapMemory (line 11) | func (self *MemWidget) updateSwapMemory() {
FILE: src/widgets/net.go
constant NET_INTERFACE_ALL (line 15) | NET_INTERFACE_ALL = "all"
constant NET_INTERFACE_VPN (line 16) | NET_INTERFACE_VPN = "tun0"
type NetInterface (line 19) | type NetInterface
type NetWidget (line 21) | type NetWidget struct
method update (line 62) | func (self *NetWidget) update() {
function NewNetWidget (line 31) | func NewNetWidget(netInterface string) *NetWidget {
FILE: src/widgets/proc.go
constant UP_ARROW (line 18) | UP_ARROW = "▲"
constant DOWN_ARROW (line 19) | DOWN_ARROW = "▼"
type ProcSortMethod (line 22) | type ProcSortMethod
constant ProcSortCpu (line 25) | ProcSortCpu ProcSortMethod = "c"
constant ProcSortMem (line 26) | ProcSortMem = "m"
constant ProcSortPid (line 27) | ProcSortPid = "p"
type Proc (line 30) | type Proc struct
type ProcWidget (line 38) | type ProcWidget struct
method update (line 89) | func (self *ProcWidget) update() {
method sortProcs (line 110) | func (self *ProcWidget) sortProcs() {
method convertProcsToTableRows (line 142) | func (self *ProcWidget) convertProcsToTableRows() {
method ChangeProcSortMethod (line 164) | func (self *ProcWidget) ChangeProcSortMethod(method ProcSortMethod) {
method ToggleShowingGroupedProcs (line 173) | func (self *ProcWidget) ToggleShowingGroupedProcs() {
method KillProc (line 186) | func (self *ProcWidget) KillProc() {
function NewProcWidget (line 48) | func NewProcWidget() *ProcWidget {
function groupProcs (line 200) | func groupProcs(procs []Proc) []Proc {
type SortProcsByCpu (line 235) | type SortProcsByCpu
method Len (line 238) | func (self SortProcsByCpu) Len() int {
method Swap (line 243) | func (self SortProcsByCpu) Swap(i, j int) {
method Less (line 248) | func (self SortProcsByCpu) Less(i, j int) bool {
type SortProcsByPid (line 252) | type SortProcsByPid
method Len (line 255) | func (self SortProcsByPid) Len() int {
method Swap (line 260) | func (self SortProcsByPid) Swap(i, j int) {
method Less (line 265) | func (self SortProcsByPid) Less(i, j int) bool {
type SortProcsByMem (line 269) | type SortProcsByMem
method Len (line 272) | func (self SortProcsByMem) Len() int {
method Swap (line 277) | func (self SortProcsByMem) Swap(i, j int) {
method Less (line 282) | func (self SortProcsByMem) Less(i, j int) bool {
FILE: src/widgets/proc_freebsd.go
type processList (line 14) | type processList struct
function getProcs (line 26) | func getProcs() ([]Proc, error) {
FILE: src/widgets/proc_linux.go
function getProcs (line 11) | func getProcs() ([]Proc, error) {
FILE: src/widgets/proc_other.go
constant five (line 17) | five = "12345"
constant ten (line 18) | ten = five + five
constant fifty (line 19) | fifty = ten + ten + ten + ten + ten
function getProcs (line 22) | func getProcs() ([]Proc, error) {
FILE: src/widgets/proc_windows.go
function getProcs (line 10) | func getProcs() ([]Proc, error) {
FILE: src/widgets/statusbar.go
type StatusBar (line 12) | type StatusBar struct
method Draw (line 22) | func (self *StatusBar) Draw(buf *ui.Buffer) {
function NewStatusBar (line 16) | func NewStatusBar() *StatusBar {
FILE: src/widgets/temp.go
type TempScale (line 14) | type TempScale
constant Celcius (line 17) | Celcius TempScale = 0
constant Fahrenheit (line 18) | Fahrenheit = 1
type TempWidget (line 21) | type TempWidget struct
method Draw (line 59) | func (self *TempWidget) Draw(buf *ui.Buffer) {
function NewTempWidget (line 31) | func NewTempWidget(tempScale TempScale) *TempWidget {
FILE: src/widgets/temp_darwin.go
type TemperatureStat (line 12) | type TemperatureStat struct
function SensorsTemperatures (line 17) | func SensorsTemperatures() ([]TemperatureStat, error) {
method update (line 56) | func (self *TempWidget) update() {
FILE: src/widgets/temp_freebsd.go
type sensorMeasurement (line 18) | type sensorMeasurement struct
function removeUnusedChars (line 23) | func removeUnusedChars(s string) string {
function refineOutput (line 29) | func refineOutput(output []byte) (float64, error) {
function collectSensors (line 38) | func collectSensors() ([]sensorMeasurement, error) {
method update (line 58) | func (self *TempWidget) update() {
FILE: src/widgets/temp_linux.go
method update (line 12) | func (self *TempWidget) update() {
FILE: src/widgets/temp_openbsd.go
method getTemp (line 18) | func (self *TempWidget) getTemp(mib []C.int, mlen int, snsrdev *C.struct...
method update (line 49) | func (self *TempWidget) update() {
FILE: src/widgets/temp_windows.go
method update (line 11) | func (self *TempWidget) update() {
FILE: vendor/github.com/StackExchange/wmi/swbemservices.go
type SWbemServices (line 16) | type SWbemServices struct
method Close (line 52) | func (s *SWbemServices) Close() error {
method process (line 76) | func (s *SWbemServices) process(initError chan error) {
method Query (line 141) | func (s *SWbemServices) Query(query string, dst interface{}, connectSe...
method queryBackground (line 170) | func (s *SWbemServices) queryBackground(q *queryRequest) error {
type queryRequest (line 26) | type queryRequest struct
function InitializeSWbemServices (line 34) | func InitializeSWbemServices(c *Client, connectServerArgs ...interface{}...
FILE: vendor/github.com/StackExchange/wmi/wmi.go
constant S_FALSE (line 55) | S_FALSE = 0x00000001
function QueryNamespace (line 58) | func QueryNamespace(query string, dst interface{}, namespace string) err...
function Query (line 74) | func Query(query string, dst interface{}, connectServerArgs ...interface...
type Client (line 84) | type Client struct
method Query (line 125) | func (c *Client) Query(query string, dst interface{}, connectServerArg...
method loadEntity (line 256) | func (c *Client) loadEntity(dst interface{}, src *ole.IDispatch) (errF...
type ErrFieldMismatch (line 242) | type ErrFieldMismatch struct
method Error (line 248) | func (e *ErrFieldMismatch) Error() string {
type multiArgType (line 423) | type multiArgType
constant multiArgTypeInvalid (line 426) | multiArgTypeInvalid multiArgType = iota
constant multiArgTypeStruct (line 427) | multiArgTypeStruct
constant multiArgTypeStructPtr (line 428) | multiArgTypeStructPtr
function checkMultiArg (line 435) | func checkMultiArg(v reflect.Value) (m multiArgType, elemType reflect.Ty...
function oleInt64 (line 452) | func oleInt64(item *ole.IDispatch, prop string) (int64, error) {
function CreateQuery (line 466) | func CreateQuery(src interface{}, where string) string {
FILE: vendor/github.com/cjbassi/drawille-go/drawille.go
constant BRAILLE_OFFSET (line 7) | BRAILLE_OFFSET = '\u2800'
type Color (line 16) | type Color
type Cell (line 18) | type Cell struct
type Canvas (line 23) | type Canvas struct
method SetPoint (line 33) | func (self *Canvas) SetPoint(p image.Point, color Color) {
method SetLine (line 41) | func (self *Canvas) SetLine(p0, p1 image.Point, color Color) {
method GetCells (line 47) | func (self *Canvas) GetCells() map[image.Point]Cell {
function NewCanvas (line 27) | func NewCanvas() *Canvas {
function line (line 55) | func line(p0, p1 image.Point) []image.Point {
function absInt (line 85) | func absInt(x int) int {
FILE: vendor/github.com/distatus/battery/battery.go
type State (line 43) | type State
method String (line 64) | func (s State) String() string {
constant Unknown (line 49) | Unknown State = iota
constant Empty (line 50) | Empty
constant Full (line 51) | Full
constant Charging (line 52) | Charging
constant Discharging (line 53) | Discharging
function newState (line 68) | func newState(name string) (State, error) {
type Battery (line 78) | type Battery struct
method String (line 101) | func (b *Battery) String() string {
function get (line 105) | func get(sg func(idx int) (*Battery, error), idx int) (*Battery, error) {
function Get (line 117) | func Get(idx int) (*Battery, error) {
function getAll (line 121) | func getAll(sg func() ([]*Battery, error)) ([]*Battery, error) {
function GetAll (line 154) | func GetAll() ([]*Battery, error) {
FILE: vendor/github.com/distatus/battery/battery_darwin.go
type battery (line 31) | type battery struct
function readBatteries (line 42) | func readBatteries() ([]*battery, error) {
function convertBattery (line 60) | func convertBattery(battery *battery) *Battery {
function systemGet (line 85) | func systemGet(idx int) (*Battery, error) {
function systemGetAll (line 97) | func systemGetAll() ([]*Battery, error) {
FILE: vendor/github.com/distatus/battery/battery_freebsd_dragonfly_.go
function readUint32 (line 34) | func readUint32(bytes []byte) uint32 {
function uint32ToFloat64 (line 42) | func uint32ToFloat64(num uint32) (float64, error) {
function ioctl_ (line 49) | func ioctl_(fd int, nr int64, retptr *[164]byte) error {
function systemGet (line 53) | func systemGet(idx int) (*Battery, error) {
function systemGetAll (line 132) | func systemGetAll() ([]*Battery, error) {
FILE: vendor/github.com/distatus/battery/battery_linux.go
constant sysfs (line 31) | sysfs = "/sys/class/power_supply"
function readFloat (line 33) | func readFloat(path, filename string) (float64, error) {
function readAmp (line 45) | func readAmp(path, filename string, volts float64) (float64, error) {
function isBattery (line 53) | func isBattery(path string) bool {
function getBatteryFiles (line 58) | func getBatteryFiles() ([]string, error) {
function getByPath (line 74) | func getByPath(path string) (*Battery, error) {
function systemGet (line 120) | func systemGet(idx int) (*Battery, error) {
function systemGetAll (line 132) | func systemGetAll() ([]*Battery, error) {
FILE: vendor/github.com/distatus/battery/battery_netbsd.go
type plistref (line 36) | type plistref struct
type values (line 41) | type values struct
type prop (line 49) | type prop
type props (line 51) | type props
function readBytes (line 53) | func readBytes(ptr unsafe.Pointer, length uint64) []byte {
function readProps (line 62) | func readProps() (props, error) {
function handleValue (line 83) | func handleValue(val values, div float64, res *float64, amps *[]string) ...
function deriveState (line 97) | func deriveState(cr1, cr2 error, current float64, max int) (State, error) {
function handleVoltage (line 110) | func handleVoltage(amps []string, b *Battery, e *ErrPartial) {
function sortFilterProps (line 145) | func sortFilterProps(props props) []string {
function convertBattery (line 157) | func convertBattery(prop prop) (*Battery, error) {
function systemGet (line 193) | func systemGet(idx int) (*Battery, error) {
function systemGetAll (line 206) | func systemGetAll() ([]*Battery, error) {
FILE: vendor/github.com/distatus/battery/battery_openbsd.go
constant sensorA (line 44) | sensorA = 6
constant sensorAH (line 45) | sensorAH = 8
type sensordev (line 48) | type sensordev struct
type sensorStatus (line 55) | type sensorStatus
constant unspecified (line 58) | unspecified sensorStatus = iota
constant ok (line 59) | ok
constant warning (line 60) | warning
constant critical (line 61) | critical
constant unknown (line 62) | unknown
type sensor (line 65) | type sensor struct
type interValue (line 75) | type interValue struct
function sysctl (line 81) | func sysctl(mib []int32, out unsafe.Pointer, n uintptr) syscall.Errno {
function readValue (line 94) | func readValue(s sensor, div float64) (float64, error) {
function readValues (line 102) | func readValues(mib []int32, c int32, values map[string]*interValue) {
function sensordevIter (line 149) | func sensordevIter(cb func(sd sensordev, i int, err error) bool) {
function getBattery (line 180) | func getBattery(sd sensordev) (*Battery, error) {
function systemGet (line 241) | func systemGet(idx int) (*Battery, error) {
function systemGetAll (line 263) | func systemGetAll() ([]*Battery, error) {
FILE: vendor/github.com/distatus/battery/battery_solaris.go
function readFloat (line 36) | func readFloat(val string) (float64, error) {
function readVoltage (line 47) | func readVoltage(val string) (float64, error) {
function readState (line 55) | func readState(val string) (State, error) {
type errParse (line 73) | type errParse
method Error (line 75) | func (p errParse) Error() string {
type batteryReader (line 79) | type batteryReader struct
method setErrParse (line 86) | func (r *batteryReader) setErrParse(n int) {
method readValue (line 110) | func (r *batteryReader) readValue() (string, string, int) {
method readBattery (line 142) | func (r *batteryReader) readBattery() (*Battery, bool, bool) {
method next (line 181) | func (r *batteryReader) next() (*Battery, error) {
function newBatteryReader (line 226) | func newBatteryReader() (*batteryReader, error) {
function systemGet (line 235) | func systemGet(idx int) (*Battery, error) {
function systemGetAll (line 244) | func systemGetAll() ([]*Battery, error) {
FILE: vendor/github.com/distatus/battery/battery_windows.go
type batteryQueryInformation (line 33) | type batteryQueryInformation struct
type batteryInformation (line 39) | type batteryInformation struct
type batteryWaitStatus (line 52) | type batteryWaitStatus struct
type batteryStatus (line 60) | type batteryStatus struct
type guid (line 67) | type guid struct
type spDeviceInterfaceData (line 74) | type spDeviceInterfaceData struct
function int32ToFloat64 (line 88) | func int32ToFloat64(num int32) (float64, error) {
function uint32ToFloat64 (line 97) | func uint32ToFloat64(num uint32) (float64, error) {
function setupDiSetup (line 104) | func setupDiSetup(proc *windows.LazyProc, nargs, a1, a2, a3, a4, a5, a6 ...
function setupDiCall (line 115) | func setupDiCall(proc *windows.LazyProc, nargs, a1, a2, a3, a4, a5, a6 u...
function readState (line 132) | func readState(powerState uint32) State {
function systemGet (line 147) | func systemGet(idx int) (*Battery, error) {
function systemGetAll (line 306) | func systemGetAll() ([]*Battery, error) {
FILE: vendor/github.com/distatus/battery/errors.go
type ErrFatal (line 45) | type ErrFatal struct
method Error (line 49) | func (f ErrFatal) Error() string {
type ErrPartial (line 61) | type ErrPartial struct
method Error (line 71) | func (p ErrPartial) Error() string {
method isNil (line 95) | func (p ErrPartial) isNil() bool {
method noNil (line 105) | func (p ErrPartial) noNil() bool {
type Errors (line 118) | type Errors
method Error (line 120) | func (e Errors) Error() string {
function wrapError (line 133) | func wrapError(err error) error {
FILE: vendor/github.com/distatus/battery/ioctl.go
function ioctl (line 32) | func ioctl(fd int, nr int64, typ byte, size uintptr, retptr unsafe.Point...
FILE: vendor/github.com/docopt/docopt.go/docopt.go
type Parser (line 14) | type Parser struct
method ParseArgs (line 68) | func (p *Parser) ParseArgs(doc string, argv []string, version string) ...
method parse (line 91) | func (p *Parser) parse(doc string, argv []string, version string) (map...
function ParseDoc (line 56) | func ParseDoc(doc string) (Opts, error) {
function ParseArgs (line 62) | func ParseArgs(doc string, argv []string, version string) (Opts, error) {
function Parse (line 74) | func Parse(doc string, argv []string, help bool, version string, options...
function parse (line 112) | func parse(doc string, argv []string, help bool, version string, options...
function handleError (line 189) | func handleError(err error, usage string) string {
function parseSection (line 196) | func parseSection(name, source string) []string {
function parseDefaults (line 208) | func parseDefaults(doc string) patternList {
function parsePattern (line 226) | func parsePattern(source string, options *patternList) (*pattern, error) {
function parseArgv (line 238) | func parseArgv(tokens *tokenList, options *patternList, optionsFirst boo...
function parseOption (line 278) | func parseOption(optionDescription string) *pattern {
function parseExpr (line 311) | func parseExpr(tokens *tokenList, options *patternList) (patternList, er...
function parseSeq (line 344) | func parseSeq(tokens *tokenList, options *patternList) (patternList, err...
function parseAtom (line 361) | func parseAtom(tokens *tokenList, options *patternList) (patternList, er...
function parseLong (line 397) | func parseLong(tokens *tokenList, options *patternList) (patternList, er...
function parseShorts (line 476) | func parseShorts(tokens *tokenList, options *patternList) (patternList, ...
function formalUsage (line 529) | func formalUsage(section string) (string, error) {
function extras (line 550) | func extras(help bool, version string, options patternList, doc string) ...
function stringPartition (line 568) | func stringPartition(s, sep string) (string, string, string) {
FILE: vendor/github.com/docopt/docopt.go/error.go
type errorType (line 7) | type errorType
method String (line 14) | func (e errorType) String() string {
constant errorUser (line 10) | errorUser errorType = iota
constant errorLanguage (line 11) | errorLanguage
type UserError (line 25) | type UserError struct
method Error (line 30) | func (e UserError) Error() string {
function newUserError (line 33) | func newUserError(msg string, f ...interface{}) error {
type LanguageError (line 38) | type LanguageError struct
method Error (line 42) | func (e LanguageError) Error() string {
function newLanguageError (line 45) | func newLanguageError(msg string, f ...interface{}) error {
FILE: vendor/github.com/docopt/docopt.go/opts.go
function errKey (line 11) | func errKey(key string) error {
function errType (line 14) | func errType(key string) error {
function errStrconv (line 17) | func errStrconv(key string, convErr error) error {
type Opts (line 40) | type Opts
method String (line 42) | func (o Opts) String(key string) (s string, err error) {
method Bool (line 55) | func (o Opts) Bool(key string) (b bool, err error) {
method Int (line 68) | func (o Opts) Int(key string) (i int, err error) {
method Float64 (line 80) | func (o Opts) Float64(key string) (f float64, err error) {
method Bind (line 111) | func (o Opts) Bind(v interface{}) error {
function isUnexportedField (line 232) | func isUnexportedField(field reflect.StructField) bool {
function titleCaseDashes (line 237) | func titleCaseDashes(key string) string {
function guessUntaggedField (line 254) | func guessUntaggedField(key string) string {
FILE: vendor/github.com/docopt/docopt.go/pattern.go
type patternType (line 9) | type patternType
method String (line 36) | func (pt patternType) String() string {
constant patternArgument (line 13) | patternArgument patternType = 1 << iota
constant patternCommand (line 14) | patternCommand
constant patternOption (line 15) | patternOption
constant patternRequired (line 18) | patternRequired
constant patternOptionAL (line 19) | patternOptionAL
constant patternOptionSSHORTCUT (line 20) | patternOptionSSHORTCUT
constant patternOneOrMore (line 21) | patternOneOrMore
constant patternEither (line 22) | patternEither
constant patternLeaf (line 24) | patternLeaf = patternArgument +
constant patternBranch (line 27) | patternBranch = patternRequired +
constant patternAll (line 32) | patternAll = patternLeaf + patternBranch
constant patternDefault (line 33) | patternDefault = 0
type pattern (line 66) | type pattern struct
method flat (line 154) | func (p *pattern) flat(types patternType) (patternList, error) {
method fix (line 182) | func (p *pattern) fix() error {
method fixIdentities (line 191) | func (p *pattern) fixIdentities(uniq patternList) error {
method fixRepeatingArguments (line 220) | func (p *pattern) fixRepeatingArguments() {
method match (line 251) | func (p *pattern) match(left *patternList, collected *patternList) (bo...
method singleMatch (line 373) | func (p *pattern) singleMatch(left *patternList) (int, *pattern) {
method String (line 402) | func (p *pattern) String() string {
method transform (line 420) | func (p *pattern) transform() *pattern {
method eq (line 475) | func (p *pattern) eq(other *pattern) bool {
type patternList (line 79) | type patternList
method unique (line 479) | func (pl patternList) unique() patternList {
method index (line 491) | func (pl patternList) index(p *pattern) (int, error) {
method count (line 500) | func (pl patternList) count(p *pattern) int {
method diff (line 510) | func (pl patternList) diff(l patternList) patternList {
method double (line 532) | func (pl patternList) double() patternList {
method remove (line 540) | func (pl *patternList) remove(p *pattern) {
method dictionary (line 544) | func (pl patternList) dictionary() map[string]interface{} {
function newBranchPattern (line 81) | func newBranchPattern(t patternType, pl ...*pattern) *pattern {
function newRequired (line 89) | func newRequired(pl ...*pattern) *pattern {
function newEither (line 93) | func newEither(pl ...*pattern) *pattern {
function newOneOrMore (line 97) | func newOneOrMore(pl ...*pattern) *pattern {
function newOptional (line 101) | func newOptional(pl ...*pattern) *pattern {
function newOptionsShortcut (line 105) | func newOptionsShortcut() *pattern {
function newLeafPattern (line 111) | func newLeafPattern(t patternType, name string, value interface{}) *patt...
function newArgument (line 120) | func newArgument(name string, value interface{}) *pattern {
function newCommand (line 125) | func newCommand(name string, value interface{}) *pattern {
function newOption (line 134) | func newOption(short, long string, argcount int, value interface{}) *pat...
FILE: vendor/github.com/docopt/docopt.go/token.go
type tokenList (line 9) | type tokenList struct
method current (line 94) | func (tl *tokenList) current() *token {
method length (line 101) | func (tl *tokenList) length() int {
method move (line 105) | func (tl *tokenList) move() *token {
type token (line 14) | type token
method eq (line 49) | func (t *token) eq(s string) bool {
method match (line 55) | func (t *token) match(matchNil bool, tokenStrings ...string) bool {
method hasPrefix (line 69) | func (t *token) hasPrefix(prefix string) bool {
method hasSuffix (line 75) | func (t *token) hasSuffix(suffix string) bool {
method isUpper (line 81) | func (t *token) isUpper() bool {
method String (line 87) | func (t *token) String() string {
function newTokenList (line 16) | func newTokenList(source []string, err errorType) *tokenList {
function tokenListFromString (line 26) | func tokenListFromString(source string) *tokenList {
function tokenListFromPattern (line 30) | func tokenListFromPattern(source string) *tokenList {
function isStringUppercase (line 116) | func isStringUppercase(s string) bool {
FILE: vendor/github.com/gizak/termui/v3/alignment.go
type Alignment (line 3) | type Alignment
constant AlignLeft (line 6) | AlignLeft Alignment = iota
constant AlignCenter (line 7) | AlignCenter
constant AlignRight (line 8) | AlignRight
FILE: vendor/github.com/gizak/termui/v3/backend.go
function Init (line 13) | func Init() error {
function Close (line 23) | func Close() {
function TerminalDimensions (line 27) | func TerminalDimensions() (int, int) {
function Clear (line 33) | func Clear() {
FILE: vendor/github.com/gizak/termui/v3/block.go
type Block (line 16) | type Block struct
method drawBorder (line 46) | func (self *Block) drawBorder(buf *Buffer) {
method Draw (line 80) | func (self *Block) Draw(buf *Buffer) {
method SetRect (line 92) | func (self *Block) SetRect(x1, y1, x2, y2 int) {
method GetRect (line 103) | func (self *Block) GetRect() image.Rectangle {
function NewBlock (line 33) | func NewBlock() *Block {
FILE: vendor/github.com/gizak/termui/v3/buffer.go
type Cell (line 14) | type Cell struct
function NewCell (line 27) | func NewCell(rune rune, args ...interface{}) Cell {
type Buffer (line 39) | type Buffer struct
method GetCell (line 53) | func (self *Buffer) GetCell(p image.Point) Cell {
method SetCell (line 57) | func (self *Buffer) SetCell(c Cell, p image.Point) {
method Fill (line 61) | func (self *Buffer) Fill(c Cell, rect image.Rectangle) {
method SetString (line 69) | func (self *Buffer) SetString(s string, style Style, p image.Point) {
function NewBuffer (line 44) | func NewBuffer(r image.Rectangle) *Buffer {
FILE: vendor/github.com/gizak/termui/v3/canvas.go
type Canvas (line 9) | type Canvas struct
method SetPoint (line 21) | func (self *Canvas) SetPoint(p image.Point, color Color) {
method SetLine (line 25) | func (self *Canvas) SetLine(p0, p1 image.Point, color Color) {
method Draw (line 29) | func (self *Canvas) Draw(buf *Buffer) {
function NewCanvas (line 14) | func NewCanvas() *Canvas {
FILE: vendor/github.com/gizak/termui/v3/events.go
type EventType (line 42) | type EventType
constant KeyboardEvent (line 45) | KeyboardEvent EventType = iota
constant MouseEvent (line 46) | MouseEvent
constant ResizeEvent (line 47) | ResizeEvent
type Event (line 50) | type Event struct
type Mouse (line 57) | type Mouse struct
type Resize (line 64) | type Resize struct
function PollEvents (line 70) | func PollEvents() <-chan Event {
function convertTermboxKeyboardEvent (line 142) | func convertTermboxKeyboardEvent(e tb.Event) Event {
function convertTermboxMouseEvent (line 173) | func convertTermboxMouseEvent(e tb.Event) Event {
function convertTermboxEvent (line 191) | func convertTermboxEvent(e tb.Event) Event {
FILE: vendor/github.com/gizak/termui/v3/grid.go
type gridItemType (line 7) | type gridItemType
constant col (line 10) | col gridItemType = 0
constant row (line 11) | row gridItemType = 1
type Grid (line 14) | type Grid struct
method Set (line 72) | func (self *Grid) Set(entries ...interface{}) {
method setHelper (line 82) | func (self *Grid) setHelper(item GridItem, parentWidthRatio, parentHei...
method Draw (line 135) | func (self *Grid) Draw(buf *Buffer) {
type GridItem (line 21) | type GridItem struct
function NewGrid (line 32) | func NewGrid() *Grid {
function NewCol (line 41) | func NewCol(ratio float64, i ...interface{}) GridItem {
function NewRow (line 56) | func NewRow(ratio float64, i ...interface{}) GridItem {
FILE: vendor/github.com/gizak/termui/v3/render.go
type Drawable (line 14) | type Drawable interface
function Render (line 21) | func Render(items ...Drawable) {
FILE: vendor/github.com/gizak/termui/v3/style.go
type Color (line 6) | type Color
constant ColorClear (line 9) | ColorClear Color = -1
constant ColorBlack (line 13) | ColorBlack Color = 0
constant ColorRed (line 14) | ColorRed Color = 1
constant ColorGreen (line 15) | ColorGreen Color = 2
constant ColorYellow (line 16) | ColorYellow Color = 3
constant ColorBlue (line 17) | ColorBlue Color = 4
constant ColorMagenta (line 18) | ColorMagenta Color = 5
constant ColorCyan (line 19) | ColorCyan Color = 6
constant ColorWhite (line 20) | ColorWhite Color = 7
type Modifier (line 23) | type Modifier
constant ModifierClear (line 27) | ModifierClear Modifier = 0
constant ModifierBold (line 28) | ModifierBold Modifier = 1 << 9
constant ModifierUnderline (line 29) | ModifierUnderline Modifier = 1 << 10
constant ModifierReverse (line 30) | ModifierReverse Modifier = 1 << 11
type Style (line 34) | type Style struct
function NewStyle (line 51) | func NewStyle(fg Color, args ...interface{}) Style {
FILE: vendor/github.com/gizak/termui/v3/style_parser.go
constant tokenFg (line 12) | tokenFg = "fg"
constant tokenBg (line 13) | tokenBg = "bg"
constant tokenModifier (line 14) | tokenModifier = "mod"
constant tokenItemSeparator (line 16) | tokenItemSeparator = ","
constant tokenValueSeparator (line 17) | tokenValueSeparator = ":"
constant tokenBeginStyledText (line 19) | tokenBeginStyledText = '['
constant tokenEndStyledText (line 20) | tokenEndStyledText = ']'
constant tokenBeginStyle (line 22) | tokenBeginStyle = '('
constant tokenEndStyle (line 23) | tokenEndStyle = ')'
type parserState (line 26) | type parserState
constant parserStateDefault (line 29) | parserStateDefault parserState = iota
constant parserStateStyleItems (line 30) | parserStateStyleItems
constant parserStateStyledText (line 31) | parserStateStyledText
function readStyle (line 54) | func readStyle(runes []rune, defaultStyle Style) Style {
function ParseStyles (line 77) | func ParseStyles(s string, defaultStyle Style) []Cell {
FILE: vendor/github.com/gizak/termui/v3/symbols.go
constant DOT (line 4) | DOT = '•'
constant ELLIPSES (line 5) | ELLIPSES = '…'
constant UP_ARROW (line 7) | UP_ARROW = '▲'
constant DOWN_ARROW (line 8) | DOWN_ARROW = '▼'
FILE: vendor/github.com/gizak/termui/v3/symbols_other.go
constant TOP_LEFT (line 10) | TOP_LEFT = '┌'
constant TOP_RIGHT (line 11) | TOP_RIGHT = '┐'
constant BOTTOM_LEFT (line 12) | BOTTOM_LEFT = '└'
constant BOTTOM_RIGHT (line 13) | BOTTOM_RIGHT = '┘'
constant VERTICAL_LINE (line 15) | VERTICAL_LINE = '│'
constant HORIZONTAL_LINE (line 16) | HORIZONTAL_LINE = '─'
constant VERTICAL_LEFT (line 18) | VERTICAL_LEFT = '┤'
constant VERTICAL_RIGHT (line 19) | VERTICAL_RIGHT = '├'
constant HORIZONTAL_UP (line 20) | HORIZONTAL_UP = '┴'
constant HORIZONTAL_DOWN (line 21) | HORIZONTAL_DOWN = '┬'
constant QUOTA_LEFT (line 23) | QUOTA_LEFT = '«'
constant QUOTA_RIGHT (line 24) | QUOTA_RIGHT = '»'
constant VERTICAL_DASH (line 26) | VERTICAL_DASH = '┊'
constant HORIZONTAL_DASH (line 27) | HORIZONTAL_DASH = '┈'
FILE: vendor/github.com/gizak/termui/v3/symbols_windows.go
constant TOP_LEFT (line 10) | TOP_LEFT = '+'
constant TOP_RIGHT (line 11) | TOP_RIGHT = '+'
constant BOTTOM_LEFT (line 12) | BOTTOM_LEFT = '+'
constant BOTTOM_RIGHT (line 13) | BOTTOM_RIGHT = '+'
constant VERTICAL_LINE (line 15) | VERTICAL_LINE = '|'
constant HORIZONTAL_LINE (line 16) | HORIZONTAL_LINE = '-'
constant VERTICAL_LEFT (line 18) | VERTICAL_LEFT = '+'
constant VERTICAL_RIGHT (line 19) | VERTICAL_RIGHT = '+'
constant HORIZONTAL_UP (line 20) | HORIZONTAL_UP = '+'
constant HORIZONTAL_DOWN (line 21) | HORIZONTAL_DOWN = '+'
constant QUOTA_LEFT (line 23) | QUOTA_LEFT = '<'
constant QUOTA_RIGHT (line 24) | QUOTA_RIGHT = '>'
constant VERTICAL_DASH (line 26) | VERTICAL_DASH = '|'
constant HORIZONTAL_DASH (line 27) | HORIZONTAL_DASH = '-'
FILE: vendor/github.com/gizak/termui/v3/theme.go
type RootTheme (line 27) | type RootTheme struct
type BlockTheme (line 44) | type BlockTheme struct
type BarChartTheme (line 49) | type BarChartTheme struct
type GaugeTheme (line 55) | type GaugeTheme struct
type PlotTheme (line 60) | type PlotTheme struct
type ListTheme (line 65) | type ListTheme struct
type ParagraphTheme (line 69) | type ParagraphTheme struct
type PieChartTheme (line 73) | type PieChartTheme struct
type SparklineTheme (line 77) | type SparklineTheme struct
type StackedBarChartTheme (line 82) | type StackedBarChartTheme struct
type TabTheme (line 88) | type TabTheme struct
type TableTheme (line 93) | type TableTheme struct
FILE: vendor/github.com/gizak/termui/v3/utils.go
function InterfaceSlice (line 18) | func InterfaceSlice(slice interface{}) []interface{} {
function TrimString (line 34) | func TrimString(s string, w int) string {
function SelectColor (line 44) | func SelectColor(colors []Color, index int) Color {
function SelectStyle (line 48) | func SelectStyle(styles []Style, index int) Style {
function SumIntSlice (line 54) | func SumIntSlice(slice []int) int {
function SumFloat64Slice (line 62) | func SumFloat64Slice(data []float64) float64 {
function GetMaxIntFromSlice (line 70) | func GetMaxIntFromSlice(slice []int) (int, error) {
function GetMaxFloat64FromSlice (line 83) | func GetMaxFloat64FromSlice(slice []float64) (float64, error) {
function GetMaxFloat64From2dSlice (line 96) | func GetMaxFloat64From2dSlice(slices [][]float64) (float64, error) {
function RoundFloat64 (line 111) | func RoundFloat64(x float64) float64 {
function FloorFloat64 (line 115) | func FloorFloat64(x float64) float64 {
function AbsInt (line 119) | func AbsInt(x int) int {
function MinFloat64 (line 126) | func MinFloat64(x, y float64) float64 {
function MaxFloat64 (line 133) | func MaxFloat64(x, y float64) float64 {
function MaxInt (line 140) | func MaxInt(x, y int) int {
function MinInt (line 147) | func MinInt(x, y int) int {
function WrapCells (line 157) | func WrapCells(cells []Cell, width uint) []Cell {
function RunesToStyledCells (line 173) | func RunesToStyledCells(runes []rune, style Style) []Cell {
function CellsToString (line 181) | func CellsToString(cells []Cell) string {
function TrimCells (line 189) | func TrimCells(cells []Cell, w int) []Cell {
function SplitCells (line 200) | func SplitCells(cells []Cell, r rune) [][]Cell {
type CellWithX (line 217) | type CellWithX struct
function BuildCellWithXArray (line 222) | func BuildCellWithXArray(cells []Cell) []CellWithX {
FILE: vendor/github.com/go-ole/go-ole/com.go
function coInitialize (line 50) | func coInitialize() (err error) {
function coInitializeEx (line 62) | func coInitializeEx(coinit uint32) (err error) {
function CoInitialize (line 81) | func CoInitialize(p uintptr) (err error) {
function CoInitializeEx (line 89) | func CoInitializeEx(p uintptr, coinit uint32) (err error) {
function CoUninitialize (line 96) | func CoUninitialize() {
function CoTaskMemFree (line 101) | func CoTaskMemFree(memptr uintptr) {
function CLSIDFromProgID (line 118) | func CLSIDFromProgID(progId string) (clsid *GUID, err error) {
function CLSIDFromString (line 135) | func CLSIDFromString(str string) (clsid *GUID, err error) {
function StringFromCLSID (line 147) | func StringFromCLSID(clsid *GUID) (str string, err error) {
function IIDFromString (line 158) | func IIDFromString(progId string) (clsid *GUID, err error) {
function StringFromIID (line 170) | func StringFromIID(iid *GUID) (str string, err error) {
function CreateInstance (line 181) | func CreateInstance(clsid *GUID, iid *GUID) (unk *IUnknown, err error) {
function GetActiveObject (line 198) | func GetActiveObject(clsid *GUID, iid *GUID) (unk *IUnknown, err error) {
function VariantInit (line 213) | func VariantInit(v *VARIANT) (err error) {
function VariantClear (line 222) | func VariantClear(v *VARIANT) (err error) {
function SysAllocString (line 231) | func SysAllocString(v string) (ss *int16) {
function SysAllocStringLen (line 238) | func SysAllocStringLen(v string) (ss *int16) {
function SysFreeString (line 248) | func SysFreeString(v *int16) (err error) {
function SysStringLen (line 257) | func SysStringLen(v *int16) uint32 {
function CreateStdDispatch (line 267) | func CreateStdDispatch(unk *IUnknown, v uintptr, ptinfo *IUnknown) (disp...
function CreateDispTypeInfo (line 282) | func CreateDispTypeInfo(idata *INTERFACEDATA) (pptinfo *IUnknown, err er...
function copyMemory (line 294) | func copyMemory(dest unsafe.Pointer, src unsafe.Pointer, length uint32) {
function GetUserDefaultLCID (line 299) | func GetUserDefaultLCID() (lcid uint32) {
function GetMessage (line 308) | func GetMessage(msg *Msg, hwnd uint32, MsgFilterMin uint32, MsgFilterMax...
function DispatchMessage (line 315) | func DispatchMessage(msg *Msg) (ret int32) {
function GetVariantDate (line 322) | func GetVariantDate(value float64) (time.Time, error) {
FILE: vendor/github.com/go-ole/go-ole/com_func.go
function coInitialize (line 19) | func coInitialize() error {
function coInitializeEx (line 24) | func coInitializeEx(coinit uint32) error {
function CoInitialize (line 37) | func CoInitialize(p uintptr) error {
function CoInitializeEx (line 42) | func CoInitializeEx(p uintptr, coinit uint32) error {
function CoUninitialize (line 47) | func CoUninitialize() {}
function CoTaskMemFree (line 50) | func CoTaskMemFree(memptr uintptr) {}
function CLSIDFromProgID (line 65) | func CLSIDFromProgID(progId string) (*GUID, error) {
function CLSIDFromString (line 75) | func CLSIDFromString(str string) (*GUID, error) {
function StringFromCLSID (line 80) | func StringFromCLSID(clsid *GUID) (string, error) {
function IIDFromString (line 85) | func IIDFromString(progId string) (*GUID, error) {
function StringFromIID (line 90) | func StringFromIID(iid *GUID) (string, error) {
function CreateInstance (line 95) | func CreateInstance(clsid *GUID, iid *GUID) (*IUnknown, error) {
function GetActiveObject (line 100) | func GetActiveObject(clsid *GUID, iid *GUID) (*IUnknown, error) {
function VariantInit (line 105) | func VariantInit(v *VARIANT) error {
function VariantClear (line 110) | func VariantClear(v *VARIANT) error {
function SysAllocString (line 115) | func SysAllocString(v string) *int16 {
function SysAllocStringLen (line 121) | func SysAllocStringLen(v string) *int16 {
function SysFreeString (line 127) | func SysFreeString(v *int16) error {
function SysStringLen (line 132) | func SysStringLen(v *int16) uint32 {
function CreateStdDispatch (line 141) | func CreateStdDispatch(unk *IUnknown, v uintptr, ptinfo *IUnknown) (*IDi...
function CreateDispTypeInfo (line 148) | func CreateDispTypeInfo(idata *INTERFACEDATA) (*IUnknown, error) {
function copyMemory (line 153) | func copyMemory(dest unsafe.Pointer, src unsafe.Pointer, length uint32) {}
function GetUserDefaultLCID (line 156) | func GetUserDefaultLCID() uint32 {
function GetMessage (line 163) | func GetMessage(msg *Msg, hwnd uint32, MsgFilterMin uint32, MsgFilterMax...
function DispatchMessage (line 168) | func DispatchMessage(msg *Msg) int32 {
function GetVariantDate (line 172) | func GetVariantDate(value float64) (time.Time, error) {
FILE: vendor/github.com/go-ole/go-ole/connect.go
type Connection (line 6) | type Connection struct
method Initialize (line 11) | func (*Connection) Initialize() (err error) {
method Uninitialize (line 16) | func (*Connection) Uninitialize() {
method Create (line 21) | func (c *Connection) Create(progId string) (err error) {
method Release (line 41) | func (c *Connection) Release() {
method Load (line 46) | func (c *Connection) Load(names ...string) (errors []error) {
method Dispatch (line 64) | func (c *Connection) Dispatch() (object *Dispatch, err error) {
type Dispatch (line 74) | type Dispatch struct
method Call (line 79) | func (d *Dispatch) Call(method string, params ...interface{}) (result ...
method MustCall (line 90) | func (d *Dispatch) MustCall(method string, params ...interface{}) (res...
method Get (line 105) | func (d *Dispatch) Get(name string, params ...interface{}) (result *VA...
method MustGet (line 115) | func (d *Dispatch) MustGet(name string, params ...interface{}) (result...
method Set (line 129) | func (d *Dispatch) Set(name string, params ...interface{}) (result *VA...
method MustSet (line 139) | func (d *Dispatch) MustSet(name string, params ...interface{}) (result...
method GetId (line 153) | func (d *Dispatch) GetId(name string) (id int32, err error) {
method GetIds (line 164) | func (d *Dispatch) GetIds(names ...string) (dispid []int32, err error) {
method Invoke (line 173) | func (d *Dispatch) Invoke(id int32, dispatch int16, params []interface...
method Release (line 183) | func (d *Dispatch) Release() {
function Connect (line 188) | func Connect(names ...string) (connection *Connection) {
FILE: vendor/github.com/go-ole/go-ole/constants.go
constant CLSCTX_INPROC_SERVER (line 4) | CLSCTX_INPROC_SERVER = 1
constant CLSCTX_INPROC_HANDLER (line 5) | CLSCTX_INPROC_HANDLER = 2
constant CLSCTX_LOCAL_SERVER (line 6) | CLSCTX_LOCAL_SERVER = 4
constant CLSCTX_INPROC_SERVER16 (line 7) | CLSCTX_INPROC_SERVER16 = 8
constant CLSCTX_REMOTE_SERVER (line 8) | CLSCTX_REMOTE_SERVER = 16
constant CLSCTX_ALL (line 9) | CLSCTX_ALL = CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | ...
constant CLSCTX_INPROC (line 10) | CLSCTX_INPROC = CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER
constant CLSCTX_SERVER (line 11) | CLSCTX_SERVER = CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | CL...
constant COINIT_APARTMENTTHREADED (line 15) | COINIT_APARTMENTTHREADED = 0x2
constant COINIT_MULTITHREADED (line 16) | COINIT_MULTITHREADED = 0x0
constant COINIT_DISABLE_OLE1DDE (line 17) | COINIT_DISABLE_OLE1DDE = 0x4
constant COINIT_SPEED_OVER_MEMORY (line 18) | COINIT_SPEED_OVER_MEMORY = 0x8
constant DISPATCH_METHOD (line 22) | DISPATCH_METHOD = 1
constant DISPATCH_PROPERTYGET (line 23) | DISPATCH_PROPERTYGET = 2
constant DISPATCH_PROPERTYPUT (line 24) | DISPATCH_PROPERTYPUT = 4
constant DISPATCH_PROPERTYPUTREF (line 25) | DISPATCH_PROPERTYPUTREF = 8
constant S_OK (line 29) | S_OK = 0x00000000
constant E_UNEXPECTED (line 30) | E_UNEXPECTED = 0x8000FFFF
constant E_NOTIMPL (line 31) | E_NOTIMPL = 0x80004001
constant E_OUTOFMEMORY (line 32) | E_OUTOFMEMORY = 0x8007000E
constant E_INVALIDARG (line 33) | E_INVALIDARG = 0x80070057
constant E_NOINTERFACE (line 34) | E_NOINTERFACE = 0x80004002
constant E_POINTER (line 35) | E_POINTER = 0x80004003
constant E_HANDLE (line 36) | E_HANDLE = 0x80070006
constant E_ABORT (line 37) | E_ABORT = 0x80004004
constant E_FAIL (line 38) | E_FAIL = 0x80004005
constant E_ACCESSDENIED (line 39) | E_ACCESSDENIED = 0x80070005
constant E_PENDING (line 40) | E_PENDING = 0x8000000A
constant CO_E_CLASSSTRING (line 42) | CO_E_CLASSSTRING = 0x800401F3
constant CC_FASTCALL (line 46) | CC_FASTCALL = iota
constant CC_CDECL (line 47) | CC_CDECL
constant CC_MSCPASCAL (line 48) | CC_MSCPASCAL
constant CC_PASCAL (line 49) | CC_PASCAL = CC_MSCPASCAL
constant CC_MACPASCAL (line 50) | CC_MACPASCAL
constant CC_STDCALL (line 51) | CC_STDCALL
constant CC_FPFASTCALL (line 52) | CC_FPFASTCALL
constant CC_SYSCALL (line 53) | CC_SYSCALL
constant CC_MPWCDECL (line 54) | CC_MPWCDECL
constant CC_MPWPASCAL (line 55) | CC_MPWPASCAL
constant CC_MAX (line 56) | CC_MAX = CC_MPWPASCAL
type VT (line 59) | type VT
constant VT_EMPTY (line 62) | VT_EMPTY VT = 0x0
constant VT_NULL (line 63) | VT_NULL VT = 0x1
constant VT_I2 (line 64) | VT_I2 VT = 0x2
constant VT_I4 (line 65) | VT_I4 VT = 0x3
constant VT_R4 (line 66) | VT_R4 VT = 0x4
constant VT_R8 (line 67) | VT_R8 VT = 0x5
constant VT_CY (line 68) | VT_CY VT = 0x6
constant VT_DATE (line 69) | VT_DATE VT = 0x7
constant VT_BSTR (line 70) | VT_BSTR VT = 0x8
constant VT_DISPATCH (line 71) | VT_DISPATCH VT = 0x9
constant VT_ERROR (line 72) | VT_ERROR VT = 0xa
constant VT_BOOL (line 73) | VT_BOOL VT = 0xb
constant VT_VARIANT (line 74) | VT_VARIANT VT = 0xc
constant VT_UNKNOWN (line 75) | VT_UNKNOWN VT = 0xd
constant VT_DECIMAL (line 76) | VT_DECIMAL VT = 0xe
constant VT_I1 (line 77) | VT_I1 VT = 0x10
constant VT_UI1 (line 78) | VT_UI1 VT = 0x11
constant VT_UI2 (line 79) | VT_UI2 VT = 0x12
constant VT_UI4 (line 80) | VT_UI4 VT = 0x13
constant VT_I8 (line 81) | VT_I8 VT = 0x14
constant VT_UI8 (line 82) | VT_UI8 VT = 0x15
constant VT_INT (line 83) | VT_INT VT = 0x16
constant VT_UINT (line 84) | VT_UINT VT = 0x17
constant VT_VOID (line 85) | VT_VOID VT = 0x18
constant VT_HRESULT (line 86) | VT_HRESULT VT = 0x19
constant VT_PTR (line 87) | VT_PTR VT = 0x1a
constant VT_SAFEARRAY (line 88) | VT_SAFEARRAY VT = 0x1b
constant VT_CARRAY (line 89) | VT_CARRAY VT = 0x1c
constant VT_USERDEFINED (line 90) | VT_USERDEFINED VT = 0x1d
constant VT_LPSTR (line 91) | VT_LPSTR VT = 0x1e
constant VT_LPWSTR (line 92) | VT_LPWSTR VT = 0x1f
constant VT_RECORD (line 93) | VT_RECORD VT = 0x24
constant VT_INT_PTR (line 94) | VT_INT_PTR VT = 0x25
constant VT_UINT_PTR (line 95) | VT_UINT_PTR VT = 0x26
constant VT_FILETIME (line 96) | VT_FILETIME VT = 0x40
constant VT_BLOB (line 97) | VT_BLOB VT = 0x41
constant VT_STREAM (line 98) | VT_STREAM VT = 0x42
constant VT_STORAGE (line 99) | VT_STORAGE VT = 0x43
constant VT_STREAMED_OBJECT (line 100) | VT_STREAMED_OBJECT VT = 0x44
constant VT_STORED_OBJECT (line 101) | VT_STORED_OBJECT VT = 0x45
constant VT_BLOB_OBJECT (line 102) | VT_BLOB_OBJECT VT = 0x46
constant VT_CF (line 103) | VT_CF VT = 0x47
constant VT_CLSID (line 104) | VT_CLSID VT = 0x48
constant VT_BSTR_BLOB (line 105) | VT_BSTR_BLOB VT = 0xfff
constant VT_VECTOR (line 106) | VT_VECTOR VT = 0x1000
constant VT_ARRAY (line 107) | VT_ARRAY VT = 0x2000
constant VT_BYREF (line 108) | VT_BYREF VT = 0x4000
constant VT_RESERVED (line 109) | VT_RESERVED VT = 0x8000
constant VT_ILLEGAL (line 110) | VT_ILLEGAL VT = 0xffff
constant VT_ILLEGALMASKED (line 111) | VT_ILLEGALMASKED VT = 0xfff
constant VT_TYPEMASK (line 112) | VT_TYPEMASK VT = 0xfff
constant DISPID_UNKNOWN (line 116) | DISPID_UNKNOWN = -1
constant DISPID_VALUE (line 117) | DISPID_VALUE = 0
constant DISPID_PROPERTYPUT (line 118) | DISPID_PROPERTYPUT = -3
constant DISPID_NEWENUM (line 119) | DISPID_NEWENUM = -4
constant DISPID_EVALUATE (line 120) | DISPID_EVALUATE = -5
constant DISPID_CONSTRUCTOR (line 121) | DISPID_CONSTRUCTOR = -6
constant DISPID_DESTRUCTOR (line 122) | DISPID_DESTRUCTOR = -7
constant DISPID_COLLECT (line 123) | DISPID_COLLECT = -8
constant TKIND_ENUM (line 127) | TKIND_ENUM = 1
constant TKIND_RECORD (line 128) | TKIND_RECORD = 2
constant TKIND_MODULE (line 129) | TKIND_MODULE = 3
constant TKIND_INTERFACE (line 130) | TKIND_INTERFACE = 4
constant TKIND_DISPATCH (line 131) | TKIND_DISPATCH = 5
constant TKIND_COCLASS (line 132) | TKIND_COCLASS = 6
constant TKIND_ALIAS (line 133) | TKIND_ALIAS = 7
constant TKIND_UNION (line 134) | TKIND_UNION = 8
constant TKIND_MAX (line 135) | TKIND_MAX = 9
constant FADF_AUTO (line 141) | FADF_AUTO = 0x0001
constant FADF_STATIC (line 142) | FADF_STATIC = 0x0002
constant FADF_EMBEDDED (line 143) | FADF_EMBEDDED = 0x0004
constant FADF_FIXEDSIZE (line 144) | FADF_FIXEDSIZE = 0x0010
constant FADF_RECORD (line 145) | FADF_RECORD = 0x0020
constant FADF_HAVEIID (line 146) | FADF_HAVEIID = 0x0040
constant FADF_HAVEVARTYPE (line 147) | FADF_HAVEVARTYPE = 0x0080
constant FADF_BSTR (line 148) | FADF_BSTR = 0x0100
constant FADF_UNKNOWN (line 149) | FADF_UNKNOWN = 0x0200
constant FADF_DISPATCH (line 150) | FADF_DISPATCH = 0x0400
constant FADF_VARIANT (line 151) | FADF_VARIANT = 0x0800
constant FADF_RESERVED (line 152) | FADF_RESERVED = 0xF008
FILE: vendor/github.com/go-ole/go-ole/error.go
type OleError (line 4) | type OleError struct
method Code (line 26) | func (v *OleError) Code() uintptr {
method String (line 31) | func (v *OleError) String() string {
method Error (line 39) | func (v *OleError) Error() string {
method Description (line 44) | func (v *OleError) Description() string {
method SubError (line 49) | func (v *OleError) SubError() error {
function NewError (line 11) | func NewError(hr uintptr) *OleError {
function NewErrorWithDescription (line 16) | func NewErrorWithDescription(hr uintptr, description string) *OleError {
function NewErrorWithSubError (line 21) | func NewErrorWithSubError(hr uintptr, description string, err error) *Ol...
FILE: vendor/github.com/go-ole/go-ole/error_func.go
function errstr (line 6) | func errstr(errno int) string {
FILE: vendor/github.com/go-ole/go-ole/error_windows.go
function errstr (line 12) | func errstr(errno int) string {
FILE: vendor/github.com/go-ole/go-ole/guid.go
constant hextable (line 92) | hextable = "0123456789ABCDEF"
constant emptyGUID (line 93) | emptyGUID = "{00000000-0000-0000-0000-000000000000}"
type GUID (line 99) | type GUID struct
method String (line 224) | func (guid *GUID) String() string {
function NewGUID (line 116) | func NewGUID(guid string) *GUID {
function decodeHexUint32 (line 158) | func decodeHexUint32(src []byte) (value uint32, ok bool) {
function decodeHexUint16 (line 170) | func decodeHexUint16(src []byte) (value uint16, ok bool) {
function decodeHexByte64 (line 180) | func decodeHexByte64(s1 []byte, s2 []byte) (value [8]byte, ok bool) {
function decodeHexByte (line 194) | func decodeHexByte(c1, c2 byte) (value byte, ok bool) {
function decodeHexChar (line 204) | func decodeHexChar(c byte) (byte, bool) {
function putUint32Hex (line 244) | func putUint32Hex(b []byte, v uint32) {
function putUint16Hex (line 255) | func putUint16Hex(b []byte, v uint16) {
function putByteHex (line 262) | func putByteHex(dst, src []byte) {
function IsEqualGUID (line 272) | func IsEqualGUID(guid1 *GUID, guid2 *GUID) bool {
FILE: vendor/github.com/go-ole/go-ole/iconnectionpoint.go
type IConnectionPoint (line 5) | type IConnectionPoint struct
method VTable (line 18) | func (v *IConnectionPoint) VTable() *IConnectionPointVtbl {
type IConnectionPointVtbl (line 9) | type IConnectionPointVtbl struct
FILE: vendor/github.com/go-ole/go-ole/iconnectionpoint_func.go
method GetConnectionInterface (line 7) | func (v *IConnectionPoint) GetConnectionInterface(piid **GUID) int32 {
method Advise (line 11) | func (v *IConnectionPoint) Advise(unknown *IUnknown) (uint32, error) {
method Unadvise (line 15) | func (v *IConnectionPoint) Unadvise(cookie uint32) error {
method EnumConnections (line 19) | func (v *IConnectionPoint) EnumConnections(p *unsafe.Pointer) (err error) {
FILE: vendor/github.com/go-ole/go-ole/iconnectionpoint_windows.go
method GetConnectionInterface (line 10) | func (v *IConnectionPoint) GetConnectionInterface(piid **GUID) int32 {
method Advise (line 15) | func (v *IConnectionPoint) Advise(unknown *IUnknown) (cookie uint32, err...
method Unadvise (line 28) | func (v *IConnectionPoint) Unadvise(cookie uint32) (err error) {
method EnumConnections (line 41) | func (v *IConnectionPoint) EnumConnections(p *unsafe.Pointer) error {
FILE: vendor/github.com/go-ole/go-ole/iconnectionpointcontainer.go
type IConnectionPointContainer (line 5) | type IConnectionPointContainer struct
method VTable (line 15) | func (v *IConnectionPointContainer) VTable() *IConnectionPointContaine...
type IConnectionPointContainerVtbl (line 9) | type IConnectionPointContainerVtbl struct
FILE: vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_func.go
method EnumConnectionPoints (line 5) | func (v *IConnectionPointContainer) EnumConnectionPoints(points interfac...
method FindConnectionPoint (line 9) | func (v *IConnectionPointContainer) FindConnectionPoint(iid *GUID, point...
FILE: vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_windows.go
method EnumConnectionPoints (line 10) | func (v *IConnectionPointContainer) EnumConnectionPoints(points interfac...
method FindConnectionPoint (line 14) | func (v *IConnectionPointContainer) FindConnectionPoint(iid *GUID, point...
FILE: vendor/github.com/go-ole/go-ole/idispatch.go
type IDispatch (line 5) | type IDispatch struct
method VTable (line 17) | func (v *IDispatch) VTable() *IDispatchVtbl {
method GetIDsOfName (line 21) | func (v *IDispatch) GetIDsOfName(names []string) (dispid []int32, err ...
method Invoke (line 26) | func (v *IDispatch) Invoke(dispid int32, dispatch int16, params ...int...
method GetTypeInfoCount (line 31) | func (v *IDispatch) GetTypeInfoCount() (c uint32, err error) {
method GetTypeInfo (line 36) | func (v *IDispatch) GetTypeInfo() (tinfo *ITypeInfo, err error) {
method GetSingleIDOfName (line 45) | func (v *IDispatch) GetSingleIDOfName(name string) (displayID int32, e...
method InvokeWithOptionalArgs (line 62) | func (v *IDispatch) InvokeWithOptionalArgs(name string, dispatch int16...
method CallMethod (line 78) | func (v *IDispatch) CallMethod(name string, params ...interface{}) (*V...
method GetProperty (line 87) | func (v *IDispatch) GetProperty(name string, params ...interface{}) (*...
method PutProperty (line 92) | func (v *IDispatch) PutProperty(name string, params ...interface{}) (*...
type IDispatchVtbl (line 9) | type IDispatchVtbl struct
FILE: vendor/github.com/go-ole/go-ole/idispatch_func.go
function getIDsOfName (line 5) | func getIDsOfName(disp *IDispatch, names []string) ([]int32, error) {
function getTypeInfoCount (line 9) | func getTypeInfoCount(disp *IDispatch) (uint32, error) {
function getTypeInfo (line 13) | func getTypeInfo(disp *IDispatch) (*ITypeInfo, error) {
function invoke (line 17) | func invoke(disp *IDispatch, dispid int32, dispatch int16, params ...int...
FILE: vendor/github.com/go-ole/go-ole/idispatch_windows.go
function getIDsOfName (line 11) | func getIDsOfName(disp *IDispatch, names []string) (dispid []int32, err ...
function getTypeInfoCount (line 33) | func getTypeInfoCount(disp *IDispatch) (c uint32, err error) {
function getTypeInfo (line 46) | func getTypeInfo(disp *IDispatch) (tinfo *ITypeInfo, err error) {
function invoke (line 59) | func invoke(disp *IDispatch, dispid int32, dispatch int16, params ...int...
FILE: vendor/github.com/go-ole/go-ole/ienumvariant.go
type IEnumVARIANT (line 5) | type IEnumVARIANT struct
method VTable (line 17) | func (v *IEnumVARIANT) VTable() *IEnumVARIANTVtbl {
type IEnumVARIANTVtbl (line 9) | type IEnumVARIANTVtbl struct
FILE: vendor/github.com/go-ole/go-ole/ienumvariant_func.go
method Clone (line 5) | func (enum *IEnumVARIANT) Clone() (*IEnumVARIANT, error) {
method Reset (line 9) | func (enum *IEnumVARIANT) Reset() error {
method Skip (line 13) | func (enum *IEnumVARIANT) Skip(celt uint) error {
method Next (line 17) | func (enum *IEnumVARIANT) Next(celt uint) (VARIANT, uint, error) {
FILE: vendor/github.com/go-ole/go-ole/ienumvariant_windows.go
method Clone (line 10) | func (enum *IEnumVARIANT) Clone() (cloned *IEnumVARIANT, err error) {
method Reset (line 23) | func (enum *IEnumVARIANT) Reset() (err error) {
method Skip (line 36) | func (enum *IEnumVARIANT) Skip(celt uint) (err error) {
method Next (line 49) | func (enum *IEnumVARIANT) Next(celt uint) (array VARIANT, length uint, e...
FILE: vendor/github.com/go-ole/go-ole/iinspectable.go
type IInspectable (line 5) | type IInspectable struct
method VTable (line 16) | func (v *IInspectable) VTable() *IInspectableVtbl {
type IInspectableVtbl (line 9) | type IInspectableVtbl struct
FILE: vendor/github.com/go-ole/go-ole/iinspectable_func.go
method GetIids (line 5) | func (v *IInspectable) GetIids() ([]*GUID, error) {
method GetRuntimeClassName (line 9) | func (v *IInspectable) GetRuntimeClassName() (string, error) {
method GetTrustLevel (line 13) | func (v *IInspectable) GetTrustLevel() (uint32, error) {
FILE: vendor/github.com/go-ole/go-ole/iinspectable_windows.go
method GetIids (line 13) | func (v *IInspectable) GetIids() (iids []*GUID, err error) {
method GetRuntimeClassName (line 44) | func (v *IInspectable) GetRuntimeClassName() (s string, err error) {
method GetTrustLevel (line 61) | func (v *IInspectable) GetTrustLevel() (level uint32, err error) {
FILE: vendor/github.com/go-ole/go-ole/iprovideclassinfo.go
type IProvideClassInfo (line 5) | type IProvideClassInfo struct
method VTable (line 14) | func (v *IProvideClassInfo) VTable() *IProvideClassInfoVtbl {
method GetClassInfo (line 18) | func (v *IProvideClassInfo) GetClassInfo() (cinfo *ITypeInfo, err erro...
type IProvideClassInfoVtbl (line 9) | type IProvideClassInfoVtbl struct
FILE: vendor/github.com/go-ole/go-ole/iprovideclassinfo_func.go
function getClassInfo (line 5) | func getClassInfo(disp *IProvideClassInfo) (tinfo *ITypeInfo, err error) {
FILE: vendor/github.com/go-ole/go-ole/iprovideclassinfo_windows.go
function getClassInfo (line 10) | func getClassInfo(disp *IProvideClassInfo) (tinfo *ITypeInfo, err error) {
FILE: vendor/github.com/go-ole/go-ole/itypeinfo.go
type ITypeInfo (line 5) | type ITypeInfo struct
method VTable (line 32) | func (v *ITypeInfo) VTable() *ITypeInfoVtbl {
type ITypeInfoVtbl (line 9) | type ITypeInfoVtbl struct
FILE: vendor/github.com/go-ole/go-ole/itypeinfo_func.go
method GetTypeAttr (line 5) | func (v *ITypeInfo) GetTypeAttr() (*TYPEATTR, error) {
FILE: vendor/github.com/go-ole/go-ole/itypeinfo_windows.go
method GetTypeAttr (line 10) | func (v *ITypeInfo) GetTypeAttr() (tattr *TYPEATTR, err error) {
FILE: vendor/github.com/go-ole/go-ole/iunknown.go
type IUnknown (line 5) | type IUnknown struct
method VTable (line 21) | func (v *IUnknown) VTable() *IUnknownVtbl {
method PutQueryInterface (line 25) | func (v *IUnknown) PutQueryInterface(interfaceID *GUID, obj interface{...
method IDispatch (line 29) | func (v *IUnknown) IDispatch(interfaceID *GUID) (dispatch *IDispatch, ...
method IEnumVARIANT (line 34) | func (v *IUnknown) IEnumVARIANT(interfaceID *GUID) (enum *IEnumVARIANT...
method QueryInterface (line 39) | func (v *IUnknown) QueryInterface(iid *GUID) (*IDispatch, error) {
method MustQueryInterface (line 43) | func (v *IUnknown) MustQueryInterface(iid *GUID) (disp *IDispatch) {
method AddRef (line 51) | func (v *IUnknown) AddRef() int32 {
method Release (line 55) | func (v *IUnknown) Release() int32 {
type IUnknownVtbl (line 9) | type IUnknownVtbl struct
type UnknownLike (line 15) | type UnknownLike interface
FILE: vendor/github.com/go-ole/go-ole/iunknown_func.go
function reflectQueryInterface (line 5) | func reflectQueryInterface(self interface{}, method uintptr, interfaceID...
function queryInterface (line 9) | func queryInterface(unk *IUnknown, iid *GUID) (disp *IDispatch, err erro...
function addRef (line 13) | func addRef(unk *IUnknown) int32 {
function release (line 17) | func release(unk *IUnknown) int32 {
FILE: vendor/github.com/go-ole/go-ole/iunknown_windows.go
function reflectQueryInterface (line 11) | func reflectQueryInterface(self interface{}, method uintptr, interfaceID...
function queryInterface (line 27) | func queryInterface(unk *IUnknown, iid *GUID) (disp *IDispatch, err erro...
function addRef (line 40) | func addRef(unk *IUnknown) int32 {
function release (line 50) | func release(unk *IUnknown) int32 {
FILE: vendor/github.com/go-ole/go-ole/ole.go
type DISPPARAMS (line 9) | type DISPPARAMS struct
type EXCEPINFO (line 17) | type EXCEPINFO struct
method WCode (line 30) | func (e EXCEPINFO) WCode() uint16 {
method SCODE (line 35) | func (e EXCEPINFO) SCODE() uint32 {
method String (line 40) | func (e EXCEPINFO) String() string {
method Error (line 67) | func (e EXCEPINFO) Error() string {
type PARAMDATA (line 86) | type PARAMDATA struct
type METHODDATA (line 92) | type METHODDATA struct
type INTERFACEDATA (line 104) | type INTERFACEDATA struct
type Point (line 110) | type Point struct
type Msg (line 116) | type Msg struct
type TYPEDESC (line 126) | type TYPEDESC struct
type IDLDESC (line 132) | type IDLDESC struct
type TYPEATTR (line 138) | type TYPEATTR struct
FILE: vendor/github.com/go-ole/go-ole/oleutil/connection.go
type stdDispatch (line 12) | type stdDispatch struct
type stdDispatchVtbl (line 20) | type stdDispatchVtbl struct
function dispQueryInterface (line 30) | func dispQueryInterface(this *ole.IUnknown, iid *ole.GUID, punk **ole.IU...
function dispAddRef (line 47) | func dispAddRef(this *ole.IUnknown) int32 {
function dispRelease (line 53) | func dispRelease(this *ole.IUnknown) int32 {
function dispGetIDsOfNames (line 59) | func dispGetIDsOfNames(this *ole.IUnknown, iid *ole.GUID, wnames []*uint...
function dispGetTypeInfoCount (line 73) | func dispGetTypeInfoCount(pcount *int) uintptr {
function dispGetTypeInfo (line 80) | func dispGetTypeInfo(ptypeif *uintptr) uintptr {
function dispInvoke (line 84) | func dispInvoke(this *ole.IDispatch, dispid int32, riid *ole.GUID, lcid ...
FILE: vendor/github.com/go-ole/go-ole/oleutil/connection_func.go
function ConnectObject (line 8) | func ConnectObject(disp *ole.IDispatch, iid *ole.GUID, idisp interface{}...
FILE: vendor/github.com/go-ole/go-ole/oleutil/connection_windows.go
function ConnectObject (line 14) | func ConnectObject(disp *ole.IDispatch, iid *ole.GUID, idisp interface{}...
FILE: vendor/github.com/go-ole/go-ole/oleutil/oleutil.go
function ClassIDFrom (line 6) | func ClassIDFrom(programID string) (classID *ole.GUID, err error) {
function CreateObject (line 15) | func CreateObject(programID string) (unknown *ole.IUnknown, err error) {
function GetActiveObject (line 35) | func GetActiveObject(programID string) (unknown *ole.IUnknown, err error) {
function CallMethod (line 50) | func CallMethod(disp *ole.IDispatch, name string, params ...interface{})...
function MustCallMethod (line 55) | func MustCallMethod(disp *ole.IDispatch, name string, params ...interfac...
function GetProperty (line 64) | func GetProperty(disp *ole.IDispatch, name string, params ...interface{}...
function MustGetProperty (line 69) | func MustGetProperty(disp *ole.IDispatch, name string, params ...interfa...
function PutProperty (line 78) | func PutProperty(disp *ole.IDispatch, name string, params ...interface{}...
function MustPutProperty (line 83) | func MustPutProperty(disp *ole.IDispatch, name string, params ...interfa...
function PutPropertyRef (line 92) | func PutPropertyRef(disp *ole.IDispatch, name string, params ...interfac...
function MustPutPropertyRef (line 97) | func MustPutPropertyRef(disp *ole.IDispatch, name string, params ...inte...
function ForEach (line 105) | func ForEach(disp *ole.IDispatch, f func(v *ole.VARIANT) error) error {
FILE: vendor/github.com/go-ole/go-ole/safearray.go
type SafeArrayBound (line 6) | type SafeArrayBound struct
type SafeArray (line 12) | type SafeArray struct
type SAFEARRAY (line 23) | type SAFEARRAY
type SAFEARRAYBOUND (line 27) | type SAFEARRAYBOUND
FILE: vendor/github.com/go-ole/go-ole/safearray_func.go
function safeArrayAccessData (line 12) | func safeArrayAccessData(safearray *SafeArray) (uintptr, error) {
function safeArrayUnaccessData (line 19) | func safeArrayUnaccessData(safearray *SafeArray) error {
function safeArrayAllocData (line 26) | func safeArrayAllocData(safearray *SafeArray) error {
function safeArrayAllocDescriptor (line 33) | func safeArrayAllocDescriptor(dimensions uint32) (*SafeArray, error) {
function safeArrayAllocDescriptorEx (line 40) | func safeArrayAllocDescriptorEx(variantType VT, dimensions uint32) (*Saf...
function safeArrayCopy (line 47) | func safeArrayCopy(original *SafeArray) (*SafeArray, error) {
function safeArrayCopyData (line 54) | func safeArrayCopyData(original *SafeArray, duplicate *SafeArray) error {
function safeArrayCreate (line 61) | func safeArrayCreate(variantType VT, dimensions uint32, bounds *SafeArra...
function safeArrayCreateEx (line 68) | func safeArrayCreateEx(variantType VT, dimensions uint32, bounds *SafeAr...
function safeArrayCreateVector (line 75) | func safeArrayCreateVector(variantType VT, lowerBound int32, length uint...
function safeArrayCreateVectorEx (line 82) | func safeArrayCreateVectorEx(variantType VT, lowerBound int32, length ui...
function safeArrayDestroy (line 89) | func safeArrayDestroy(safearray *SafeArray) error {
function safeArrayDestroyData (line 96) | func safeArrayDestroyData(safearray *SafeArray) error {
function safeArrayDestroyDescriptor (line 103) | func safeArrayDestroyDescriptor(safearray *SafeArray) error {
function safeArrayGetDim (line 113) | func safeArrayGetDim(safearray *SafeArray) (*uint32, error) {
function safeArrayGetElementSize (line 121) | func safeArrayGetElementSize(safearray *SafeArray) (*uint32, error) {
function safeArrayGetElement (line 127) | func safeArrayGetElement(safearray *SafeArray, index int64, pv unsafe.Po...
function safeArrayGetElementString (line 132) | func safeArrayGetElementString(safearray *SafeArray, index int64) (strin...
function safeArrayGetIID (line 139) | func safeArrayGetIID(safearray *SafeArray) (*GUID, error) {
function safeArrayGetLBound (line 149) | func safeArrayGetLBound(safearray *SafeArray, dimension uint32) (int64, ...
function safeArrayGetUBound (line 159) | func safeArrayGetUBound(safearray *SafeArray, dimension uint32) (int64, ...
function safeArrayGetVartype (line 166) | func safeArrayGetVartype(safearray *SafeArray) (uint16, error) {
function safeArrayLock (line 176) | func safeArrayLock(safearray *SafeArray) error {
function safeArrayUnlock (line 183) | func safeArrayUnlock(safearray *SafeArray) error {
function safeArrayPutElement (line 191) | func safeArrayPutElement(safearray *SafeArray, index int64, element uint...
function safeArrayGetRecordInfo (line 200) | func safeArrayGetRecordInfo(safearray *SafeArray) (interface{}, error) {
function safeArraySetRecordInfo (line 209) | func safeArraySetRecordInfo(safearray *SafeArray, recordInfo interface{}...
FILE: vendor/github.com/go-ole/go-ole/safearray_windows.go
function safeArrayAccessData (line 45) | func safeArrayAccessData(safearray *SafeArray) (element uintptr, err err...
function safeArrayUnaccessData (line 56) | func safeArrayUnaccessData(safearray *SafeArray) (err error) {
function safeArrayAllocData (line 64) | func safeArrayAllocData(safearray *SafeArray) (err error) {
function safeArrayAllocDescriptor (line 72) | func safeArrayAllocDescriptor(dimensions uint32) (safearray *SafeArray, ...
function safeArrayAllocDescriptorEx (line 81) | func safeArrayAllocDescriptorEx(variantType VT, dimensions uint32) (safe...
function safeArrayCopy (line 93) | func safeArrayCopy(original *SafeArray) (safearray *SafeArray, err error) {
function safeArrayCopyData (line 104) | func safeArrayCopyData(original *SafeArray, duplicate *SafeArray) (err e...
function safeArrayCreate (line 115) | func safeArrayCreate(variantType VT, dimensions uint32, bounds *SafeArra...
function safeArrayCreateEx (line 127) | func safeArrayCreateEx(variantType VT, dimensions uint32, bounds *SafeAr...
function safeArrayCreateVector (line 140) | func safeArrayCreateVector(variantType VT, lowerBound int32, length uint...
function safeArrayCreateVectorEx (line 152) | func safeArrayCreateVectorEx(variantType VT, lowerBound int32, length ui...
function safeArrayDestroy (line 165) | func safeArrayDestroy(safearray *SafeArray) (err error) {
function safeArrayDestroyData (line 173) | func safeArrayDestroyData(safearray *SafeArray) (err error) {
function safeArrayDestroyDescriptor (line 181) | func safeArrayDestroyDescriptor(safearray *SafeArray) (err error) {
function safeArrayGetDim (line 192) | func safeArrayGetDim(safearray *SafeArray) (dimensions *uint32, err erro...
function safeArrayGetElementSize (line 201) | func safeArrayGetElementSize(safearray *SafeArray) (length *uint32, err ...
function safeArrayGetElement (line 208) | func safeArrayGetElement(safearray *SafeArray, index int64, pv unsafe.Po...
function safeArrayGetElementString (line 217) | func safeArrayGetElementString(safearray *SafeArray, index int64) (str s...
function safeArrayGetIID (line 232) | func safeArrayGetIID(safearray *SafeArray) (guid *GUID, err error) {
function safeArrayGetLBound (line 246) | func safeArrayGetLBound(safearray *SafeArray, dimension uint32) (lowerBo...
function safeArrayGetUBound (line 261) | func safeArrayGetUBound(safearray *SafeArray, dimension uint32) (upperBo...
function safeArrayGetVartype (line 273) | func safeArrayGetVartype(safearray *SafeArray) (varType uint16, err erro...
function safeArrayLock (line 287) | func safeArrayLock(safearray *SafeArray) (err error) {
function safeArrayUnlock (line 295) | func safeArrayUnlock(safearray *SafeArray) (err error) {
function safeArrayPutElement (line 304) | func safeArrayPutElement(safearray *SafeArray, index int64, element uint...
function safeArrayGetRecordInfo (line 318) | func safeArrayGetRecordInfo(safearray *SafeArray) (recordInfo interface{...
function safeArraySetRecordInfo (line 331) | func safeArraySetRecordInfo(safearray *SafeArray, recordInfo interface{}...
FILE: vendor/github.com/go-ole/go-ole/safearrayconversion.go
type SafeArrayConversion (line 9) | type SafeArrayConversion struct
method ToStringArray (line 13) | func (sac *SafeArrayConversion) ToStringArray() (strings []string) {
method ToByteArray (line 24) | func (sac *SafeArrayConversion) ToByteArray() (bytes []byte) {
method ToValueArray (line 35) | func (sac *SafeArrayConversion) ToValueArray() (values []interface{}) {
method GetType (line 102) | func (sac *SafeArrayConversion) GetType() (varType uint16, err error) {
method GetDimensions (line 106) | func (sac *SafeArrayConversion) GetDimensions() (dimensions *uint32, e...
method GetSize (line 110) | func (sac *SafeArrayConversion) GetSize() (length *uint32, err error) {
method TotalElements (line 114) | func (sac *SafeArrayConversion) TotalElements(index uint32) (totalElem...
method Release (line 138) | func (sac *SafeArrayConversion) Release() {
FILE: vendor/github.com/go-ole/go-ole/safearrayslices.go
function safeArrayFromByteSlice (line 9) | func safeArrayFromByteSlice(slice []byte) *SafeArray {
function safeArrayFromStringSlice (line 22) | func safeArrayFromStringSlice(slice []string) *SafeArray {
FILE: vendor/github.com/go-ole/go-ole/utility.go
function ClassIDFrom (line 13) | func ClassIDFrom(programID string) (classID *GUID, err error) {
function BytePtrToString (line 25) | func BytePtrToString(p *byte) string {
function UTF16PtrToString (line 37) | func UTF16PtrToString(p *uint16) string {
function LpOleStrToString (line 42) | func LpOleStrToString(p *uint16) string {
function BstrToString (line 61) | func BstrToString(p *uint16) string {
function lpOleStrLen (line 78) | func lpOleStrLen(p *uint16) (length int64) {
function convertHresultToError (line 96) | func convertHresultToError(hr uintptr, r2 uintptr, ignore error) (err er...
FILE: vendor/github.com/go-ole/go-ole/variant.go
function NewVariant (line 6) | func NewVariant(vt VT, val int64) VARIANT {
method ToIUnknown (line 11) | func (v *VARIANT) ToIUnknown() *IUnknown {
method ToIDispatch (line 19) | func (v *VARIANT) ToIDispatch() *IDispatch {
method ToArray (line 27) | func (v *VARIANT) ToArray() *SafeArrayConversion {
method ToString (line 38) | func (v *VARIANT) ToString() string {
method Clear (line 46) | func (v *VARIANT) Clear() error {
method Value (line 57) | func (v *VARIANT) Value() interface{} {
FILE: vendor/github.com/go-ole/go-ole/variant_386.go
type VARIANT (line 5) | type VARIANT struct
FILE: vendor/github.com/go-ole/go-ole/variant_amd64.go
type VARIANT (line 5) | type VARIANT struct
FILE: vendor/github.com/go-ole/go-ole/variant_s390x.go
type VARIANT (line 5) | type VARIANT struct
FILE: vendor/github.com/go-ole/go-ole/vt_string.go
constant _VT_name_0 (line 8) | _VT_name_0 = "VT_EMPTYVT_NULLVT_I2VT_I4VT_R4VT_R8VT_CYVT_DATEVT_BSTRVT_D...
constant _VT_name_1 (line 9) | _VT_name_1 = "VT_I1VT_UI1VT_UI2VT_UI4VT_I8VT_UI8VT_INTVT_UINTVT_VOIDVT_H...
constant _VT_name_2 (line 10) | _VT_name_2 = "VT_RECORDVT_INT_PTRVT_UINT_PTR"
constant _VT_name_3 (line 11) | _VT_name_3 = "VT_FILETIMEVT_BLOBVT_STREAMVT_STORAGEVT_STREAMED_OBJECTVT_...
constant _VT_name_4 (line 12) | _VT_name_4 = "VT_BSTR_BLOBVT_VECTOR"
constant _VT_name_5 (line 13) | _VT_name_5 = "VT_ARRAY"
constant _VT_name_6 (line 14) | _VT_name_6 = "VT_BYREF"
constant _VT_name_7 (line 15) | _VT_name_7 = "VT_RESERVED"
constant _VT_name_8 (line 16) | _VT_name_8 = "VT_ILLEGAL"
method String (line 31) | func (i VT) String() string {
FILE: vendor/github.com/go-ole/go-ole/winrt.go
function RoInitialize (line 21) | func RoInitialize(thread_type uint32) (err error) {
function RoActivateInstance (line 29) | func RoActivateInstance(clsid string) (ins *IInspectable, err error) {
function RoGetActivationFactory (line 45) | func RoGetActivationFactory(clsid string, iid *GUID) (ins *IInspectable,...
type HString (line 63) | type HString
method String (line 89) | func (h HString) String() string {
function NewHString (line 66) | func NewHString(s string) (hstring HString, err error) {
function DeleteHString (line 80) | func DeleteHString(hstring HString) (err error) {
FILE: vendor/github.com/go-ole/go-ole/winrt_doc.go
function RoInitialize (line 6) | func RoInitialize(thread_type uint32) (err error) {
function RoActivateInstance (line 11) | func RoActivateInstance(clsid string) (ins *IInspectable, err error) {
function RoGetActivationFactory (line 16) | func RoGetActivationFactory(clsid string, iid *GUID) (ins *IInspectable,...
type HString (line 21) | type HString
method String (line 34) | func (h HString) String() string {
function NewHString (line 24) | func NewHString(s string) (hstring HString, err error) {
function DeleteHString (line 29) | func DeleteHString(hstring HString) (err error) {
FILE: vendor/github.com/mattn/go-runewidth/runewidth.go
function init (line 18) | func init() {
function handleEnv (line 22) | func handleEnv() {
type interval (line 34) | type interval struct
type table (line 39) | type table
function inTables (line 41) | func inTables(r rune, ts ...table) bool {
function inTable (line 50) | func inTable(r rune, t table) bool {
type Condition (line 808) | type Condition struct
method RuneWidth (line 823) | func (c *Condition) RuneWidth(r rune) int {
method stringWidth (line 836) | func (c *Condition) stringWidth(s string) (width int) {
method stringWidthZeroJoiner (line 843) | func (c *Condition) stringWidthZeroJoiner(s string) (width int) {
method StringWidth (line 860) | func (c *Condition) StringWidth(s string) (width int) {
method Truncate (line 868) | func (c *Condition) Truncate(s string, w int, tail string) string {
method Wrap (line 888) | func (c *Condition) Wrap(s string, w int) string {
method FillLeft (line 911) | func (c *Condition) FillLeft(s string, w int) string {
method FillRight (line 925) | func (c *Condition) FillRight(s string, w int) string {
function NewCondition (line 814) | func NewCondition() *Condition {
function RuneWidth (line 940) | func RuneWidth(r rune) int {
function IsAmbiguousWidth (line 945) | func IsAmbiguousWidth(r rune) bool {
function IsNeutralWidth (line 950) | func IsNeutralWidth(r rune) bool {
function StringWidth (line 955) | func StringWidth(s string) (width int) {
function Truncate (line 960) | func Truncate(s string, w int, tail string) string {
function Wrap (line 965) | func Wrap(s string, w int) string {
function FillLeft (line 970) | func FillLeft(s string, w int) string {
function FillRight (line 975) | func FillRight(s string, w int) string {
FILE: vendor/github.com/mattn/go-runewidth/runewidth_appengine.go
function IsEastAsian (line 6) | func IsEastAsian() bool {
FILE: vendor/github.com/mattn/go-runewidth/runewidth_js.go
function IsEastAsian (line 6) | func IsEastAsian() bool {
FILE: vendor/github.com/mattn/go-runewidth/runewidth_posix.go
function isEastAsian (line 33) | func isEastAsian(locale string) bool {
function IsEastAsian (line 64) | func IsEastAsian() bool {
FILE: vendor/github.com/mattn/go-runewidth/runewidth_windows.go
function IsEastAsian (line 16) | func IsEastAsian() bool {
FILE: vendor/github.com/mitchellh/go-wordwrap/wordwrap.go
function WrapString (line 14) | func WrapString(s string, lim uint) string {
FILE: vendor/github.com/nsf/termbox-go/api.go
function Init (line 24) | func Init() error {
function Interrupt (line 123) | func Interrupt() {
function Close (line 129) | func Close() {
function Flush (line 160) | func Flush() error {
function SetCursor (line 212) | func SetCursor(x, y int) {
function HideCursor (line 228) | func HideCursor() {
function SetCell (line 234) | func SetCell(x, y int, ch rune, fg, bg Attribute) {
function CellBuffer (line 248) | func CellBuffer() []Cell {
function ParseEvent (line 263) | func ParseEvent(data []byte) Event {
function PollRawEvent (line 279) | func PollRawEvent(data []byte) Event {
function PollEvent (line 314) | func PollEvent() Event {
function Size (line 392) | func Size() (width int, height int) {
function Clear (line 397) | func Clear(fg, bg Attribute) error {
function SetInputMode (line 417) | func SetInputMode(mode InputMode) InputMode {
function SetOutputMode (line 476) | func SetOutputMode(mode OutputMode) OutputMode {
function Sync (line 489) | func Sync() error {
FILE: vendor/github.com/nsf/termbox-go/api_common.go
type InputMode (line 7) | type InputMode
type OutputMode (line 8) | type OutputMode
type EventType (line 9) | type EventType
type Modifier (line 10) | type Modifier
type Key (line 11) | type Key
type Attribute (line 12) | type Attribute
type Event (line 18) | type Event struct
type Cell (line 34) | type Cell struct
constant KeyF1 (line 47) | KeyF1 Key = 0xFFFF - iota
constant KeyF2 (line 48) | KeyF2
constant KeyF3 (line 49) | KeyF3
constant KeyF4 (line 50) | KeyF4
constant KeyF5 (line 51) | KeyF5
constant KeyF6 (line 52) | KeyF6
constant KeyF7 (line 53) | KeyF7
constant KeyF8 (line 54) | KeyF8
constant KeyF9 (line 55) | KeyF9
constant KeyF10 (line 56) | KeyF10
constant KeyF11 (line 57) | KeyF11
constant KeyF12 (line 58) | KeyF12
constant KeyInsert (line 59) | KeyInsert
constant KeyDelete (line 60) | KeyDelete
constant KeyHome (line 61) | KeyHome
constant KeyEnd (line 62) | KeyEnd
constant KeyPgup (line 63) | KeyPgup
constant KeyPgdn (line 64) | KeyPgdn
constant KeyArrowUp (line 65) | KeyArrowUp
constant KeyArrowDown (line 66) | KeyArrowDown
constant KeyArrowLeft (line 67) | KeyArrowLeft
constant KeyArrowRight (line 68) | KeyArrowRight
constant key_min (line 69) | key_min
constant MouseLeft (line 70) | MouseLeft
constant MouseMiddle (line 71) | MouseMiddle
constant MouseRight (line 72) | MouseRight
constant MouseRelease (line 73) | MouseRelease
constant MouseWheelUp (line 74) | MouseWheelUp
constant MouseWheelDown (line 75) | MouseWheelDown
constant KeyCtrlTilde (line 79) | KeyCtrlTilde Key = 0x00
constant KeyCtrl2 (line 80) | KeyCtrl2 Key = 0x00
constant KeyCtrlSpace (line 81) | KeyCtrlSpace Key = 0x00
constant KeyCtrlA (line 82) | KeyCtrlA Key = 0x01
constant KeyCtrlB (line 83) | KeyCtrlB Key = 0x02
constant KeyCtrlC (line 84) | KeyCtrlC Key = 0x03
constant KeyCtrlD (line 85) | KeyCtrlD Key = 0x04
constant KeyCtrlE (line 86) | KeyCtrlE Key = 0x05
constant KeyCtrlF (line 87) | KeyCtrlF Key = 0x06
constant KeyCtrlG (line 88) | KeyCtrlG Key = 0x07
constant KeyBackspace (line 89) | KeyBackspace Key = 0x08
constant KeyCtrlH (line 90) | KeyCtrlH Key = 0x08
constant KeyTab (line 91) | KeyTab Key = 0x09
constant KeyCtrlI (line 92) | KeyCtrlI Key = 0x09
constant KeyCtrlJ (line 93) | KeyCtrlJ Key = 0x0A
constant KeyCtrlK (line 94) | KeyCtrlK Key = 0x0B
constant KeyCtrlL (line 95) | KeyCtrlL Key = 0x0C
constant KeyEnter (line 96) | KeyEnter Key = 0x0D
constant KeyCtrlM (line 97) | KeyCtrlM Key = 0x0D
constant KeyCtrlN (line 98) | KeyCtrlN Key = 0x0E
constant KeyCtrlO (line 99) | KeyCtrlO Key = 0x0F
constant KeyCtrlP (line 100) | KeyCtrlP Key = 0x10
constant KeyCtrlQ (line 101) | KeyCtrlQ Key = 0x11
constant KeyCtrlR (line 102) | KeyCtrlR Key = 0x12
constant KeyCtrlS (line 103) | KeyCtrlS Key = 0x13
constant KeyCtrlT (line 104) | KeyCtrlT Key = 0x14
constant KeyCtrlU (line 105) | KeyCtrlU Key = 0x15
constant KeyCtrlV (line 106) | KeyCtrlV Key = 0x16
constant KeyCtrlW (line 107) | KeyCtrlW Key = 0x17
constant KeyCtrlX (line 108) | KeyCtrlX Key = 0x18
constant KeyCtrlY (line 109) | KeyCtrlY Key = 0x19
constant KeyCtrlZ (line 110) | KeyCtrlZ Key = 0x1A
constant KeyEsc (line 111) | KeyEsc Key = 0x1B
constant KeyCtrlLsqBracket (line 112) | KeyCtrlLsqBracket Key = 0x1B
constant KeyCtrl3 (line 113) | KeyCtrl3 Key = 0x1B
constant KeyCtrl4 (line 114) | KeyCtrl4 Key = 0x1C
constant KeyCtrlBackslash (line 115) | KeyCtrlBackslash Key = 0x1C
constant KeyCtrl5 (line 116) | KeyCtrl5 Key = 0x1D
constant KeyCtrlRsqBracket (line 117) | KeyCtrlRsqBracket Key = 0x1D
constant KeyCtrl6 (line 118) | KeyCtrl6 Key = 0x1E
constant KeyCtrl7 (line 119) | KeyCtrl7 Key = 0x1F
constant KeyCtrlSlash (line 120) | KeyCtrlSlash Key = 0x1F
constant KeyCtrlUnderscore (line 121) | KeyCtrlUnderscore Key = 0x1F
constant KeySpace (line 122) | KeySpace Key = 0x20
constant KeyBackspace2 (line 123) | KeyBackspace2 Key = 0x7F
constant KeyCtrl8 (line 124) | KeyCtrl8 Key = 0x7F
constant ModAlt (line 129) | ModAlt Modifier = 1 << iota
constant ModMotion (line 130) | ModMotion
constant ColorDefault (line 136) | ColorDefault Attribute = iota
constant ColorBlack (line 137) | ColorBlack
constant ColorRed (line 138) | ColorRed
constant ColorGreen (line 139) | ColorGreen
constant ColorYellow (line 140) | ColorYellow
constant ColorBlue (line 141) | ColorBlue
constant ColorMagenta (line 142) | ColorMagenta
constant ColorCyan (line 143) | ColorCyan
constant ColorWhite (line 144) | ColorWhite
constant AttrBold (line 156) | AttrBold Attribute = 1 << (iota + 9)
constant AttrUnderline (line 157) | AttrUnderline
constant AttrReverse (line 158) | AttrReverse
constant InputEsc (line 163) | InputEsc InputMode = 1 << iota
constant InputAlt (line 164) | InputAlt
constant InputMouse (line 165) | InputMouse
constant InputCurrent (line 166) | InputCurrent InputMode = 0
constant OutputCurrent (line 171) | OutputCurrent OutputMode = iota
constant OutputNormal (line 172) | OutputNormal
constant Output256 (line 173) | Output256
constant Output216 (line 174) | Output216
constant OutputGrayscale (line 175) | OutputGrayscale
constant EventKey (line 180) | EventKey EventType = iota
constant EventResize (line 181) | EventResize
constant EventMouse (line 182) | EventMouse
constant EventError (line 183) | EventError
constant EventInterrupt (line 184) | EventInterrupt
constant EventRaw (line 185) | EventRaw
constant EventNone (line 186) | EventNone
FILE: vendor/github.com/nsf/termbox-go/api_windows.go
function Init (line 18) | func Init() error {
function Close (line 80) | func Close() {
function Interrupt (line 108) | func Interrupt() {
function Flush (line 113) | func Flush() error {
function SetCursor (line 132) | func SetCursor(x, y int) {
function HideCursor (line 148) | func HideCursor() {
function SetCell (line 154) | func SetCell(x, y int, ch rune, fg, bg Attribute) {
function CellBuffer (line 168) | func CellBuffer() []Cell {
function PollEvent (line 173) | func PollEvent() Event {
function Size (line 186) | func Size() (int, int) {
function Clear (line 191) | func Clear(fg, bg Attribute) error {
function SetInputMode (line 211) | func SetInputMode(mode InputMode) InputMode {
function SetOutputMode (line 235) | func SetOutputMode(mode OutputMode) OutputMode {
function Sync (line 243) | func Sync() error {
FILE: vendor/github.com/nsf/termbox-go/collect_terminfo.py
function escaped (line 5) | def escaped(s):
function tput (line 8) | def tput(term, name):
function w (line 15) | def w(s):
function iter_pairs (line 69) | def iter_pairs(iterable):
function do_term (line 74) | def do_term(term, nick):
function do_terms (line 94) | def do_terms(d):
FILE: vendor/github.com/nsf/termbox-go/escwait.go
function enable_wait_for_escape_sequence (line 9) | func enable_wait_for_escape_sequence() bool {
FILE: vendor/github.com/nsf/termbox-go/escwait_darwin.go
function enable_wait_for_escape_sequence (line 7) | func enable_wait_for_escape_sequence() bool {
FILE: vendor/github.com/nsf/termbox-go/syscalls.go
type syscall_Termios (line 11) | type syscall_Termios
constant syscall_IGNBRK (line 14) | syscall_IGNBRK = C.IGNBRK
constant syscall_BRKINT (line 15) | syscall_BRKINT = C.BRKINT
constant syscall_PARMRK (line 16) | syscall_PARMRK = C.PARMRK
constant syscall_ISTRIP (line 17) | syscall_ISTRIP = C.ISTRIP
constant syscall_INLCR (line 18) | syscall_INLCR = C.INLCR
constant syscall_IGNCR (line 19) | syscall_IGNCR = C.IGNCR
constant syscall_ICRNL (line 20) | syscall_ICRNL = C.ICRNL
constant syscall_IXON (line 21) | syscall_IXON = C.IXON
constant syscall_OPOST (line 22) | syscall_OPOST = C.OPOST
constant syscall_ECHO (line 23) | syscall_ECHO = C.ECHO
constant syscall_ECHONL (line 24) | syscall_ECHONL = C.ECHONL
constant syscall_ICANON (line 25) | syscall_ICANON = C.ICANON
constant syscall_ISIG (line 26) | syscall_ISIG = C.ISIG
constant syscall_IEXTEN (line 27) | syscall_IEXTEN = C.IEXTEN
constant syscall_CSIZE (line 28) | syscall_CSIZE = C.CSIZE
constant syscall_PARENB (line 29) | syscall_PARENB = C.PARENB
constant syscall_CS8 (line 30) | syscall_CS8 = C.CS8
constant syscall_VMIN (line 31) | syscall_VMIN = C.VMIN
constant syscall_VTIME (line 32) | syscall_VTIME = C.VTIME
constant syscall_TCGETS (line 37) | syscall_TCGETS = C.TCGETS
constant syscall_TCSETS (line 38) | syscall_TCSETS = C.TCSETS
FILE: vendor/github.com/nsf/termbox-go/syscalls_darwin.go
type syscall_Termios (line 8) | type syscall_Termios struct
constant syscall_IGNBRK (line 19) | syscall_IGNBRK = 0x1
constant syscall_BRKINT (line 20) | syscall_BRKINT = 0x2
constant syscall_PARMRK (line 21) | syscall_PARMRK = 0x8
constant syscall_ISTRIP (line 22) | syscall_ISTRIP = 0x20
constant syscall_INLCR (line 23) | syscall_INLCR = 0x40
constant syscall_IGNCR (line 24) | syscall_IGNCR = 0x80
constant syscall_ICRNL (line 25) | syscall_ICRNL = 0x100
constant syscall_IXON (line 26) | syscall_IXON = 0x200
constant syscall_OPOST (line 27) | syscall_OPOST = 0x1
constant syscall_ECHO (line 28) | syscall_ECHO = 0x8
constant syscall_ECHONL (line 29) | syscall_ECHONL = 0x10
constant syscall_ICANON (line 30) | syscall_ICANON = 0x100
constant syscall_ISIG (line 31) | syscall_ISIG = 0x80
constant syscall_IEXTEN (line 32) | syscall_IEXTEN = 0x400
constant syscall_CSIZE (line 33) | syscall_CSIZE = 0x300
constant syscall_PARENB (line 34) | syscall_PARENB = 0x1000
constant syscall_CS8 (line 35) | syscall_CS8 = 0x300
constant syscall_VMIN (line 36) | syscall_VMIN = 0x10
constant syscall_VTIME (line 37) | syscall_VTIME = 0x11
constant syscall_TCGETS (line 39) | syscall_TCGETS = 0x402c7413
constant syscall_TCSETS (line 40) | syscall_TCSETS = 0x802c7414
FILE: vendor/github.com/nsf/termbox-go/syscalls_darwin_amd64.go
type syscall_Termios (line 6) | type syscall_Termios struct
constant syscall_IGNBRK (line 18) | syscall_IGNBRK = 0x1
constant syscall_BRKINT (line 19) | syscall_BRKINT = 0x2
constant syscall_PARMRK (line 20) | syscall_PARMRK = 0x8
constant syscall_ISTRIP (line 21) | syscall_ISTRIP = 0x20
constant syscall_INLCR (line 22) | syscall_INLCR = 0x40
constant syscall_IGNCR (line 23) | syscall_IGNCR = 0x80
constant syscall_ICRNL (line 24) | syscall_ICRNL = 0x100
constant syscall_IXON (line 25) | syscall_IXON = 0x200
constant syscall_OPOST (line 26) | syscall_OPOST = 0x1
constant syscall_ECHO (line 27) | syscall_ECHO = 0x8
constant syscall_ECHONL (line 28) | syscall_ECHONL = 0x10
constant syscall_ICANON (line 29) | syscall_ICANON = 0x100
constant syscall_ISIG (line 30) | syscall_ISIG = 0x80
constant syscall_IEXTEN (line 31) | syscall_IEXTEN = 0x400
constant syscall_CSIZE (line 32) | syscall_CSIZE = 0x300
constant syscall_PARENB (line 33) | syscall_PARENB = 0x1000
constant syscall_CS8 (line 34) | syscall_CS8 = 0x300
constant syscall_VMIN (line 35) | syscall_VMIN = 0x10
constant syscall_VTIME (line 36) | syscall_VTIME = 0x11
constant syscall_TCGETS (line 38) | syscall_TCGETS = 0x40487413
constant syscall_TCSETS (line 39) | syscall_TCSETS = 0x80487414
FILE: vendor/github.com/nsf/termbox-go/syscalls_dragonfly.go
type syscall_Termios (line 6) | type syscall_Termios struct
constant syscall_IGNBRK (line 17) | syscall_IGNBRK = 0x1
constant syscall_BRKINT (line 18) | syscall_BRKINT = 0x2
constant syscall_PARMRK (line 19) | syscall_PARMRK = 0x8
constant syscall_ISTRIP (line 20) | syscall_ISTRIP = 0x20
constant syscall_INLCR (line 21) | syscall_INLCR = 0x40
constant syscall_IGNCR (line 22) | syscall_IGNCR = 0x80
constant syscall_ICRNL (line 23) | syscall_ICRNL = 0x100
constant syscall_IXON (line 24) | syscall_IXON = 0x200
constant syscall_OPOST (line 25) | syscall_OPOST = 0x1
constant syscall_ECHO (line 26) | syscall_ECHO = 0x8
constant syscall_ECHONL (line 27) | syscall_ECHONL = 0x10
constant syscall_ICANON (line 28) | syscall_ICANON = 0x100
constant syscall_ISIG (line 29) | syscall_ISIG = 0x80
constant syscall_IEXTEN (line 30) | syscall_IEXTEN = 0x400
constant syscall_CSIZE (line 31) | syscall_CSIZE = 0x300
constant syscall_PARENB (line 32) | syscall_PARENB = 0x1000
constant syscall_CS8 (line 33) | syscall_CS8 = 0x300
constant syscall_VMIN (line 34) | syscall_VMIN = 0x10
constant syscall_VTIME (line 35) | syscall_VTIME = 0x11
constant syscall_TCGETS (line 37) | syscall_TCGETS = 0x402c7413
constant syscall_TCSETS (line 38) | syscall_TCSETS = 0x802c7414
FILE: vendor/github.com/nsf/termbox-go/syscalls_freebsd.go
type syscall_Termios (line 6) | type syscall_Termios struct
constant syscall_IGNBRK (line 17) | syscall_IGNBRK = 0x1
constant syscall_BRKINT (line 18) | syscall_BRKINT = 0x2
constant syscall_PARMRK (line 19) | syscall_PARMRK = 0x8
constant syscall_ISTRIP (line 20) | syscall_ISTRIP = 0x20
constant syscall_INLCR (line 21) | syscall_INLCR = 0x40
constant syscall_IGNCR (line 22) | syscall_IGNCR = 0x80
constant syscall_ICRNL (line 23) | syscall_ICRNL = 0x100
constant syscall_IXON (line 24) | syscall_IXON = 0x200
constant syscall_OPOST (line 25) | syscall_OPOST = 0x1
constant syscall_ECHO (line 26) | syscall_ECHO = 0x8
constant syscall_ECHONL (line 27) | syscall_ECHONL = 0x10
constant syscall_ICANON (line 28) | syscall_ICANON = 0x100
constant syscall_ISIG (line 29) | syscall_ISIG = 0x80
constant syscall_IEXTEN (line 30) | syscall_IEXTEN = 0x400
constant syscall_CSIZE (line 31) | syscall_CSIZE = 0x300
constant syscall_PARENB (line 32) | syscall_PARENB = 0x1000
constant syscall_CS8 (line 33) | syscall_CS8 = 0x300
constant syscall_VMIN (line 34) | syscall_VMIN = 0x10
constant syscall_VTIME (line 35) | syscall_VTIME = 0x11
constant syscall_TCGETS (line 37) | syscall_TCGETS = 0x402c7413
constant syscall_TCSETS (line 38) | syscall_TCSETS = 0x802c7414
FILE: vendor/github.com/nsf/termbox-go/syscalls_linux.go
type syscall_Termios (line 8) | type syscall_Termios
constant syscall_IGNBRK (line 11) | syscall_IGNBRK = syscall.IGNBRK
constant syscall_BRKINT (line 12) | syscall_BRKINT = syscall.BRKINT
constant syscall_PARMRK (line 13) | syscall_PARMRK = syscall.PARMRK
constant syscall_ISTRIP (line 14) | syscall_ISTRIP = syscall.ISTRIP
constant syscall_INLCR (line 15) | syscall_INLCR = syscall.INLCR
constant syscall_IGNCR (line 16) | syscall_IGNCR = syscall.IGNCR
constant syscall_ICRNL (line 17) | syscall_ICRNL = syscall.ICRNL
constant syscall_IXON (line 18) | syscall_IXON = syscall.IXON
constant syscall_OPOST (line 19) | syscall_OPOST = syscall.OPOST
constant syscall_ECHO (line 20) | syscall_ECHO = syscall.ECHO
constant syscall_ECHONL (line 21) | syscall_ECHONL = syscall.ECHONL
constant syscall_ICANON (line 22) | syscall_ICANON = syscall.ICANON
constant syscall_ISIG (line 23) | syscall_ISIG = syscall.ISIG
constant syscall_IEXTEN (line 24) | syscall_IEXTEN = syscall.IEXTEN
constant syscall_CSIZE (line 25) | syscall_CSIZE = syscall.CSIZE
constant syscall_PARENB (line 26) | syscall_PARENB = syscall.PARENB
constant syscall_CS8 (line 27) | syscall_CS8 = syscall.CS8
constant syscall_VMIN (line 28) | syscall_VMIN = syscall.VMIN
constant syscall_VTIME (line 29) | syscall_VTIME = syscall.VTIME
constant syscall_TCGETS (line 31) | syscall_TCGETS = syscall.TCGETS
constant syscall_TCSETS (line 32) | syscall_TCSETS = syscall.TCSETS
FILE: vendor/github.com/nsf/termbox-go/syscalls_netbsd.go
type syscall_Termios (line 6) | type syscall_Termios struct
constant syscall_IGNBRK (line 17) | syscall_IGNBRK = 0x1
constant syscall_BRKINT (line 18) | syscall_BRKINT = 0x2
constant syscall_PARMRK (line 19) | syscall_PARMRK = 0x8
constant syscall_ISTRIP (line 20) | syscall_ISTRIP = 0x20
constant syscall_INLCR (line 21) | syscall_INLCR = 0x40
constant syscall_IGNCR (line 22) | syscall_IGNCR = 0x80
constant syscall_ICRNL (line 23) | syscall_ICRNL = 0x100
constant syscall_IXON (line 24) | syscall_IXON = 0x200
constant syscall_OPOST (line 25) | syscall_OPOST = 0x1
constant syscall_ECHO (line 26) | syscall_ECHO = 0x8
constant syscall_ECHONL (line 27) | syscall_ECHONL = 0x10
constant syscall_ICANON (line 28) | syscall_ICANON = 0x100
constant syscall_ISIG (line 29) | syscall_ISIG = 0x80
constant syscall_IEXTEN (line 30) | syscall_IEXTEN = 0x400
constant syscall_CSIZE (line 31) | syscall_CSIZE = 0x300
constant syscall_PARENB (line 32) | syscall_PARENB = 0x1000
constant syscall_CS8 (line 33) | syscall_CS8 = 0x300
constant syscall_VMIN (line 34) | syscall_VMIN = 0x10
constant syscall_VTIME (line 35) | syscall_VTIME = 0x11
constant syscall_TCGETS (line 37) | syscall_TCGETS = 0x402c7413
constant syscall_TCSETS (line 38) | syscall_TCSETS = 0x802c7414
FILE: vendor/github.com/nsf/termbox-go/syscalls_openbsd.go
type syscall_Termios (line 6) | type syscall_Termios struct
constant syscall_IGNBRK (line 17) | syscall_IGNBRK = 0x1
constant syscall_BRKINT (line 18) | syscall_BRKINT = 0x2
constant syscall_PARMRK (line 19) | syscall_PARMRK = 0x8
constant syscall_ISTRIP (line 20) | syscall_ISTRIP = 0x20
constant syscall_INLCR (line 21) | syscall_INLCR = 0x40
constant syscall_IGNCR (line 22) | syscall_IGNCR = 0x80
constant syscall_ICRNL (line 23) | syscall_ICRNL = 0x100
constant syscall_IXON (line 24) | syscall_IXON = 0x200
constant syscall_OPOST (line 25) | syscall_OPOST = 0x1
constant syscall_ECHO (line 26) | syscall_ECHO = 0x8
constant syscall_ECHONL (line 27) | syscall_ECHONL = 0x10
constant syscall_ICANON (line 28) | syscall_ICANON = 0x100
constant syscall_ISIG (line 29) | syscall_ISIG = 0x80
constant syscall_IEXTEN (line 30) | syscall_IEXTEN = 0x400
constant syscall_CSIZE (line 31) | syscall_CSIZE = 0x300
constant syscall_PARENB (line 32) | syscall_PARENB = 0x1000
constant syscall_CS8 (line 33) | syscall_CS8 = 0x300
constant syscall_VMIN (line 34) | syscall_VMIN = 0x10
constant syscall_VTIME (line 35) | syscall_VTIME = 0x11
constant syscall_TCGETS (line 37) | syscall_TCGETS = 0x402c7413
constant syscall_TCSETS (line 38) | syscall_TCSETS = 0x802c7414
FILE: vendor/github.com/nsf/termbox-go/syscalls_windows.go
constant foreground_blue (line 7) | foreground_blue = 0x1
constant foreground_green (line 8) | foreground_green = 0x2
constant foreground_red (line 9) | foreground_red = 0x4
constant foreground_intensity (line 10) | foreground_intensity = 0x8
constant background_blue (line 11) | background_blue = 0x10
constant background_green (line 12) | background_green = 0x20
constant background_red (line 13) | background_red = 0x40
constant background_intensity (line 14) | background_intensity = 0x80
constant std_input_handle (line 15) | std_input_handle = -0xa
constant std_output_handle (line 16) | std_output_handle = -0xb
constant key_event (line 17) | key_event = 0x1
constant mouse_event (line 18) | mouse_event = 0x2
constant window_buffer_size_event (line 19) | window_buffer_size_event = 0x4
constant enable_window_input (line 20) | enable_window_input = 0x8
constant enable_mouse_input (line 21) | enable_mouse_input = 0x10
constant enable_extended_flags (line 22) | enable_extended_flags = 0x80
constant vk_f1 (line 24) | vk_f1 = 0x70
constant vk_f2 (line 25) | vk_f2 = 0x71
constant vk_f3 (line 26) | vk_f3 = 0x72
constant vk_f4 (line 27) | vk_f4 = 0x73
constant vk_f5 (line 28) | vk_f5 = 0x74
constant vk_f6 (line 29) | vk_f6 = 0x75
constant vk_f7 (line 30) | vk_f7 = 0x76
constant vk_f8 (line 31) | vk_f8 = 0x77
constant vk_f9 (line 32) | vk_f9 = 0x78
constant vk_f10 (line 33) | vk_f10 = 0x79
constant vk_f11 (line 34) | vk_f11 = 0x7a
constant vk_f12 (line 35) | vk_f12 = 0x7b
constant vk_insert (line 36) | vk_insert = 0x2d
constant vk_delete (line 37) | vk_delete = 0x2e
constant vk_home (line 38) | vk_home = 0x24
constant vk_end (line 39) | vk_end = 0x23
constant vk_pgup (line 40) | vk_pgup = 0x21
constant vk_pgdn (line 41) | vk_pgdn = 0x22
constant vk_arrow_up (line 42) | vk_arrow_up = 0x26
constant vk_arrow_down (line 43) | vk_arrow_down = 0x28
constant vk_arrow_left (line 44) | vk_arrow_left = 0x25
constant vk_arrow_right (line 45) | vk_arrow_right = 0x27
constant vk_backspace (line 46) | vk_backspace = 0x8
constant vk_tab (line 47) | vk_tab = 0x9
constant vk_enter (line 48) | vk_enter = 0xd
constant vk_esc (line 49) | vk_esc = 0x1b
constant vk_space (line 50) | vk_space = 0x20
constant left_alt_pressed (line 52) | left_alt_pressed = 0x2
constant left_ctrl_pressed (line 53) | left_ctrl_pressed = 0x8
constant right_alt_pressed (line 54) | right_alt_pressed = 0x1
constant right_ctrl_pressed (line 55) | right_ctrl_pressed = 0x4
constant shift_pressed (line 56) | shift_pressed = 0x10
constant generic_read (line 58) | generic_read = 0x80000000
constant generic_write (line 59) | generic_write = 0x40000000
constant console_textmode_buffer (line 60) | console_textmode_buffer = 0x1
FILE: vendor/github.com/nsf/termbox-go/termbox.go
constant t_enter_ca (line 17) | t_enter_ca = iota
constant t_exit_ca (line 18) | t_exit_ca
constant t_show_cursor (line 19) | t_show_cursor
constant t_hide_cursor (line 20) | t_hide_cursor
constant t_clear_screen (line 21) | t_clear_screen
constant t_sgr0 (line 22) | t_sgr0
constant t_underline (line 23) | t_underline
constant t_bold (line 24) | t_bold
constant t_blink (line 25) | t_blink
constant t_reverse (line 26) | t_reverse
constant t_enter_keypad (line 27) | t_enter_keypad
constant t_exit_keypad (line 28) | t_exit_keypad
constant t_enter_mouse (line 29) | t_enter_mouse
constant t_exit_mouse (line 30) | t_exit_mouse
constant t_max_funcs (line 31) | t_max_funcs
constant coord_invalid (line 35) | coord_invalid = -2
constant attr_invalid (line 36) | attr_invalid = Attribute(0xFFFF)
type input_event (line 39) | type input_event struct
type extract_event_res (line 44) | type extract_event_res
constant event_not_extracted (line 47) | event_not_extracted extract_event_res = iota
constant event_extracted (line 48) | event_extracted
constant esc_wait (line 49) | esc_wait
function write_cursor (line 91) | func write_cursor(x, y int) {
function write_sgr_fg (line 99) | func write_sgr_fg(a Attribute) {
function write_sgr_bg (line 112) | func write_sgr_bg(a Attribute) {
function write_sgr (line 125) | func write_sgr(fg, bg Attribute) {
type winsize (line 143) | type winsize struct
function get_term_size (line 150) | func get_term_size(fd uintptr) (int, int) {
function send_attr (line 157) | func send_attr(fg, bg Attribute) {
function send_char (line 231) | func send_char(x, y int, ch rune) {
function flush (line 241) | func flush() error {
function send_clear (line 247) | func send_clear() error {
function update_size_maybe (line 265) | func update_size_maybe() error {
function tcsetattr (line 277) | func tcsetattr(fd uintptr, termios *syscall_Termios) error {
function tcgetattr (line 286) | func tcgetattr(fd uintptr, termios *syscall_Termios) error {
function parse_mouse_event (line 295) | func parse_mouse_event(event *Event, buf string) (int, bool) {
function parse_escape_sequence (line 418) | func parse_escape_sequence(event *Event, buf []byte) (int, bool) {
function extract_raw_event (line 432) | func extract_raw_event(data []byte, event *Event) bool {
function extract_event (line 451) | func extract_event(inbuf []byte, event *Event, allow_esc_wait bool) extr...
function fcntl (line 521) | func fcntl(fd int, cmd int, arg int) (val int, err error) {
FILE: vendor/github.com/nsf/termbox-go/termbox_common.go
type cellbuf (line 5) | type cellbuf struct
method init (line 11) | func (this *cellbuf) init(width, height int) {
method resize (line 17) | func (this *cellbuf) resize(width, height int) {
method clear (line 46) | func (this *cellbuf) clear() {
constant cursor_hidden (line 55) | cursor_hidden = -1
function is_cursor_hidden (line 57) | func is_cursor_hidden(x, y int) bool {
FILE: vendor/github.com/nsf/termbox-go/termbox_windows.go
type wchar (line 10) | type wchar
type short (line 11) | type short
type dword (line 12) | type dword
type word (line 13) | type word
type char_info (line 14) | type char_info struct
type coord (line 18) | type coord struct
method uintptr (line 75) | func (this coord) uintptr() uintptr {
type small_rect (line 22) | type small_rect struct
method uintptr (line 79) | func (this *small_rect) uintptr() uintptr {
type console_screen_buffer_info (line 28) | type console_screen_buffer_info struct
type console_cursor_info (line 35) | type console_cursor_info struct
type input_record (line 39) | type input_record struct
type key_event_record (line 44) | type key_event_record struct
type window_buffer_size_record (line 52) | type window_buffer_size_record struct
type mouse_event_record (line 55) | type mouse_event_record struct
type console_font_info (line 61) | type console_font_info struct
constant mouse_lmb (line 68) | mouse_lmb = 0x1
constant mouse_rmb (line 69) | mouse_rmb = 0x2
constant mouse_mmb (line 70) | mouse_mmb = 0x4 | 0x8 | 0x10
constant SM_CXMIN (line 71) | SM_CXMIN = 28
constant SM_CYMIN (line 72) | SM_CYMIN = 29
function set_console_active_screen_buffer (line 111) | func set_console_active_screen_buffer(h syscall.Handle) (err error) {
function set_console_screen_buffer_size (line 124) | func set_console_screen_buffer_size(h syscall.Handle, size coord) (err e...
function set_console_window_info (line 137) | func set_console_window_info(h syscall.Handle, window *small_rect) (err ...
function create_console_screen_buffer (line 152) | func create_console_screen_buffer() (h syscall.Handle, err error) {
function get_console_screen_buffer_info (line 165) | func get_console_screen_buffer_info(h syscall.Handle, info *console_scre...
function write_console_output (line 178) | func write_console_output(h syscall.Handle, chars []char_info, dst small...
function write_console_output_character (line 194) | func write_console_output_character(h syscall.Handle, chars []wchar, pos...
function write_console_output_attribute (line 208) | func write_console_output_attribute(h syscall.Handle, attrs []word, pos ...
function set_console_cursor_info (line 222) | func set_console_cursor_info(h syscall.Handle, info *console_cursor_info...
function get_console_cursor_info (line 235) | func get_console_cursor_info(h syscall.Handle, info *console_cursor_info...
function set_console_cursor_position (line 248) | func set_console_cursor_position(h syscall.Handle, pos coord) (err error) {
function read_console_input (line 261) | func read_console_input(h syscall.Handle, record *input_record) (err err...
function get_console_mode (line 274) | func get_console_mode(h syscall.Handle, mode *dword) (err error) {
function set_console_mode (line 287) | func set_console_mode(h syscall.Handle, mode dword) (err error) {
function fill_console_output_character (line 300) | func fill_console_output_character(h syscall.Handle, char wchar, n int) ...
function fill_console_output_attribute (line 315) | func fill_console_output_attribute(h syscall.Handle, attr word, n int) (...
function create_event (line 330) | func create_event() (out syscall.Handle, err error) {
function wait_for_multiple_objects (line 343) | func wait_for_multiple_objects(objects []syscall.Handle) (err error) {
function set_event (line 357) | func set_event(ev syscall.Handle) (err error) {
function get_current_console_font (line 370) | func get_current_console_font(h syscall.Handle, info *console_font_info)...
type diff_msg (line 383) | type diff_msg struct
type input_event (line 389) | type input_event struct
function get_cursor_position (line 431) | func get_cursor_position(out syscall.Handle) coord {
function get_term_size (line 439) | func get_term_size(out syscall.Handle) (coord, small_rect) {
function get_win_min_size (line 447) | func get_win_min_size(out syscall.Handle) coord {
function get_win_size (line 468) | func get_win_size(out syscall.Handle) coord {
function fix_win_size (line 492) | func fix_win_size(out syscall.Handle, size coord) (err error) {
function update_size_maybe (line 501) | func update_size_maybe() {
constant replacement_char (line 544) | replacement_char = '\uFFFD'
constant max_rune (line 545) | max_rune = '\U0010FFFF'
constant surr1 (line 546) | surr1 = 0xd800
constant surr2 (line 547) | surr2 = 0xdc00
constant surr3 (line 548) | surr3 = 0xe000
constant surr_self (line 549) | surr_self = 0x10000
function append_diff_line (line 552) | func append_diff_line(y int) int {
function prepare_diff_messages (line 577) | func prepare_diff_messages() {
function get_ct (line 617) | func get_ct(table []word, idx int) word {
function cell_to_char_info (line 625) | func cell_to_char_info(c Cell) (attr word, wc [2]wchar) {
function move_cursor (line 648) | func move_cursor(x, y int) {
function show_cursor (line 655) | func show_cursor(visible bool) {
function clear (line 670) | func clear() {
function key_event_record_to_event (line 692) | func key_event_record_to_event(r *key_event_record) (Event, bool) {
function input_event_producer (line 843) | func input_event_producer() {
FILE: vendor/github.com/nsf/termbox-go/terminfo.go
constant ti_magic (line 24) | ti_magic = 0432
constant ti_header_length (line 25) | ti_header_length = 12
constant ti_mouse_enter (line 26) | ti_mouse_enter = "\x1b[?1000h\x1b[?1002h\x1b[?1015h\x1b[?1006h"
constant ti_mouse_leave (line 27) | ti_mouse_leave = "\x1b[?1006l\x1b[?1015l\x1b[?1002l\x1b[?1000l"
function load_terminfo (line 30) | func load_terminfo() ([]byte, error) {
function ti_try_path (line 82) | func ti_try_path(path string) (data []byte, err error) {
function setup_term_builtin (line 99) | func setup_term_builtin() error {
function setup_term (line 140) | func setup_term() (err error) {
function ti_read_string (line 193) | func ti_read_string(rd *bytes.Reader, str_off, table int16) (string, err...
FILE: vendor/github.com/shirou/gopsutil/cpu/cpu.go
type TimesStat (line 19) | type TimesStat struct
method String (line 74) | func (c TimesStat) String() string {
method Total (line 94) | func (c TimesStat) Total() float64 {
type InfoStat (line 34) | type InfoStat struct
method String (line 100) | func (c InfoStat) String() string {
type lastPercent (line 50) | type lastPercent struct
function init (line 59) | func init() {
function Counts (line 66) | func Counts(logical bool) (int, error) {
function CountsWithContext (line 70) | func CountsWithContext(ctx context.Context, logical bool) (int, error) {
function getAllBusy (line 105) | func getAllBusy(t TimesStat) (float64, float64) {
function calculateBusy (line 111) | func calculateBusy(t1, t2 TimesStat) float64 {
function calculateAllBusy (line 124) | func calculateAllBusy(t1, t2 []TimesStat) ([]float64, error) {
function Percent (line 143) | func Percent(interval time.Duration, percpu bool) ([]float64, error) {
function PercentWithContext (line 147) | func PercentWithContext(ctx context.Context, interval time.Duration, per...
function percentUsedFromLastCall (line 169) | func percentUsedFromLastCall(percpu bool) ([]float64, error) {
FILE: vendor/github.com/shirou/gopsutil/cpu/cpu_darwin.go
constant CPUser (line 14) | CPUser = 0
constant CPNice (line 15) | CPNice = 1
constant CPSys (line 16) | CPSys = 2
constant CPIntr (line 17) | CPIntr = 3
constant CPIdle (line 18) | CPIdle = 4
constant CPUStates (line 19) | CPUStates = 5
function Times (line 25) | func Times(percpu bool) ([]TimesStat, error) {
function TimesWithContext (line 29) | func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, er...
function Info (line 38) | func Info() ([]InfoStat, error) {
function InfoWithContext (line 42) | func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
FILE: vendor/github.com/shirou/gopsutil/cpu/cpu_darwin_cgo.go
function perCPUTimes (line 30) | func perCPUTimes() ([]TimesStat, error) {
function allCPUTimes (line 86) | func allCPUTimes() ([]TimesStat, error) {
FILE: vendor/github.com/shirou/gopsutil/cpu/cpu_darwin_nocgo.go
function perCPUTimes (line 8) | func perCPUTimes() ([]TimesStat, error) {
function allCPUTimes (line 12) | func allCPUTimes() ([]TimesStat, error) {
FILE: vendor/github.com/shirou/gopsutil/cpu/cpu_fallback.go
function Times (line 11) | func Times(percpu bool) ([]TimesStat, error) {
function TimesWithContext (line 15) | func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, er...
function Info (line 19) | func Info() ([]InfoStat, error) {
function InfoWithContext (line 23) | func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
FILE: vendor/github.com/shirou/gopsutil/cpu/cpu_freebsd.go
function init (line 27) | func init() {
function timeStat (line 42) | func timeStat(name string, t *cpuTimes) *TimesStat {
function Times (line 53) | func Times(percpu bool) ([]TimesStat, error) {
function TimesWithContext (line 57) | func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, er...
function Info (line 94) | func Info() ([]InfoStat, error) {
function InfoWithContext (line 98) | func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
function parseDmesgBoot (line 129) | func parseDmesgBoot(fileName string) (InfoStat, int, error) {
FILE: vendor/github.com/shirou/gopsutil/cpu/cpu_freebsd_386.go
type cpuTimes (line 3) | type cpuTimes struct
FILE: vendor/github.com/shirou/gopsutil/cpu/cpu_freebsd_amd64.go
type cpuTimes (line 3) | type cpuTimes struct
FILE: vendor/github.com/shirou/gopsutil/cpu/cpu_linux.go
function init (line 18) | func init() {
function Times (line 33) | func Times(percpu bool) ([]TimesStat, error) {
function TimesWithContext (line 37) | func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, er...
function sysCPUPath (line 68) | func sysCPUPath(cpu int32, relPath string) string {
function finishCPUInfo (line 72) | func finishCPUInfo(c *InfoStat) error {
function Info (line 111) | func Info() ([]InfoStat, error) {
function InfoWithContext (line 115) | func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
function parseStatLine (line 207) | func parseStatLine(line string) (*TimesStat, error) {
FILE: vendor/github.com/shirou/gopsutil/cpu/cpu_openbsd.go
constant CPUser (line 20) | CPUser = 0
constant CPNice (line 21) | CPNice = 1
constant CPSys (line 22) | CPSys = 2
constant CPIntr (line 23) | CPIntr = 3
constant CPIdle (line 24) | CPIdle = 4
constant CPUStates (line 25) | CPUStates = 5
constant CTLKern (line 30) | CTLKern = 1
constant KernCptime (line 31) | KernCptime = 40
constant KernCptime2 (line 32) | KernCptime2 = 71
function init (line 37) | func init() {
function Times (line 52) | func Times(percpu bool) ([]TimesStat, error) {
function TimesWithContext (line 56) | func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, er...
function Info (line 103) | func Info() ([]InfoStat, error) {
function InfoWithContext (line 107) | func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
FILE: vendor/github.com/shirou/gopsutil/cpu/cpu_solaris.go
function init (line 18) | func init() {
function Times (line 33) | func Times(percpu bool) ([]TimesStat, error) {
function TimesWithContext (line 37) | func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, er...
function Info (line 41) | func Info() ([]InfoStat, error) {
function InfoWithContext (line 45) | func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
function parseISAInfo (line 86) | func parseISAInfo(cmdOutput string) ([]string, error) {
constant psrNumCoresOffset (line 106) | psrNumCoresOffset = 1
constant psrNumCoresHTOffset (line 107) | psrNumCoresHTOffset = 3
constant psrNumHTOffset (line 108) | psrNumHTOffset = 4
constant psrVendorIDOffset (line 109) | psrVendorIDOffset = 5
constant psrFamilyOffset (line 110) | psrFamilyOffset = 7
constant psrModelOffset (line 111) | psrModelOffset = 8
constant psrStepOffset (line 112) | psrStepOffset = 9
constant psrClockOffset (line 113) | psrClockOffset = 10
constant psrModelNameOffset (line 114) | psrModelNameOffset = 11
function parseProcessorInfo (line 117) | func parseProcessorInfo(cmdOutput string) ([]InfoStat, error) {
FILE: vendor/github.com/shirou/gopsutil/cpu/cpu_windows.go
type Win32_Processor (line 15) | type Win32_Processor struct
type win32_PerfFormattedData_Counters_ProcessorInformation (line 27) | type win32_PerfFormattedData_Counters_ProcessorInformation struct
type Win32_PerfFormattedData_PerfOS_System (line 42) | type Win32_PerfFormattedData_PerfOS_System struct
function Times (line 48) | func Times(percpu bool) ([]TimesStat, error) {
function TimesWithContext (line 52) | func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, er...
function Info (line 85) | func Info() ([]InfoStat, error) {
function InfoWithContext (line 89) | func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
function perfInfoWithContext (line 122) | func perfInfoWithContext(ctx context.Context) ([]win32_PerfFormattedData...
function ProcInfo (line 136) | func ProcInfo() ([]Win32_PerfFormattedData_PerfOS_System, error) {
function ProcInfoWithContext (line 140) | func ProcInfoWithContext(ctx context.Context) ([]Win32_PerfFormattedData...
function perCPUTimesWithContext (line 151) | func perCPUTimesWithContext(ctx context.Context) ([]TimesStat, error) {
FILE: vendor/github.com/shirou/gopsutil/disk/disk.go
type UsageStat (line 11) | type UsageStat struct
method String (line 48) | func (d UsageStat) String() string {
type PartitionStat (line 24) | type PartitionStat struct
method String (line 53) | func (d PartitionStat) String() string {
type IOCountersStat (line 31) | type IOCountersStat struct
method String (line 58) | func (d IOCountersStat) String() string {
FILE: vendor/github.com/shirou/gopsutil/disk/disk_darwin.go
function Partitions (line 14) | func Partitions(all bool) ([]PartitionStat, error) {
function PartitionsWithContext (line 18) | func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionSt...
function Getfsstat (line 97) | func Getfsstat(buf []Statfs, flags int) (n int, err error) {
function GetfsstatWithContext (line 101) | func GetfsstatWithContext(ctx context.Context, buf []Statfs, flags int) ...
function getFsType (line 116) | func getFsType(stat unix.Statfs_t) string {
FILE: vendor/github.com/shirou/gopsutil/disk/disk_darwin.h
function StartIOCounterFetch (line 17) | int StartIOCounterFetch()
function EndIOCounterFetch (line 29) | void EndIOCounterFetch()
function FetchNextDisk (line 43) | int FetchNextDisk()
function ReadDiskInfo (line 71) | int ReadDiskInfo(DiskInfo *info)
FILE: vendor/github.com/shirou/gopsutil/disk/disk_darwin_386.go
constant MntWait (line 7) | MntWait = 1
constant MfsNameLen (line 8) | MfsNameLen = 15
constant MNameLen (line 9) | MNameLen = 90
constant MFSTYPENAMELEN (line 11) | MFSTYPENAMELEN = 16
constant MAXPATHLEN (line 12) | MAXPATHLEN = 1024
constant MNAMELEN (line 13) | MNAMELEN = MAXPATHLEN
constant SYS_GETFSSTAT64 (line 15) | SYS_GETFSSTAT64 = 347
type Fsid (line 18) | type Fsid struct
type uid_t (line 19) | type uid_t
constant MntReadOnly (line 23) | MntReadOnly = 0x00000001
constant MntSynchronous (line 24) | MntSynchronous = 0x00000002
constant MntNoExec (line 25) | MntNoExec = 0x00000004
constant MntNoSuid (line 26) | MntNoSuid = 0x00000008
constant MntUnion (line 27) | MntUnion = 0x00000020
constant MntAsync (line 28) | MntAsync = 0x00000040
constant MntSuidDir (line 29) | MntSuidDir = 0x00100000
constant MntSoftDep (line 30) | MntSoftDep = 0x00200000
constant MntNoSymFollow (line 31) | MntNoSymFollow = 0x00400000
constant MntGEOMJournal (line 32) | MntGEOMJournal = 0x02000000
constant MntMultilabel (line 33) | MntMultilabel = 0x04000000
constant MntACLs (line 34) | MntACLs = 0x08000000
constant MntNoATime (line 35) | MntNoATime = 0x10000000
constant MntClusterRead (line 36) | MntClusterRead = 0x40000000
constant MntClusterWrite (line 37) | MntClusterWrite = 0x80000000
constant MntNFS4ACLs (line 38) | MntNFS4ACLs = 0x00000010
type Statfs (line 42) | type Statfs struct
FILE: vendor/github.com/shirou/gopsutil/disk/disk_darwin_amd64.go
constant MntWait (line 7) | MntWait = 1
constant MfsNameLen (line 8) | MfsNameLen = 15
constant MNameLen (line 9) | MNameLen = 90
constant MFSTYPENAMELEN (line 11) | MFSTYPENAMELEN = 16
constant MAXPATHLEN (line 12) | MAXPATHLEN = 1024
constant MNAMELEN (line 13) | MNAMELEN = MAXPATHLEN
constant SYS_GETFSSTAT64 (line 15) | SYS_GETFSSTAT64 = 347
type Fsid (line 18) | type Fsid struct
type uid_t (line 19) | type uid_t
constant MntReadOnly (line 23) | MntReadOnly = 0x00000001
constant MntSynchronous (line 24) | MntSynchronous = 0x00000002
constant MntNoExec (line 25) | MntNoExec = 0x00000004
constant MntNoSuid (line 26) | MntNoSuid = 0x00000008
constant MntUnion (line 27) | MntUnion = 0x00000020
constant MntAsync (line 28) | MntAsync = 0x00000040
constant MntSuidDir (line 29) | MntSuidDir = 0x00100000
constant MntSoftDep (line 30) | MntSoftDep = 0x00200000
constant MntNoSymFollow (line 31) | MntNoSymFollow = 0x00400000
constant MntGEOMJournal (line 32) | MntGEOMJournal = 0x02000000
constant MntMultilabel (line 33) | MntMultilabel = 0x04000000
constant MntACLs (line 34) | MntACLs = 0x08000000
constant MntNoATime (line 35) | MntNoATime = 0x10000000
constant MntClusterRead (line 36) | MntClusterRead = 0x40000000
constant MntClusterWrite (line 37) | MntClusterWrite = 0x80000000
constant MntNFS4ACLs (line 38) | MntNFS4ACLs = 0x00000010
type Statfs (line 41) | type Statfs struct
FILE: vendor/github.com/shirou/gopsutil/disk/disk_darwin_arm64.go
constant MntWait (line 7) | MntWait = 1
constant MfsNameLen (line 8) | MfsNameLen = 15
constant MNameLen (line 9) | MNameLen = 90
constant MFSTYPENAMELEN (line 11) | MFSTYPENAMELEN = 16
constant MAXPATHLEN (line 12) | MAXPATHLEN = 1024
constant MNAMELEN (line 13) | MNAMELEN = MAXPATHLEN
constant SYS_GETFSSTAT64 (line 15) | SYS_GETFSSTAT64 = 347
type Fsid (line 18) | type Fsid struct
type uid_t (line 19) | type uid_t
constant MntReadOnly (line 23) | MntReadOnly = 0x00000001
constant MntSynchronous (line 24) | MntSynchronous = 0x00000002
constant MntNoExec (line 25) | MntNoExec = 0x00000004
constant MntNoSuid (line 26) | MntNoSuid = 0x00000008
constant MntUnion (line 27) | MntUnion = 0x00000020
constant MntAsync (line 28) | MntAsync = 0x00000040
constant MntSuidDir (line 29) | MntSuidDir = 0x00100000
constant MntSoftDep (line 30) | MntSoftDep = 0x00200000
constant MntNoSymFollow (line 31) | MntNoSymFollow = 0x00400000
constant MntGEOMJournal (line 32) | MntGEOMJournal = 0x02000000
constant MntMultilabel (line 33) | MntMultilabel = 0x04000000
constant MntACLs (line 34) | MntACLs = 0x08000000
constant MntNoATime (line 35) | MntNoATime = 0x10000000
constant MntClusterRead (line 36) | MntClusterRead = 0x40000000
constant MntClusterWrite (line 37) | MntClusterWrite = 0x80000000
constant MntNFS4ACLs (line 38) | MntNFS4ACLs = 0x00000010
type Statfs (line 41) | type Statfs struct
FILE: vendor/github.com/shirou/gopsutil/disk/disk_darwin_cgo.go
function IOCounters (line 37) | func IOCounters(names ...string) (map[string]IOCountersStat, error) {
function IOCountersWithContext (line 41) | func IOCountersWithContext(ctx context.Context, names ...string) (map[st...
FILE: vendor/github.com/shirou/gopsutil/disk/disk_darwin_nocgo.go
function IOCounters (line 12) | func IOCounters(names ...string) (map[string]IOCountersStat, error) {
function IOCountersWithContext (line 16) | func IOCountersWithContext(ctx context.Context, names ...string) (map[st...
FILE: vendor/github.com/shirou/gopsutil/disk/disk_fallback.go
function IOCounters (line 11) | func IOCounters(names ...string) (map[string]IOCountersStat, error) {
function IOCountersWithContext (line 15) | func IOCountersWithContext(ctx context.Context, names ...string) (map[st...
function Partitions (line 19) | func Partitions(all bool) ([]PartitionStat, error) {
function PartitionsWithContext (line 23) | func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionSt...
function Usage (line 27) | func Usage(path string) (*UsageStat, error) {
function UsageWithContext (line 31) | func UsageWithContext(ctx context.Context, path string) (*UsageStat, err...
FILE: vendor/github.com/shirou/gopsutil/disk/disk_freebsd.go
function Partitions (line 18) | func Partitions(all bool) ([]PartitionStat, error) {
function PartitionsWithContext (line 22) | func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionSt...
function IOCounters (line 105) | func IOCounters(names ...string) (map[string]IOCountersStat, error) {
function IOCountersWithContext (line 109) | func IOCountersWithContext(ctx context.Context, names ...string) (map[st...
method Compute (line 154) | func (b Bintime) Compute() float64 {
function Getfsstat (line 163) | func Getfsstat(buf []Statfs, flags int) (n int, err error) {
function GetfsstatWithContext (line 167) | func GetfsstatWithContext(ctx context.Context, buf []Statfs, flags int) ...
function parseDevstat (line 182) | func parseDevstat(buf []byte) (Devstat, error) {
function getFsType (line 194) | func getFsType(stat unix.Statfs_t) string {
FILE: vendor/github.com/shirou/gopsutil/disk/disk_freebsd_386.go
constant sizeofPtr (line 7) | sizeofPtr = 0x4
constant sizeofShort (line 8) | sizeofShort = 0x2
constant sizeofInt (line 9) | sizeofInt = 0x4
constant sizeofLong (line 10) | sizeofLong = 0x4
constant sizeofLongLong (line 11) | sizeofLongLong = 0x8
constant sizeofLongDouble (line 12) | sizeofLongDouble = 0x8
constant DEVSTAT_NO_DATA (line 14) | DEVSTAT_NO_DATA = 0x00
constant DEVSTAT_READ (line 15) | DEVSTAT_READ = 0x01
constant DEVSTAT_WRITE (line 16) | DEVSTAT_WRITE = 0x02
constant DEVSTAT_FREE (line 17) | DEVSTAT_FREE = 0x03
constant MNT_RDONLY (line 19) | MNT_RDONLY = 0x00000001
constant MNT_SYNCHRONOUS (line 20) | MNT_SYNCHRONOUS = 0x00000002
constant MNT_NOEXEC (line 21) | MNT_NOEXEC = 0x00000004
constant MNT_NOSUID (line 22) | MNT_NOSUID = 0x00000008
constant MNT_UNION (line 23) | MNT_UNION = 0x00000020
constant MNT_ASYNC (line 24) | MNT_ASYNC = 0x00000040
constant MNT_SUIDDIR (line 25) | MNT_SUIDDIR = 0x00100000
constant MNT_SOFTDEP (line 26) | MNT_SOFTDEP = 0x00200000
constant MNT_NOSYMFOLLOW (line 27) | MNT_NOSYMFOLLOW = 0x00400000
constant MNT_GJOURNAL (line 28) | MNT_GJOURNAL = 0x02000000
constant MNT_MULTILABEL (line 29) | MNT_MULTILABEL = 0x04000000
constant MNT_ACLS (line 30) | MNT_ACLS = 0x08000000
constant MNT_NOATIME (line 31) | MNT_NOATIME = 0x10000000
constant MNT_NOCLUSTERR (line 32) | MNT_NOCLUSTERR = 0x40000000
constant MNT_NOCLUSTERW (line 33) | MNT_NOCLUSTERW = 0x80000000
constant MNT_NFS4ACLS (line 34) | MNT_NFS4ACLS = 0x00000010
constant MNT_WAIT (line 36) | MNT_WAIT = 1
constant MNT_NOWAIT (line 37) | MNT_NOWAIT = 2
constant MNT_LAZY (line 38) | MNT_LAZY = 3
constant MNT_SUSPEND (line 39) | MNT_SUSPEND = 4
constant sizeOfDevstat (line 43) | sizeOfDevstat = 0xf0
type _C_short (line 47) | type _C_short
type _C_int (line 48) | type _C_int
type _C_long (line 49) | type _C_long
type _C_long_long (line 50) | type _C_long_long
type _C_long_double (line 51) | type _C_long_double
type Statfs (line 54) | type Statfs struct
type Fsid (line 78) | type Fsid struct
type Devstat (line 82) | type Devstat struct
type Bintime (line 105) | type Bintime struct
type _Ctype_struct___0 (line 110) | type _Ctype_struct___0 struct
FILE: vendor/github.com/shirou/gopsutil/disk/disk_freebsd_amd64.go
constant sizeofPtr (line 7) | sizeofPtr = 0x8
constant sizeofShort (line 8) | sizeofShort = 0x2
constant sizeofInt (line 9) | sizeofInt = 0x4
constant sizeofLong (line 10) | sizeofLong = 0x8
constant sizeofLongLong (line 11) | sizeofLongLong = 0x8
constant sizeofLongDouble (line 12) | sizeofLongDouble = 0x8
constant DEVSTAT_NO_DATA (line 14) | DEVSTAT_NO_DATA = 0x00
constant DEVSTAT_READ (line 15) | DEVSTAT_READ = 0x01
constant DEVSTAT_WRITE (line 16) | DEVSTAT_WRITE = 0x02
constant DEVSTAT_FREE (line 17) | DEVSTAT_FREE = 0x03
constant MNT_RDONLY (line 19) | MNT_RDONLY = 0x00000001
constant MNT_SYNCHRONOUS (line 20) | MNT_SYNCHRONOUS = 0x00000002
constant MNT_NOEXEC (line 21) | MNT_NOEXEC = 0x00000004
constant MNT_NOSUID (line 22) | MNT_NOSUID = 0x00000008
constant MNT_UNION (line 23) | MNT_UNION = 0x00000020
constant MNT_ASYNC (line 24) | MNT_ASYNC = 0x00000040
constant MNT_SUIDDIR (line 25) | MNT_SUIDDIR = 0x00100000
constant MNT_SOFTDEP (line 26) | MNT_SOFTDEP = 0x00200000
constant MNT_NOSYMFOLLOW (line 27) | MNT_NOSYMFOLLOW = 0x00400000
constant MNT_GJOURNAL (line 28) | MNT_GJOURNAL = 0x02000000
constant MNT_MULTILABEL (line 29) | MNT_MULTILABEL = 0x04000000
constant MNT_ACLS (line 30) | MNT_ACLS = 0x08000000
constant MNT_NOATIME (line 31) | MNT_NOATIME = 0x10000000
constant MNT_NOCLUSTERR (line 32) | MNT_NOCLUSTERR = 0x40000000
constant MNT_NOCLUSTERW (line 33) | MNT_NOCLUSTERW = 0x80000000
constant MNT_NFS4ACLS (line 34) | MNT_NFS4ACLS = 0x00000010
constant MNT_WAIT (line 36) | MNT_WAIT = 1
constant MNT_NOWAIT (line 37) | MNT_NOWAIT = 2
constant MNT_LAZY (line 38) | MNT_LAZY = 3
constant MNT_SUSPEND (line 39) | MNT_SUSPEND = 4
constant sizeOfDevstat (line 43) | sizeOfDevstat = 0x120
type _C_short (line 47) | type _C_short
type _C_int (line 48) | type _C_int
type _C_long (line 49) | type _C_long
type _C_long_long (line 50) | type _C_long_long
type _C_long_double (line 51) | type _C_long_double
type Statfs (line 54) | type Statfs struct
type Fsid (line 78) | type Fsid struct
type Devstat (line 82) | type Devstat struct
type Bintime (line 108) | type Bintime struct
type _Ctype_struct___0 (line 113) | type _Ctype_struct___0 struct
FILE: vendor/github.com/shirou/gopsutil/disk/disk_linux.go
constant SectorSize (line 21) | SectorSize = 512
constant ADFS_SUPER_MAGIC (line 25) | ADFS_SUPER_MAGIC = 0xadf5
constant AFFS_SUPER_MAGIC (line 26) | AFFS_SUPER_MAGIC = 0xADFF
constant BDEVFS_MAGIC (line 27) | BDEVFS_MAGIC = 0x62646576
constant BEFS_SUPER_MAGIC (line 28) | BEFS_SUPER_MAGIC = 0x42465331
constant BFS_MAGIC (line 29) | BFS_MAGIC = 0x1BADFACE
constant BINFMTFS_MAGIC (line 30) | BINFMTFS_MAGIC = 0x42494e4d
constant BTRFS_SUPER_MAGIC (line 31) | BTRFS_SUPER_MAGIC = 0x9123683E
constant CGROUP_SUPER_MAGIC (line 32) | CGROUP_SUPER_MAGIC = 0x27e0eb
constant CIFS_MAGIC_NUMBER (line 33) | CIFS_MAGIC_NUMBER = 0xFF534D42
constant CODA_SUPER_MAGIC (line 34) | CODA_SUPER_MAGIC = 0x73757245
constant COH_SUPER_MAGIC (line 35) | COH_SUPER_MAGIC = 0x012FF7B7
constant CRAMFS_MAGIC (line 36) | CRAMFS_MAGIC = 0x28cd3d45
constant DEBUGFS_MAGIC (line 37) | DEBUGFS_MAGIC = 0x64626720
constant DEVFS_SUPER_MAGIC (line 38) | DEVFS_SUPER_MAGIC = 0x1373
constant DEVPTS_SUPER_MAGIC (line 39) | DEVPTS_SUPER_MAGIC = 0x1cd1
constant EFIVARFS_MAGIC (line 40) | EFIVARFS_MAGIC = 0xde5e81e4
constant EFS_SUPER_MAGIC (line 41) | EFS_SUPER_MAGIC = 0x00414A53
constant EXT_SUPER_MAGIC (line 42) | EXT_SUPER_MAGIC = 0x137D
constant EXT2_OLD_SUPER_MAGIC (line 43) | EXT2_OLD_SUPER_MAGIC = 0xEF51
constant EXT2_SUPER_MAGIC (line 44) | EXT2_SUPER_MAGIC = 0xEF53
constant EXT3_SUPER_MAGIC (line 45) | EXT3_SUPER_MAGIC = 0xEF53
constant EXT4_SUPER_MAGIC (line 46) | EXT4_SUPER_MAGIC = 0xEF53
constant FUSE_SUPER_MAGIC (line 47) | FUSE_SUPER_MAGIC = 0x65735546
constant FUTEXFS_SUPER_MAGIC (line 48) | FUTEXFS_SUPER_MAGIC = 0xBAD1DEA
constant HFS_SUPER_MAGIC (line 49) | HFS_SUPER_MAGIC = 0x4244
constant HOSTFS_SUPER_MAGIC (line 50) | HOSTFS_SUPER_MAGIC = 0x00c0ffee
constant HPFS_SUPER_MAGIC (line 51) | HPFS_SUPER_MAGIC = 0xF995E849
constant HUGETLBFS_MAGIC (line 52) | HUGETLBFS_MAGIC = 0x958458f6
constant ISOFS_SUPER_MAGIC (line 53) | ISOFS_SUPER_MAGIC = 0x9660
constant JFFS2_SUPER_MAGIC (line 54) | JFFS2_SUPER_MAGIC = 0x72b6
constant JFS_SUPER_MAGIC (line 55) | JFS_SUPER_MAGIC = 0x3153464a
constant MINIX_SUPER_MAGIC (line 56) | MINIX_SUPER_MAGIC = 0x137F
constant MINIX_SUPER_MAGIC2 (line 57) | MINIX_SUPER_MAGIC2 = 0x138F
constant MINIX2_SUPER_MAGIC (line 58) | MINIX2_SUPER_MAGIC = 0x2468
constant MINIX2_SUPER_MAGIC2 (line 59) | MINIX2_SUPER_MAGIC2 = 0x2478
constant MINIX3_SUPER_MAGIC (line 60) | MINIX3_SUPER_MAGIC = 0x4d5a
constant MQUEUE_MAGIC (line 61) | MQUEUE_MAGIC = 0x19800202
constant MSDOS_SUPER_MAGIC (line 62) | MSDOS_SUPER_MAGIC = 0x4d44
constant NCP_SUPER_MAGIC (line 63) | NCP_SUPER_MAGIC = 0x564c
constant NFS_SUPER_MAGIC (line 64) | NFS_SUPER_MAGIC = 0x6969
constant NILFS_SUPER_MAGIC (line 65) | NILFS_SUPER_MAGIC = 0x3434
constant NTFS_SB_MAGIC (line 66) | NTFS_SB_MAGIC = 0x5346544e
constant OCFS2_SUPER_MAGIC (line 67) | OCFS2_SUPER_MAGIC = 0x7461636f
constant OPENPROM_SUPER_MAGIC (line 68) | OPENPROM_SUPER_MAGIC = 0x9fa1
constant PIPEFS_MAGIC (line 69) | PIPEFS_MAGIC = 0x50495045
constant PROC_SUPER_MAGIC (line 70) | PROC_SUPER_MAGIC = 0x9fa0
constant PSTOREFS_MAGIC (line 71) | PSTOREFS_MAGIC = 0x6165676C
constant QNX4_SUPER_MAGIC (line 72) | QNX4_SUPER_MAGIC = 0x002f
constant QNX6_SUPER_MAGIC (line 73) | QNX6_SUPER_MAGIC = 0x68191122
constant RAMFS_MAGIC (line 74) | RAMFS_MAGIC = 0x858458f6
constant REISERFS_SUPER_MAGIC (line 75) | REISERFS_SUPER_MAGIC = 0x52654973
constant ROMFS_MAGIC (line 76) | ROMFS_MAGIC = 0x7275
constant SELINUX_MAGIC (line 77) | SELINUX_MAGIC = 0xf97cff8c
constant SMACK_MAGIC (line 78) | SMACK_MAGIC = 0x43415d53
constant SMB_SUPER_MAGIC (line 79) | SMB_SUPER_MAGIC = 0x517B
constant SOCKFS_MAGIC (line 80) | SOCKFS_MAGIC = 0x534F434B
constant SQUASHFS_MAGIC (line 81) | SQUASHFS_MAGIC = 0x73717368
constant SYSFS_MAGIC (line 82) | SYSFS_MAGIC = 0x62656572
constant SYSV2_SUPER_MAGIC (line 83) | SYSV2_SUPER_MAGIC = 0x012FF7B6
constant SYSV4_SUPER_MAGIC (line 84) | SYSV4_SUPER_MAGIC = 0x012FF7B5
constant TMPFS_MAGIC (line 85) | TMPFS_MAGIC = 0x01021994
constant UDF_SUPER_MAGIC (line 86) | UDF_SUPER_MAGIC = 0x15013346
constant UFS_MAGIC (line 87) | UFS_MAGIC = 0x00011954
constant USBDEVICE_SUPER_MAGIC (line 88) | USBDEVICE_SUPER_MAGIC = 0x9fa2
constant V9FS_MAGIC (line 89) | V9FS_MAGIC = 0x01021997
constant VXFS_SUPER_MAGIC (line 90) | VXFS_SUPER_MAGIC = 0xa501FCF5
constant XENFS_SUPER_MAGIC (line 91) | XENFS_SUPER_MAGIC = 0xabba1974
constant XENIX_SUPER_MAGIC (line 92) | XENIX_SUPER_MAGIC = 0x012FF7B4
constant XFS_SUPER_MAGIC (line 93) | XFS_SUPER_MAGIC = 0x58465342
constant _XIAFS_SUPER_MAGIC (line 94) | _XIAFS_SUPER_MAGIC = 0x012FD16D
constant AFS_SUPER_MAGIC (line 96) | AFS_SUPER_MAGIC = 0x5346414F
constant AUFS_SUPER_MAGIC (line 97) | AUFS_SUPER_MAGIC = 0x61756673
constant ANON_INODE_FS_SUPER_MAGIC (line 98) | ANON_INODE_FS_SUPER_MAGIC = 0x09041934
constant CEPH_SUPER_MAGIC (line 99) | CEPH_SUPER_MAGIC = 0x00C36400
constant ECRYPTFS_SUPER_MAGIC (line 100) | ECRYPTFS_SUPER_MAGIC = 0xF15F
constant FAT_SUPER_MAGIC (line 101) | FAT_SUPER_MAGIC = 0x4006
constant FHGFS_SUPER_MAGIC (line 102) | FHGFS_SUPER_MAGIC = 0x19830326
constant FUSEBLK_SUPER_MAGIC (line 103) | FUSEBLK_SUPER_MAGIC = 0x65735546
constant FUSECTL_SUPER_MAGIC (line 104) | FUSECTL_SUPER_MAGIC = 0x65735543
constant GFS_SUPER_MAGIC (line 105) | GFS_SUPER_MAGIC = 0x1161970
constant GPFS_SUPER_MAGIC (line 106) | GPFS_SUPER_MAGIC = 0x47504653
constant MTD_INODE_FS_SUPER_MAGIC (line 107) | MTD_INODE_FS_SUPER_MAGIC = 0x11307854
constant INOTIFYFS_SUPER_MAGIC (line 108) | INOTIFYFS_SUPER_MAGIC = 0x2BAD1DEA
constant ISOFS_R_WIN_SUPER_MAGIC (line 109) | ISOFS_R_WIN_SUPER_MAGIC = 0x4004
constant ISOFS_WIN_SUPER_MAGIC (line 110) | ISOFS_WIN_SUPER_MAGIC = 0x4000
constant JFFS_SUPER_MAGIC (line 111) | JFFS_SUPER_MAGIC = 0x07C0
constant KAFS_SUPER_MAGIC (line 112) | KAFS_SUPER_MAGIC = 0x6B414653
constant LUSTRE_SUPER_MAGIC (line 113) | LUSTRE_SUPER_MAGIC = 0x0BD00BD0
constant NFSD_SUPER_MAGIC (line 114) | NFSD_SUPER_MAGIC = 0x6E667364
constant PANFS_SUPER_MAGIC (line 115) | PANFS_SUPER_MAGIC = 0xAAD7AAEA
constant RPC_PIPEFS_SUPER_MAGIC (line 116) | RPC_PIPEFS_SUPER_MAGIC = 0x67596969
constant SECURITYFS_SUPER_MAGIC (line 117) | SECURITYFS_SUPER_MAGIC = 0x73636673
constant UFS_BYTESWAPPED_SUPER_MAGIC (line 118) | UFS_BYTESWAPPED_SUPER_MAGIC = 0x54190100
constant VMHGFS_SUPER_MAGIC (line 119) | VMHGFS_SUPER_MAGIC = 0xBACBACBC
constant VZFS_SUPER_MAGIC (line 120) | VZFS_SUPER_MAGIC = 0x565A4653
constant ZFS_SUPER_MAGIC (line 121) | ZFS_SUPER_MAGIC = 0x2FC12FC1
function Partitions (line 222) | func Partitions(all bool) ([]PartitionStat, error) {
function PartitionsWithContext (line 226) | func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionSt...
function getFileSystems (line 260) | func getFileSystems() ([]string, error) {
function IOCounters (line 282) | func IOCounters(names ...string) (map[string]IOCountersStat, error) {
function IOCountersWithContext (line 286) | func IOCountersWithContext(ctx context.Context, names ...string) (map[st...
function GetDiskSerialNumber (line 384) | func GetDiskSerialNumber(name string) string {
function GetDiskSerialNumberWithContext (line 388) | func GetDiskSerialNumberWithContext(ctx context.Context, name string) st...
function GetLabel (line 424) | func GetLabel(name string) string {
function getFsType (line 440) | func getFsType(stat unix.Statfs_t) string {
FILE: vendor/github.com/shirou/gopsutil/disk/disk_openbsd.go
function Partitions (line 16) | func Partitions(all bool) ([]PartitionStat, error) {
function PartitionsWithContext (line 20) | func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionSt...
function IOCounters (line 73) | func IOCounters(names ...string) (map[string]IOCountersStat, error) {
function IOCountersWithContext (line 77) | func IOCountersWithContext(ctx context.Context, names ...string) (map[st...
function Getfsstat (line 119) | func Getfsstat(buf []Statfs, flags int) (n int, err error) {
function GetfsstatWithContext (line 123) | func GetfsstatWithContext(ctx context.Context, buf []Statfs, flags int) ...
function parseDiskstats (line 138) | func parseDiskstats(buf []byte) (Diskstats, error) {
function Usage (line 150) | func Usage(path string) (*UsageStat, error) {
function UsageWithContext (line 154) | func UsageWithContext(ctx context.Context, path string) (*UsageStat, err...
function getFsType (line 179) | func getFsType(stat unix.Statfs_t) string {
FILE: vendor/github.com/shirou/gopsutil/disk/disk_openbsd_amd64.go
constant sizeofPtr (line 7) | sizeofPtr = 0x8
constant sizeofShort (line 8) | sizeofShort = 0x2
constant sizeofInt (line 9) | sizeofInt = 0x4
constant sizeofLong (line 10) | sizeofLong = 0x8
constant sizeofLongLong (line 11) | sizeofLongLong = 0x8
constant sizeofLongDouble (line 12) | sizeofLongDouble = 0x8
constant DEVSTAT_NO_DATA (line 14) | DEVSTAT_NO_DATA = 0x00
constant DEVSTAT_READ (line 15) | DEVSTAT_READ = 0x01
constant DEVSTAT_WRITE (line 16) | DEVSTAT_WRITE = 0x02
constant DEVSTAT_FREE (line 17) | DEVSTAT_FREE = 0x03
constant MNT_RDONLY (line 19) | MNT_RDONLY = 0x00000001
constant MNT_SYNCHRONOUS (line 20) | MNT_SYNCHRONOUS = 0x00000002
constant MNT_NOEXEC (line 21) | MNT_NOEXEC = 0x00000004
constant MNT_NOSUID (line 22) | MNT_NOSUID = 0x00000008
constant MNT_NODEV (line 23) | MNT_NODEV = 0x00000010
constant MNT_ASYNC (line 24) | MNT_ASYNC = 0x00000040
constant MNT_WAIT (line 26) | MNT_WAIT = 1
constant MNT_NOWAIT (line 27) | MNT_NOWAIT = 2
constant MNT_LAZY (line 28) | MNT_LAZY = 3
constant sizeOfDiskstats (line 32) | sizeOfDiskstats = 0x70
type _C_short (line 36) | type _C_short
type _C_int (line 37) | type _C_int
type _C_long (line 38) | type _C_long
type _C_long_long (line 39) | type _C_long_long
type _C_long_double (line 40) | type _C_long_double
type Statfs (line 43) | type Statfs struct
type Diskstats (line 69) | type Diskstats struct
type Fsid (line 82) | type Fsid struct
type Timeval (line 85) | type Timeval struct
type Diskstat (line 90) | type Diskstat struct
type Bintime (line 91) | type Bintime struct
FILE: vendor/github.com/shirou/gopsutil/disk/disk_solaris.go
constant _DEFAULT_NUM_MOUNTS (line 20) | _DEFAULT_NUM_MOUNTS = 32
constant _MNTTAB (line 23) | _MNTTAB = "/etc/mnttab"
function Partitions (line 41) | func Partitions(all bool) ([]PartitionStat, error) {
function PartitionsWithContext (line 45) | func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionSt...
function IOCounters (line 86) | func IOCounters(names ...string) (map[string]IOCountersStat, error) {
function IOCountersWithContext (line 90) | func IOCountersWithContext(ctx context.Context, names ...string) (map[st...
function Usage (line 94) | func Usage(path string) (*UsageStat, error) {
function UsageWithContext (line 98) | func UsageWithContext(ctx context.Context, path string) (*UsageStat, err...
FILE: vendor/github.com/shirou/gopsutil/disk/disk_unix.go
function Usage (line 15) | func Usage(path string) (*UsageStat, error) {
function UsageWithContext (line 19) | func UsageWithContext(ctx context.Context, path string) (*UsageStat, err...
function unescapeFstab (line 62) | func unescapeFstab(path string) string {
FILE: vendor/github.com/shirou/gopsutil/disk/disk_windows.go
type Win32_PerfFormattedData (line 26) | type Win32_PerfFormattedData struct
constant WaitMSec (line 36) | WaitMSec = 500
function Usage (line 38) | func Usage(path string) (*UsageStat, error) {
function UsageWithContext (line 42) | func UsageWithContext(ctx context.Context, path string) (*UsageStat, err...
function Partitions (line 70) | func Partitions(all bool) ([]PartitionStat, error) {
function PartitionsWithContext (line 74) | func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionSt...
function IOCounters (line 136) | func IOCounters(names ...string) (map[string]IOCountersStat, error) {
function IOCountersWithContext (line 140) | func IOCountersWithContext(ctx context.Context, names ...string) (map[st...
FILE: vendor/github.com/shirou/gopsutil/disk/types_freebsd.go
constant sizeofPtr (line 34) | sizeofPtr = C.sizeofPtr
constant sizeofShort (line 35) | sizeofShort = C.sizeof_short
constant sizeofInt (line 36) | sizeofInt = C.sizeof_int
constant sizeofLong (line 37) | sizeofLong = C.sizeof_long
constant sizeofLongLong (line 38) | sizeofLongLong = C.sizeof_longlong
constant sizeofLongDouble (line 39) | sizeofLongDouble = C.sizeof_longlong
constant DEVSTAT_NO_DATA (line 41) | DEVSTAT_NO_DATA = 0x00
constant DEVSTAT_READ (line 42) | DEVSTAT_READ = 0x01
constant DEVSTAT_WRITE (line 43) | DEVSTAT_WRITE = 0x02
constant DEVSTAT_FREE (line 44) | DEVSTAT_FREE = 0x03
constant MNT_RDONLY (line 47) | MNT_RDONLY = 0x00000001
constant MNT_SYNCHRONOUS (line 48) | MNT_SYNCHRONOUS = 0x00000002
constant MNT_NOEXEC (line 49) | MNT_NOEXEC = 0x00000004
constant MNT_NOSUID (line 50) | MNT_NOSUID = 0x00000008
constant MNT_UNION (line 51) | MNT_UNION = 0x00000020
constant MNT_ASYNC (line 52) | MNT_ASYNC = 0x00000040
constant MNT_SUIDDIR (line 53) | MNT_SUIDDIR = 0x00100000
constant MNT_SOFTDEP (line 54) | MNT_SOFTDEP = 0x00200000
constant MNT_NOSYMFOLLOW (line 55) | MNT_NOSYMFOLLOW = 0x00400000
constant MNT_GJOURNAL (line 56) | MNT_GJOURNAL = 0x02000000
constant MNT_MULTILABEL (line 57) | MNT_MULTILABEL = 0x04000000
constant MNT_ACLS (line 58) | MNT_ACLS = 0x08000000
constant MNT_NOATIME (line 59) | MNT_NOATIME = 0x10000000
constant MNT_NOCLUSTERR (line 60) | MNT_NOCLUSTERR = 0x40000000
constant MNT_NOCLUSTERW (line 61) | MNT_NOCLUSTERW = 0x80000000
constant MNT_NFS4ACLS (line 62) | MNT_NFS4ACLS = 0x00000010
constant MNT_WAIT (line 64) | MNT_WAIT = 1
constant MNT_NOWAIT (line 65) | MNT_NOWAIT = 2
constant MNT_LAZY (line 66) | MNT_LAZY = 3
constant MNT_SUSPEND (line 67) | MNT_SUSPEND = 4
constant sizeOfDevstat (line 71) | sizeOfDevstat = C.sizeof_struct_devstat
type _C_short (line 77) | type _C_short
type _C_int (line 78) | type _C_int
type _C_long (line 79) | type _C_long
type _C_long_long (line 80) | type _C_long_long
type _C_long_double (line 81) | type _C_long_double
type Statfs (line 84) | type Statfs
type Fsid (line 85) | type Fsid
type Devstat (line 87) | type Devstat
type Bintime (line 88) | type Bintime
FILE: vendor/github.com/shirou/gopsutil/disk/types_openbsd.go
constant sizeofPtr (line 25) | sizeofPtr = C.sizeofPtr
constant sizeofShort (line 26) | sizeofShort = C.sizeof_short
constant sizeofInt (line 27) | sizeofInt = C.sizeof_int
constant sizeofLong (line 28) | sizeofLong = C.sizeof_long
constant sizeofLongLong (line 29) | sizeofLongLong = C.sizeof_longlong
constant sizeofLongDouble (line 30) | sizeofLongDouble = C.sizeof_longlong
constant DEVSTAT_NO_DATA (line 32) | DEVSTAT_NO_DATA = 0x00
constant DEVSTAT_READ (line 33) | DEVSTAT_READ = 0x01
constant DEVSTAT_WRITE (line 34) | DEVSTAT_WRITE = 0x02
constant DEVSTAT_FREE (line 35) | DEVSTAT_FREE = 0x03
constant MNT_RDONLY (line 38) | MNT_RDONLY = 0x00000001
constant MNT_SYNCHRONOUS (line 39) | MNT_SYNCHRONOUS = 0x00000002
constant MNT_NOEXEC (line 40) | MNT_NOEXEC = 0x00000004
constant MNT_NOSUID (line 41) | MNT_NOSUID = 0x00000008
constant MNT_NODEV (line 42) | MNT_NODEV = 0x00000010
constant MNT_ASYNC (line 43) | MNT_ASYNC = 0x00000040
constant MNT_WAIT (line 45) | MNT_WAIT = 1
constant MNT_NOWAIT (line 46) | MNT_NOWAIT = 2
constant MNT_LAZY (line 47) | MNT_LAZY = 3
constant sizeOfDiskstats (line 51) | sizeOfDiskstats = C.sizeof_struct_diskstats
type _C_short (line 57) | type _C_short
type _C_int (line 58) | type _C_int
type _C_long (line 59) | type _C_long
type _C_long_long (line 60) | type _C_long_long
type _C_long_double (line 61) | type _C_long_double
type Statfs (line 64) | type Statfs
type Diskstats (line 65) | type Diskstats
type Fsid (line 66) | type Fsid
type Timeval (line 67) | type Timeval
type Diskstat (line 69) | type Diskstat
type Bintime (line 70) | type Bintime
FILE: vendor/github.com/shirou/gopsutil/host/host.go
type InfoStat (line 13) | type InfoStat struct
method String (line 40) | func (h InfoStat) String() string {
type UserStat (line 28) | type UserStat struct
method String (line 45) | func (u UserStat) String() string {
type TemperatureStat (line 35) | type TemperatureStat struct
method String (line 50) | func (t TemperatureStat) String() string {
FILE: vendor/github.com/shirou/gopsutil/host/host_darwin.go
constant USER_PROCESS (line 24) | USER_PROCESS = 7
function Info (line 26) | func Info() (*InfoStat, error) {
function InfoWithContext (line 30) | func InfoWithContext(ctx context.Context) (*InfoStat, error) {
function BootTime (line 81) | func BootTime() (uint64, error) {
function BootTimeWithContext (line 85) | func BootTimeWithContext(ctx context.Context) (uint64, error) {
function uptime (line 106) | func uptime(boot uint64) uint64 {
function Uptime (line 110) | func Uptime() (uint64, error) {
function UptimeWithContext (line 114) | func UptimeWithContext(ctx context.Context) (uint64, error) {
function Users (line 122) | func Users() ([]UserStat, error) {
function UsersWithContext (line 126) | func UsersWithContext(ctx context.Context) ([]UserStat, error) {
function PlatformInformation (line 170) | func PlatformInformation() (string, string, string, error) {
function PlatformInformationWithContext (line 174) | func PlatformInformationWithContext(ctx context.Context) (string, string...
function Virtualization (line 201) | func Virtualization() (string, string, error) {
function VirtualizationWithContext (line 205) | func VirtualizationWithContext(ctx context.Context) (string, string, err...
function KernelVersion (line 209) | func KernelVersion() (string, error) {
function KernelVersionWithContext (line 213) | func KernelVersionWithContext(ctx context.Context) (string, error) {
function SensorsTemperatures (line 226) | func SensorsTemperatures() ([]TemperatureStat, error) {
function SensorsTemperaturesWithContext (line 230) | func SensorsTemperaturesWithContext(ctx context.Context) ([]TemperatureS...
FILE: vendor/github.com/shirou/gopsutil/host/host_darwin_386.go
type Utmpx (line 6) | type Utmpx struct
type Timeval (line 17) | type Timeval struct
FILE: vendor/github.com/shirou/gopsutil/host/host_darwin_amd64.go
type Utmpx (line 6) | type Utmpx struct
type Timeval (line 17) | type Timeval struct
FILE: vendor/github.com/shirou/gopsutil/host/host_fallback.go
function Info (line 11) | func Info() (*InfoStat, error) {
function InfoWithContext (line 15) | func InfoWithContext(ctx context.Context) (*InfoStat, error) {
function BootTime (line 19) | func BootTime() (uint64, error) {
function BootTimeWithContext (line 23) | func BootTimeWithContext(ctx context.Context) (uint64, error) {
function Uptime (line 27) | func Uptime() (uint64, error) {
function UptimeWithContext (line 31) | func UptimeWithContext(ctx context.Context) (uint64, error) {
function Users (line 35) | func Users() ([]UserStat, error) {
function UsersWithContext (line 39) | func UsersWithContext(ctx context.Context) ([]UserStat, error) {
function Virtualization (line 43) | func Virtualization() (string, string, error) {
function VirtualizationWithContext (line 47) | func VirtualizationWithContext(ctx context.Context) (string, string, err...
function KernelVersion (line 51) | func KernelVersion() (string, error) {
function KernelVersionWithContext (line 55) | func KernelVersionWithContext(ctx context.Context) (string, error) {
function PlatformInformation (line 59) | func PlatformInformation() (string, string, string, error) {
function PlatformInformationWithContext (line 63) | func PlatformInformationWithContext(ctx context.Context) (string, string...
FILE: vendor/github.com/shirou/gopsutil/host/host_freebsd.go
constant UTNameSize (line 24) | UTNameSize = 16
constant UTLineSize (line 25) | UTLineSize = 8
constant UTHostSize (line 26) | UTHostSize = 16
function Info (line 29) | func Info() (*InfoStat, error) {
function InfoWithContext (line 33) | func InfoWithContext(ctx context.Context) (*InfoStat, error) {
function BootTime (line 80) | func BootTime() (uint64, error) {
function BootTimeWithContext (line 84) | func BootTimeWithContext(ctx context.Context) (uint64, error) {
function uptime (line 100) | func uptime(boot uint64) uint64 {
function Uptime (line 104) | func Uptime() (uint64, error) {
function UptimeWithContext (line 108) | func UptimeWithContext(ctx context.Context) (uint64, error) {
function Users (line 116) | func Users() ([]UserStat, error) {
function UsersWithContext (line 120) | func UsersWithContext(ctx context.Context) ([]UserStat, error) {
function PlatformInformation (line 165) | func PlatformInformation() (string, string, string, error) {
function PlatformInformationWithContext (line 169) | func PlatformInformationWithContext(ctx context.Context) (string, string...
function Virtualization (line 183) | func Virtualization() (string, string, error) {
function VirtualizationWithContext (line 187) | func VirtualizationWithContext(ctx context.Context) (string, string, err...
function getUsersFromUtmp (line 192) | func getUsersFromUtmp(utmpfile string) ([]UserStat, error) {
function SensorsTemperatures (line 230) | func SensorsTemperatures() ([]TemperatureStat, error) {
function SensorsTemperaturesWithContext (line 234) | func SensorsTemperaturesWithContext(ctx context.Context) ([]TemperatureS...
function KernelVersion (line 238) | func KernelVersion() (string, error) {
function KernelVersionWithContext (line 242) | func KernelVersionWithContext(ctx context.Context) (string, error) {
FILE: vendor/github.com/shirou/gopsutil/host/host_freebsd_386.go
constant sizeofPtr (line 7) | sizeofPtr = 0x4
constant sizeofShort (line 8) | sizeofShort = 0x2
constant sizeofInt (line 9) | sizeofInt = 0x4
constant sizeofLong (line 10) | sizeofLong = 0x4
constant sizeofLongLong (line 11) | sizeofLongLong = 0x8
constant sizeOfUtmpx (line 12) | sizeOfUtmpx = 197
type _C_short (line 16) | type _C_short
type _C_int (line 17) | type _C_int
type _C_long (line 18) | type _C_long
type _C_long_long (line 19) | type _C_long_long
type Utmp (line 22) | type Utmp struct
type Utmpx (line 29) | type Utmpx struct
type Timeval (line 40) | type Timeval struct
FILE: vendor/github.com/shirou/gopsutil/host/host_freebsd_amd64.go
constant sizeofPtr (line 7) | sizeofPtr = 0x8
constant sizeofShort (line 8) | sizeofShort = 0x2
constant sizeofInt (line 9) | sizeofInt = 0x4
constant sizeofLong (line 10) | sizeofLong = 0x8
constant sizeofLongLong (line 11) | sizeofLongLong = 0x8
constant sizeOfUtmpx (line 12) | sizeOfUtmpx = 197
type _C_short (line 16) | type _C_short
type _C_int (line 17) | type _C_int
type _C_long (line 18) | type _C_long
type _C_long_long (line 19) | type _C_long_long
type Utmp (line 22) | type Utmp struct
type Utmpx (line 29) | type Utmpx struct
type Timeval (line 41) | type Timeval struct
FILE: vendor/github.com/shirou/gopsutil/host/host_freebsd_arm.go
constant sizeofPtr (line 7) | sizeofPtr = 0x4
constant sizeofShort (line 8) | sizeofShort = 0x2
constant sizeofInt (line 9) | sizeofInt = 0x4
constant sizeofLong (line 10) | sizeofLong = 0x8
constant sizeofLongLong (line 11) | sizeofLongLong = 0x8
constant sizeOfUtmpx (line 12) | sizeOfUtmpx = 197
type _C_short (line 16) | type _C_short
type _C_int (line 17) | type _C_int
type _C_long (line 18) | type _C_long
type _C_long_long (line 19) | type _C_long_long
type Utmp (line 22) | type Utmp struct
type Utmpx (line 29) | type Utmpx struct
type Timeval (line 41) | type Timeval struct
FILE: vendor/github.com/shirou/gopsutil/host/host_linux.go
type LSB (line 24) | type LSB struct
constant USER_PROCESS (line 32) | USER_PROCESS = 7
function Info (line 34) | func Info() (*InfoStat, error) {
function InfoWithContext (line 38) | func InfoWithContext(ctx context.Context) (*InfoStat, error) {
function BootTime (line 111) | func BootTime() (uint64, error) {
function BootTimeWithContext (line 115) | func BootTimeWithContext(ctx context.Context) (uint64, error) {
function uptime (line 174) | func uptime(boot uint64) uint64 {
function Uptime (line 178) | func Uptime() (uint64, error) {
function UptimeWithContext (line 182) | func UptimeWithContext(ctx context.Context) (uint64, error) {
function Users (line 190) | func Users() ([]UserStat, error) {
function UsersWithContext (line 194) | func UsersWithContext(ctx context.Context) ([]UserStat, error) {
function getOSRelease (line 237) | func getOSRelease() (platform string, version string, err error) {
function getLSB (line 257) | func getLSB() (*LSB, error) {
function PlatformInformation (line 311) | func PlatformInformation() (platform string, family string, version stri...
function PlatformInformationWithContext (line 315) | func PlatformInformationWithContext(ctx context.Context) (platform strin...
function KernelVersion (line 443) | func KernelVersion() (version string, err error) {
function KernelVersionWithContext (line 447) | func KernelVersionWithContext(ctx context.Context) (version string, err ...
function getSlackwareVersion (line 463) | func getSlackwareVersion(contents []string) string {
function getRedhatishVersion (line 469) | func getRedhatishVersion(contents []string) string {
function getRedhatishPlatform (line 481) | func getRedhatishPlatform(contents []string) string {
function getSuseVersion (line 492) | func getSuseVersion(contents []string) string {
function getSusePlatform (line 504) | func getSusePlatform(contents []string) string {
function Virtualization (line 512) | func Virtualization() (string, string, error) {
function VirtualizationWithContext (line 516) | func VirtualizationWithContext(ctx context.Context) (string, string, err...
function SensorsTemperatures (line 619) | func SensorsTemperatures() ([]TemperatureStat, error) {
function SensorsTemperaturesWithContext (line 623) | func SensorsTemperaturesWithContext(ctx context.Context) ([]TemperatureS...
FILE: vendor/github.com/shirou/gopsutil/host/host_linux_386.go
constant sizeofPtr (line 9) | sizeofPtr = 0x4
constant sizeofShort (line 10) | sizeofShort = 0x2
constant sizeofInt (line 11) | sizeofInt = 0x4
constant sizeofLong (line 12) | sizeofLong = 0x4
constant sizeofLongLong (line 13) | sizeofLongLong = 0x8
constant sizeOfUtmp (line 14) | sizeOfUtmp = 0x180
type _C_short (line 18) | type _C_short
type _C_int (line 19) | type _C_int
type _C_long (line 20) | type _C_long
type _C_long_long (line 21) | type _C_long_long
type utmp (line 24) | type utmp struct
type exit_status (line 38) | type exit_status struct
type UtTv (line 42) | type UtTv struct
FILE: vendor/github.com/shirou/gopsutil/host/host_linux_amd64.go
constant sizeofPtr (line 7) | sizeofPtr = 0x8
constant sizeofShort (line 8) | sizeofShort = 0x2
constant sizeofInt (line 9) | sizeofInt = 0x4
constant sizeofLong (line 10) | sizeofLong = 0x8
constant sizeofLongLong (line 11) | sizeofLongLong = 0x8
constant sizeOfUtmp (line 12) | sizeOfUtmp = 0x180
type _C_short (line 16) | type _C_short
type _C_int (line 17) | type _C_int
type _C_long (line 18) | type _C_long
type _C_long_long (line 19) | type _C_long_long
type utmp (line 22) | type utmp struct
type exit_status (line 36) | type exit_status struct
type timeval (line 40) | type timeval struct
type _Ctype_struct___0 (line 45) | type _Ctype_struct___0 struct
FILE: vendor/github.com/shirou/gopsutil/host/host_linux_arm.go
constant sizeofPtr (line 7) | sizeofPtr = 0x4
constant sizeofShort (line 8) | sizeofShort = 0x2
constant sizeofInt (line 9) | sizeofInt = 0x4
constant sizeofLong (line 10) | sizeofLong = 0x4
constant sizeofLongLong (line 11) | sizeofLongLong = 0x8
constant sizeOfUtmp (line 12) | sizeOfUtmp = 0x180
type _C_short (line 16) | type _C_short
type _C_int (line 17) | type _C_int
type _C_long (line 18) | type _C_long
type _C_long_long (line 19) | type _C_long_long
type utmp (line 22) | type utmp struct
type exit_status (line 36) | type exit_status struct
type timeval (line 40) | type timeval struct
FILE: vendor/github.com/shirou/gopsutil/host/host_linux_arm64.go
constant sizeofPtr (line 7) | sizeofPtr = 0x8
constant sizeofShort (line 8) | sizeofShort = 0x2
constant sizeofInt (line 9) | sizeofInt = 0x4
constant sizeofLong (line 10) | sizeofLong = 0x8
constant sizeofLongLong (line 11) | sizeofLongLong = 0x8
constant sizeOfUtmp (line 12) | sizeOfUtmp = 0x180
type _C_short (line 16) | type _C_short
type _C_int (line 17) | type _C_int
type _C_long (line 18) | type _C_long
type _C_long_long (line 19) | type _C_long_long
type utmp (line 22) | type utmp struct
type exit_status (line 36) | type exit_status struct
type timeval (line 40) | type timeval struct
FILE: vendor/github.com/shirou/gopsutil/host/host_linux_mips.go
constant sizeofPtr (line 7) | sizeofPtr = 0x4
constant sizeofShort (line 8) | sizeofShort = 0x2
constant sizeofInt (line 9) | sizeofInt = 0x4
constant sizeofLong (line 10) | sizeofLong = 0x4
constant sizeofLongLong (line 11) | sizeofLongLong = 0x8
constant sizeOfUtmp (line 12) | sizeOfUtmp = 0x180
type _C_short (line 16) | type _C_short
type _C_int (line 17) | type _C_int
type _C_long (line 18) | type _C_long
type _C_long_long (line 19) | type _C_long_long
type utmp (line 22) | type utmp struct
type exit_status (line 36) | type exit_status struct
type timeval (line 40) | type timeval struct
FILE: vendor/github.com/shirou/gopsutil/host/host_linux_mips64.go
constant sizeofPtr (line 7) | sizeofPtr = 0x4
constant sizeofShort (line 8) | sizeofShort = 0x2
constant sizeofInt (line 9) | sizeofInt = 0x4
constant sizeofLong (line 10) | sizeofLong = 0x4
constant sizeofLongLong (line 11) | sizeofLongLong = 0x8
constant sizeOfUtmp (line 12) | sizeOfUtmp = 0x180
type _C_short (line 16) | type _C_short
type _C_int (line 17) | type _C_int
type _C_long (line 18) | type _C_long
type _C_long_long (line 19) | type _C_long_long
type utmp (line 22) | type utmp struct
type exit_status (line 36) | type exit_status struct
type timeval (line 40) | type timeval struct
FILE: vendor/github.com/shirou/gopsutil/host/host_linux_mips64le.go
constant sizeofPtr (line 7) | sizeofPtr = 0x4
constant sizeofShort (line 8) | sizeofShort = 0x2
constant sizeofInt (line 9) | sizeofInt = 0x4
constant sizeofLong (line 10) | sizeofLong = 0x4
constant sizeofLongLong (line 11) | sizeofLongLong = 0x8
constant sizeOfUtmp (line 12) | sizeOfUtmp = 0x180
type _C_short (line 16) | type _C_short
type _C_int (line 17) | type _C_int
type _C_long (line 18) | type _C_long
type _C_long_long (line 19) | type _C_long_long
type utmp (line 22) | type utmp struct
type exit_status (line 36) | type exit_status struct
type timeval (line 40) | type timeval struct
FILE: vendor/github.com/shirou/gopsutil/host/host_linux_mipsle.go
constant sizeofPtr (line 7) | sizeofPtr = 0x4
constant sizeofShort (line 8) | sizeofShort = 0x2
constant sizeofInt (line 9) | sizeofInt = 0x4
constant sizeofLong (line 10) | sizeofLong = 0x4
constant sizeofLongLong (line 11) | sizeofLongLong = 0x8
constant sizeOfUtmp (line 12) | sizeOfUtmp = 0x180
type _C_short (line 16) | type _C_short
type _C_int (line 17) | type _C_int
type _C_long (line 18) | type _C_long
type _C_long_long (line 19) | type _C_long_long
type utmp (line 22) | type utmp struct
type exit_status (line 36) | type exit_status struct
type timeval (line 40) | type timeval struct
FILE: vendor/github.com/shirou/gopsutil/host/host_linux_ppc64le.go
constant sizeofPtr (line 9) | sizeofPtr = 0x8
constant sizeofShort (line 10) | sizeofShort = 0x2
constant sizeofInt (line 11) | sizeofInt = 0x4
constant sizeofLong (line 12) | sizeofLong = 0x8
constant sizeofLongLong (line 13) | sizeofLongLong = 0x8
constant sizeOfUtmp (line 14) | sizeOfUtmp = 0x180
type _C_short (line 18) | type _C_short
type _C_int (line 19) | type _C_int
type _C_long (line 20) | type _C_long
type _C_long_long (line 21) | type _C_long_long
type utmp (line 24) | type utmp struct
type exit_status (line 38) | type exit_status struct
type timeval (line 42) | type timeval struct
FILE: vendor/github.com/shirou/gopsutil/host/host_linux_s390x.go
constant sizeofPtr (line 9) | sizeofPtr = 0x8
constant sizeofShort (line 10) | sizeofShort = 0x2
constant sizeofInt (line 11) | sizeofInt = 0x4
constant sizeofLong (line 12) | sizeofLong = 0x8
constant sizeofLongLong (line 13) | sizeofLongLong = 0x8
constant sizeOfUtmp (line 14) | sizeOfUtmp = 0x180
type _C_short (line 18) | type _C_short
type _C_int (line 19) | type _C_int
type _C_long (line 20) | type _C_long
type _C_long_long (line 21) | type _C_long_long
type utmp (line 24) | type utmp struct
type exit_status (line 38) | type exit_status struct
type timeval (line 42) | type timeval struct
FILE: vendor/github.com/shirou/gopsutil/host/host_openbsd.go
constant UTNameSize (line 23) | UTNameSize = 32
constant UTLineSize (line 24) | UTLineSize = 8
constant UTHostSize (line 25) | UTHostSize = 16
function Info (line 28) | func Info() (*InfoStat, error) {
function InfoWithContext (line 32) | func InfoWithContext(ctx context.Context) (*InfoStat, error) {
function BootTime (line 69) | func BootTime() (uint64, error) {
function BootTimeWithContext (line 73) | func BootTimeWithContext(ctx context.Context) (uint64, error) {
function uptime (line 87) | func uptime(boot uint64) uint64 {
function Uptime (line 91) | func Uptime() (uint64, error) {
function UptimeWithContext (line 95) | func UptimeWithContext(ctx context.Context) (uint64, error) {
function PlatformInformation (line 103) | func PlatformInformation() (string, string, string, error) {
function PlatformInformationWithContext (line 107) | func PlatformInformationWithContext(ctx context.Context) (string, string...
function Virtualization (line 129) | func Virtualization() (string, string, error) {
function VirtualizationWithContext (line 133) | func VirtualizationWithContext(ctx context.Context) (string, string, err...
function Users (line 137) | func Users() ([]UserStat, error) {
function UsersWithContext (line 141) | func UsersWithContext(ctx context.Context) ([]UserStat, error) {
function SensorsTemperatures (line 180) | func SensorsTemperatures() ([]TemperatureStat, error) {
function SensorsTemperaturesWithContext (line 184) | func SensorsTemperaturesWithContext(ctx context.Context) ([]TemperatureS...
function KernelVersion (line 188) | func KernelVersion() (string, error) {
function KernelVersionWithContext (line 192) | func KernelVersionWithContext(ctx context.Context) (string, error) {
FILE: vendor/github.com/shirou/gopsutil/host/host_openbsd_amd64.go
constant sizeofPtr (line 7) | sizeofPtr = 0x8
constant sizeofShort (line 8) | sizeofShort = 0x2
constant sizeofInt (line 9) | sizeofInt = 0x4
constant sizeofLong (line 10) | sizeofLong = 0x8
constant sizeofLongLong (line 11) | sizeofLongLong = 0x8
constant sizeOfUtmp (line 12) | sizeOfUtmp = 0x130
type _C_short (line 16) | type _C_short
type _C_int (line 17) | type _C_int
type _C_long (line 18) | type _C_long
type _C_long_long (line 19) | type _C_long_long
type Utmp (line 22) | type Utmp struct
type Timeval (line 28) | type Timeval struct
FILE: vendor/github.com/shirou/gopsutil/host/host_solaris.go
function Info (line 20) | func Info() (*InfoStat, error) {
function InfoWithContext (line 24) | func InfoWithContext(ctx context.Context) (*InfoStat, error) {
function BootTime (line 149) | func BootTime() (uint64, error) {
function BootTimeWithContext (line 153) | func BootTimeWithContext(ctx context.Context) (uint64, error) {
function Uptime (line 172) | func Uptime() (uint64, error) {
function UptimeWithContext (line 176) | func UptimeWithContext(ctx context.Context) (uint64, error) {
function uptimeSince (line 184) | func uptimeSince(since uint64) uint64 {
function Users (line 188) | func Users() ([]UserStat, error) {
function UsersWithContext (line 192) | func UsersWithContext(ctx context.Context) ([]UserStat, error) {
function SensorsTemperatures (line 196) | func SensorsTemperatures() ([]TemperatureStat, error) {
function SensorsTemperaturesWithContext (line 200) | func SensorsTemperaturesWithContext(ctx context.Context) ([]TemperatureS...
function Virtualization (line 204) | func Virtualization() (string, string, error) {
function VirtualizationWithContext (line 208) | func VirtualizationWithContext(ctx context.Context) (string, string, err...
function KernelVersion (line 212) | func KernelVersion() (string, error) {
function KernelVersionWithContext (line 216) | func KernelVersionWithContext(ctx context.Context) (string, error) {
function PlatformInformation (line 235) | func PlatformInformation() (platform string, family string, version stri...
function PlatformInformationWithContext (line 239) | func PlatformInformationWithContext(ctx context.Context) (platform strin...
FILE: vendor/github.com/shirou/gopsutil/host/host_windows.go
type osVersionInfoExW (line 31) | type osVersionInfoExW struct
type msAcpi_ThermalZoneTemperature (line 45) | type msAcpi_ThermalZoneTemperature struct
function Info (line 52) | func Info() (*InfoStat, error) {
function InfoWithContext (line 56) | func InfoWithContext(ctx context.Context) (*InfoStat, error) {
function getMachineGuid (line 104) | func getMachineGuid() (string, error) {
function Uptime (line 134) | func Uptime() (uint64, error) {
function UptimeWithContext (line 138) | func UptimeWithContext(ctx context.Context) (uint64, error) {
function bootTimeFromUptime (line 151) | func bootTimeFromUptime(up uint64) uint64 {
function BootTime (line 158) | func BootTime() (uint64, error) {
function BootTimeWithContext (line 162) | func BootTimeWithContext(ctx context.Context) (uint64, error) {
function PlatformInformation (line 176) | func PlatformInformation() (platform string, family string, version stri...
function PlatformInformationWithContext (line 180) | func PlatformInformationWithContext(ctx context.Context) (platform strin...
function Users (line 239) | func Users() ([]UserStat, error) {
function UsersWithContext (line 243) | func UsersWithContext(ctx context.Context) ([]UserStat, error) {
function SensorsTemperatures (line 249) | func SensorsTemperatures() ([]TemperatureStat, error) {
function SensorsTemperaturesWithContext (line 253) | func SensorsTemperaturesWithContext(ctx context.Context) ([]TemperatureS...
function kelvinToCelsius (line 272) | func kelvinToCelsius(temp uint32, n int) float64 {
function Virtualization (line 280) | func Virtualization() (string, string, error) {
function VirtualizationWithContext (line 284) | func VirtualizationWithContext(ctx context.Context) (string, string, err...
function KernelVersion (line 288) | func KernelVersion() (string, error) {
function KernelVersionWithContext (line 292) | func KernelVersionWithContext(ctx context.Context) (string, error) {
FILE: vendor/github.com/shirou/gopsutil/host/types_darwin.go
type Utmpx (line 16) | type Utmpx
type Timeval (line 17) | type Timeval
FILE: vendor/github.com/shirou/gopsutil/host/types_freebsd.go
constant sizeofPtr (line 25) | sizeofPtr = C.sizeofPtr
constant sizeofShort (line 26) | sizeofShort = C.sizeof_short
constant sizeofInt (line 27) | sizeofInt = C.sizeof_int
constant sizeofLong (line 28) | sizeofLong = C.sizeof_long
constant sizeofLongLong (line 29) | sizeofLongLong = C.sizeof_longlong
constant sizeOfUtmpx (line 30) | sizeOfUtmpx = C.sizeof_struct_utmpx
type _C_short (line 36) | type _C_short
type _C_int (line 37) | type _C_int
type _C_long (line 38) | type _C_long
type _C_long_long (line 39) | type _C_long_long
type Utmp (line 42) | type Utmp
type Utmpx (line 43) | type Utmpx
type Timeval (line 44) | type Timeval
FILE: vendor/github.com/shirou/gopsutil/host/types_linux.go
constant sizeofPtr (line 23) | sizeofPtr = C.sizeofPtr
constant sizeofShort (line 24) | sizeofShort = C.sizeof_short
constant sizeofInt (line 25) | sizeofInt = C.sizeof_int
constant sizeofLong (line 26) | sizeofLong = C.sizeof_long
constant sizeofLongLong (line 27) | sizeofLongLong = C.sizeof_longlong
constant sizeOfUtmp (line 28) | sizeOfUtmp = C.sizeof_struct_utmp
type _C_short (line 34) | type _C_short
type _C_int (line 35) | type _C_int
type _C_long (line 36) | type _C_long
type _C_long_long (line 37) | type _C_long_long
type utmp (line 40) | type utmp
type exit_status (line 41) | type exit_status
type timeval (line 42) | type timeval
FILE: vendor/github.com/shirou/gopsutil/host/types_openbsd.go
constant sizeofPtr (line 25) | sizeofPtr = C.sizeofPtr
constant sizeofShort (line 26) | sizeofShort = C.sizeof_short
constant sizeofInt (line 27) | sizeofInt = C.sizeof_int
constant sizeofLong (line 28) | sizeofLong = C.sizeof_long
constant sizeofLongLong (line 29) | sizeofLongLong = C.sizeof_longlong
constant sizeOfUtmp (line 30) | sizeOfUtmp = C.sizeof_struct_utmp
type _C_short (line 36) | type _C_short
type _C_int (line 37) | type _C_int
type _C_long (line 38) | type _C_long
type _C_long_long (line 39) | type _C_long_long
type Utmp (line 42) | type Utmp
type Timeval (line 43) | type Timeval
FILE: vendor/github.com/shirou/gopsutil/internal/common/binary.go
type ByteOrder (line 33) | type ByteOrder interface
type littleEndian (line 49) | type littleEndian struct
method Uint16 (line 51) | func (littleEndian) Uint16(b []byte) uint16 { return uint16(b[0]) | ui...
method PutUint16 (line 53) | func (littleEndian) PutUint16(b []byte, v uint16) {
method Uint32 (line 58) | func (littleEndian) Uint32(b []byte) uint32 {
method PutUint32 (line 62) | func (littleEndian) PutUint32(b []byte, v uint32) {
method Uint64 (line 69) | func (littleEndian) Uint64(b []byte) uint64 {
method PutUint64 (line 74) | func (littleEndian) PutUint64(b []byte, v uint64) {
method String (line 85) | func (littleEndian) String() string { return "LittleEndian" }
method GoString (line 87) | func (littleEndian) GoString() string { return "binary.LittleEndian" }
type bigEndian (line 89) | type bigEndian struct
method Uint16 (line 91) | func (bigEndian) Uint16(b []byte) uint16 { return uint16(b[1]) | uint1...
method PutUint16 (line 93) | func (bigEndian) PutUint16(b []byte, v uint16) {
method Uint32 (line 98) | func (bigEndian) Uint32(b []byte) uint32 {
method PutUint32 (line 102) | func (bigEndian) PutUint32(b []byte, v uint32) {
method Uint64 (line 109) | func (bigEndian) Uint64(b []byte) uint64 {
method PutUint64 (line 114) | func (bigEndian) PutUint64(b []byte, v uint64) {
method String (line 125) | func (bigEndian) String() string { return "BigEndian" }
method GoString (line 127) | func (bigEndian) GoString() string { return "binary.BigEndian" }
function Read (line 138) | func Read(r io.Reader, order ByteOrder, data interface{}) error {
function Write (line 230) | func Write(w io.Writer, order ByteOrder, data interface{}) error {
function Size (line 340) | func Size(v interface{}) int {
function dataSize (line 348) | func dataSize(v reflect.Value) int {
function sizeof (line 359) | func sizeof(t reflect.Type) int {
type coder (line 386) | type coder struct
type decoder (line 391) | type decoder
method uint8 (line 394) | func (d *decoder) uint8() uint8 {
method uint16 (line 405) | func (d *decoder) uint16() uint16 {
method uint32 (line 416) | func (d *decoder) uint32() uint32 {
method uint64 (line 427) | func (d *decoder) uint64() uint64 {
method int8 (line 438) | func (d *decoder) int8() int8 { return int8(d.uint8()) }
method int16 (line 442) | func (d *decoder) int16() int16 { return int16(d.uint16()) }
method int32 (line 446) | func (d *decoder) int32() int32 { return int32(d.uint32()) }
method int64 (line 450) | func (d *decoder) int64() int64 { return int64(d.uint64()) }
method value (line 454) | func (d *decoder) value(v reflect.Value) {
method skip (line 592) | func (d *decoder) skip(v reflect.Value) {
type encoder (line 392) | type encoder
method uint8 (line 400) | func (e *encoder) uint8(x uint8) {
method uint16 (line 411) | func (e *encoder) uint16(x uint16) {
method uint32 (line 422) | func (e *encoder) uint32(x uint32) {
method uint64 (line 433) | func (e *encoder) uint64(x uint64) {
method int8 (line 440) | func (e *encoder) int8(x int8) { e.uint8(uint8(x)) }
method int16 (line 444) | func (e *encoder) int16(x int16) { e.uint16(uint16(x)) }
method int32 (line 448) | func (e *encoder) int32(x int32) { e.uint32(uint32(x)) }
method int64 (line 452) | func (e *encoder) int64(x int64) { e.uint64(uint64(x)) }
method value (line 520) | func (e *encoder) value(v reflect.Value) {
method skip (line 596) | func (e *encoder) skip(v reflect.Value) {
function intDataSize (line 606) | func intDataSize(data interface{}) int {
FILE: vendor/github.com/shirou/gopsutil/internal/common/common.go
type Invoker (line 33) | type Invoker interface
type Invoke (line 38) | type Invoke struct
method Command (line 40) | func (i Invoke) Command(name string, arg ...string) ([]byte, error) {
method CommandWithContext (line 46) | func (i Invoke) CommandWithContext(ctx context.Context, name string, a...
type FakeInvoke (line 64) | type FakeInvoke struct
method Command (line 70) | func (i FakeInvoke) Command(name string, arg ...string) ([]byte, error) {
method CommandWithContext (line 91) | func (i FakeInvoke) CommandWithContext(ctx context.Context, name strin...
function ReadLines (line 99) | func ReadLines(filename string) ([]string, error) {
function ReadLinesOffsetN (line 108) | func ReadLinesOffsetN(filename string, offset uint, n int) ([]string, er...
function IntToString (line 132) | func IntToString(orig []int8) string {
function UintToString (line 149) | func UintToString(orig []uint8) string {
function ByteToString (line 166) | func ByteToString(orig []byte) string {
function ReadInts (line 190) | func ReadInts(filename string) ([]int64, error) {
function mustParseInt32 (line 217) | func mustParseInt32(val string) int32 {
function mustParseUint64 (line 223) | func mustParseUint64(val string) uint64 {
function mustParseFloat64 (line 229) | func mustParseFloat64(val string) float64 {
function StringsHas (line 235) | func StringsHas(target []string, src string) bool {
function StringsContains (line 245) | func StringsContains(target []string, src string) bool {
function IntContains (line 255) | func IntContains(target []int, src int) bool {
function attributes (line 266) | func attributes(m interface{}) map[string]reflect.Type {
function PathExists (line 287) | func PathExists(filename string) bool {
function GetEnv (line 295) | func GetEnv(key string, dfault string, combineWith ...string) string {
function HostProc (line 315) | func HostProc(combineWith ...string) string {
function HostSys (line 319) | func HostSys(combineWith ...string) string {
function HostEtc (line 323) | func HostEtc(combineWith ...string) string {
function HostVar (line 327) | func HostVar(combineWith ...string) string {
function HostRun (line 331) | func HostRun(combineWith ...string) string {
function Pipeline (line 336) | func Pipeline(cmds ...*exec.Cmd) ([]byte, []byte, error) {
function getSysctrlEnv (line 380) | func getSysctrlEnv(env []string) []string {
FILE: vendor/github.com/shirou/gopsutil/internal/common/common_darwin.go
function DoSysctrlWithContext (line 15) | func DoSysctrlWithContext(ctx context.Context, mib string) ([]string, er...
function CallSyscall (line 33) | func CallSyscall(mib []int32) ([]byte, uint64, error) {
FILE: vendor/github.com/shirou/gopsutil/internal/common/common_freebsd.go
function DoSysctrl (line 14) | func DoSysctrl(mib string) ([]string, error) {
function CallSyscall (line 32) | func CallSyscall(mib []int32) ([]byte, uint64, error) {
FILE: vendor/github.com/shirou/gopsutil/internal/common/common_linux.go
function DoSysctrl (line 11) | func DoSysctrl(mib string) ([]string, error) {
function NumProcs (line 29) | func NumProcs() (uint64, error) {
FILE: vendor/github.com/shirou/gopsutil/internal/common/common_openbsd.go
function DoSysctrl (line 14) | func DoSysctrl(mib string) ([]string, error) {
function CallSyscall (line 32) | func CallSyscall(mib []int32) ([]byte, uint64, error) {
FILE: vendor/github.com/shirou/gopsutil/internal/common/common_unix.go
function CallLsofWithContext (line 12) | func CallLsofWithContext(ctx context.Context, invoke Invoker, pid int32,...
function CallPgrepWithContext (line 43) | func CallPgrepWithContext(ctx context.Context, invoke Invoker, pid int32...
FILE: vendor/github.com/shirou/gopsutil/internal/common/common_windows.go
type PDH_FMT_COUNTERVALUE_DOUBLE (line 14) | type PDH_FMT_COUNTERVALUE_DOUBLE struct
type PDH_FMT_COUNTERVALUE_LARGE (line 20) | type PDH_FMT_COUNTERVALUE_LARGE struct
type PDH_FMT_COUNTERVALUE_LONG (line 26) | type PDH_FMT_COUNTERVALUE_LONG struct
constant ERROR_SUCCESS (line 34) | ERROR_SUCCESS = 0
constant ERROR_FILE_NOT_FOUND (line 35) | ERROR_FILE_NOT_FOUND = 2
constant DRIVE_REMOVABLE (line 36) | DRIVE_REMOVABLE = 2
constant DRIVE_FIXED (line 37) | DRIVE_FIXED = 3
constant HKEY_LOCAL_MACHINE (line 38) | HKEY_LOCAL_MACHINE = 0x80000002
constant RRF_RT_REG_SZ (line 39) | RRF_RT_REG_SZ = 0x00000002
constant RRF_RT_REG_DWORD (line 40) | RRF_RT_REG_DWORD = 0x00000010
constant PDH_FMT_LONG (line 41) | PDH_FMT_LONG = 0x00000100
constant PDH_FMT_DOUBLE (line 42) | PDH_FMT_DOUBLE = 0x00000200
constant PDH_FMT_LARGE (line 43) | PDH_FMT_LARGE = 0x00000400
constant PDH_INVALID_DATA (line 44) | PDH_INVALID_DATA = 0xc0000bc6
constant PDH_INVALID_HANDLE (line 45) | PDH_INVALID_HANDLE = 0xC0000bbc
constant PDH_NO_DATA (line 46) | PDH_NO_DATA = 0x800007d5
type FILETIME (line 64) | type FILETIME struct
function BytePtrToString (line 70) | func BytePtrToString(p *uint8) string {
type CounterInfo (line 81) | type CounterInfo struct
function CreateQuery (line 89) | func CreateQuery() (windows.Handle, error) {
function CreateCounter (line 99) | func CreateCounter(query windows.Handle, pname, cname string) (*CounterI...
function WMIQueryWithContext (line 117) | func WMIQueryWithContext(ctx context.Context, query string, dst interfac...
FILE: vendor/github.com/shirou/gopsutil/mem/mem.go
type VirtualMemoryStat (line 15) | type VirtualMemoryStat struct
method String (line 88) | func (m VirtualMemoryStat) String() string {
type SwapMemoryStat (line 79) | type SwapMemoryStat struct
method String (line 93) | func (m SwapMemoryStat) String() string {
FILE: vendor/github.com/shirou/gopsutil/mem/mem_darwin.go
function getHwMemsize (line 15) | func getHwMemsize() (uint64, error) {
function SwapMemory (line 31) | func SwapMemory() (*SwapMemoryStat, error) {
function SwapMemoryWithContext (line 35) | func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) {
FILE: vendor/github.com/shirou/gopsutil/mem/mem_darwin_cgo.go
function VirtualMemory (line 20) | func VirtualMemory() (*VirtualMemoryStat, error) {
function VirtualMemoryWithContext (line 24) | func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, ...
FILE: vendor/github.com/shirou/gopsutil/mem/mem_darwin_nocgo.go
function getVMStat (line 16) | func getVMStat(vms *VirtualMemoryStat) error {
function parseVMStat (line 28) | func parseVMStat(out string, vms *VirtualMemoryStat) error {
function VirtualMemory (line 71) | func VirtualMemory() (*VirtualMemoryStat, error) {
function VirtualMemoryWithContext (line 75) | func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, ...
FILE: vendor/github.com/shirou/gopsutil/mem/mem_fallback.go
function VirtualMemory (line 11) | func VirtualMemory() (*VirtualMemoryStat, error) {
function VirtualMemoryWithContext (line 15) | func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, ...
function SwapMemory (line 19) | func SwapMemory() (*SwapMemoryStat, error) {
function SwapMemoryWithContext (line 23) | func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) {
FILE: vendor/github.com/shirou/gopsutil/mem/mem_freebsd.go
function VirtualMemory (line 13) | func VirtualMemory() (*VirtualMemoryStat, error) {
function VirtualMemoryWithContext (line 17) | func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, ...
function SwapMemory (line 80) | func SwapMemory() (*SwapMemoryStat, error) {
constant XSWDEV_VERSION (line 87) | XSWDEV_VERSION = 1
type xswdev (line 91) | type xswdev struct
function SwapMemoryWithContext (line 99) | func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) {
FILE: vendor/github.com/shirou/gopsutil/mem/mem_linux.go
function VirtualMemory (line 14) | func VirtualMemory() (*VirtualMemoryStat, error) {
function VirtualMemoryWithContext (line 18) | func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, ...
function SwapMemory (line 109) | func SwapMemory() (*SwapMemoryStat, error) {
function SwapMemoryWithContext (line 113) | func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) {
FILE: vendor/github.com/shirou/gopsutil/mem/mem_openbsd.go
function GetPageSize (line 16) | func GetPageSize() (uint64, error) {
function GetPageSizeWithContext (line 20) | func GetPageSizeWithContext(ctx context.Context) (uint64, error) {
function VirtualMemory (line 38) | func VirtualMemory() (*VirtualMemoryStat, error) {
function VirtualMemoryWithContext (line 42) | func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, ...
function SwapMemory (line 92) | func SwapMemory() (*SwapMemoryStat, error) {
function SwapMemoryWithContext (line 96) | func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) {
FILE: vendor/github.com/shirou/gopsutil/mem/mem_openbsd_amd64.go
constant CTLVm (line 7) | CTLVm = 2
constant CTLVfs (line 8) | CTLVfs = 10
constant VmUvmexp (line 9) | VmUvmexp = 4
constant VfsGeneric (line 10) | VfsGeneric = 0
constant VfsBcacheStat (line 11) | VfsBcacheStat = 3
constant sizeOfUvmexp (line 15) | sizeOfUvmexp = 0x154
constant sizeOfBcachestats (line 16) | sizeOfBcachestats = 0x78
type Uvmexp (line 19) | type Uvmexp struct
type Bcachestats (line 106) | type Bcachestats struct
FILE: vendor/github.com/shirou/gopsutil/mem/mem_solaris.go
function VirtualMemory (line 17) | func VirtualMemory() (*VirtualMemoryStat, error) {
function VirtualMemoryWithContext (line 21) | func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, ...
function SwapMemory (line 46) | func SwapMemory() (*SwapMemoryStat, error) {
function SwapMemoryWithContext (line 50) | func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) {
function zoneName (line 54) | func zoneName() (string, error) {
function globalZoneMemoryCapacity (line 71) | func globalZoneMemoryCapacity() (uint64, error) {
function nonGlobalZoneMemoryCapacity (line 98) | func nonGlobalZoneMemoryCapacity() (uint64, error) {
FILE: vendor/github.com/shirou/gopsutil/mem/mem_windows.go
type memoryStatusEx (line 18) | type memoryStatusEx struct
function VirtualMemory (line 30) | func VirtualMemory() (*VirtualMemoryStat, error) {
function VirtualMemoryWithContext (line 34) | func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, ...
type performanceInformation (line 52) | type performanceInformation struct
function SwapMemory (line 69) | func SwapMemory() (*SwapMemoryStat, error) {
function SwapMemoryWithContext (line 73) | func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) {
FILE: vendor/github.com/shirou/gopsutil/mem/types_openbsd.go
constant CTLVm (line 21) | CTLVm = 2
constant CTLVfs (line 22) | CTLVfs = 10
constant VmUvmexp (line 23) | VmUvmexp = 4
constant VfsGeneric (line 24) | VfsGeneric = 0
constant VfsBcacheStat (line 25) | VfsBcacheStat = 3
constant sizeOfUvmexp (line 29) | sizeOfUvmexp = C.sizeof_struct_uvmexp
constant sizeOfBcachestats (line 30) | sizeOfBcachestats = C.sizeof_struct_bcachestats
type Uvmexp (line 33) | type Uvmexp
type Bcachestats (line 34) | type Bcachestats
FILE: vendor/github.com/shirou/gopsutil/net/net.go
type IOCountersStat (line 17) | type IOCountersStat struct
method String (line 81) | func (n IOCountersStat) String() string {
type Addr (line 33) | type Addr struct
method String (line 96) | func (a Addr) String() string {
type ConnectionStat (line 38) | type ConnectionStat struct
method String (line 86) | func (n ConnectionStat) String() string {
type ProtoCountersStat (line 50) | type ProtoCountersStat struct
method String (line 91) | func (n ProtoCountersStat) String() string {
type InterfaceAddr (line 56) | type InterfaceAddr struct
method String (line 106) | func (n InterfaceAddr) String() string {
type InterfaceStat (line 60) | type InterfaceStat struct
method String (line 101) | func (n InterfaceStat) String() string {
type FilterStat (line 68) | type FilterStat struct
function Interfaces (line 111) | func Interfaces() ([]InterfaceStat, error) {
function InterfacesWithContext (line 115) | func InterfacesWithContext(ctx context.Context) ([]InterfaceStat, error) {
function getIOCountersAll (line 162) | func getIOCountersAll(n []IOCountersStat) ([]IOCountersStat, error) {
function parseNetLine (line 180) | func parseNetLine(line string) (ConnectionStat, error) {
function parseNetAddr (line 233) | func parseNetAddr(line string) (laddr Addr, raddr Addr, err error) {
FILE: vendor/github.com/shirou/gopsutil/net/net_darwin.go
constant endOfLine (line 20) | endOfLine = "\n"
function parseNetstatLine (line 22) | func parseNet
Condensed preview — 654 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (8,771K chars).
[
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 517,
"preview": "---\nname: Bug report\nabout: Template to report bugs.\n---\n\n<!-- Please search existing issues to avoid creating duplicate"
},
{
"path": ".github/ISSUE_TEMPLATE/other.md",
"chars": 40,
"preview": "---\nname: Other\nabout: No template.\n---\n"
},
{
"path": ".gitignore",
"chars": 108,
"preview": "dist/\ngotop*\n\n# snap packaging specific\n/parts/\n/prime/\n/stage/\n/*.snap\n/snap/.snapcraft/\n/*_source.tar.bz2\n"
},
{
"path": ".travis.yml",
"chars": 747,
"preview": "language: go\n\ngo:\n - 1.11.x\n\ngit:\n depth: 1\n\nenv:\n global:\n - NAME=gotop\n\nmatrix:\n include:\n # Linux\n - env"
},
{
"path": "CHANGELOG.md",
"chars": 2532,
"preview": "# Changelog\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changel"
},
{
"path": "LICENSE",
"chars": 34520,
"preview": " GNU AFFERO GENERAL PUBLIC LICENSE\n Version 3, 19 November 2007\n\n Copyright (C)"
},
{
"path": "Makefile",
"chars": 797,
"preview": "# builds .rpm and .deb packages\n# requires dockerd to be running\n# builds the packages for amd64\n\nVERSION=$(shell go run"
},
{
"path": "README.md",
"chars": 3804,
"preview": "### **NO LONGER MAINTAINED.** A maintained fork of gotop exists at https://github.com/xxxserxxx/gotop.\n\n<div align=\"cent"
},
{
"path": "assets/logo/credits.md",
"chars": 92,
"preview": "Logo created and contributed by [mdnazmulhasan27771](https://github.com/mdnazmulhasan27771)\n"
},
{
"path": "build/nfpm.yml",
"chars": 434,
"preview": "name: \"gotop\"\narch: \"amd64\"\nplatform: \"linux\"\nversion: \"v${VERSION}\"\nsection: \"default\"\npriority: \"extra\"\nmaintainer: \"C"
},
{
"path": "ci/script.sh",
"chars": 702,
"preview": "#!/usr/bin/env bash\n\nfunction main {\n # Check if any command failed\n ERROR=false\n\n GOARCH=${_GOARCH}\n GOOS=$"
},
{
"path": "colorschemes/default.go",
"chars": 294,
"preview": "package colorschemes\n\nvar Default = Colorscheme{\n\tFg: 7,\n\tBg: -1,\n\n\tBorderLabel: 7,\n\tBorderLine: 6,\n\n\tCPULines: []int{4"
},
{
"path": "colorschemes/default.json",
"chars": 420,
"preview": "// Example json file to put in `~/.config/gotop/{name}.json` and load with\n// `gotop -c {name}`. MUST DELETE THESE COMME"
},
{
"path": "colorschemes/default_dark.go",
"chars": 304,
"preview": "package colorschemes\n\nvar DefaultDark = Colorscheme{\n\tFg: 235,\n\tBg: -1,\n\n\tBorderLabel: 235,\n\tBorderLine: 6,\n\n\tCPULines:"
},
{
"path": "colorschemes/monokai.go",
"chars": 339,
"preview": "package colorschemes\n\nvar Monokai = Colorscheme{\n\tFg: 249,\n\tBg: -1,\n\n\tBorderLabel: 249,\n\tBorderLine: 239,\n\n\tCPULines: ["
},
{
"path": "colorschemes/solarized.go",
"chars": 336,
"preview": "package colorschemes\n\nvar Solarized = Colorscheme{\n\tFg: 250,\n\tBg: -1,\n\n\tBorderLabel: 250,\n\tBorderLine: 37,\n\n\tCPULines: "
},
{
"path": "colorschemes/template.go",
"chars": 810,
"preview": "package colorschemes\n\n/*\n\tThe standard 256 terminal colors are supported.\n\n\t-1 = clear\n\n\tYou can combine a color with 'B"
},
{
"path": "colorschemes/vice.go",
"chars": 340,
"preview": "package colorschemes\n\nvar Vice = Colorscheme{\n\tFg: 231,\n\tBg: -1,\n\n\tBorderLabel: 123,\n\tBorderLine: 102,\n\n\tCPULines: []in"
},
{
"path": "go.mod",
"chars": 800,
"preview": "module github.com/cjbassi/gotop\n\nrequire (\n\tgithub.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect\n"
},
{
"path": "go.sum",
"chars": 4399,
"preview": "github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8=\ngithub.c"
},
{
"path": "main.go",
"chars": 10825,
"preview": "package main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"log\"\n\t\"os\"\n\t\"os/signal\"\n\t\"path/filepath\"\n\t\"sort\"\n\t\"strconv"
},
{
"path": "scripts/download.sh",
"chars": 1414,
"preview": "#!/usr/bin/env bash\n\n# https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c\nfunction get_latest_release {"
},
{
"path": "snap/snapcraft.yaml",
"chars": 980,
"preview": "name: gotop-cjbassi\nbase: core18\nversion: determined-by-version-script\nversion-script: git describe --always --tags --di"
},
{
"path": "src/logging/logging_arm64.go",
"chars": 128,
"preview": "package logging\n\nimport (\n\t\"os\"\n\t\"syscall\"\n)\n\nfunc StderrToLogfile(logfile *os.File) {\n\tsyscall.Dup3(int(logfile.Fd()), "
},
{
"path": "src/logging/logging_other.go",
"chars": 143,
"preview": "// +build !arm64\n\npackage logging\n\nimport (\n\t\"os\"\n\t\"syscall\"\n)\n\nfunc StderrToLogfile(logfile *os.File) {\n\tsyscall.Dup2(i"
},
{
"path": "src/termui/drawille-go/LICENSE.md",
"chars": 34500,
"preview": "GNU AFFERO GENERAL PUBLIC LICENSE\n Version 3, 19 November 2007\n\n Copyright (C) 2007 Free Software "
},
{
"path": "src/termui/drawille-go/README.md",
"chars": 954,
"preview": "GO-DRAWILLE\n===========\nDrawing in the terminal with Unicode Braille characters.\nA [go](https://golang.org) port of [asc"
},
{
"path": "src/termui/drawille-go/drawille.go",
"chars": 5098,
"preview": "package drawille\n\n//import \"code.google.com/p/goncurses\"\nimport \"math\"\n\nvar pixel_map = [4][2]int{\n\t{0x1, 0x8},\n\t{0x2, 0"
},
{
"path": "src/termui/linegraph.go",
"chars": 3502,
"preview": "package termui\n\nimport (\n\t\"image\"\n\t\"sort\"\n\n\tdrawille \"github.com/cjbassi/gotop/src/termui/drawille-go\"\n\t. \"github.com/gi"
},
{
"path": "src/termui/sparkline.go",
"chars": 2694,
"preview": "package termui\n\nimport (\n\t\"image\"\n\t\"log\"\n\n\t. \"github.com/gizak/termui/v3\"\n)\n\n// Sparkline is like: ▅▆▂▂▅▇▂▂▃▆▆▆▅▃. The d"
},
{
"path": "src/termui/table.go",
"chars": 4650,
"preview": "package termui\n\nimport (\n\t\"fmt\"\n\t\"image\"\n\t\"log\"\n\t\"strings\"\n\n\t. \"github.com/gizak/termui/v3\"\n)\n\ntype Table struct {\n\t*Blo"
},
{
"path": "src/utils/bytes.go",
"chars": 774,
"preview": "package utils\n\nimport (\n\t\"math\"\n)\n\nvar (\n\tKB = uint64(math.Pow(2, 10))\n\tMB = uint64(math.Pow(2, 20))\n\tGB = uint64(math.P"
},
{
"path": "src/utils/conversions.go",
"chars": 186,
"preview": "package utils\n\nimport (\n\t\"strings\"\n)\n\nfunc ConvertLocalizedString(s string) string {\n\tif strings.ContainsAny(s, \",\") {\n\t"
},
{
"path": "src/utils/math.go",
"chars": 81,
"preview": "package utils\n\nfunc MaxInt(a, b int) int {\n\tif a > b {\n\t\treturn a\n\t}\n\treturn b\n}\n"
},
{
"path": "src/utils/xdg.go",
"chars": 529,
"preview": "package utils\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n)\n\nfunc GetConfigDir(name string) string {\n\tvar basedir string\n\tif env :="
},
{
"path": "src/widgets/battery.go",
"chars": 1235,
"preview": "package widgets\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"math\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"github.com/distatus/battery\"\n\n\tui \"github.com/cjba"
},
{
"path": "src/widgets/cpu.go",
"chars": 2816,
"preview": "package widgets\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"sync\"\n\t\"time\"\n\n\tpsCpu \"github.com/shirou/gopsutil/cpu\"\n\n\tui \"github.com/cjbass"
},
{
"path": "src/widgets/disk.go",
"chars": 4630,
"preview": "package widgets\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"sort\"\n\t\"strings\"\n\t\"time\"\n\n\tpsDisk \"github.com/shirou/gopsutil/disk\"\n\n\tui \"gith"
},
{
"path": "src/widgets/help.go",
"chars": 1365,
"preview": "package widgets\n\nimport (\n\t\"image\"\n\t\"strings\"\n\n\tui \"github.com/gizak/termui/v3\"\n)\n\nconst KEYBINDS = `\nQuit: q or <C-c>\n\n"
},
{
"path": "src/widgets/include/smc.c",
"chars": 17300,
"preview": "/*\n * Apple System Management Controller (SMC) API from user space for Intel based\n * Macs. Works by talking to the Appl"
},
{
"path": "src/widgets/include/smc.h",
"chars": 6836,
"preview": "/*\n * Apple System Management Controller (SMC) API from user space for Intel based\n * Macs. Works by talking to the Appl"
},
{
"path": "src/widgets/mem.go",
"chars": 1696,
"preview": "package widgets\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"time\"\n\n\tpsMem \"github.com/shirou/gopsutil/mem\"\n\n\tui \"github.com/cjbassi/gotop/"
},
{
"path": "src/widgets/mem_freebsd.go",
"chars": 1404,
"preview": "package widgets\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"os/exec\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/cjbassi/gotop/src/utils\"\n)\n\nfunc "
},
{
"path": "src/widgets/mem_other.go",
"chars": 435,
"preview": "// +build !freebsd\n\npackage widgets\n\nimport (\n\t\"log\"\n\n\tpsMem \"github.com/shirou/gopsutil/mem\"\n)\n\nfunc (self *MemWidget) "
},
{
"path": "src/widgets/net.go",
"chars": 3129,
"preview": "package widgets\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"time\"\n\n\tpsNet \"github.com/shirou/gopsutil/net\"\n\n\tui \"github.com/cjbassi/gotop/"
},
{
"path": "src/widgets/proc.go",
"chars": 6290,
"preview": "package widgets\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"os/exec\"\n\t\"sort\"\n\t\"strconv\"\n\t\"time\"\n\n\tpsCPU \"github.com/shirou/gopsutil/cpu\"\n\n"
},
{
"path": "src/widgets/proc_freebsd.go",
"chars": 1658,
"preview": "package widgets\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"os/exec\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/cjbassi/gotop/sr"
},
{
"path": "src/widgets/proc_linux.go",
"chars": 1207,
"preview": "package widgets\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"os/exec\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nfunc getProcs() ([]Proc, error) {\n\toutput, e"
},
{
"path": "src/widgets/proc_other.go",
"chars": 1529,
"preview": "// +build darwin openbsd\n\npackage widgets\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"os/exec\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/cjbassi"
},
{
"path": "src/widgets/proc_windows.go",
"chars": 1189,
"preview": "package widgets\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\tpsProc \"github.com/shirou/gopsutil/process\"\n)\n\nfunc getProcs() ([]Proc, error)"
},
{
"path": "src/widgets/statusbar.go",
"chars": 950,
"preview": "package widgets\n\nimport (\n\t\"image\"\n\t\"log\"\n\t\"os\"\n\t\"time\"\n\n\tui \"github.com/gizak/termui/v3\"\n)\n\ntype StatusBar struct {\n\tui"
},
{
"path": "src/widgets/temp.go",
"chars": 1929,
"preview": "package widgets\n\nimport (\n\t\"fmt\"\n\t\"image\"\n\t\"sort\"\n\t\"time\"\n\n\tui \"github.com/gizak/termui/v3\"\n\n\t\"github.com/cjbassi/gotop/"
},
{
"path": "src/widgets/temp_darwin.go",
"chars": 2084,
"preview": "package widgets\n\n// #cgo LDFLAGS: -framework IOKit\n// #include \"include/smc.c\"\nimport \"C\"\nimport (\n\t\"log\"\n\n\t\"github.com/"
},
{
"path": "src/widgets/temp_freebsd.go",
"chars": 1598,
"preview": "package widgets\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"os/exec\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/cjbassi/gotop/src/utils\"\n)\n\nvar s"
},
{
"path": "src/widgets/temp_linux.go",
"chars": 795,
"preview": "package widgets\n\nimport (\n\t\"log\"\n\t\"strings\"\n\n\tpsHost \"github.com/shirou/gopsutil/host\"\n\n\t\"github.com/cjbassi/gotop/src/u"
},
{
"path": "src/widgets/temp_openbsd.go",
"chars": 1554,
"preview": "package widgets\n\n// loosely based on https://github.com/openbsd/src/blob/master/sbin/sysctl/sysctl.c#L2517\n\n// #include "
},
{
"path": "src/widgets/temp_windows.go",
"chars": 575,
"preview": "package widgets\n\nimport (\n\t\"log\"\n\n\tpsHost \"github.com/shirou/gopsutil/host\"\n\n\t\"github.com/cjbassi/gotop/src/utils\"\n)\n\nfu"
},
{
"path": "vendor/github.com/StackExchange/wmi/LICENSE",
"chars": 1081,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2013 Stack Exchange\n\nPermission is hereby granted, free of charge, to any person ob"
},
{
"path": "vendor/github.com/StackExchange/wmi/README.md",
"chars": 149,
"preview": "wmi\n===\n\nPackage wmi provides a WQL interface to Windows WMI.\n\nNote: It interfaces with WMI on the local machine, theref"
},
{
"path": "vendor/github.com/StackExchange/wmi/swbemservices.go",
"chars": 7766,
"preview": "// +build windows\n\npackage wmi\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"runtime\"\n\t\"sync\"\n\n\t\"github.com/go-ole/go-ole\"\n\t\"github.com/"
},
{
"path": "vendor/github.com/StackExchange/wmi/wmi.go",
"chars": 13105,
"preview": "// +build windows\n\n/*\nPackage wmi provides a WQL interface for WMI on Windows.\n\nExample code to print names of running p"
},
{
"path": "vendor/github.com/cjbassi/drawille-go/LICENSE",
"chars": 1068,
"preview": "MIT License\n\nCopyright (c) 2019 Caleb Bassi\n\nPermission is hereby granted, free of charge, to any person obtaining a cop"
},
{
"path": "vendor/github.com/cjbassi/drawille-go/README.md",
"chars": 171,
"preview": "# drawille-go\n\nA [drawille](https://github.com/asciimoo/drawille) implementation in Go with a more permissive license.\n\n"
},
{
"path": "vendor/github.com/cjbassi/drawille-go/drawille.go",
"chars": 1821,
"preview": "package drawille\n\nimport (\n\t\"image\"\n)\n\nconst BRAILLE_OFFSET = '\\u2800'\n\nvar BRAILLE = [4][2]rune{\n\t{'\\u0001', '\\u0008'},"
},
{
"path": "vendor/github.com/distatus/battery/.gitignore",
"chars": 35,
"preview": "cmd/battery/battery*\ncoverage.html\n"
},
{
"path": "vendor/github.com/distatus/battery/.travis.yml",
"chars": 99,
"preview": "language: go\n\ngo:\n - 1.3\n - 1.4\n - 1.5\n - 1.6\n - tip\n\nmatrix:\n allow_failures:\n - go: tip\n"
},
{
"path": "vendor/github.com/distatus/battery/LICENSE.md",
"chars": 1083,
"preview": "battery\nCopyright (C) 2016 Karol 'Kenji Takahashi' Woźniak\n\nPermission is hereby granted, free of charge, to any person "
},
{
"path": "vendor/github.com/distatus/battery/README.md",
"chars": 1757,
"preview": "battery [](https://travis-ci.org/distatus/batte"
},
{
"path": "vendor/github.com/distatus/battery/battery.go",
"chars": 4504,
"preview": "// battery\n// Copyright (C) 2016-2017 Karol 'Kenji Takahashi' Woźniak\n//\n// Permission is hereby granted, free of charge"
},
{
"path": "vendor/github.com/distatus/battery/battery_darwin.go",
"chars": 3000,
"preview": "// battery\n// Copyright (C) 2016-2017 Karol 'Kenji Takahashi' Woźniak\n//\n// Permission is hereby granted, free of charge"
},
{
"path": "vendor/github.com/distatus/battery/battery_freebsd_dragonfly_.go",
"chars": 4144,
"preview": "// battery\n// Copyright (C) 2016-2017 Karol 'Kenji Takahashi' Woźniak\n//\n// Permission is hereby granted, free of charge"
},
{
"path": "vendor/github.com/distatus/battery/battery_linux.go",
"chars": 4109,
"preview": "// battery\n// Copyright (C) 2016-2017 Karol 'Kenji Takahashi' Woźniak\n//\n// Permission is hereby granted, free of charge"
},
{
"path": "vendor/github.com/distatus/battery/battery_netbsd.go",
"chars": 5395,
"preview": "// battery\n// Copyright (C) 2016-2017 Karol 'Kenji Takahashi' Woźniak\n//\n// Permission is hereby granted, free of charge"
},
{
"path": "vendor/github.com/distatus/battery/battery_openbsd.go",
"chars": 6215,
"preview": "// battery\n// Copyright (C) 2016-2017 Karol 'Kenji Takahashi' Woźniak\n//\n// Permission is hereby granted, free of charge"
},
{
"path": "vendor/github.com/distatus/battery/battery_solaris.go",
"chars": 5878,
"preview": "// battery\n// Copyright (C) 2016-2017 Karol 'Kenji Takahashi' Woźniak\n//\n// Permission is hereby granted, free of charge"
},
{
"path": "vendor/github.com/distatus/battery/battery_windows.go",
"chars": 7691,
"preview": "// battery\n// Copyright (C) 2016-2017 Karol 'Kenji Takahashi' Woźniak\n//\n// Permission is hereby granted, free of charge"
},
{
"path": "vendor/github.com/distatus/battery/errors.go",
"chars": 4210,
"preview": "// battery\n// Copyright (C) 2016-2017 Karol 'Kenji Takahashi' Woźniak\n//\n// Permission is hereby granted, free of charge"
},
{
"path": "vendor/github.com/distatus/battery/ioctl.go",
"chars": 1606,
"preview": "// battery\n// Copyright (C) 2016 Karol 'Kenji Takahashi' Woźniak\n//\n// Permission is hereby granted, free of charge, to "
},
{
"path": "vendor/github.com/docopt/docopt.go/.gitignore",
"chars": 286,
"preview": "# Compiled Object files, Static and Dynamic libs (Shared Objects)\n*.o\n*.a\n*.so\n\n# Folders\n_obj\n_test\n\n# Architecture spe"
},
{
"path": "vendor/github.com/docopt/docopt.go/.travis.yml",
"chars": 640,
"preview": "# Travis CI (http://travis-ci.org/) is a continuous integration\n# service for open source projects. This file configures"
},
{
"path": "vendor/github.com/docopt/docopt.go/LICENSE",
"chars": 1111,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2013 Keith Batten\nCopyright (c) 2016 David Irvine\n\nPermission is hereby granted, fr"
},
{
"path": "vendor/github.com/docopt/docopt.go/README.md",
"chars": 3881,
"preview": "docopt-go\n=========\n\n[](https://travis-ci.org/d"
},
{
"path": "vendor/github.com/docopt/docopt.go/doc.go",
"chars": 1760,
"preview": "/*\nPackage docopt parses command-line arguments based on a help message.\n\nGiven a conventional command-line help message"
},
{
"path": "vendor/github.com/docopt/docopt.go/docopt.go",
"chars": 15364,
"preview": "// Licensed under terms of MIT license (see LICENSE-MIT)\n// Copyright (c) 2013 Keith Batten, kbatten@gmail.com\n// Copyri"
},
{
"path": "vendor/github.com/docopt/docopt.go/error.go",
"chars": 816,
"preview": "package docopt\n\nimport (\n\t\"fmt\"\n)\n\ntype errorType int\n\nconst (\n\terrorUser errorType = iota\n\terrorLanguage\n)\n\nfunc (e err"
},
{
"path": "vendor/github.com/docopt/docopt.go/opts.go",
"chars": 7737,
"preview": "package docopt\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"strconv\"\n\t\"strings\"\n\t\"unicode\"\n)\n\nfunc errKey(key string) error {\n\treturn f"
},
{
"path": "vendor/github.com/docopt/docopt.go/pattern.go",
"chars": 11940,
"preview": "package docopt\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"strings\"\n)\n\ntype patternType uint\n\nconst (\n\t// leaf\n\tpatternArgument patter"
},
{
"path": "vendor/github.com/docopt/docopt.go/test_golang.docopt",
"chars": 126,
"preview": "r\"\"\"usage: prog [NAME_-2]...\"\"\"\n$ prog 10 20\n{\"NAME_-2\": [\"10\", \"20\"]}\n\n$ prog 10\n{\"NAME_-2\": [\"10\"]}\n\n$ prog\n{\"NAME_-2\""
},
{
"path": "vendor/github.com/docopt/docopt.go/testcases.docopt",
"chars": 11970,
"preview": "r\"\"\"Usage: prog\n\n\"\"\"\n$ prog\n{}\n\n$ prog --xxx\n\"user-error\"\n\n\nr\"\"\"Usage: prog [options]\n\nOptions: -a All.\n\n\"\"\"\n$ prog\n{\"-"
},
{
"path": "vendor/github.com/docopt/docopt.go/token.go",
"chars": 2526,
"preview": "package docopt\n\nimport (\n\t\"regexp\"\n\t\"strings\"\n\t\"unicode\"\n)\n\ntype tokenList struct {\n\ttokens []string\n\terrorFunc func("
},
{
"path": "vendor/github.com/gizak/termui/v3/.gitignore",
"chars": 38,
"preview": ".DS_Store\n.vscode/\n.mypy_cache/\n.idea\n"
},
{
"path": "vendor/github.com/gizak/termui/v3/CHANGELOG.md",
"chars": 2901,
"preview": "# Changelog\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changel"
},
{
"path": "vendor/github.com/gizak/termui/v3/LICENSE",
"chars": 1076,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2015 Zack Guo\n\nPermission is hereby granted, free of charge, to any person obtainin"
},
{
"path": "vendor/github.com/gizak/termui/v3/Makefile",
"chars": 99,
"preview": ".PHONY: run-examples\nrun-examples:\n\t@for file in _examples/*.go; do \\\n\t go run $$file; \\\n\t done;\n"
},
{
"path": "vendor/github.com/gizak/termui/v3/README.md",
"chars": 2546,
"preview": "# termui\n\n[<img src=\"./_assets/demo.gif\" alt=\"demo cast under osx 10.10; Terminal.app; Menlo Regular 12pt.)\" width=\"100%"
},
{
"path": "vendor/github.com/gizak/termui/v3/alignment.go",
"chars": 100,
"preview": "package termui\n\ntype Alignment uint\n\nconst (\n\tAlignLeft Alignment = iota\n\tAlignCenter\n\tAlignRight\n)\n"
},
{
"path": "vendor/github.com/gizak/termui/v3/backend.go",
"chars": 770,
"preview": "// Copyright 2017 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.\n// Use of this source code is governed by a MIT "
},
{
"path": "vendor/github.com/gizak/termui/v3/block.go",
"chars": 2726,
"preview": "// Copyright 2017 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.\n// Use of this source code is governed by a MIT "
},
{
"path": "vendor/github.com/gizak/termui/v3/buffer.go",
"chars": 1553,
"preview": "// Copyright 2017 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.\n// Use of this source code is governed by a MIT "
},
{
"path": "vendor/github.com/gizak/termui/v3/canvas.go",
"chars": 757,
"preview": "package termui\n\nimport (\n\t\"image\"\n\n\tdrawille \"github.com/cjbassi/drawille-go\"\n)\n\ntype Canvas struct {\n\tBlock\n\tdrawille.C"
},
{
"path": "vendor/github.com/gizak/termui/v3/doc.go",
"chars": 280,
"preview": "// Copyright 2017 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.\n// Use of this source code is governed by a MIT "
},
{
"path": "vendor/github.com/gizak/termui/v3/events.go",
"chars": 4819,
"preview": "// Copyright 2017 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.\n// Use of this source code is governed by a MIT "
},
{
"path": "vendor/github.com/gizak/termui/v3/go.mod",
"chars": 349,
"preview": "module github.com/gizak/termui/v3\n\nrequire (\n\tgithub.com/cjbassi/drawille-go v0.0.0-20190126131713-27dc511fe6fd\n\tgithub."
},
{
"path": "vendor/github.com/gizak/termui/v3/go.sum",
"chars": 1085,
"preview": "github.com/cjbassi/drawille-go v0.0.0-20190126131713-27dc511fe6fd h1:XtfPmj9tQRilnrEmI1HjQhxXWRhEM+m8CACtaMJE/kM=\ngithub"
},
{
"path": "vendor/github.com/gizak/termui/v3/grid.go",
"chars": 3288,
"preview": "// Copyright 2017 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.\n// Use of this source code is governed by a MIT "
},
{
"path": "vendor/github.com/gizak/termui/v3/render.go",
"chars": 768,
"preview": "// Copyright 2017 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.\n// Use of this source code is governed by a MIT "
},
{
"path": "vendor/github.com/gizak/termui/v3/style.go",
"chars": 1297,
"preview": "package termui\n\n// Color is an integer from -1 to 255\n// -1 = ColorClear\n// 0-255 = Xterm colors\ntype Color int\n\n// Colo"
},
{
"path": "vendor/github.com/gizak/termui/v3/style_parser.go",
"chars": 3860,
"preview": "// Copyright 2017 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.\n// Use of this source code is governed by a MIT "
},
{
"path": "vendor/github.com/gizak/termui/v3/symbols.go",
"chars": 989,
"preview": "package termui\n\nconst (\n\tDOT = '•'\n\tELLIPSES = '…'\n\n\tUP_ARROW = '▲'\n\tDOWN_ARROW = '▼'\n)\n\nvar (\n\tBARS = [...]rune{"
},
{
"path": "vendor/github.com/gizak/termui/v3/symbols_other.go",
"chars": 523,
"preview": "// Copyright 2017 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.\n// Use of this source code is governed by a MIT "
},
{
"path": "vendor/github.com/gizak/termui/v3/symbols_windows.go",
"chars": 522,
"preview": "// Copyright 2017 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.\n// Use of this source code is governed by a MIT "
},
{
"path": "vendor/github.com/gizak/termui/v3/theme.go",
"chars": 2556,
"preview": "// Copyright 2017 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.\n// Use of this source code is governed by a MIT "
},
{
"path": "vendor/github.com/gizak/termui/v3/utils.go",
"chars": 4580,
"preview": "// Copyright 2017 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.\n// Use of this source code is governed by a MIT "
},
{
"path": "vendor/github.com/go-ole/go-ole/.travis.yml",
"chars": 70,
"preview": "language: go\nsudo: false\n\ngo:\n - 1.1\n - 1.2\n - 1.3\n - 1.4\n - tip\n"
},
{
"path": "vendor/github.com/go-ole/go-ole/ChangeLog.md",
"chars": 1986,
"preview": "# Version 1.x.x\n\n* **Add more test cases and reference new test COM server project.** (Placeholder for future additions)"
},
{
"path": "vendor/github.com/go-ole/go-ole/LICENSE",
"chars": 1110,
"preview": "The MIT License (MIT)\n\nCopyright © 2013-2017 Yasuhiro Matsumoto, <mattn.jp@gmail.com>\n\nPermission is hereby granted, fre"
},
{
"path": "vendor/github.com/go-ole/go-ole/README.md",
"chars": 2257,
"preview": "#Go OLE\n\n[](https://ci.appveyor.co"
},
{
"path": "vendor/github.com/go-ole/go-ole/appveyor.yml",
"chars": 1358,
"preview": "# Notes:\n# - Minimal appveyor.yml file is an empty file. All sections are optional.\n# - Indent each level of configu"
},
{
"path": "vendor/github.com/go-ole/go-ole/com.go",
"chars": 10973,
"preview": "// +build windows\n\npackage ole\n\nimport (\n\t\"errors\"\n\t\"syscall\"\n\t\"time\"\n\t\"unicode/utf16\"\n\t\"unsafe\"\n)\n\nvar (\n\tprocCoInitial"
},
{
"path": "vendor/github.com/go-ole/go-ole/com_func.go",
"chars": 5395,
"preview": "// +build !windows\n\npackage ole\n\nimport (\n\t\"time\"\n\t\"unsafe\"\n)\n\n// coInitialize initializes COM library on current thread"
},
{
"path": "vendor/github.com/go-ole/go-ole/connect.go",
"chars": 4365,
"preview": "package ole\n\n// Connection contains IUnknown for fluent interface interaction.\n//\n// Deprecated. Use oleutil package ins"
},
{
"path": "vendor/github.com/go-ole/go-ole/constants.go",
"chars": 3590,
"preview": "package ole\n\nconst (\n\tCLSCTX_INPROC_SERVER = 1\n\tCLSCTX_INPROC_HANDLER = 2\n\tCLSCTX_LOCAL_SERVER = 4\n\tCLSCTX_INPROC_"
},
{
"path": "vendor/github.com/go-ole/go-ole/error.go",
"chars": 1307,
"preview": "package ole\n\n// OleError stores COM errors.\ntype OleError struct {\n\thr uintptr\n\tdescription string\n\tsubError "
},
{
"path": "vendor/github.com/go-ole/go-ole/error_func.go",
"chars": 119,
"preview": "// +build !windows\n\npackage ole\n\n// errstr converts error code to string.\nfunc errstr(errno int) string {\n\treturn \"\"\n}\n"
},
{
"path": "vendor/github.com/go-ole/go-ole/error_windows.go",
"chars": 650,
"preview": "// +build windows\n\npackage ole\n\nimport (\n\t\"fmt\"\n\t\"syscall\"\n\t\"unicode/utf16\"\n)\n\n// errstr converts error code to string.\n"
},
{
"path": "vendor/github.com/go-ole/go-ole/guid.go",
"chars": 8124,
"preview": "package ole\n\nvar (\n\t// IID_NULL is null Interface ID, used when no other Interface ID is known.\n\tIID_NULL = NewGUID(\"{00"
},
{
"path": "vendor/github.com/go-ole/go-ole/iconnectionpoint.go",
"chars": 434,
"preview": "package ole\n\nimport \"unsafe\"\n\ntype IConnectionPoint struct {\n\tIUnknown\n}\n\ntype IConnectionPointVtbl struct {\n\tIUnknownVt"
},
{
"path": "vendor/github.com/go-ole/go-ole/iconnectionpoint_func.go",
"chars": 450,
"preview": "// +build !windows\n\npackage ole\n\nimport \"unsafe\"\n\nfunc (v *IConnectionPoint) GetConnectionInterface(piid **GUID) int32 {"
},
{
"path": "vendor/github.com/go-ole/go-ole/iconnectionpoint_windows.go",
"chars": 864,
"preview": "// +build windows\n\npackage ole\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc (v *IConnectionPoint) GetConnectionInterface(piid "
},
{
"path": "vendor/github.com/go-ole/go-ole/iconnectionpointcontainer.go",
"chars": 354,
"preview": "package ole\n\nimport \"unsafe\"\n\ntype IConnectionPointContainer struct {\n\tIUnknown\n}\n\ntype IConnectionPointContainerVtbl st"
},
{
"path": "vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_func.go",
"chars": 280,
"preview": "// +build !windows\n\npackage ole\n\nfunc (v *IConnectionPointContainer) EnumConnectionPoints(points interface{}) error {\n\tr"
},
{
"path": "vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_windows.go",
"chars": 501,
"preview": "// +build windows\n\npackage ole\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc (v *IConnectionPointContainer) EnumConnectionPoint"
},
{
"path": "vendor/github.com/go-ole/go-ole/idispatch.go",
"chars": 2980,
"preview": "package ole\n\nimport \"unsafe\"\n\ntype IDispatch struct {\n\tIUnknown\n}\n\ntype IDispatchVtbl struct {\n\tIUnknownVtbl\n\tGetTypeInf"
},
{
"path": "vendor/github.com/go-ole/go-ole/idispatch_func.go",
"chars": 473,
"preview": "// +build !windows\n\npackage ole\n\nfunc getIDsOfName(disp *IDispatch, names []string) ([]int32, error) {\n\treturn []int32{}"
},
{
"path": "vendor/github.com/go-ole/go-ole/idispatch_windows.go",
"chars": 6508,
"preview": "// +build windows\n\npackage ole\n\nimport (\n\t\"syscall\"\n\t\"time\"\n\t\"unsafe\"\n)\n\nfunc getIDsOfName(disp *IDispatch, names []stri"
},
{
"path": "vendor/github.com/go-ole/go-ole/ienumvariant.go",
"chars": 289,
"preview": "package ole\n\nimport \"unsafe\"\n\ntype IEnumVARIANT struct {\n\tIUnknown\n}\n\ntype IEnumVARIANTVtbl struct {\n\tIUnknownVtbl\n\tNext"
},
{
"path": "vendor/github.com/go-ole/go-ole/ienumvariant_func.go",
"chars": 413,
"preview": "// +build !windows\n\npackage ole\n\nfunc (enum *IEnumVARIANT) Clone() (*IEnumVARIANT, error) {\n\treturn nil, NewError(E_NOTI"
},
{
"path": "vendor/github.com/go-ole/go-ole/ienumvariant_windows.go",
"chars": 1052,
"preview": "// +build windows\n\npackage ole\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc (enum *IEnumVARIANT) Clone() (cloned *IEnumVARIANT"
},
{
"path": "vendor/github.com/go-ole/go-ole/iinspectable.go",
"chars": 316,
"preview": "package ole\n\nimport \"unsafe\"\n\ntype IInspectable struct {\n\tIUnknown\n}\n\ntype IInspectableVtbl struct {\n\tIUnknownVtbl\n\tGetI"
},
{
"path": "vendor/github.com/go-ole/go-ole/iinspectable_func.go",
"chars": 323,
"preview": "// +build !windows\n\npackage ole\n\nfunc (v *IInspectable) GetIids() ([]*GUID, error) {\n\treturn []*GUID{}, NewError(E_NOTIM"
},
{
"path": "vendor/github.com/go-ole/go-ole/iinspectable_windows.go",
"chars": 1437,
"preview": "// +build windows\n\npackage ole\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"reflect\"\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc (v *IInspec"
},
{
"path": "vendor/github.com/go-ole/go-ole/iprovideclassinfo.go",
"chars": 392,
"preview": "package ole\n\nimport \"unsafe\"\n\ntype IProvideClassInfo struct {\n\tIUnknown\n}\n\ntype IProvideClassInfoVtbl struct {\n\tIUnknown"
},
{
"path": "vendor/github.com/go-ole/go-ole/iprovideclassinfo_func.go",
"chars": 143,
"preview": "// +build !windows\n\npackage ole\n\nfunc getClassInfo(disp *IProvideClassInfo) (tinfo *ITypeInfo, err error) {\n\treturn nil,"
},
{
"path": "vendor/github.com/go-ole/go-ole/iprovideclassinfo_windows.go",
"chars": 326,
"preview": "// +build windows\n\npackage ole\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc getClassInfo(disp *IProvideClassInfo) (tinfo *ITyp"
},
{
"path": "vendor/github.com/go-ole/go-ole/itypeinfo.go",
"chars": 784,
"preview": "package ole\n\nimport \"unsafe\"\n\ntype ITypeInfo struct {\n\tIUnknown\n}\n\ntype ITypeInfoVtbl struct {\n\tIUnknownVtbl\n\tGetTypeAtt"
},
{
"path": "vendor/github.com/go-ole/go-ole/itypeinfo_func.go",
"chars": 123,
"preview": "// +build !windows\n\npackage ole\n\nfunc (v *ITypeInfo) GetTypeAttr() (*TYPEATTR, error) {\n\treturn nil, NewError(E_NOTIMPL)"
},
{
"path": "vendor/github.com/go-ole/go-ole/itypeinfo_windows.go",
"chars": 318,
"preview": "// +build windows\n\npackage ole\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc (v *ITypeInfo) GetTypeAttr() (tattr *TYPEATTR, err"
},
{
"path": "vendor/github.com/go-ole/go-ole/iunknown.go",
"chars": 1222,
"preview": "package ole\n\nimport \"unsafe\"\n\ntype IUnknown struct {\n\tRawVTable *interface{}\n}\n\ntype IUnknownVtbl struct {\n\tQueryInterfa"
},
{
"path": "vendor/github.com/go-ole/go-ole/iunknown_func.go",
"chars": 384,
"preview": "// +build !windows\n\npackage ole\n\nfunc reflectQueryInterface(self interface{}, method uintptr, interfaceID *GUID, obj int"
},
{
"path": "vendor/github.com/go-ole/go-ole/iunknown_windows.go",
"chars": 1068,
"preview": "// +build windows\n\npackage ole\n\nimport (\n\t\"reflect\"\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc reflectQueryInterface(self interface{},"
},
{
"path": "vendor/github.com/go-ole/go-ole/ole.go",
"chars": 3011,
"preview": "package ole\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\n// DISPPARAMS are the arguments that passed to methods or property.\ntype DISP"
},
{
"path": "vendor/github.com/go-ole/go-ole/oleutil/connection.go",
"chars": 2242,
"preview": "// +build windows\n\npackage oleutil\n\nimport (\n\t\"reflect\"\n\t\"unsafe\"\n\n\tole \"github.com/go-ole/go-ole\"\n)\n\ntype stdDispatch s"
},
{
"path": "vendor/github.com/go-ole/go-ole/oleutil/connection_func.go",
"chars": 293,
"preview": "// +build !windows\n\npackage oleutil\n\nimport ole \"github.com/go-ole/go-ole\"\n\n// ConnectObject creates a connection point "
},
{
"path": "vendor/github.com/go-ole/go-ole/oleutil/connection_windows.go",
"chars": 1572,
"preview": "// +build windows\n\npackage oleutil\n\nimport (\n\t\"reflect\"\n\t\"syscall\"\n\t\"unsafe\"\n\n\tole \"github.com/go-ole/go-ole\"\n)\n\n// Conn"
},
{
"path": "vendor/github.com/go-ole/go-ole/oleutil/go-get.go",
"chars": 145,
"preview": "// This file is here so go get succeeds as without it errors with:\n// no buildable Go source files in ...\n//\n// +build !"
},
{
"path": "vendor/github.com/go-ole/go-ole/oleutil/oleutil.go",
"chars": 3604,
"preview": "package oleutil\n\nimport ole \"github.com/go-ole/go-ole\"\n\n// ClassIDFrom retrieves class ID whether given is program ID or"
},
{
"path": "vendor/github.com/go-ole/go-ole/safearray.go",
"chars": 638,
"preview": "// Package is meant to retrieve and process safe array data returned from COM.\n\npackage ole\n\n// SafeArrayBound defines t"
},
{
"path": "vendor/github.com/go-ole/go-ole/safearray_func.go",
"chars": 6280,
"preview": "// +build !windows\n\npackage ole\n\nimport (\n\t\"unsafe\"\n)\n\n// safeArrayAccessData returns raw array pointer.\n//\n// AKA: Safe"
},
{
"path": "vendor/github.com/go-ole/go-ole/safearray_windows.go",
"chars": 12025,
"preview": "// +build windows\n\npackage ole\n\nimport (\n\t\"unsafe\"\n)\n\nvar (\n\tprocSafeArrayAccessData, _ = modoleaut32.FindProc(\"S"
},
{
"path": "vendor/github.com/go-ole/go-ole/safearrayconversion.go",
"chars": 3343,
"preview": "// Helper for converting SafeArray to array of objects.\n\npackage ole\n\nimport (\n\t\"unsafe\"\n)\n\ntype SafeArrayConversion str"
},
{
"path": "vendor/github.com/go-ole/go-ole/safearrayslices.go",
"chars": 720,
"preview": "// +build windows\n\npackage ole\n\nimport (\n\t\"unsafe\"\n)\n\nfunc safeArrayFromByteSlice(slice []byte) *SafeArray {\n\tarray, _ :"
},
{
"path": "vendor/github.com/go-ole/go-ole/utility.go",
"chars": 2173,
"preview": "package ole\n\nimport (\n\t\"unicode/utf16\"\n\t\"unsafe\"\n)\n\n// ClassIDFrom retrieves class ID whether given is program ID or app"
},
{
"path": "vendor/github.com/go-ole/go-ole/variables.go",
"chars": 358,
"preview": "// +build windows\n\npackage ole\n\nimport (\n\t\"syscall\"\n)\n\nvar (\n\tmodcombase = syscall.NewLazyDLL(\"combase.dll\")\n\tmodker"
},
{
"path": "vendor/github.com/go-ole/go-ole/variant.go",
"chars": 2407,
"preview": "package ole\n\nimport \"unsafe\"\n\n// NewVariant returns new variant based on type and value.\nfunc NewVariant(vt VT, val int6"
},
{
"path": "vendor/github.com/go-ole/go-ole/variant_386.go",
"chars": 177,
"preview": "// +build 386\n\npackage ole\n\ntype VARIANT struct {\n\tVT VT // 2\n\twReserved1 uint16 // 4\n\twReserved2 uint16 /"
},
{
"path": "vendor/github.com/go-ole/go-ole/variant_amd64.go",
"chars": 210,
"preview": "// +build amd64\n\npackage ole\n\ntype VARIANT struct {\n\tVT VT // 2\n\twReserved1 uint16 // 4\n\twReserved2 uint"
},
{
"path": "vendor/github.com/go-ole/go-ole/variant_s390x.go",
"chars": 210,
"preview": "// +build s390x\n\npackage ole\n\ntype VARIANT struct {\n\tVT VT // 2\n\twReserved1 uint16 // 4\n\twReserved2 uint"
},
{
"path": "vendor/github.com/go-ole/go-ole/vt_string.go",
"chars": 1824,
"preview": "// generated by stringer -output vt_string.go -type VT; DO NOT EDIT\n\npackage ole\n\nimport \"fmt\"\n\nconst (\n\t_VT_name_0 = \"V"
},
{
"path": "vendor/github.com/go-ole/go-ole/winrt.go",
"chars": 2432,
"preview": "// +build windows\n\npackage ole\n\nimport (\n\t\"reflect\"\n\t\"syscall\"\n\t\"unicode/utf8\"\n\t\"unsafe\"\n)\n\nvar (\n\tprocRoInitialize "
},
{
"path": "vendor/github.com/go-ole/go-ole/winrt_doc.go",
"chars": 842,
"preview": "// +build !windows\n\npackage ole\n\n// RoInitialize\nfunc RoInitialize(thread_type uint32) (err error) {\n\treturn NewError(E_"
},
{
"path": "vendor/github.com/mattn/go-runewidth/.travis.yml",
"chars": 205,
"preview": "language: go\ngo:\n - tip\nbefore_install:\n - go get github.com/mattn/goveralls\n - go get golang.org/x/tools/cmd/cover\ns"
},
{
"path": "vendor/github.com/mattn/go-runewidth/LICENSE",
"chars": 1085,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2016 Yasuhiro Matsumoto\n\nPermission is hereby granted, free of charge, to any perso"
},
{
"path": "vendor/github.com/mattn/go-runewidth/README.mkd",
"chars": 798,
"preview": "go-runewidth\n============\n\n[](https://travis-"
},
{
"path": "vendor/github.com/mattn/go-runewidth/runewidth.go",
"chars": 45414,
"preview": "package runewidth\n\nimport (\n\t\"os\"\n)\n\nvar (\n\t// EastAsianWidth will be set true if the current locale is CJK\n\tEastAsianWi"
},
{
"path": "vendor/github.com/mattn/go-runewidth/runewidth_appengine.go",
"chars": 138,
"preview": "// +build appengine\n\npackage runewidth\n\n// IsEastAsian return true if the current locale is CJK\nfunc IsEastAsian() bool "
},
{
"path": "vendor/github.com/mattn/go-runewidth/runewidth_js.go",
"chars": 190,
"preview": "// +build js\n// +build !appengine\n\npackage runewidth\n\nfunc IsEastAsian() bool {\n\t// TODO: Implement this for the web. De"
},
{
"path": "vendor/github.com/mattn/go-runewidth/runewidth_posix.go",
"chars": 1407,
"preview": "// +build !windows\n// +build !js\n// +build !appengine\n\npackage runewidth\n\nimport (\n\t\"os\"\n\t\"regexp\"\n\t\"strings\"\n)\n\nvar reL"
},
{
"path": "vendor/github.com/mattn/go-runewidth/runewidth_windows.go",
"chars": 456,
"preview": "// +build windows\n// +build !appengine\n\npackage runewidth\n\nimport (\n\t\"syscall\"\n)\n\nvar (\n\tkernel32 = syscal"
},
{
"path": "vendor/github.com/mitchellh/go-wordwrap/LICENSE.md",
"chars": 1085,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2014 Mitchell Hashimoto\n\nPermission is hereby granted, free of charge, to any perso"
},
{
"path": "vendor/github.com/mitchellh/go-wordwrap/README.md",
"chars": 1063,
"preview": "# go-wordwrap\n\n`go-wordwrap` (Golang package: `wordwrap`) is a package for Go that\nautomatically wraps words into multip"
},
{
"path": "vendor/github.com/mitchellh/go-wordwrap/go.mod",
"chars": 40,
"preview": "module github.com/mitchellh/go-wordwrap\n"
},
{
"path": "vendor/github.com/mitchellh/go-wordwrap/wordwrap.go",
"chars": 1679,
"preview": "package wordwrap\n\nimport (\n\t\"bytes\"\n\t\"unicode\"\n)\n\n// WrapString wraps the given string within lim width in characters.\n/"
},
{
"path": "vendor/github.com/nsf/termbox-go/AUTHORS",
"chars": 101,
"preview": "# Please keep this file sorted.\n\nGeorg Reinke <guelfey@googlemail.com>\nnsf <no.smile.face@gmail.com>\n"
},
{
"path": "vendor/github.com/nsf/termbox-go/LICENSE",
"chars": 1062,
"preview": "Copyright (C) 2012 termbox-go authors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof t"
},
{
"path": "vendor/github.com/nsf/termbox-go/README.md",
"chars": 3815,
"preview": "[](http://godoc.org/github.com/nsf/termbox-go)\n\n## Termb"
},
{
"path": "vendor/github.com/nsf/termbox-go/api.go",
"chars": 13201,
"preview": "// +build !windows\n\npackage termbox\n\nimport \"github.com/mattn/go-runewidth\"\nimport \"fmt\"\nimport \"os\"\nimport \"os/signal\"\n"
},
{
"path": "vendor/github.com/nsf/termbox-go/api_common.go",
"chars": 4436,
"preview": "// termbox is a library for creating cross-platform text-based interfaces\npackage termbox\n\n// public API, common OS agno"
},
{
"path": "vendor/github.com/nsf/termbox-go/api_windows.go",
"chars": 6163,
"preview": "package termbox\n\nimport (\n\t\"syscall\"\n)\n\n// public API\n\n// Initializes termbox library. This function should be called be"
},
{
"path": "vendor/github.com/nsf/termbox-go/collect_terminfo.py",
"chars": 2041,
"preview": "#!/usr/bin/env python\n\nimport sys, os, subprocess\n\ndef escaped(s):\n\treturn repr(s)[1:-1]\n\ndef tput(term, name):\n\ttry:\n\t\t"
},
{
"path": "vendor/github.com/nsf/termbox-go/escwait.go",
"chars": 373,
"preview": "// +build !darwin\n\npackage termbox\n\n// On all systems other than macOS, disable behavior which will wait before\n// decid"
},
{
"path": "vendor/github.com/nsf/termbox-go/escwait_darwin.go",
"chars": 329,
"preview": "package termbox\n\n// On macOS, enable behavior which will wait before deciding that the escape\n// key was pressed, to acc"
},
{
"path": "vendor/github.com/nsf/termbox-go/syscalls.go",
"chars": 773,
"preview": "// +build ignore\n\npackage termbox\n\n/*\n#include <termios.h>\n#include <sys/ioctl.h>\n*/\nimport \"C\"\n\ntype syscall_Termios C."
},
{
"path": "vendor/github.com/nsf/termbox-go/syscalls_darwin.go",
"chars": 753,
"preview": "// Created by cgo -godefs - DO NOT EDIT\n// cgo -godefs syscalls.go\n\n// +build !amd64\n\npackage termbox\n\ntype syscall_Term"
},
{
"path": "vendor/github.com/nsf/termbox-go/syscalls_darwin_amd64.go",
"chars": 775,
"preview": "// Created by cgo -godefs - DO NOT EDIT\n// cgo -godefs syscalls.go\n\npackage termbox\n\ntype syscall_Termios struct {\n\tIfla"
},
{
"path": "vendor/github.com/nsf/termbox-go/syscalls_dragonfly.go",
"chars": 735,
"preview": "// Created by cgo -godefs - DO NOT EDIT\n// cgo -godefs syscalls.go\n\npackage termbox\n\ntype syscall_Termios struct {\n\tIfla"
},
{
"path": "vendor/github.com/nsf/termbox-go/syscalls_freebsd.go",
"chars": 735,
"preview": "// Created by cgo -godefs - DO NOT EDIT\n// cgo -godefs syscalls.go\n\npackage termbox\n\ntype syscall_Termios struct {\n\tIfla"
},
{
"path": "vendor/github.com/nsf/termbox-go/syscalls_linux.go",
"chars": 828,
"preview": "// Created by cgo -godefs - DO NOT EDIT\n// cgo -godefs syscalls.go\n\npackage termbox\n\nimport \"syscall\"\n\ntype syscall_Term"
},
{
"path": "vendor/github.com/nsf/termbox-go/syscalls_netbsd.go",
"chars": 733,
"preview": "// Created by cgo -godefs - DO NOT EDIT\n// cgo -godefs syscalls.go\n\npackage termbox\n\ntype syscall_Termios struct {\n\tIfla"
},
{
"path": "vendor/github.com/nsf/termbox-go/syscalls_openbsd.go",
"chars": 733,
"preview": "// Created by cgo -godefs - DO NOT EDIT\n// cgo -godefs syscalls.go\n\npackage termbox\n\ntype syscall_Termios struct {\n\tIfla"
},
{
"path": "vendor/github.com/nsf/termbox-go/syscalls_windows.go",
"chars": 1487,
"preview": "// Created by cgo -godefs - DO NOT EDIT\n// cgo -godefs -- -DUNICODE syscalls.go\n\npackage termbox\n\nconst (\n\tforeground_bl"
}
]
// ... and 454 more files (download for full content)
About this extraction
This page contains the full source code of the cjbassi/gotop GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 654 files (7.8 MB), approximately 2.1M tokens, and a symbol index with 101823 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.