26 lines
529 B
Go
26 lines
529 B
Go
package comment
|
|
|
|
import (
|
|
"github.com/eat-pray-ai/yutu/pkg/comment"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var deleteCmd = &cobra.Command{
|
|
Use: "delete",
|
|
Short: "Delete YouTube comments",
|
|
Long: "Delete YouTube comments by ids",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
c := comment.NewComment(
|
|
comment.WithIDs(ids),
|
|
comment.WithService(nil),
|
|
)
|
|
c.Delete()
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
commentCmd.AddCommand(deleteCmd)
|
|
|
|
deleteCmd.Flags().StringSliceVarP(&ids, "ids", "i", []string{}, "Comma separated ids of comments")
|
|
}
|