mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-27 20:36:29 -04:00
Explicitly ignore some errors
This commit is contained in:
+2
-2
@@ -12,7 +12,7 @@ import (
|
||||
// copyString copies a string to the clipboard.
|
||||
func copyString(continuous bool, copySubject string) error {
|
||||
cmd := exec.Command("pbcopy")
|
||||
back.WriteToStdin(cmd, copySubject)
|
||||
_ = back.WriteToStdin(cmd, copySubject)
|
||||
err := cmd.Run()
|
||||
if err != nil {
|
||||
return errors.New("unable to copy to clipboard: " + err.Error())
|
||||
@@ -26,6 +26,6 @@ func copyString(continuous bool, copySubject string) error {
|
||||
// getClipCommands returns the commands for pasting and clearing the clipboard contents.
|
||||
func getClipCommands() (*exec.Cmd, *exec.Cmd) {
|
||||
cmdClear := exec.Command("pbcopy")
|
||||
back.WriteToStdin(cmdClear, "")
|
||||
_ = back.WriteToStdin(cmdClear, "")
|
||||
return exec.Command("pbpaste"), cmdClear
|
||||
}
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@ import (
|
||||
// copyString copies a string to the clipboard.
|
||||
func copyString(continuous bool, copySubject string) error {
|
||||
cmd := exec.Command("termux-clipboard-set")
|
||||
back.WriteToStdin(cmd, copySubject)
|
||||
_ = back.WriteToStdin(cmd, copySubject)
|
||||
err := cmd.Run()
|
||||
if err != nil {
|
||||
return errors.New("unable to copy to clipboard: " + err.Error())
|
||||
@@ -26,6 +26,6 @@ func copyString(continuous bool, copySubject string) error {
|
||||
// getClipCommands returns the commands for pasting and clearing the clipboard contents.
|
||||
func getClipCommands() (*exec.Cmd, *exec.Cmd) {
|
||||
cmdClear := exec.Command("termux-clipboard-set")
|
||||
back.WriteToStdin(cmdClear, "")
|
||||
_ = back.WriteToStdin(cmdClear, "")
|
||||
return exec.Command("termux-clipboard-get"), cmdClear
|
||||
}
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ func copyString(continuous bool, copySubject string) error {
|
||||
return errors.New("clipboard platform could not be determined")
|
||||
}
|
||||
|
||||
back.WriteToStdin(cmdCopy, copySubject)
|
||||
_ = back.WriteToStdin(cmdCopy, copySubject)
|
||||
err := cmdCopy.Run()
|
||||
if err != nil {
|
||||
return errors.New("unable to copy to clipboard: " + err.Error())
|
||||
|
||||
Reference in New Issue
Block a user