code: func executeSAMLSliceTemplate(raw []string, assertion map[string]string) ([]string, error) {
  	var sl []string
  
  	for _, v := range raw {
  		tmpl, err := template.New("dynamic-roles").Parse(v)
  		if err != nil {
  			return nil, trace.Wrap(err)
  		}
  		var buf bytes.Buffer
  		err = tmpl.Execute(&buf, assertion)
  		if err != nil {
  			return nil, trace.Wrap(err)
  		}
  
  		sl = append(sl, buf.String())
  	}
  
  	return sl, nil
  }
docs: // executeSAMLStringTemplate takes raw template strings and a map of
  // assertions to execute templates and generate a slice of output. Because the
  // data structure used to execute the template is a map, the format of each raw
  // string is expected to be {{index . "key"}}. See
  // https://golang.org/pkg/text/template/ for more details.