You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
442 B

package sriracha
import "io"
type Post struct {
ID int
Thread int
Name string
Email string
Subject string
Message string
type renderPostData struct {
Post *Post
BaseURL string
func (p *Post) render(w io.Writer) error {
return templates.ExecuteTemplate(w, "post.gohtml", renderPostData{
Post: p,
BaseURL: "/",
func (p *Post) ThreadID() int {
if p.Thread == 0 {
return p.ID
return p.Thread