cmd

package
v0.34.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 47 Imported by: 0

Documentation

Overview

Package cmd implements all td CLI commands using cobra.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFeatureGatedCommand added in v0.30.0

func AddFeatureGatedCommand(featureName string, command *cobra.Command)

AddFeatureGatedCommand registers a command only when its feature is enabled for the current process (env overrides + defaults).

func AutoSyncEnabled added in v0.30.0

func AutoSyncEnabled() bool

AutoSyncEnabled returns true if auto-sync is enabled via config.

func Execute

func Execute()

Execute runs the root command

func RegisterSyncFeatureHooks added in v0.30.0

func RegisterSyncFeatureHooks(hooks SyncFeatureHooks)

RegisterSyncFeatureHooks registers sync-related hooks.

func SetVersion

func SetVersion(v string)

SetVersion sets the version string and enables --version flag

func ValidateIssueID added in v0.4.21

func ValidateIssueID(id string, cmdUsage string) error

ValidateIssueID checks if an issue ID is valid (non-empty, non-whitespace) Returns an error with helpful usage info if invalid

func ValidateIssueIDs added in v0.4.21

func ValidateIssueIDs(ids []string, cmdUsage string) error

ValidateIssueIDs validates multiple issue IDs

Types

type RuntimeStats added in v0.30.0

type RuntimeStats struct {
	AllocMB      float64 `json:"alloc_mb"`
	SysMB        float64 `json:"sys_mb"`
	NumGC        uint32  `json:"num_gc"`
	NumGoroutine int     `json:"num_goroutine"`
	HeapObjects  uint64  `json:"heap_objects"`
	HeapInuseMB  float64 `json:"heap_inuse_mb"`
}

RuntimeStats contains runtime metrics for soak testing

type SubmitReviewResult added in v0.13.0

type SubmitReviewResult struct {
	Success bool
	Message string
}

SubmitReviewResult holds the result of a review submission

type SyncFeatureHooks added in v0.30.0

type SyncFeatureHooks struct {
	OnStartup         func(commandName string)
	OnAfterMutation   func()
	IsMutatingCommand func(commandName string) bool
}

SyncFeatureHooks exposes optional sync hooks that can be registered by sync-specific command files. These hooks are gated by feature flags.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL