code: func GetResourcesAndPairs(args []string, pairType string) (resources []string, pairArgs []string, err error) {
  	foundPair := false
  	for _, s := range args {
  		nonResource := (strings.Contains(s, "=") && s[0] != '=') || (strings.HasSuffix(s, "-") && s != "-")
  		switch {
  		case !foundPair && nonResource:
  			foundPair = true
  			fallthrough
  		case foundPair && nonResource:
  			pairArgs = append(pairArgs, s)
  		case !foundPair && !nonResource:
  			resources = append(resources, s)
  		case foundPair && !nonResource:
  			err = fmt.Errorf("all resources must be specified before %s changes: %s", pairType, s)
  			return
  		}
  	}
  	return
  }
docs: // GetResourcesAndPairs retrieves resources and "KEY=VALUE or KEY-" pair args from given args