Explicitly ignore some errors

This commit is contained in:
2025-06-28 21:25:58 -04:00
parent 362eb75dc4
commit dd622c59e2
5 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -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
View File
@@ -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
View File
@@ -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())