Re: [go-nuts] if condition in html template

2017-09-12 Thread ivo . hechmann
Thank you very much. Indeed, it would be clean to use Objects instead of simple Strings to flag if a dump can be restored or not. I've added the function strings.Contains before parsing the template-files: templates, err = template.New("").Funcs(template.FuncMap{ "Contains": strings.C

[go-nuts] if condition in html template

2017-09-11 Thread ivo . hechmann
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