Cleanup
This commit is contained in:
18
hub/app.go
18
hub/app.go
@@ -19,14 +19,14 @@ var templateFS embed.FS
|
||||
type Config struct {
|
||||
RootDir string
|
||||
ListenAddr string
|
||||
Secure bool
|
||||
Insecure bool
|
||||
}
|
||||
|
||||
type App struct {
|
||||
api *api.API
|
||||
mux *http.ServeMux
|
||||
tmpl map[string]*template.Template
|
||||
secure bool
|
||||
api *api.API
|
||||
mux *http.ServeMux
|
||||
tmpl map[string]*template.Template
|
||||
insecure bool
|
||||
}
|
||||
|
||||
func NewApp(conf Config) (*App, error) {
|
||||
@@ -36,10 +36,10 @@ func NewApp(conf Config) (*App, error) {
|
||||
}
|
||||
|
||||
app := &App{
|
||||
api: api,
|
||||
mux: http.NewServeMux(),
|
||||
tmpl: webutil.ParseTemplateSet(templateFuncs, templateFS),
|
||||
secure: conf.Secure,
|
||||
api: api,
|
||||
mux: http.NewServeMux(),
|
||||
tmpl: webutil.ParseTemplateSet(templateFuncs, templateFS),
|
||||
insecure: conf.Insecure,
|
||||
}
|
||||
|
||||
app.registerRoutes()
|
||||
|
||||
Reference in New Issue
Block a user