Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for isKeyInList (0.1 sec)

  1. pilot/pkg/security/trustdomain/util.go

    	if !strings.HasPrefix(pattern, "*") {
    		return false
    	}
    	pattern = strings.TrimPrefix(pattern, "*")
    	return strings.HasSuffix(a, pattern)
    }
    
    // isKeyInList it's fine to use this naive implementation for searching in a very short list.
    func isKeyInList(key string, list []string) bool {
    	for _, l := range list {
    		if key == l {
    			return true
    		}
    	}
    	return false
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Aug 13 15:27:59 UTC 2021
    - 2K bytes
    - Viewed (0)
  2. pilot/pkg/security/trustdomain/bundle.go

    		// has a * prefix. For example, "*-td" can match with "old-td" and "new-td", but we only want
    		// to keep the principal as-is in the generated config, .i.e. *-td.
    		if !isKeyInList(newPrincipal, principalsForAliases) {
    			principalsForAliases = append(principalsForAliases, newPrincipal)
    		}
    	}
    	return principalsForAliases
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Oct 23 15:48:01 UTC 2023
    - 7.5K bytes
    - Viewed (0)
Back to top