diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-05-22 23:35:37 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-05-22 23:51:12 -0400 |
commit | a6c816217f09e4d462949c2631a88439886ed655 (patch) | |
tree | 4469487aa48ebc4315c080ed7b14763da88e1dfd /init_test.go | |
parent | bce52652ceb54b325ac72cc9a173655ec0a80756 (diff) | |
download | getwtxt-a6c816217f09e4d462949c2631a88439886ed655.tar.gz |
moved test init funcs to init_test, testing POST
Diffstat (limited to 'init_test.go')
-rw-r--r-- | init_test.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/init_test.go b/init_test.go new file mode 100644 index 0000000..c13ec21 --- /dev/null +++ b/init_test.go @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + "log" + "os" +) + +var testport = fmt.Sprintf(":%v", confObj.port) + +func initTestConf() { + initConfig() + tmpls = initTemplates() + logToNull() +} + +func logToNull() { + hush, err := os.Open("/dev/null") + if err != nil { + log.Printf("%v\n", err) + } + log.SetOutput(hush) +} |