You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
431 B

package main
import (
"flag"
"fmt"
"github.com/cep21/xdgbasedir"
)
type args struct {
ConfigFile *string
}
func main() {
args := args{
ConfigFile: flag.String(
"config", getDefaultConfigName(), "Usage about option",
),
}
flag.Parse()
fmt.Println(*args.ConfigFile)
}
func getDefaultConfigName() string {
configHome, _ := xdgbasedir.ConfigHomeDirectory()
return fmt.Sprintf("%s/promptkit.toml", configHome)
}