Documentation
¶
Overview ¶
Copyright © 2025 YOUR NAME HERE <EMAIL ADDRESS>
Copyright © 2025 YOUR NAME HERE <EMAIL ADDRESS>
Copyright © 2025 YOUR NAME HERE <EMAIL ADDRESS>
Copyright © 2025 YOUR NAME HERE <EMAIL ADDRESS>
Copyright © 2025 YOUR NAME HERE <EMAIL ADDRESS>
Copyright © 2025 YOUR NAME HERE <EMAIL ADDRESS>
Copyright © 2025 YOUR NAME HERE <EMAIL ADDRESS>
Copyright © 2025 YOUR NAME HERE <EMAIL ADDRESS>
Index ¶
Constants ¶
const ( RootUse = "padz" RootShort = "padz create scratch pads, draft files using $EDITOR." RootLong = `` /* 433-byte string literal not displayed */ // Root command error messages ErrFailedToInitStore = "Failed to initialize store" ErrFailedToGetWorkingDir = "Failed to get working directory" ErrFailedToGetProject = "Failed to get current project" ErrFailedToCreateNote = "Failed to create note" // Version format VersionFormat = "padz version %s (commit: %s, built: %s)\n" // Command groups GroupSingleScratch = "SINGLE SCRATCH:" GroupScratches = "SCRATCHES:" )
Root command messages
const ( // Global flags FlagVerboseDesc = "Increase verbosity (-v, -vv, -vvv)" FlagFormatDesc = "Output format (plain, json, term)" FlagVersionDesc = "Print version information" // Common flags used across commands FlagAllDesc = "Show scratches from all projects" FlagAllDescSearch = "Search in all projects" FlagGlobalDesc = "Show only global scratches" FlagGlobalDescSearch = "Search in global scratches only" )
Flag messages
const ( LsUse = "ls" LsShort = "Lists all scratches for the current project" LsLong = `` /* 136-byte string literal not displayed */ LsNoScratchesFound = "No scratches found." )
LS command messages
const ( ViewUse = "view <index>" ViewShort = "View a scratch (v)" ViewLong = "View the content of a scratch identified by its index." )
View command messages
const ( OpenUse = "open <index>" OpenShort = "Open a scratch in $EDITOR (o, e)" OpenLong = "Open a scratch, identified by its index, in $EDITOR." OpenSuccess = "Scratch updated." )
Open command messages
const ( PeekUse = "peek <index>" PeekShort = "Peek at a scratch" PeekLong = "Peek at the first and last lines of a scratch." FlagLinesDesc = "Number of lines to show from the beginning and end" )
Peek command messages
const ( DeleteUse = "delete <index>" DeleteShort = "Delete a scratch (rm, d, del)" DeleteLong = "Delete a scratch identified by its index." DeleteSuccess = "Scratch deleted." )
Delete command messages
const ( CleanupUse = "cleanup" CleanupShort = "Cleanup old scratches (clean)" CleanupLong = "Cleanup scratches older than a specified number of days." FlagDaysDesc = "Delete scratches older than this many days" CleanupSuccessFormat = "Cleaned up scratches older than %d days." )
Cleanup command messages
const ( CopyUse = "copy <index>" CopyShort = "Copy a scratch to the clipboard (cp)" CopyLong = `` /* 197-byte string literal not displayed */ ErrFailedToCopyScratch = "Failed to copy scratch to clipboard" SuccessCopiedToClipboard = "Copied to clipboard" )
Copy command messages
const ( SearchUse = "search [term]" SearchShort = "Search for a scratch" SearchLong = "Search for a scratch by a regular expression." SearchNoMatchesFound = "No matches found." )
Search command messages
const ( NukeUse = "nuke" NukeShort = "Delete all scratches in the current scope" NukeLong = `Delete all scratches in the current scope (project or global). Use --all to delete all scratches across all scopes.` // Confirmation prompts NukeConfirmProject = "This will delete all %d pads in [%s]. Confirm? [y/N] " NukeConfirmGlobal = "This will delete all %d pads in global storage. Confirm? [y/N] " NukeConfirmAll = "This will delete all %d pads across all scopes, projects and global. Confirm? [y/N] " // Success messages NukeSuccessProject = "Deleted all %d pads in [%s]." NukeSuccessGlobal = "Deleted all %d pads in global storage." NukeSuccessAll = "Deleted all %d pads across all scopes." // Other messages NukeNoPadsFound = "No pads found to delete." NukeCancelled = "Nuke cancelled." )
Nuke command messages
const ( ShowDataFileUse = "show-data-file" ShowDataFileShort = "Show the path to the data directory used by padz" ShowDataFileLong = `` /* 310-byte string literal not displayed */ )
ShowDataFile command messages
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute() error
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func IsSilentMode ¶ added in v1.8.5
func IsSilentMode() bool
IsSilentMode returns true if silent output is enabled
func IsVerboseMode ¶ added in v1.8.5
func IsVerboseMode() bool
IsVerboseMode returns true if verbose output is enabled
Types ¶
This section is empty.