check / check (push) Failing after 1s
script/lint-darwin (make lint-darwin; run by script/check, and its commands by the Dockerfile lint stage) runs go vet and golangci-lint with GOOS=darwin and cgo off. Compiling cgo for macOS needs Apple's SDK, and keychainunlocker.go uses go-keychain, which is cgo there, so it and its tests are now built only with cgo on macOS, like internal/macse; their stubs serve a macOS build without cgo. checkMacOSAvailable moves to seunlocker_darwin.go. The findings in the newly checked files are fixed, and lines over 88 columns in the unchecked ones are wrapped. Model: opus-5-5
29 lines
742 B
Go
29 lines
742 B
Go
//go:build !darwin || !cgo
|
|
|
|
// Package macse provides Go bindings for macOS Secure Enclave operations.
|
|
package macse
|
|
|
|
import "errors"
|
|
|
|
var errNotSupported = errors.New("secure enclave is only supported on macOS")
|
|
|
|
// CreateKey is not supported on non-darwin platforms.
|
|
func CreateKey(_ string) ([]byte, string, error) {
|
|
return nil, "", errNotSupported
|
|
}
|
|
|
|
// Encrypt is not supported on non-darwin platforms.
|
|
func Encrypt(_ string, _ []byte) ([]byte, error) {
|
|
return nil, errNotSupported
|
|
}
|
|
|
|
// Decrypt is not supported on non-darwin platforms.
|
|
func Decrypt(_ string, _ []byte) ([]byte, error) {
|
|
return nil, errNotSupported
|
|
}
|
|
|
|
// DeleteKey is not supported on non-darwin platforms.
|
|
func DeleteKey(_ string) error {
|
|
return errNotSupported
|
|
}
|