Move web instance struct to web.go

This commit is contained in:
A. Svensson 2016-06-19 16:18:08 +02:00
parent f86693b22b
commit 205a3135ef
2 changed files with 11 additions and 14 deletions

View File

@ -2,23 +2,9 @@ package ss13
import (
"fmt"
"html/template"
"time"
"github.com/gorilla/mux"
)
type D map[string]interface{}
type Instance struct {
Config *Config
Debug bool
db *DB
router *mux.Router
tmpls *template.Template
}
// Database models
type Server struct {

View File

@ -12,6 +12,17 @@ import (
"github.com/gorilla/mux"
)
type D map[string]interface{}
type Instance struct {
Config *Config
Debug bool
db *DB
router *mux.Router
tmpls *template.Template
}
func New(debug bool, path string) (*Instance, error) {
// WHen in debug mode we load the assets from disk instead of the
// embedded ones.