refactored render to internal/render added logging with charmbracelet/log
This commit is contained in:
parent
109c54f1e5
commit
6f0b534d8d
20 changed files with 356 additions and 13 deletions
28
Output/cmd/root.go
Normal file
28
Output/cmd/root.go
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"specCon18/test-test/tui"
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "test-test",
|
||||
Short: "test-test, A test program generated by bubblewand",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if err := tui.Run(); err != nil {
|
||||
fmt.Println("Error:", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
func Execute() {
|
||||
cobra.CheckErr(rootCmd.Execute())
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(versionCmd)
|
||||
}
|
||||
15
Output/cmd/version.go
Normal file
15
Output/cmd/version.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var versionCmd = &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Print the version number of test-test",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("test-test ~ 0.0.6")
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue