mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +08:00
refactor: move LoadFile to hrp/loader
This commit is contained in:
@@ -6,13 +6,12 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/httprunner/httprunner/v4/hrp"
|
||||
"github.com/httprunner/httprunner/v4/hrp/internal/builtin"
|
||||
)
|
||||
|
||||
func LoadYAMLCase(path string) (*hrp.TestCase, error) {
|
||||
// load yaml 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 yaml file failed")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user