mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-02 14:29:44 +08:00
change: use pointer type for TStep.Request
This commit is contained in:
@@ -49,7 +49,7 @@ type TValidator struct {
|
|||||||
|
|
||||||
type TStep struct {
|
type TStep struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Request TRequest `json:"request"`
|
Request *TRequest `json:"request"`
|
||||||
Variables Variables `json:"variables"`
|
Variables Variables `json:"variables"`
|
||||||
SetupHooks []string `json:"setup_hooks"`
|
SetupHooks []string `json:"setup_hooks"`
|
||||||
TeardownHooks []string `json:"teardown_hooks"`
|
TeardownHooks []string `json:"teardown_hooks"`
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ func RunRequest(name string) *Request {
|
|||||||
return &Request{
|
return &Request{
|
||||||
TStep: &TStep{
|
TStep: &TStep{
|
||||||
Name: name,
|
Name: name,
|
||||||
|
Request: &TRequest{},
|
||||||
Variables: make(Variables),
|
Variables: make(Variables),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user