mirror of
https://github.com/eeeXun/GTT.git
synced 2025-05-29 05:50:17 -07:00
style(format): run gofmt
This commit is contained in:
parent
8f2b3167d6
commit
161af85fb2
20
utils.go
20
utils.go
@ -23,16 +23,16 @@ func SetTermTitle(title string) {
|
|||||||
func CopyToClipboard(text string) {
|
func CopyToClipboard(text string) {
|
||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
case "linux":
|
case "linux":
|
||||||
switch os.Getenv("XDG_SESSION_TYPE") {
|
switch os.Getenv("XDG_SESSION_TYPE") {
|
||||||
case "x11":
|
case "x11":
|
||||||
exec.Command("sh", "-c",
|
exec.Command("sh", "-c",
|
||||||
fmt.Sprintf("echo -n '%s' | xclip -selection clipboard", text)).
|
fmt.Sprintf("echo -n '%s' | xclip -selection clipboard", text)).
|
||||||
Start()
|
Start()
|
||||||
case "wayland":
|
case "wayland":
|
||||||
exec.Command("sh", "-c",
|
exec.Command("sh", "-c",
|
||||||
fmt.Sprintf("echo -n '%s' | wl-copy", text)).
|
fmt.Sprintf("echo -n '%s' | wl-copy", text)).
|
||||||
Start()
|
Start()
|
||||||
}
|
}
|
||||||
case "darwin":
|
case "darwin":
|
||||||
exec.Command("sh", "-c",
|
exec.Command("sh", "-c",
|
||||||
fmt.Sprintf("echo -n '%s' | pbcopy", text)).
|
fmt.Sprintf("echo -n '%s' | pbcopy", text)).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user