code: func NewWhitelist(patterns []string) (*patternWhitelist, error) {
  	w := &patternWhitelist{
  		sysctls:  map[string]Namespace{},
  		prefixes: map[string]Namespace{},
  	}
  
  	for _, s := range patterns {
  		if !policyvalidation.IsValidSysctlPattern(s) {
  			return nil, fmt.Errorf("sysctl %q must have at most %d characters and match regex %s",
  				s,
  				validation.SysctlMaxLength,
  				policyvalidation.SysctlPatternFmt,
  			)
  		}
  		if strings.HasSuffix(s, "*") {
  			prefix := s[:len(s)-1]
  			ns := NamespacedBy(prefix)
  			if ns == UnknownNamespace {
  				return nil, fmt.Errorf("the sysctls %q are not known to be namespaced", s)
  			}
  			w.prefixes[prefix] = ns
  		} else {
  			ns := NamespacedBy(s)
  			if ns == UnknownNamespace {
  				return nil, fmt.Errorf("the sysctl %q are not known to be namespaced", s)
  			}
  			w.sysctls[s] = ns
  		}
  	}
  	return w, nil
  }
docs: // NewWhitelist creates a new Whitelist from a list of sysctls and sysctl pattern (ending in *).