code: func FromStrings(str []string, skip func(string) bool) (*Set, error) {
  	set := &Set{}
  	for _, s := range str {
  		if skip != nil && skip(s) {
  			continue
  		}
  		switch {
  		case s == "*":
  			set.All = true
  		case strings.HasPrefix(s, "group:"):
  			gr := strings.TrimPrefix(s, "group:")
  			if gr == "" {
  				return nil, fmt.Errorf("invalid entry %q", s)
  			}
  			set.AddGroup(gr)
  		default:
  			id, err := identity.MakeIdentity(s)
  			if err != nil {
  				return nil, err
  			}
  			set.AddIdentity(id)
  		}
  	}
  	// If '*' was used, separately listed IDs and groups are redundant.
  	if set.All {
  		set.Groups = nil
  		set.IDs = nil
  	}
  	return set, nil
  }
docs: // FromStrings constructs a Set by parsing a slice of strings.
  //
  // Each string is either:
  //  * "<kind>:<id>" identity string.
  //  * "group:<name>" group reference.
  //  * "*" token to mean "All identities".
  //
  // Any string that matches 'skip' predicate is skipped.