forked from xiulab/discuzx-xiuno
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
63 lines (55 loc) · 1.06 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package main
import (
"bufio"
"fmt"
"github.com/skiy/golib"
"github.com/skiy/xiuno-tools/dx3ToXn4"
"github.com/skiy/xiuno-tools/xn3ToXn4"
"os"
)
func main() {
fmt.Println(`
:::
::: 本程序开源地址: https://github.com/skiy/xiuno-tools
::: 作者: Skiychan <dev@skiy.net> https://www.skiy.net
:::
::: 请选择主菜单:::
:::
::: 1. XiunoBBS 3.x 升级到 XiunoBBS 4.x
::: 2. Discuz!X 3.x 升级到 XiunoBBS 4.x
:::
::: 执行过程中按"Q", 再按"回车键"退出本程序...
:::
::: Version:1.1.4 Updated:2018-05-06
`)
var flag bool
buf := bufio.NewReader(os.Stdin)
for {
inputVal := lib.Input(buf)
switch inputVal {
case "1":
flag = true
app := xn3ToXn4.App{}
app.Init()
break
case "2":
flag = true
app := dx3ToXn4.App{}
app.Init()
break
case "q":
case "Q":
flag = true
break
}
//Q退出
if flag {
break
}
fmt.Println(`
-----------------------------------------
输入错误,请按上面提示选择对应的菜单
按“Q”退出本程序
-----------------------------------------`)
}
}