initial commits

master
Charles Iliya Krempeaux 2023-08-18 09:28:18 -07:00
parent 7a54232d0d
commit 95a5ab657b
1 changed files with 44 additions and 0 deletions

44
renderhtml.go 100644
View File

@ -0,0 +1,44 @@
package maymoon
import (
"io"
)
func renderHTML(writer io.Writer, reader io.Reader) error {
{
_, err := io.WriteString(
writer,
`<html>` +"\n"+
`<head>` +"\n"+
`<meta charset="utf-8" />` +"\n"+
`</head>` +"\n"+
`<body>` +"\n"+
`<main>` +"\n",
)
if nil != err {
return err
}
}
{
_, err := io.Copy(writer, reader)
if nil != err {
return err
}
}
{
_, err := io.WriteString(
writer,
`</main>` +"\n"+
`</body>` +"\n"+
`</html>` +"\n",
)
if nil != err {
return err
}
}
return nil
}