diff options
Diffstat (limited to 'vendor/github.com/a-h/templ/runtime/runtime.go')
-rw-r--r-- | vendor/github.com/a-h/templ/runtime/runtime.go | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/vendor/github.com/a-h/templ/runtime/runtime.go b/vendor/github.com/a-h/templ/runtime/runtime.go deleted file mode 100644 index aaa4a2c..0000000 --- a/vendor/github.com/a-h/templ/runtime/runtime.go +++ /dev/null @@ -1,21 +0,0 @@ -package runtime - -import ( - "context" - "io" - - "github.com/a-h/templ" -) - -// GeneratedComponentInput is used to avoid generated code needing to import the `context` and `io` packages. -type GeneratedComponentInput struct { - Context context.Context - Writer io.Writer -} - -// GeneratedTemplate is used to avoid generated code needing to import the `context` and `io` packages. -func GeneratedTemplate(f func(GeneratedComponentInput) error) templ.Component { - return templ.ComponentFunc(func(ctx context.Context, w io.Writer) error { - return f(GeneratedComponentInput{ctx, w}) - }) -} |