code: func processArgs() (cfg *etcd.ClientConfig, op int, data []string, err error) {
  	var task []string
  
  	// default args
  	fileConfig := &etcd.Config{}
  	op = Put
  
  	if len(os.Args) > 2 {
  		if os.Args[1] == "--cfg" {
  			err = config.ParseConfigFromYamlFile(os.Args[2], fileConfig)
  			if err != nil {
  				return
  			}
  			cfg, err = etcd.ConfigToClient(fileConfig)
  			if err != nil {
  				return
  			}
  
  			task = os.Args[3:]
  		} else {
  			task = os.Args[1:]
  		}
  	} else {
  		return cfg, 0, nil, fmt.Errorf("incorrect arguments")
  	}
  
  	if len(task) < 2 || (task[0] == "put" && len(task) < 4) {
  		return cfg, 0, nil, fmt.Errorf("incorrect arguments")
  	}
  
  	if task[0] == "delete" {
  		op = Delete
  	} else if task[0] == "puttxn" {
  		op = PutTxn
  	}
  
  	return cfg, op, task[1:], nil
  }
docs: // processArgs processes input arguments.