✨ Simplify commend parameters
This commit is contained in:
1 parent
54fae0ce12
commit
eab1361cc3
2 files changed
+2
-6
No files matched your search
@@ -31,7 +31,7 @@ yutu comment insert --channelId UC_x5X --videoId dQw4w9 --authorChannelId UA_x5X
|
||||
var insertInSchema = &jsonschema.Schema{
|
||||
Type: "object",
|
||||
Required: []string{
|
||||
"author_channel_id", "channel_id", "parent_id", "text_original", "video_id",
|
||||
"parent_id", "text_original",
|
||||
},
|
||||
Properties: map[string]*jsonschema.Schema{
|
||||
"author_channel_id": {Type: "string", Description: acidUsage},
|
||||
@@ -83,11 +83,8 @@ func init() {
|
||||
insertCmd.Flags().StringVarP(&output, "output", "o", "", pkg.SilentUsage)
|
||||
insertCmd.Flags().StringVarP(&jsonpath, "jsonPath", "j", "", pkg.JPUsage)
|
||||
|
||||
_ = insertCmd.MarkFlagRequired("authorChannelId")
|
||||
_ = insertCmd.MarkFlagRequired("channelId")
|
||||
_ = insertCmd.MarkFlagRequired("parentId")
|
||||
_ = insertCmd.MarkFlagRequired("textOriginal")
|
||||
_ = insertCmd.MarkFlagRequired("videoId")
|
||||
}
|
||||
|
||||
var insertCmd = &cobra.Command{
|
||||
|
||||
@@ -31,7 +31,7 @@ yutu commentThread insert --channelId UC_x5X --videoId dQw4w9WgXcQ --authorChann
|
||||
var insertInSchema = &jsonschema.Schema{
|
||||
Type: "object",
|
||||
Required: []string{
|
||||
"author_channel_id", "channel_id", "text_original", "video_id",
|
||||
"channel_id", "text_original", "video_id",
|
||||
},
|
||||
Properties: map[string]*jsonschema.Schema{
|
||||
"author_channel_id": {Type: "string", Description: acidUsage},
|
||||
@@ -73,7 +73,6 @@ func init() {
|
||||
insertCmd.Flags().StringVarP(&output, "output", "o", "", pkg.SilentUsage)
|
||||
insertCmd.Flags().StringVarP(&jsonpath, "jsonpath", "j", "", pkg.JPUsage)
|
||||
|
||||
_ = insertCmd.MarkFlagRequired("authorChannelId")
|
||||
_ = insertCmd.MarkFlagRequired("channelId")
|
||||
_ = insertCmd.MarkFlagRequired("textOriginal")
|
||||
_ = insertCmd.MarkFlagRequired("videoId")
|
||||
|
||||
Reference in new issue
Block a user