refactor: follow the google go style guide
Document every package and exported identifier, return the log level from NewLogger instead of keeping it in a package variable, and stop tests from mutating the argon2 parameters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
048e114fd9
commit
d20225982a
21 files changed
+147
-36
No files matched your search
@@ -1,3 +1,5 @@
|
||||
// Package web contains the templ components and static assets shared by
|
||||
// the console and status pages.
|
||||
package web
|
||||
|
||||
import (
|
||||
@@ -12,6 +14,7 @@ import (
|
||||
//go:embed all:static
|
||||
var static embed.FS
|
||||
|
||||
// Static serves the embedded build output of npm run build.
|
||||
func Static() http.FileSystem {
|
||||
sub, err := fs.Sub(static, "static")
|
||||
if err != nil {
|
||||
@@ -20,6 +23,8 @@ func Static() http.FileSystem {
|
||||
return http.FS(sub)
|
||||
}
|
||||
|
||||
// Render writes comp as HTML. Rendering errors are attached to c so the
|
||||
// access log records them; the status has already been sent.
|
||||
func Render(c *gin.Context, status int, comp templ.Component) {
|
||||
c.Status(status)
|
||||
c.Header("Content-Type", "text/html; charset=utf-8")
|
||||
|
||||
Reference in new issue
Block a user