passgo/impl_linux.go

17 lines
226 B
Go
Raw Permalink Normal View History

2019-09-10 14:50:56 -04:00
//+build !android,linux
2019-09-10 12:27:38 -04:00
package passgo
import (
"bytes"
"os/exec"
)
//Clip copies a string to the clipboard
func Clip(x string) {
b := bytes.NewBuffer([]byte(x))
cmd := exec.Command("xclip")
cmd.Stdin = b
cmd.Run()
}