mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-05-29 21:43:55 +00:00
Update clipboard example code
This commit is contained in:
parent
7bbc39e975
commit
d008e6aa25
@ -7,14 +7,19 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
clipboard.WriteAll("日本語")
|
||||
err := clipboard.WriteAll("日本語")
|
||||
if err != nil {
|
||||
log.Println("clipboard write all error: ", err)
|
||||
}
|
||||
|
||||
text, err := clipboard.ReadAll()
|
||||
if err != nil {
|
||||
log.Println("clipboard read all error: ", err)
|
||||
} else {
|
||||
if text != "" {
|
||||
log.Println("text is: ", text)
|
||||
// Output: 日本語
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if text != "" {
|
||||
log.Println("text is: ", text)
|
||||
// Output: 日本語
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user