mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 07:26:55 +08:00
fix: load env once
This commit is contained in:
@@ -30,12 +30,12 @@ type Config struct {
|
||||
}
|
||||
|
||||
var (
|
||||
globalConfig *Config
|
||||
once sync.Once
|
||||
globalConfig *Config
|
||||
getConfigOnce sync.Once
|
||||
)
|
||||
|
||||
func GetConfig() *Config {
|
||||
once.Do(func() {
|
||||
getConfigOnce.Do(func() {
|
||||
cfg := &Config{
|
||||
StartTime: time.Now(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user