Skip to content

Commit

Permalink
removed - v2-ui migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
MHSanaei committed May 31, 2023
1 parent 48dce38 commit e4e0dee
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 139 deletions.
20 changes: 1 addition & 19 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"x-ui/database"
"x-ui/logger"
"x-ui/sub"
"x-ui/v2ui"
"x-ui/web"
"x-ui/web/global"
"x-ui/web/service"
Expand Down Expand Up @@ -270,10 +269,6 @@ func main() {

runCmd := flag.NewFlagSet("run", flag.ExitOnError)

v2uiCmd := flag.NewFlagSet("v2-ui", flag.ExitOnError)
var dbPath string
v2uiCmd.StringVar(&dbPath, "db", fmt.Sprintf("%s/v2-ui.db", config.GetDBFolderPath()), "set v2-ui db file path")

settingCmd := flag.NewFlagSet("setting", flag.ExitOnError)
var port int
var username string
Expand Down Expand Up @@ -301,7 +296,6 @@ func main() {
fmt.Println()
fmt.Println("Commands:")
fmt.Println(" run run web panel")
fmt.Println(" v2-ui migrate form v2-ui")
fmt.Println(" migrate migrate form other/old x-ui")
fmt.Println(" setting set settings")
}
Expand All @@ -322,16 +316,6 @@ func main() {
runWebServer()
case "migrate":
migrateDb()
case "v2-ui":
err := v2uiCmd.Parse(os.Args[2:])
if err != nil {
fmt.Println(err)
return
}
err = v2ui.MigrateFromV2UI(dbPath)
if err != nil {
fmt.Println("migrate from v2-ui failed:", err)
}
case "setting":
err := settingCmd.Parse(os.Args[2:])
if err != nil {
Expand All @@ -356,12 +340,10 @@ func main() {
updateTgbotEnableSts(enabletgbot)
}
default:
fmt.Println("except 'run' or 'v2-ui' or 'setting' subcommands")
fmt.Println("except 'run' or 'setting' subcommands")
fmt.Println()
runCmd.Usage()
fmt.Println()
v2uiCmd.Usage()
fmt.Println()
settingCmd.Usage()
}
}
28 changes: 0 additions & 28 deletions v2ui/db.go

This file was deleted.

41 changes: 0 additions & 41 deletions v2ui/models.go

This file was deleted.

51 changes: 0 additions & 51 deletions v2ui/v2ui.go

This file was deleted.

0 comments on commit e4e0dee

Please sign in to comment.