gospt/cmd/link.go
a 2925b2c432
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
this should be print
2023-11-05 20:42:20 -06:00

29 lines
488 B
Go

package cmd
import (
"fmt"
"os"
"github.com/spf13/cobra"
)
// linkCmd represents the link command
var linkCmd = &cobra.Command{
Use: "link",
Aliases: []string{"yy"},
Short: "Print link to currently playing song",
Long: `Print link to currently playing song`,
Run: func(cmd *cobra.Command, args []string) {
link, err := commands.Link(ctx)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
fmt.Println(link)
},
}
func init() {
rootCmd.AddCommand(linkCmd)
}