From c0507308950bf7db65d1f6ee79ce9f67b61cbe0e Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Sun, 9 Jun 2019 04:21:03 -0400 Subject: explicit init of static assets and test template init were removed: redundant --- svc/init_test.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'svc/init_test.go') diff --git a/svc/init_test.go b/svc/init_test.go index 8fd8e95..a9fe624 100644 --- a/svc/init_test.go +++ b/svc/init_test.go @@ -2,7 +2,6 @@ package svc // import "github.com/getwtxt/getwtxt/svc" import ( "fmt" - "html/template" "log" "os" "strings" @@ -20,16 +19,15 @@ var ( func initTestConf() { initTestOnce.Do(func() { + logToNull() testConfig() - tmpls = testTemplates() - staticCache = initAssets() + tmpls = initTemplates() + pingAssets() confObj.Mu.RLock() defer confObj.Mu.RUnlock() testport = fmt.Sprintf(":%v", confObj.Port) - - logToNull() }) } @@ -47,10 +45,6 @@ func logToNull() { log.SetOutput(hush) } -func testTemplates() *template.Template { - return template.Must(template.ParseFiles("../assets/tmpl/index.html")) -} - func testConfig() { viper.SetConfigName("getwtxt") -- cgit 1.4.1-2-gfad0