<commit_before>package cmd

import (
	"fmt"
	"log"

	gm "google.golang.org/api/gmail/v1"

	"github.com/spf13/cobra"

	"github.com/tsiemens/gmail-tools/prnt"
)

var DryRun = false
var AssumeYes = false

func addDryFlag(command *cobra.Command) {
	command.Flags().BoolVarP(&DryRun, "dry", "n", false,
		"Perform no action, just print what would be done")
}

func addAssumeYesFlag(command *cobra.Command) {
	command.Flags().BoolVarP(&AssumeYes, "assumeyes", "y", false,
		"Answer 'yes' for all prompts")
}

func maybeTouchMessages(msgs []*gm.Message, helper *GmailHelper) {
	plural := ""
	if len(msgs) > 1 {
		plural = "s"
	}

	if DryRun {
		fmt.Println("Skipping touching message" + plural + " (--dry provided)")
	} else {
		if MaybeConfirmFromInput("Mark message"+plural+" touched?", false) {
			err := helper.TouchMessages(msgs)
			if err != nil {
				log.Fatalf("Failed to touch message"+plural+": %s\n", err)
			} else {
				prnt.HPrintln(prnt.Quietable, "Message"+plural+" marked touched")
			}
		}
	}
}<commit_msg>Default the touch option to true for the user choice<commit_after>package cmd

import (
	"fmt"
	"log"

	gm "google.golang.org/api/gmail/v1"

	"github.com/spf13/cobra"

	"github.com/tsiemens/gmail-tools/prnt"
)

var DryRun = false
var AssumeYes = false

func addDryFlag(command *cobra.Command) {
	command.Flags().BoolVarP(&DryRun, "dry", "n", false,
		"Perform no action, just print what would be done")
}

func addAssumeYesFlag(command *cobra.Command) {
	command.Flags().BoolVarP(&AssumeYes, "assumeyes", "y", false,
		"Answer 'yes' for all prompts")
}

func maybeTouchMessages(msgs []*gm.Message, helper *GmailHelper) {
	plural := ""
	if len(msgs) > 1 {
		plural = "s"
	}

	if DryRun {
		fmt.Println("Skipping touching message" + plural + " (--dry provided)")
	} else {
		if MaybeConfirmFromInput("Mark message"+plural+" touched?", true) {
			err := helper.TouchMessages(msgs)
			if err != nil {
				log.Fatalf("Failed to touch message"+plural+": %s\n", err)
			} else {
				prnt.HPrintln(prnt.Quietable, "Message"+plural+" marked touched")
			}
		}
	}
}
{'fraction_non_alphanumeric': 0.15926640926640925, 'fraction_numerical': 0.003861003861003861, 'mean_word_length': 4.156716417910448, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4281364', 'n_tokens_mistral': 850, 'n_tokens_neox': 776, 'n_words': 177}