Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // crashCmd is the cobra command to manage crash logs CrashCmd = &cobra.Command{ Use: "crash-log", Short: "manage iris crash logs", Run: func(cmd *cobra.Command, args []string) { if ClearLog { dir, errDir := config.CrashDir() if errDir == nil { _ = os.RemoveAll(dir) } home, errHome := os.UserHomeDir() if errHome == nil { _ = os.RemoveAll(filepath.Join(home, ".iris", "crashes")) _ = os.Remove(filepath.Join(home, ".iris", "crash.log")) } cmd.Println("crash log cleared") return } logFile := getLatestCrashLog() if logFile == "" { cmd.Println("no crash log found") return } cmd.Println(logFile) }, } // clearLog is the flag to clear the crash log ClearLog bool )
View Source
var Version = "dev"
Version is the current build version, injected at release time via ldflags e.g. go build -ldflags="-X github.com/versenilvis/iris/root.Version=v1.2.0"
Functions ¶
func GetAIEngine ¶ added in v0.3.0
func GetCurrentAISuggestion ¶ added in v0.3.0
func GetCurrentAISuggestion() *spec.Suggestion
func MergeResults ¶
func MergeResults(query string, mode string) []spec.Suggestion
MergeResults collects and dedupes suggestions for a query and mode
func SetCurrentAISuggestion ¶ added in v0.3.0
func SetCurrentAISuggestion(sugg *spec.Suggestion)
func WriteCrashLog ¶
func WriteCrashLog(err any)
writeCrashLog writes the crash info and stack trace to a new log file
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.