// Valid checks if the ACL is valid. func (acl *ACL) Valid() bool { rv := C.acl_valid(acl.a) if rv < 0 { return false } return true }
func NewFromString(s string) (self *ACL, e error) { cs := C.CString(s) ptr, err := C.acl_from_text(cs) if err != nil { return nil, err } ret, err := C.acl_valid(ptr) if ret != 0 && err != nil { return nil, err } self = &ACL{ptr: ptr} return self, nil }