17 lines
226 B
Go
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()
|
|
}
|