code: func ParsePairs(pairArgs []string, pairType string, supportRemove bool) (newPairs map[string]string, removePairs []string, err error) {
  	newPairs = map[string]string{}
  	if supportRemove {
  		removePairs = []string{}
  	}
  	var invalidBuf bytes.Buffer
  	var invalidBufNonEmpty bool
  	for _, pairArg := range pairArgs {
  		if strings.Contains(pairArg, "=") && pairArg[0] != '=' {
  			parts := strings.SplitN(pairArg, "=", 2)
  			if len(parts) != 2 {
  				if invalidBufNonEmpty {
  					invalidBuf.WriteString(", ")
  				}
  				invalidBuf.WriteString(pairArg)
  				invalidBufNonEmpty = true
  			} else {
  				newPairs[parts[0]] = parts[1]
  			}
  		} else if supportRemove && strings.HasSuffix(pairArg, "-") && pairArg != "-" {
  			removePairs = append(removePairs, pairArg[:len(pairArg)-1])
  		} else {
  			if invalidBufNonEmpty {
  				invalidBuf.WriteString(", ")
  			}
  			invalidBuf.WriteString(pairArg)
  			invalidBufNonEmpty = true
  		}
  	}
  	if invalidBufNonEmpty {
  		err = fmt.Errorf("invalid %s format: %s", pairType, invalidBuf.String())
  		return
  	}
  
  	return
  }
docs: // ParsePairs retrieves new and remove pairs (if supportRemove is true) from "KEY=VALUE or KEY-" pair args