commit 11aac315f0629a2a4a8d74d16cc49bb54a577778
parent 8ef947dc5a40615d7c05bc7898bf8de17352bf2c
Author: lash <dev@holbrook.no>
Date: Sun, 1 Sep 2024 07:39:18 +0100
Remove commented code
Diffstat:
3 files changed, 4 insertions(+), 67 deletions(-)
diff --git a/logging/doc.go b/logging/doc.go
@@ -1,2 +1,2 @@
-// Package logging provides a logging implementation for internal use in vise.
+// Package logging provides a logging implementation for use with vise.
package logging
diff --git a/render/doc.go b/render/doc.go
@@ -1,2 +1,2 @@
-// Package render handles output size constraints and paginated rendering of contents and menus against templates.
+// Package render handles output size constraints and paginated rendering of contents and menus using templates.
package render
diff --git a/render/size_test.go b/render/size_test.go
@@ -55,61 +55,6 @@ func getXyzzy(ctx context.Context, sym string, input []byte) (resource.Result, e
Content: r,
}, nil
}
-//
-//type TestSizeResource struct {
-// *resource.MenuResource
-//}
-//
-//func getTemplate(sym string, ctx context.Context) (string, error) {
-// var tpl string
-// switch sym {
-// case "small":
-// tpl = "one {{.foo}} two {{.bar}} three {{.baz}}"
-// case "toobig":
-// tpl = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus in mattis lorem. Aliquam erat volutpat. Ut vitae metus."
-// case "pages":
-// tpl = "one {{.foo}} two {{.bar}} three {{.baz}}\n{{.xyzzy}}"
-// }
-// return tpl, nil
-//}
-//
-//func funcFor(sym string) (resource.EntryFunc, error) {
-// switch sym {
-// case "foo":
-// return getFoo, nil
-// case "bar":
-// return getBar, nil
-// case "baz":
-// return getBaz, nil
-// case "xyzzy":
-// return getXyzzy, nil
-// }
-// return nil, fmt.Errorf("unknown func: %s", sym)
-//}
-//
-//func getFoo(sym string, input []byte, ctx context.Context) (resource.Result, error) {
-// return resource.Result{
-// Content: "inky",
-// }, nil
-//}
-//
-//func getBar(sym string, input []byte, ctx context.Context) (resource.Result, error) {
-// return resource.Result{
-// Content: "pinky",
-// }, nil
-//}
-//
-//func getBaz(sym string, input []byte, ctx context.Context) (resource.Result, error) {
-// return resource.Result{
-// Content: "blinky",
-// }, nil
-//}
-//
-//func getXyzzy(sym string, input []byte, ctx context.Context) (resource.Result, error) {
-// return resource.Result{
-// Content: "inky pinky\nblinky clyde sue\ntinkywinky dipsy\nlala poo\none two three four five six seven\neight nine ten\neleven twelve",
-// }, nil
-//}
func TestSizeCheck(t *testing.T) {
szr := NewSizer(16)
@@ -133,11 +78,7 @@ func TestSizeCheck(t *testing.T) {
func TestSizeLimit(t *testing.T) {
st := state.NewState(0)
ca := cache.NewCache()
- mn := NewMenu() //.WithOutputSize(32)
- //mrs := NewMenuResource() //.WithEntryFuncGetter(funcFor).WithTemplateGetter(getTemplate)
- //rs := TestSizeResource{
- // mrs,
- //}
+ mn := NewMenu()
rs := newTestSizeResource()
szr := NewSizer(128)
pg := NewPage(ca, rs).WithMenu(mn).WithSizer(szr)
@@ -186,11 +127,7 @@ func TestSizeLimit(t *testing.T) {
func TestSizePages(t *testing.T) {
st := state.NewState(0)
ca := cache.NewCache()
- mn := NewMenu() //.WithOutputSize(32)
- //mrs := NewMenuResource() //.WithEntryFuncGetter(funcFor).WithTemplateGetter(getTemplate)
- //rs := TestSizeResource{
- // mrs,
- //}
+ mn := NewMenu()
rs := newTestSizeResource()
szr := NewSizer(128)
pg := NewPage(ca, rs).WithSizer(szr).WithMenu(mn)