Learning if-then in Hugo/Go templates.
This commit is contained in:
1 parent
c143eae7c5
commit
48c2aeff49
1 file changed
+7
@@ -0,0 +1,7 @@
|
|||||||
|
{{ if eq (.Get 0) "bug" }}
|
||||||
|
{{ print "Bug" }}
|
||||||
|
{{ else if eq (.Get 0) "hyperling" }}
|
||||||
|
{{ print "Hyperling" }}
|
||||||
|
{{ else if eq (.Get 0) "hypervegan" }}
|
||||||
|
{{ print "HyperVegan" }}'
|
||||||
|
{{ end }}
|
||||||
Reference in new issue
Block a user