Files
online-status-htmx-golang/templates/hello_templ.go
T
2023-09-06 13:09:51 -07:00

49 lines
1.1 KiB
Go

// Code generated by [email protected] DO NOT EDIT.
package templates
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import "context"
import "io"
import "bytes"
func Hello(name string) templ.Component {
return templ.ComponentFunc(func(ctx context.Context, w io.Writer) (err error) {
templBuffer, templIsBuffer := w.(*bytes.Buffer)
if !templIsBuffer {
templBuffer = templ.GetBuffer()
defer templ.ReleaseBuffer(templBuffer)
}
ctx = templ.InitializeContext(ctx)
var_1 := templ.GetChildren(ctx)
if var_1 == nil {
var_1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, err = templBuffer.WriteString("<div>")
if err != nil {
return err
}
var_2 := `Hello, `
_, err = templBuffer.WriteString(var_2)
if err != nil {
return err
}
var var_3 string = name
_, err = templBuffer.WriteString(templ.EscapeString(var_3))
if err != nil {
return err
}
_, err = templBuffer.WriteString("</div>")
if err != nil {
return err
}
if !templIsBuffer {
_, err = io.Copy(w, templBuffer)
}
return err
})
}