go fmt, fix typo

This commit is contained in:
f0x 2021-06-19 12:14:38 +02:00
parent de66eb900f
commit 8041fd04e1
2 changed files with 8 additions and 8 deletions

View File

@ -27,7 +27,6 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/api/client/timeline"
"github.com/superseriousbusiness/gotosocial/internal/api/s2s/user"
"github.com/superseriousbusiness/gotosocial/internal/api/s2s/webfinger"
"github.com/superseriousbusiness/gotosocial/internal/web/base"
"github.com/superseriousbusiness/gotosocial/internal/api/security"
"github.com/superseriousbusiness/gotosocial/internal/blob"
"github.com/superseriousbusiness/gotosocial/internal/cliactions"
@ -44,6 +43,7 @@ import (
timelineprocessing "github.com/superseriousbusiness/gotosocial/internal/timeline"
"github.com/superseriousbusiness/gotosocial/internal/transport"
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
"github.com/superseriousbusiness/gotosocial/internal/web/base"
)
var models []interface{} = []interface{}{

View File

@ -26,7 +26,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/router"
)
type Module sruct {
type Module struct {
config *config.Config
log *logrus.Logger
}
@ -34,7 +34,7 @@ type Module sruct {
func New(config *config.Config, log *logrus.Logger) {
return &Module{
config: config,
log: log
log: log,
}
}
@ -43,12 +43,12 @@ func (m *Module) Route(s router.Router) error {
l := m.log.WithField("func", "BaseGETHandler")
// serve static files from /assets
assetPath := filepath.Join(cwd, m.config.TemplateConfig.AssetBaseDir);
s.Static("/assets", assetPath);
assetPath := filepath.Join(cwd, m.config.TemplateConfig.AssetBaseDir)
s.Static("/assets", assetPath)
// serve front-page
s.GET("/", func(c *gin.Context) {
l.Trace("serving index html");
l.Trace("serving index html")
// FIXME: actual variables
c.HTML(http.StatusOK, "index.tmpl", gin.H{
"instancename": "GoToSocial Test Instance",
@ -56,7 +56,7 @@ func (m *Module) Route(s router.Router) error {
"countStatuses": 42069,
"version": "1.0.0",
"adminUsername": "@admin",
});
})
})
return nil
}
}