summary refs log tree commit diff stats
path: root/init_test.go
blob: 0739d47ee5c2aaaee87334624c9654da735acdc3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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)
}