summaryrefslogtreecommitdiff
path: root/src/gmi/posts_preprocess_funcs.go
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2024-07-24 21:48:38 +0200
committerBrian Picciano <mediocregopher@gmail.com>2024-07-24 21:48:38 +0200
commit45c20d03663878f3508eaa9b961cb0cb12cc5574 (patch)
treea965671ce18393c638b3d52b6a82b3b5cf90beb9 /src/gmi/posts_preprocess_funcs.go
parent60c6165d07b7fa633d7a8fafbe70e23c83d43c47 (diff)
Got post exporting working
Diffstat (limited to 'src/gmi/posts_preprocess_funcs.go')
-rw-r--r--src/gmi/posts_preprocess_funcs.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gmi/posts_preprocess_funcs.go b/src/gmi/posts_preprocess_funcs.go
index f8fcda6..92a9494 100644
--- a/src/gmi/posts_preprocess_funcs.go
+++ b/src/gmi/posts_preprocess_funcs.go
@@ -6,11 +6,13 @@ import (
"dev.mediocregopher.com/mediocre-blog.git/src/render"
)
-type postPreprocessFuncs struct {
- urlBuilder render.URLBuilder
+// NOTE If I wasn't abandoning this codebase I would give this a proper doc and
+// constructor, and make URLBuilder private.
+type PostPreprocessFuncs struct {
+ URLBuilder render.URLBuilder
}
-func (f postPreprocessFuncs) Image(args ...string) (string, error) {
+func (f PostPreprocessFuncs) Image(args ...string) (string, error) {
var (
id = args[0]
descr = "Image"
@@ -21,6 +23,6 @@ func (f postPreprocessFuncs) Image(args ...string) (string, error) {
}
return fmt.Sprintf(
- "\n=> %s %s", f.urlBuilder.Asset(id), descr,
+ "\n=> %s %s", f.URLBuilder.Asset(id), descr,
), nil
}