diff --git a/src/utils/utils.go b/src/utils/utils.go index 39d2fbe..09e0f96 100644 --- a/src/utils/utils.go +++ b/src/utils/utils.go @@ -4,6 +4,8 @@ import ( "net" "os" "strings" + + "github.com/atotto/clipboard" ) func GetComputerName() string { @@ -56,3 +58,11 @@ func ConvertIPAddress(addrs []net.Addr) []string { } return ipaddress } + +// SetClipboard, returns error or nil + +func SetClipboard(text string) error { + // Set the clipboard to the text + // Get the clipboard from the clipboard package + return clipboard.WriteAll(text) +}