feat(config): config at XDG dir
This commit is contained in:
parent
0c0de52a6e
commit
6f39d532ce
4 changed files with 77 additions and 5 deletions
|
|
@ -22,6 +22,7 @@ THE SOFTWARE.
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
|
@ -42,6 +43,10 @@ var rootCmd = &cobra.Command{
|
|||
`}
|
||||
|
||||
func Execute() {
|
||||
if configErr != nil {
|
||||
fmt.Fprintln(os.Stderr, "failed to load config:", configErr)
|
||||
os.Exit(1)
|
||||
}
|
||||
err := rootCmd.Execute()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue