v/GTT
1
0
mirror of https://github.com/eeeXun/GTT.git synced 2025-05-27 21:11:11 -07:00

feat: windows clipboard(#6)

This commit is contained in:
Shalmon Anandas 2023-01-19 09:36:20 +05:30 committed by GitHub
parent 717630e3b7
commit 9c7056ed8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
gtt
*.exe

View File

@ -29,5 +29,9 @@ func CopyToClipboard(text string) {
exec.Command("sh", "-c",
fmt.Sprintf("echo -n '%s' | pbcopy", text)).
Start()
case "windows":
exec.Command("cmd", "/c",
fmt.Sprintf("echo %s | clip", text)).
Start()
}
}