tex: update composability section's listing
This commit is contained in:
parent
0d6ac6125e
commit
2baaffaf27
@ -374,9 +374,11 @@ Echo's built-in facilities in a more ergonomic manner using \texttt{return
|
||||
c.Render(http.StatusOk, "home.tmpl")}.
|
||||
|
||||
\vspace{\parskip}
|
||||
\begin{lstlisting}[language=Go, caption={A conditional inside a Go template},
|
||||
\begin{lstlisting}[
|
||||
caption={Conditionaly enabling functionality inside a Go template based on user access level},
|
||||
label=tmplConditionals, basicstyle=\linespread{0.9}\small\ttfamily,
|
||||
backgroundcolor=\color{lstbg},
|
||||
morekeywords={if,and,end},
|
||||
]
|
||||
{{ if and .User .User.IsLoggedIn .User.IsAdmin }}
|
||||
...
|
||||
|
Reference in New Issue
Block a user