good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
temple
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
util
temple
Commits
0882540e
Commit
0882540e
authored
Mar 12, 2023
by
Garet Halliday
Browse files
Options
Downloads
Patches
Plain Diff
add formatter
parent
def3923b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/prayer/raw.go
+7
-1
7 additions, 1 deletion
lib/prayer/raw.go
with
7 additions
and
1 deletion
lib/prayer/raw.go
+
7
−
1
View file @
0882540e
...
@@ -7,6 +7,8 @@ type Raw struct {
...
@@ -7,6 +7,8 @@ type Raw struct {
Obj
any
Obj
any
// Args will be accessible within the template as arg0, arg1, argN...
// Args will be accessible within the template as arg0, arg1, argN...
Args
[]
any
Args
[]
any
// Formatter will be called to format and validate the output of the template.
Formatter
func
([]
byte
)
([]
byte
,
error
)
// Output defines the file name to place the output of this prayer.
// Output defines the file name to place the output of this prayer.
Output
string
Output
string
...
@@ -25,9 +27,13 @@ func (r *Raw) Arguments() []any {
...
@@ -25,9 +27,13 @@ func (r *Raw) Arguments() []any {
}
}
func
(
r
*
Raw
)
Format
(
bytes
[]
byte
)
([]
byte
,
error
)
{
func
(
r
*
Raw
)
Format
(
bytes
[]
byte
)
([]
byte
,
error
)
{
if
r
.
Formatter
==
nil
{
return
bytes
,
nil
return
bytes
,
nil
}
}
return
r
.
Formatter
(
bytes
)
}
func
(
r
*
Raw
)
FileName
()
string
{
func
(
r
*
Raw
)
FileName
()
string
{
return
r
.
Output
return
r
.
Output
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment