Move web instance struct to web.go
This commit is contained in:
parent
f86693b22b
commit
205a3135ef
@ -2,23 +2,9 @@ package ss13
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"html/template"
|
|
||||||
"time"
|
"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
|
// Database models
|
||||||
|
|
||||||
type Server struct {
|
type Server struct {
|
||||||
|
|||||||
11
src/web.go
11
src/web.go
@ -12,6 +12,17 @@ import (
|
|||||||
"github.com/gorilla/mux"
|
"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) {
|
func New(debug bool, path string) (*Instance, error) {
|
||||||
// WHen in debug mode we load the assets from disk instead of the
|
// WHen in debug mode we load the assets from disk instead of the
|
||||||
// embedded ones.
|
// embedded ones.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user