Better modularize clipboard code (add "clip" package; break up TOTP code

This commit is contained in:
2025-11-09 23:23:47 -05:00
parent d49632d221
commit bf1399ce8d
14 changed files with 162 additions and 140 deletions
+16
View File
@@ -0,0 +1,16 @@
//go:build (android && !termux) || ios
package clip
import (
"golang.design/x/clipboard"
)
// CopyString copies a string to the clipboard.
func CopyString(continuous bool, copySubject string) error {
clipboard.Write(clipboard.FmtText, []byte(copySubject))
if !continuous {
LaunchClipClearProcess(copySubject)
}
return nil
}