Created
August 5, 2014 15:27
-
-
Save yosssi/2e2d7ed8a2394aa8bc1a to your computer and use it in GitHub Desktop.
[Ace] Default Value Example
This file contains hidden or 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
| html | |
| head | |
| = include inc "aaa" | |
| = include inc "bbb" | |
| = include inc |
This file contains hidden or 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
| meta name=description content={{or . "default value"}} |
This file contains hidden or 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
| package main | |
| import ( | |
| "os" | |
| "github.com/yosssi/ace" | |
| ) | |
| func main() { | |
| tpl, err := ace.Load("base", "", nil) | |
| if err != nil { | |
| panic(err) | |
| } | |
| if err := tpl.Execute(os.Stdout, nil); err != nil { | |
| panic(err) | |
| } | |
| } |
This file contains hidden or 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
| <html> | |
| <head> | |
| <meta name="description" content="aaa"> | |
| <meta name="description" content="bbb"> | |
| <meta name="description" content="default value"> | |
| </head> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment