mirror of
https://github.com/eeeXun/GTT.git
synced 2025-05-29 14:00:29 -07:00
feat: windows clipboard(#6)
This commit is contained in:
parent
717630e3b7
commit
9c7056ed8b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
gtt
|
gtt
|
||||||
|
*.exe
|
4
utils.go
4
utils.go
@ -29,5 +29,9 @@ func CopyToClipboard(text string) {
|
|||||||
exec.Command("sh", "-c",
|
exec.Command("sh", "-c",
|
||||||
fmt.Sprintf("echo -n '%s' | pbcopy", text)).
|
fmt.Sprintf("echo -n '%s' | pbcopy", text)).
|
||||||
Start()
|
Start()
|
||||||
|
case "windows":
|
||||||
|
exec.Command("cmd", "/c",
|
||||||
|
fmt.Sprintf("echo %s | clip", text)).
|
||||||
|
Start()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user