change: udpate docs

This commit is contained in:
debugtalk
2022-01-08 22:25:52 +08:00
parent c6549f4012
commit 853a456b12
4 changed files with 11 additions and 9 deletions
+2 -1
View File
@@ -64,9 +64,10 @@ Usage:
Available Commands:
boom run load test with boomer
completion generate the autocompletion script for the specified shell
har2case Convert HAR to json/yaml testcase files
har2case convert HAR to json/yaml testcase files
help Help about any command
run run API test
startproject create a scaffold project
Flags:
-h, --help help for hrp
+2 -2
View File
@@ -10,8 +10,8 @@ import (
// har2caseCmd represents the har2case command
var har2caseCmd = &cobra.Command{
Use: "har2case $har_path...",
Short: "Convert HAR to json/yaml testcase files",
Long: `Convert HAR to json/yaml testcase files`,
Short: "convert HAR to json/yaml testcase files",
Long: `convert HAR to json/yaml testcase files`,
Args: cobra.MinimumNArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
setLogLevel(logLevel)
+1 -1
View File
@@ -10,7 +10,7 @@ import (
var scaffoldCmd = &cobra.Command{
Use: "startproject $project_name",
Short: "Create a scaffold project",
Short: "create a scaffold project",
Args: cobra.ExactValidArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
setLogLevel(logLevel)
+2 -1
View File
@@ -2,6 +2,7 @@ package scaffold
import (
"fmt"
"io/ioutil"
"os"
"path"
@@ -62,7 +63,7 @@ func createFolder(folderPath string) error {
func createFile(filePath string, data string) error {
log.Info().Str("filePath", filePath).Msg("create file")
err := os.WriteFile(filePath, []byte(data), 0o644)
err := ioutil.WriteFile(filePath, []byte(data), 0o644)
if err != nil {
log.Error().Err(err).Msg("create file failed")
return err