forked from hairyhenderson/gomplate
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use otto for js templating (#10)
* feat: use otto for js templating * add custom scripts for js program * test: added test cases for javascript
- Loading branch information
1 parent
c764d91
commit 76f3c39
Showing
7 changed files
with
506 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package js | ||
|
||
import ( | ||
_ "embed" | ||
|
||
"github.com/robertkrimen/otto/registry" | ||
) | ||
|
||
//go:embed k8s.js | ||
var k8s string | ||
|
||
//go:embed shared.js | ||
var shared string | ||
|
||
func init() { | ||
_ = registry.Register(func() string { return k8s }) | ||
_ = registry.Register(func() string { return shared }) | ||
} |
Oops, something went wrong.