Package ossec provides Pledge and Unveil. These are enforced using the pledge(2) and unveil(2) system calls when compiled on OpenBSD and a no-op when compiled on other systems.
browse code or git clone https://go.netsend.nl/ossec.git
import "go.netsend.nl/ossec"
func Pledge(promises, execpromises string) error
func PledgePromises(promises string) error
func Unveil(path string, permissions string) error