clipboard

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: Apache-2.0, BSD-3-Clause Imports: 5 Imported by: 0

README

clipboard

This package provides access to the system's text clipboard for the Go programming language. Windows, OSX and Linux (GTK) are supported.

Install with go get github.com/tjgq/clipboard.

Browse the package documentation at http://godoc.org/github.com/tjgq/clipboard.

Documentation

Overview

Package clipboard gives access to the system's text clipboard.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get() (string, error)

Get returns the current clipboard value.

func Notify

func Notify(c chan<- string)

Notify causes c to receive future clipboard values. If c is already receiving clipboard values, Notify is a no-op.

This package will not block sending to c. It is the caller's responsibility to either ensure enough buffer is available.

func Set

func Set(s string) error

Set sets the clipboard value.

func Unnotify

func Unnotify(c chan<- string)

Unnotify causes c to no longer receive clipboard values. If c is not receiving clipboard values, Unnotify is a no-op.

It is guaranteed that c receives no more values after Unnotify returns.

Types

This section is empty.

Jump to

Keyboard shortcuts

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