mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
change: udpate docs
This commit is contained in:
11
README.md
11
README.md
@@ -62,11 +62,12 @@ Usage:
|
||||
hrp [command]
|
||||
|
||||
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
|
||||
help Help about any command
|
||||
run run API test
|
||||
boom run load test with boomer
|
||||
completion generate the autocompletion script for the specified shell
|
||||
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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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,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
|
||||
|
||||
Reference in New Issue
Block a user