gospt/cmd/linkcontext.go
abs3nt b5f76fb321
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
queue tracks, view queue, queue updates when open, hotkey clean up
2023-04-16 10:47:26 -07:00

29 lines
528 B
Go

package cmd
import (
"fmt"
"os"
"github.com/spf13/cobra"
)
// linkCmd represents the link command
var linkContextCmd = &cobra.Command{
Use: "linkcontext",
Aliases: []string{"lc"},
Short: "Get url to current context(album, playlist)",
Long: `Get url to current context(album, playlist)`,
Run: func(cmd *cobra.Command, args []string) {
link, err := commands.LinkContext(ctx)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
fmt.Print(link)
},
}
func init() {
rootCmd.AddCommand(linkContextCmd)
}