clipboard

package
v0.3.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package clipboard provides a thin wrapper for writing text to the system clipboard. It uses platform-native CLI tools (xclip/xsel on Linux, pbcopy on macOS, clip.exe on Windows) so that no CGO or display-server headers are required at build time. Availability is determined at runtime by probing for the tools.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available() bool

Available reports whether a clipboard tool was found on this system.

func Write

func Write(text string) error

Write copies text to the system clipboard. Returns an error when no suitable clipboard tool is available.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL