mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-04 23:16:57 +08:00
refactor: move LoadFile to hrp/loader
This commit is contained in:
@@ -5,13 +5,12 @@ import (
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
"github.com/httprunner/httprunner/v4/hrp"
|
||||
"github.com/httprunner/httprunner/v4/hrp/internal/builtin"
|
||||
)
|
||||
|
||||
func LoadJSONCase(path string) (*hrp.TestCase, error) {
|
||||
log.Info().Str("path", path).Msg("load json case file")
|
||||
caseJSON := new(hrp.TestCase)
|
||||
err := builtin.LoadFile(path, caseJSON)
|
||||
err := hrp.LoadFile(path, caseJSON)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "load json file failed")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user