code: func (s *Action) generatePasswordXKCD(ctx context.Context, c *cli.Context, length string) (string, error) {
  	xkcdSeparator := " "
  	if c.IsSet("xkcdsep") {
  		xkcdSeparator = c.String("xkcdsep")
  	}
  
  	var pwlen int
  	if length == "" {
  		candidateLength := defaultXKCDLength
  		question := "How many words should be combined to a password?"
  		iv, err := termio.AskForInt(ctx, question, candidateLength)
  		if err != nil {
  			return "", ExitError(ctx, ExitUsage, err, "password length must be a number")
  		}
  		pwlen = iv
  	} else {
  		iv, err := strconv.Atoi(length)
  		if err != nil {
  			return "", ExitError(ctx, ExitUsage, err, "password length must be a number: %s", err)
  		}
  		pwlen = iv
  	}
  
  	if pwlen < 1 {
  		return "", ExitError(ctx, ExitUsage, nil, "password length must not be zero")
  	}
  
  	return xkcdgen.RandomLengthDelim(pwlen, xkcdSeparator, c.String("xkcdlang"))
  }
docs: // generatePasswordXKCD walks through the steps necessary to create an XKCD-style
  // password