refactor: init logger

This commit is contained in:
lilong.129
2023-08-06 11:23:08 +08:00
parent 630cd70215
commit 2625f135fd
10 changed files with 68 additions and 83 deletions

View File

@@ -15,12 +15,9 @@ import (
)
var pytestCmd = &cobra.Command{
Use: "pytest $path ...",
Short: "run API test with pytest",
Args: cobra.MinimumNArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
setLogLevel(logLevel)
},
Use: "pytest $path ...",
Short: "run API test with pytest",
Args: cobra.MinimumNArgs(1),
DisableFlagParsing: true, // allow to pass any args to pytest
RunE: func(cmd *cobra.Command, args []string) (err error) {
startTime := time.Now()