Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleTemplate (0.3 sec)

  1. src/text/template/example_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package template_test
    
    import (
    	"log"
    	"os"
    	"strings"
    	"text/template"
    )
    
    func ExampleTemplate() {
    	// Define a template.
    	const letter = `
    Dear {{.Name}},
    {{if .Attended}}
    It was a pleasure to see you at the wedding.
    {{- else}}
    It is a shame you couldn't make it to the wedding.
    {{- end}}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 29 00:17:40 UTC 2015
    - 2.4K bytes
    - Viewed (0)
Back to top