Package clipboard
provide a simple clipboard read and write operations.
go get github.com/gookit/goutil/sysutil/clipboard
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)