-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
265 additions
and
604 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package cmd | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
|
||
"github.com/spf13/cobra" | ||
"github.com/spf13/viper" | ||
) | ||
|
||
var rootCmd = &cobra.Command{ | ||
Use: "QuickPiperAudiobook", | ||
Short: "Hugo is a very fast static site generator", | ||
Long: `A Fast and Flexible Static Site Generator built with | ||
love by spf13 and friends in Go. | ||
Complete documentation is available at http://hugo.spf13.com`, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
|
||
}, | ||
} | ||
|
||
func init() { | ||
|
||
viper.SetConfigName("config.yaml") | ||
viper.SetConfigType("yaml") | ||
viper.AddConfigPath("/etc/QuickPiperAudiobook/") | ||
viper.AddConfigPath("$HOME/.config/QuickPiperAudiobook") | ||
err := viper.ReadInConfig() | ||
if _, ok := err.(viper.ConfigFileNotFoundError); ok { | ||
// Config file not found; ignore error if desired | ||
} else { | ||
// Config file was found but another error was produced | ||
} | ||
} | ||
|
||
func Execute() { | ||
if err := rootCmd.Execute(); err != nil { | ||
fmt.Println(err) | ||
os.Exit(1) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.