Skip to content

Commit

Permalink
internal/base: use relative path in flag -c default value
Browse files Browse the repository at this point in the history
  • Loading branch information
wdvxdr1123 committed Nov 3, 2022
1 parent db64699 commit de44adb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions internal/base/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"flag"
"fmt"
"os"
"path"
"time"

log "github.com/sirupsen/logrus"
Expand Down Expand Up @@ -54,9 +53,7 @@ var (

// Parse parse flags
func Parse() {
wd, _ := os.Getwd()
dc := path.Join(wd, "config.yml")
flag.StringVar(&LittleC, "c", dc, "configuration filename")
flag.StringVar(&LittleC, "c", "config.yml", "configuration filename")
flag.BoolVar(&LittleD, "d", false, "running as a daemon")
flag.BoolVar(&LittleH, "h", false, "this Help")
flag.StringVar(&LittleWD, "w", "", "cover the working directory")
Expand Down

0 comments on commit de44adb

Please sign in to comment.