mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2024-12-12 13:30:26 +00:00
Remove unused flags
This commit is contained in:
parent
5dc5a97bdb
commit
a9e7878741
11
flag.go
11
flag.go
@ -13,14 +13,8 @@ import (
|
|||||||
|
|
||||||
// CLI options are read and parsed here.
|
// CLI options are read and parsed here.
|
||||||
|
|
||||||
//go:embed assets/config.ini
|
|
||||||
var defaultConfig []byte
|
|
||||||
|
|
||||||
var printExampleConfig bool
|
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
flag.StringVar(&cfg.HTTPPort, "port", "", "Listen on another port. This option also updates the config file for your convenience.")
|
flag.StringVar(&cfg.HTTPPort, "port", "", "Listen on another port. This option also updates the config file for your convenience.")
|
||||||
flag.BoolVar(&printExampleConfig, "print-example-config", false, "If true, print an example configuration file contents and exit. You can save the output to a file and base your own configuration on it.")
|
|
||||||
flag.Usage = printHelp
|
flag.Usage = printHelp
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,11 +33,6 @@ func parseCliArgs() {
|
|||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
args := flag.Args()
|
args := flag.Args()
|
||||||
if printExampleConfig {
|
|
||||||
os.Stdout.Write(defaultConfig)
|
|
||||||
os.Exit(0)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(args) == 0 {
|
if len(args) == 0 {
|
||||||
log.Fatal("Error: pass a wiki directory")
|
log.Fatal("Error: pass a wiki directory")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user