8000 TemplateDataFunc -> HTMLTemplateHandler · coder/coder@34e4f46 · GitHub
[go: up one dir, main page]

Skip to content

Commit 34e4f46

Browse files
committed
TemplateDataFunc -> HTMLTemplateHandler
1 parent c17fc15 commit 34e4f46

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nextrouter/nextrouter.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ import (
1818
// Options for configuring a nextrouter
1919
type Options struct {
2020
Logger slog.Logger
21-
TemplateDataFunc TemplateDataFunc
21+
TemplateDataFunc HTMLTemplateHandler
2222
}
2323

24-
// TemplateDataFunc is a function that lets the consumer of `nextrouter`
24+
// HTMLTemplateHandler is a function that lets the consumer of `nextrouter`
2525
// inject arbitrary template parameters, based on the request. This is useful
2626
// if the Request object is carrying CSRF tokens, session tokens, etc -
2727
// they can be emitted in the page.
28-
type TemplateDataFunc func(*http.Request) interface{}
28+
type HTMLTemplateHandler func(*http.Request) interface{}
2929

3030
// Handler returns an HTTP handler for serving a next-based static site
3131
// This handler respects NextJS-based routing rules:

0 commit comments

Comments
 (0)
0