passgo/impl_linux.go
2019-09-10 14:50:56 -04:00

17 lines
226 B
Go

//+build !android,linux
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()
}