code: func (kc *kubeClient) getRulesForEnvironment(envName string) (*accessRules, error) {
  	// Check if we have a cached copy
  	rules, pres := kc.rulesMap[envName]
  	if pres {
  		return rules, nil
  	}
  
  	// Lookup authorization rules for this environment
  	envNS, err := kc.getEnvironmentNamespace(envName)
  	if err != nil {
  		return nil, err
  	}
  	rules, err = kc.lookupAllRules(envNS)
  	if err != nil {
  		return nil, err
  	}
  
  	// Cache rules, so subsequent calls by this kubeClient don't
  	// trigger lookup over network
  	kc.rulesMap[envName] = rules
  	return rules, nil
  }
docs: // Gets the authorization rules for the current user in a given environment