feat: create python plugin in scaffold

This commit is contained in:
debugtalk
2022-03-18 18:07:58 +08:00
parent efc53703d3
commit 1b2ec9175b
7 changed files with 272 additions and 19 deletions
+3 -2
View File
@@ -2,6 +2,7 @@ package cmd
import (
"errors"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
@@ -22,7 +23,7 @@ var har2caseCmd = &cobra.Command{
for _, arg := range args {
// must choose one
if !genYAMLFlag && !genJSONFlag {
return errors.New("please select to-json flag or to-yaml flag.")
return errors.New("please select convert format type")
}
var outputPath string
var err error
@@ -37,7 +38,7 @@ var har2caseCmd = &cobra.Command{
if genYAMLFlag {
outputPath, err = har.GenYAML()
} else {
outputPath, err = har.GenJSON()
outputPath, err = har.GenJSON() // default
}
if err != nil {
return err