What you are really wanting there is to run xsel --clipboard and pipe data 
into it. Talk to your cmd.Stdin!
This is mostly straight from the StdinPipe example in the go docs:

cmd := exec.Command ("xsel","--clipboard" )
stdin, err := cmd.StdinPipe()
if err != nil {

go func() {
defer stdin.Close()
io.WriteString(stdin, "values written to stdin are passed to cmd's standard 
input and in this case end up on the X clipboard")

out, err := cmd.CombinedOutput()
if err != nil {

You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Reply via email to