feat: mvp
This commit is contained in:
33
main.go
Normal file
33
main.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
|
||||
"amt/app"
|
||||
"amt/modules/voxyimport"
|
||||
)
|
||||
|
||||
func main() {
|
||||
defer voxyimport.Cleanup()
|
||||
|
||||
entries := []app.Entry{
|
||||
{
|
||||
Title: "Voxy Import",
|
||||
Desc: "导入服务器 Voxy 数据",
|
||||
Create: func() tea.Model {
|
||||
return voxyimport.New(voxyimport.NewDefaultVoxyService())
|
||||
},
|
||||
},
|
||||
// 在这里添加新模块即可:
|
||||
// {Title: "...", Desc: "...", Create: func() tea.Model { return newmodule.New(newmodule.NewDefaultService()) }},
|
||||
}
|
||||
|
||||
p := tea.NewProgram(app.New(entries))
|
||||
if _, err := p.Run(); err != nil {
|
||||
fmt.Println("Error:", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user