Tells you when a copy came from a password manager, so a clipboard manager, a history, or a sync tool can leave it alone. No breaking changes: go get golang.design/x/clipboard@v0.11.0.
New
Sensitive and Data.Sensitive (#178, #179). Password managers mark the passwords they copy, but this package couldn't see those marks, because Formats only reports MIME-shaped types. So a tool built on Watch synced every password its user copied. Now:
for data := range clipboard.Watch(ctx, clipboard.FmtText) {
if data.Sensitive {
continue // a password: don't store or upload it
}
save(data.Bytes)
}clipboard.Sensitive(ctx) answers the same question for the current content.
| Platform | Mark read |
|---|---|
| macOS | org.nspasteboard.ConcealedType, org.nspasteboard.TransientType
|
| Windows | ExcludeClipboardContentFromMonitorProcessing; CanIncludeInClipboardHistory or CanUploadToCloudClipboard set to 0
|
| X11, Wayland | x-kde-passwordManagerHint
|
On iOS, Android and in the browser there's no mark to read, so Sensitive returns ErrUnsupported, never a false that looks like "safe". Checking for the mark isn't a paste, so it doesn't count against a Loops limit.
Fixed
- The README's CI badge showed "no status" (#177).
Full changelog: v0.10.0...v0.11.0