You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
431 B
Go
30 lines
431 B
Go
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)
|
|
}
|