mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-07 23:41:22 +08:00
change: udpate docs
This commit is contained in:
11
README.md
11
README.md
@@ -62,11 +62,12 @@ Usage:
|
|||||||
hrp [command]
|
hrp [command]
|
||||||
|
|
||||||
Available Commands:
|
Available Commands:
|
||||||
boom run load test with boomer
|
boom run load test with boomer
|
||||||
completion generate the autocompletion script for the specified shell
|
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
|
help Help about any command
|
||||||
run run API test
|
run run API test
|
||||||
|
startproject create a scaffold project
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
-h, --help help for hrp
|
-h, --help help for hrp
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
// har2caseCmd represents the har2case command
|
// har2caseCmd represents the har2case command
|
||||||
var har2caseCmd = &cobra.Command{
|
var har2caseCmd = &cobra.Command{
|
||||||
Use: "har2case $har_path...",
|
Use: "har2case $har_path...",
|
||||||
Short: "Convert HAR to json/yaml testcase files",
|
Short: "convert HAR to json/yaml testcase files",
|
||||||
Long: `Convert HAR to json/yaml testcase files`,
|
Long: `convert HAR to json/yaml testcase files`,
|
||||||
Args: cobra.MinimumNArgs(1),
|
Args: cobra.MinimumNArgs(1),
|
||||||
PreRun: func(cmd *cobra.Command, args []string) {
|
PreRun: func(cmd *cobra.Command, args []string) {
|
||||||
setLogLevel(logLevel)
|
setLogLevel(logLevel)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
|
|
||||||
var scaffoldCmd = &cobra.Command{
|
var scaffoldCmd = &cobra.Command{
|
||||||
Use: "startproject $project_name",
|
Use: "startproject $project_name",
|
||||||
Short: "Create a scaffold project",
|
Short: "create a scaffold project",
|
||||||
Args: cobra.ExactValidArgs(1),
|
Args: cobra.ExactValidArgs(1),
|
||||||
PreRun: func(cmd *cobra.Command, args []string) {
|
PreRun: func(cmd *cobra.Command, args []string) {
|
||||||
setLogLevel(logLevel)
|
setLogLevel(logLevel)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package scaffold
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
|
||||||
@@ -62,7 +63,7 @@ func createFolder(folderPath string) error {
|
|||||||
|
|
||||||
func createFile(filePath string, data string) error {
|
func createFile(filePath string, data string) error {
|
||||||
log.Info().Str("filePath", filePath).Msg("create file")
|
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 {
|
if err != nil {
|
||||||
log.Error().Err(err).Msg("create file failed")
|
log.Error().Err(err).Msg("create file failed")
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user