large changes
This commit is contained in:
24
main.go
24
main.go
@@ -9,15 +9,15 @@ import (
|
||||
|
||||
"github.com/fatih/color"
|
||||
|
||||
"fes/src/config"
|
||||
"fes/src/doc"
|
||||
"fes/src/new"
|
||||
"fes/src/server"
|
||||
"fes/src/version"
|
||||
"fes/modules/config"
|
||||
"fes/modules/doc"
|
||||
"fes/modules/new"
|
||||
"fes/modules/server"
|
||||
"fes/modules/version"
|
||||
)
|
||||
|
||||
//go:embed core/*
|
||||
var core embed.FS
|
||||
//go:embed lib/*
|
||||
var lib embed.FS
|
||||
|
||||
//go:embed index.html
|
||||
var documentation string
|
||||
@@ -25,7 +25,8 @@ var documentation string
|
||||
func init() {
|
||||
config.Port = flag.Int("p", 3000, "Set the server port")
|
||||
config.Color = flag.Bool("no-color", false, "Disable color output")
|
||||
config.Core = core
|
||||
config.Static = flag.Bool("static", false, "Render and save all pages.")
|
||||
config.Lib = lib
|
||||
config.Doc = documentation
|
||||
}
|
||||
|
||||
@@ -38,15 +39,22 @@ func main() {
|
||||
fmt.Println(" run <project_dir> Start the server")
|
||||
fmt.Println("Options:")
|
||||
flag.PrintDefaults()
|
||||
fmt.Println("For bug reports, contact a developer and describe the issue. Provide the output of the `-V1` flag.")
|
||||
}
|
||||
|
||||
showVersion := flag.Bool("version", false, "Show version and exit")
|
||||
showFullVersion := flag.Bool("V1", false, "Show extended version information and exit")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
if *showVersion {
|
||||
version.Version()
|
||||
}
|
||||
|
||||
if *showFullVersion {
|
||||
version.FullVersion()
|
||||
}
|
||||
|
||||
if *config.Color {
|
||||
color.NoColor = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user