code: func (env EnvironmentItemModel) GetKeyValuePair() (string, string, error) {
  	// Collect keys and values
  	keys := []string{}
  	values := []interface{}{}
  
  	for key, value := range env {
  		keys = append(keys, key)
  		values = append(values, value)
  	}
  
  	if len(keys) == 0 {
  		return "", "", errors.New("no environment key specified")
  	} else if len(keys) > 2 {
  		sort.Strings(keys)
  		return "", "", fmt.Errorf("more than 2 keys specified: %v", keys)
  	}
  
  	// Collect env key and value
  	key := ""
  	var value interface{}
  	optionsFound := false
  
  	for i := 0; i < len(keys); i++ {
  		k := keys[i]
  		if k != OptionsKey {
  			key = k
  			value = values[i]
  		} else {
  			optionsFound = true
  		}
  	}
  
  	if key == "" {
  		sort.Strings(keys)
  		return "", "", fmt.Errorf("no environment key found, keys: %v", keys)
  	}
  	if len(keys) > 1 && !optionsFound {
  		sort.Strings(keys)
  		return "", "", fmt.Errorf("more than 1 environment key specified: %v", keys)
  	}
  
  	// Cast env value to string
  	valueStr := ""
  
  	if value != nil {
  		if str, ok := value.(string); ok {
  			valueStr = str
  		} else if str := parseutil.CastToString(value); str != "" {
  			valueStr = str
  		} else {
  			return "", "", fmt.Errorf("value (%#v) is not a string for key (%s)", value, key)
  		}
  	}
  
  	return key, valueStr, nil
  }
docs: // GetKeyValuePair ...