Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-clipboard

A cross-platform Go library for clipboard operations.
Supports Linux, macOS, Windows, and WSL environments.

Features

  • Copy text to the native clipboard on all major platforms
  • Special support for copying from WSL to Windows clipboard
  • Simple, thread-safe API
  • Empty strings are rejected automatically

Design

Platform-specific implementations use Go build tags, so only the required clipboard backend is compiled into the final binary.

Usage

import "github.com/rshayer95/go-clipboard/clipboard"

cb, err := clipboard.New()
if err != nil {
    log.Fatal(err)
}
cb.Copy("Hello, world!")
cb.CopyToHost("Hello from WSL!")

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages