From 451e99c4a6882b64671fc75f6011d5aedb135d96 Mon Sep 17 00:00:00 2001 From: Brandon Dyck Date: Thu, 21 Mar 2019 15:56:52 -0600 Subject: [PATCH] Removed RText --- hatmill.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/hatmill.go b/hatmill.go index 65ead7a..ad3f40a 100644 --- a/hatmill.go +++ b/hatmill.go @@ -3,9 +3,8 @@ package hatmill import "fmt" import "io" import "os" -import "strings" -// Html is one of EmptyElement, ParentElement, Text, or RText. +// Html is one of EmptyElement, ParentElement, or Text. type Html interface { io.WriterTo @@ -109,16 +108,6 @@ func (t Text) WriteTo(w io.Writer) (n int64, err error) { return } -type RText struct { - io.Reader -} - -func (RText) isHtml() {} - -func (rt RText) WriteTo(w io.Writer) (n int64, err error) { - return io.Copy(w, rt.Reader) -} - // Html5 functions func Div(attribs ...Attrib) func(children ...Html) *ParentElement { @@ -172,7 +161,6 @@ func Main() { Img(Id("profile-photo")), Text("hello"), Img(Disabled()), - RText{strings.NewReader("goodbye!")}, ) n, err := WriteDocument(os.Stdout, page)