From daeccd7132a184137aa13b9c1291678d57c7c782 Mon Sep 17 00:00:00 2001 From: hardy Date: Fri, 6 Dec 2024 22:07:08 +0800 Subject: [PATCH] fix: build error --- loader.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/loader.go b/loader.go index fa4ec5e..ad66169 100644 --- a/loader.go +++ b/loader.go @@ -32,7 +32,6 @@ import ( "compress/gzip" "crypto/tls" "encoding/json" - "github.com/jamiealquiza/tachymeter" "io" "net" "os" @@ -41,6 +40,8 @@ import ( "sync/atomic" "time" + "github.com/jamiealquiza/tachymeter" + log "github.com/cihub/seelog" "infini.sh/framework/core/conditions" "infini.sh/framework/core/global" @@ -334,11 +335,11 @@ func (v *RequestItem) prepareRequest(config *LoaderConfig, globalCtx util.MapStr req.ResetBody() if v.Request.BasicAuth != nil && v.Request.BasicAuth.Username != "" { - req.SetBasicAuth(v.Request.BasicAuth.Username, v.Request.BasicAuth.Password) + req.SetBasicAuth(v.Request.BasicAuth.Username, v.Request.BasicAuth.Password.Get()) } else { //try use default auth if config.RunnerConfig.DefaultBasicAuth != nil && config.RunnerConfig.DefaultBasicAuth.Username != "" { - req.SetBasicAuth(config.RunnerConfig.DefaultBasicAuth.Username, config.RunnerConfig.DefaultBasicAuth.Password) + req.SetBasicAuth(config.RunnerConfig.DefaultBasicAuth.Username, config.RunnerConfig.DefaultBasicAuth.Password.Get()) } }