mirror of
https://codeberg.org/scip/kleingebaeck.git
synced 2025-12-17 04:21:00 +01:00
re-orgainzied code a little, using go templates instead format string
This commit is contained in:
@@ -38,9 +38,10 @@ Format is simple:
|
||||
|
||||
Be carefull if you want to change the template. The default one looks like this:
|
||||
|
||||
Title: %s\nPrice: %s\nId: %s\nCategory: %s\nCondition: %s\nCreated: %s\nBody:\n\n%s\n
|
||||
Title: {{.Title}}\nPrice: {{.Price}}\nId: {{.Id}}\nCategory: {{.Category}}\nCondition: {{.Condition}}\nCreated: {{.Created}}\n\n{{.Text}}\n
|
||||
|
||||
If you change it, include 7 times the '%s' format tag.
|
||||
You can left out certain fields and use any formatting you like. Refer
|
||||
to L<https://pkg.go.dev/text/template> for details how to write a template.
|
||||
|
||||
=head1 SETUP
|
||||
|
||||
|
||||
Reference in New Issue
Block a user