<commit_before>package commands

import (
	"errors"
	"github.com/millenc/golatch"
	"github.com/spf13/cobra"
)

//Flag variables
var ParentID string
var Name string
var TwoFactor string
var LockOnRequest string

//Flag initialization
func init() {
	OperationAddCmd.PersistentFlags().StringVarP(&ParentID, "parent", "p", "", "Parent ID (must be an existing operation or application)")
	OperationAddCmd.PersistentFlags().StringVarP(&Name, "name", "n", "", "Name of the operation")
	OperationAddCmd.PersistentFlags().StringVarP(&TwoFactor, "two-factor", "t", golatch.DISABLED, "Two Factor Authentication (possible values are MANDATORY,OPT_IN and DISABLED)")
	OperationAddCmd.PersistentFlags().StringVarP(&LockOnRequest, "lock-on-request", "l", golatch.DISABLED, "Lock On Request (possible values are MANDATORY,OPT_IN and DISABLED)")
}

//Status command
var OperationAddCmd = &cobra.Command{
	Use:   "add",
	Short: "Adds a new operation",
	Run: func(cmd *cobra.Command, args []string) {
		if ParentID == "" {
			Session.Halt(errors.New("You must provide the ID of the parent operation or application (--parent)."))
		}
		if Name == "" {
			Session.Halt(errors.New("You must provide the new operation's name (--name)."))
		}

		if resp, err := Latch.AddOperation(ParentID, Name, TwoFactor, LockOnRequest); err == nil {
			Session.AddSuccess("Operation created with ID: " + resp.OperationId())
		} else {
			Session.Halt(err)
		}
	},
}<commit_msg>Fixed Add operation command comment.<commit_after>package commands

import (
	"errors"
	"github.com/millenc/golatch"
	"github.com/spf13/cobra"
)

//Flag variables
var ParentID string
var Name string
var TwoFactor string
var LockOnRequest string

//Flag initialization
func init() {
	OperationAddCmd.PersistentFlags().StringVarP(&ParentID, "parent", "p", "", "Parent ID (must be an existing operation or application)")
	OperationAddCmd.PersistentFlags().StringVarP(&Name, "name", "n", "", "Name of the operation")
	OperationAddCmd.PersistentFlags().StringVarP(&TwoFactor, "two-factor", "t", golatch.DISABLED, "Two Factor Authentication (possible values are MANDATORY,OPT_IN and DISABLED)")
	OperationAddCmd.PersistentFlags().StringVarP(&LockOnRequest, "lock-on-request", "l", golatch.DISABLED, "Lock On Request (possible values are MANDATORY,OPT_IN and DISABLED)")
}

//Add Operation command
var OperationAddCmd = &cobra.Command{
	Use:   "add",
	Short: "Adds a new operation",
	Run: func(cmd *cobra.Command, args []string) {
		if ParentID == "" {
			Session.Halt(errors.New("You must provide the ID of the parent operation or application (--parent)."))
		}
		if Name == "" {
			Session.Halt(errors.New("You must provide the new operation's name (--name)."))
		}

		if resp, err := Latch.AddOperation(ParentID, Name, TwoFactor, LockOnRequest); err == nil {
			Session.AddSuccess("Operation created with ID: " + resp.OperationId())
		} else {
			Session.Halt(err)
		}
	},
}
{'fraction_non_alphanumeric': 0.14054982817869416, 'fraction_numerical': 0.0013745704467353953, 'mean_word_length': 5.077244258872652, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6854737', 'n_tokens_mistral': 966, 'n_tokens_neox': 928, 'n_words': 257}