| 12345678910111213141516171819202122232425262728 |
- package cmd
- import (
- log "github.com/sirupsen/logrus"
- "github.com/spf13/cobra"
- "standard/cobra/internal"
- "standard/cobra/internal/pkg/logger"
- )
- var(
- testCmd = &cobra.Command{
- Use: "test",
- Short: "Test cobra",
- Run: func(cmd *cobra.Command, args []string) {
- test(&logger.NewLogger())
- },
- }
- )
- func init() {
- rootCmd.AddCommand(testCmd)
- }
- func test(logger *log.Logger) {
- internal.Serve(logger)
- }
|