Skip to content

Latest commit

 

History

History

clipboard

Clipboard

Package clipboard provide a simple clipboard read and write operations.

Install

go get github.com/gookit/goutil/sysutil/clipboard

Usage

Examples:

src := "hello, this is clipboard"
err = clipboard.WriteString(src)
assert.NoErr(t, err)

// str: "hello, this is clipboard"
str, err = clipboard.ReadString()
assert.NoErr(t, err)
assert.NotEmpty(t, str)
assert.Eq(t, src, str)

Related