code: func AskForString(ctx context.Context, text, def string) (string, error) {
  	if ctxutil.IsAlwaysYes(ctx) || !ctxutil.IsInteractive(ctx) {
  		return def, nil
  	}
  
  	// check for context cancelation
  	select {
  	case <-ctx.Done():
  		return def, ErrAborted
  	default:
  	}
  
  	fmt.Fprintf(Stdout, "%s [%s]: ", text, def)
  	input, err := NewReader(Stdin).ReadLine()
  	if err != nil {
  		return "", errors.Wrapf(err, "failed to read user input")
  	}
  	input = strings.TrimSpace(input)
  	if input == "" {
  		input = def
  	}
  	return input, nil
  }
docs: // AskForString asks for a string once, using the default if the
  // anser is empty. Errors are only returned on I/O errors