func Cmd() {
	args := os.Args
	if len(args) > 1 {
		switch args[1] {
		case "install":
			cmd.DoInstall()
		case "update":
			file, _ := cmd.DoBackup(App, false)
			cmd.DoUpdateZipBytes(file)
		case "backup":
			cmd.DoBackup(App, true)
		case "upgrade":
			cmd.DoUpgrade(VERSION, App)
		}
		os.Exit(1)
	}
	if !cmd.CheckInstall() {
		cmd.DoInstall()
		return
	}
	if cmd.CheckUpgrade(VERSION, true) {
		os.Exit(1)
		return
	}
	cmd.Init(App)
}
Cmd starts command line application.
It captures command line arguments and executes proper operation.
Some operations will exit application when finished.
package app
import (
	"github.com/fuxiaohei/GoBlog/app/cmd"
	"github.com/fuxiaohei/GoBlog/app/handler"
	_ "github.com/fuxiaohei/GoBlog/app/upgrade"
	"os"
)