Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ef2k/raymond
A fork of raymond (Handlebars for Golang) with improvements to partial and helper management.
https://github.com/ef2k/raymond
Last synced: 10 days ago
JSON representation
A fork of raymond (Handlebars for Golang) with improvements to partial and helper management.
- Host: GitHub
- URL: https://github.com/ef2k/raymond
- Owner: ef2k
- License: mit
- Created: 2018-02-01T07:13:53.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-12T20:24:00.000Z (over 6 years ago)
- Last Synced: 2024-11-08T10:39:50.443Z (2 months ago)
- Language: Go
- Homepage:
- Size: 393 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# raymond
This is a fork of `aymerick/raymond`, a Golang implementation of Handlebars 3.0, with non-breaking API changes.
## What changed?
### Return errors instead of panicking
The following functions now return `error` instead of triggering a `panic`.
- `RegisterHelper() error`
- `RegisterHelpers() error`
- `RegisterPartial() error`
- `RegisterPartials() error`
- `Template.RegisterHelper() error`
- `Template.RegisterHelpers() error`
- `Template.RegisterPartial() error`
- `Template.RegisterPartials() error`### Allow previously registered helpers and partials to be removed
The following functions were added to the API.
- `RemovePartial()`
- `RemoveHelper()`
- `Template.RemovePartial()`
- `Template.RemoveHelper()`### Use golang/dep to manage dependencies
The raymond subpackages are vendored along with the YAML dependency.
## Should you use this fork?
As of now (Feb 2018), upstream has multiple pull requests waiting to be merged with similar functionality.
If they are merged by the time you read this, then you should probably use the upstream repo.These are the pending pull requests you should check:
- [RegisterHelper and RegisterHelpers do not panic](https://github.com/aymerick/raymond/pull/18)
- [Added methods to remove global partials](https://github.com/aymerick/raymond/pull/16)
- [added the ability to remove a registered helper](https://github.com/aymerick/raymond/pull/9)## Future changes
One of my projects heavily depends on `raymond` and I'll likely be making future changes that
fit my specific use-case. Some off the top of my head are:- Encapsulating globals so multiple raymond instances can be ran.
- Returning human readable errors for handlebars syntax issues.## Installing
```
$ go get github.com/ef2k/raymond
```## Documentation
Raymond already has excellent documentation.
You can find it here: [Read the Original Raymond Docs](./original_README.md)