diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-05-27 19:01:04 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-05-27 19:01:04 -0400 |
commit | d6d0c18cad6426a0562d19b2b0c66a7c2bb4e2c5 (patch) | |
tree | 0157890c7bf462db415ad0ed59828576496b2685 /init_test.go | |
parent | 6f9383517d8dbee557d2b52113e20e08207b533e (diff) | |
download | getwtxt-d6d0c18cad6426a0562d19b2b0c66a7c2bb4e2c5.tar.gz |
fixed race condition
Diffstat (limited to 'init_test.go')
-rw-r--r-- | init_test.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/init_test.go b/init_test.go index 0739d47..bffe036 100644 --- a/init_test.go +++ b/init_test.go @@ -7,11 +7,15 @@ import ( ) var testport = fmt.Sprintf(":%v", confObj.Port) +var hasInit = false func initTestConf() { - initConfig() - tmpls = initTemplates() - logToNull() + if !hasInit { + initConfig() + tmpls = initTemplates() + logToNull() + hasInit = true + } } func logToNull() { |