Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
keychain
✓ github.com/keybase/go-keychain
Add a generic password to the macOS Keychain.
package main
import (
"fmt"
"github.com/keybase/go-keychain"
)
func main() {
item := keychain.NewItem()
item.SetSecClass(keychain.SecClassGenericPassword)
item.SetService("MyService")
item.SetAccount("myaccount")
item.SetData([]byte("secret"))
err := keychain.AddItem(item)
if err != nil {
fmt.Println("Error:", err)
}
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.1latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.