mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-05-31 06:13:55 +00:00
fix clipboard golint
This commit is contained in:
parent
43ae76caff
commit
83dcf38788
@ -17,6 +17,7 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
// Primary choose primary mode on unix
|
||||
Primary bool
|
||||
|
||||
pasteCmdArgs []string
|
||||
@ -28,7 +29,7 @@ var (
|
||||
xclipPasteArgs = []string{xclip, "-out", "-selection", "clipboard"}
|
||||
xclipCopyArgs = []string{xclip, "-in", "-selection", "clipboard"}
|
||||
|
||||
missingCommands = errors.New("No clipboard utilities available. Please install xsel or xclip")
|
||||
errMissingCommands = errors.New("No clipboard utilities available. Please install xsel or xclip")
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -65,7 +66,7 @@ func getCopyCommand() *exec.Cmd {
|
||||
|
||||
func readAll() (string, error) {
|
||||
if Unsupported {
|
||||
return "", missingCommands
|
||||
return "", errMissingCommands
|
||||
}
|
||||
pasteCmd := getPasteCommand()
|
||||
out, err := pasteCmd.Output()
|
||||
@ -77,7 +78,7 @@ func readAll() (string, error) {
|
||||
|
||||
func writeAll(text string) error {
|
||||
if Unsupported {
|
||||
return missingCommands
|
||||
return errMissingCommands
|
||||
}
|
||||
copyCmd := getCopyCommand()
|
||||
in, err := copyCmd.StdinPipe()
|
||||
|
@ -63,7 +63,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
version string = "v0.48.0.501, Ben Nevis!"
|
||||
version string = "v0.48.0.503, Ben Nevis!"
|
||||
)
|
||||
|
||||
type (
|
||||
|
Loading…
Reference in New Issue
Block a user