1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00

internal/base: use relative path in flag -c default value

This commit is contained in:
wdvxdr 2022-11-03 20:55:01 +08:00
parent db64699f3c
commit de44adbfa1
No known key found for this signature in database
GPG Key ID: 703F8C071DE7A1B6

View File

@ -5,7 +5,6 @@ import (
"flag"
"fmt"
"os"
"path"
"time"
log "github.com/sirupsen/logrus"
@ -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")