27 lines
439 B
Go
27 lines
439 B
Go
package gosimplenpm
|
|
|
|
import (
|
|
"fmt"
|
|
"gosimplenpm/internal/config"
|
|
"os"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var configCmd = &cobra.Command{
|
|
Use: "config",
|
|
Aliases: []string{"conf"},
|
|
Short: "Display the config file",
|
|
Run: func(_ *cobra.Command, _ []string) {
|
|
err := config.PrintConfigFile()
|
|
if err != nil {
|
|
fmt.Printf("Error printing config: %+v\n", err)
|
|
os.Exit(1)
|
|
}
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(configCmd)
|
|
}
|