1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-12-12 05:20:26 +00:00

Remove unused flags

This commit is contained in:
handlerug 2021-07-02 01:52:44 +07:00
parent 5dc5a97bdb
commit a9e7878741
No known key found for this signature in database
GPG Key ID: 38009F0605051491

11
flag.go
View File

@ -13,14 +13,8 @@ import (
// CLI options are read and parsed here.
//go:embed assets/config.ini
var defaultConfig []byte
var printExampleConfig bool
func init() {
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
}
@ -39,11 +33,6 @@ func parseCliArgs() {
flag.Parse()
args := flag.Args()
if printExampleConfig {
os.Stdout.Write(defaultConfig)
os.Exit(0)
}
if len(args) == 0 {
log.Fatal("Error: pass a wiki directory")
}