[fix] Testing fixes

- sqlite error handling and wrapping
- more responsive commands
- database updates
This commit is contained in:
2025-06-19 17:23:17 -04:00
parent 0d7fbffaf6
commit 7ff43c82c2
15 changed files with 112 additions and 40 deletions

View File

@@ -11,15 +11,20 @@ import (
)
var viewCmd = &cobra.Command{
Use: "view",
Example: "mctl server view",
Short: "view all saved servers",
Use: "view",
Example: "mctl server view",
Short: "view all saved servers",
SilenceUsage: true,
Run: func(cmd *cobra.Command, args []string) {
db, err := database.New()
cobra.CheckErr(err)
defer db.Close()
ts, err := db.GetAllServers()
if err.Error() == ErrInit {
fmt.Println(ErrInitRsp)
return
}
cobra.CheckErr(err)
for _, s := range ts {