Hello golang-nuts,
My problem: in a html page, I iterate over a list (of strings). the items
are names of backupfiles. Sometimes, a backup has failed, in this case, the
backupfilename contains the token .FAILED.
when i print the list of items, I would like to check if I have to print a
restore-link or not. Obviously, I should not print a restore link for
backups that contains the token .FAILED.
<table width="100%" class="backups" border="0">
{{ range $element := .Items }}
<tr>
<td>{{ $element }}</td>
{{ if CONDITION }}
<td><a
href="javascript:action('restore','{{$element}}');">Restore</a></td>
{{ end }}
</tr>
{{ end }}
</table>
So i need a regex or -contains- function for CONDITION. But I only found
the eq, ne, lt, le, gt, and ge, functions. Is there a way to check a
String in the condition?
Thank you very much for any hints...
Ivo
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.