- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 537 for funcMap (0.18 sec)
-
staging/src/k8s.io/cli-runtime/pkg/printers/template.go
type GoTemplatePrinter struct { rawTemplate string template *template.Template } func NewGoTemplatePrinter(tmpl []byte) (*GoTemplatePrinter, error) { t, err := template.New("output"). Funcs(template.FuncMap{ "exists": exists, "base64decode": base64decode, }). Parse(string(tmpl)) if err != nil { return nil, err } return &GoTemplatePrinter{ rawTemplate: string(tmpl), template: t,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 23:00:24 UTC 2019 - 3.4K bytes - Viewed (0) -
src/html/template/example_test.go
func ExampleTemplate_block() { const ( master = `Names:{{block "list" .}}{{"\n"}}{{range .}}{{println "-" .}}{{end}}{{end}}` overlay = `{{define "list"}} {{join . ", "}}{{end}} ` ) var ( funcs = template.FuncMap{"join": strings.Join} guardians = []string{"Gamora", "Groot", "Nebula", "Rocket", "Star-Lord"} ) masterTmpl, err := template.New("master").Funcs(funcs).Parse(master) if err != nil { log.Fatal(err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 3.9K bytes - Viewed (0) -
pkg/config/schema/codegen/common.go
c.Stdout = os.Stdout c.Stderr = os.Stderr return c.Run() } func applyTemplate(tmpl string, i any) (string, error) { t := template.New("tmpl").Funcs(template.FuncMap{ "contains": strings.Contains, }) t2 := template.Must(t.Parse(tmpl)) var b bytes.Buffer if err := t2.Execute(&b, i); err != nil { return "", err } return b.String(), nil
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sat Mar 30 00:31:03 UTC 2024 - 4.5K bytes - Viewed (0) -
api/go1.19.txt
pkg hash/maphash, func Bytes(Seed, []uint8) uint64 #42710 pkg hash/maphash, func String(Seed, string) uint64 #42710 pkg html/template, method (*Template) Funcs(template.FuncMap) *Template #46121 pkg html/template, type FuncMap = template.FuncMap #46121 pkg net/http, method (*MaxBytesError) Error() string #30715 pkg net/http, type MaxBytesError struct #30715 pkg net/http, type MaxBytesError struct, Limit int64 #30715
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 02 16:29:41 UTC 2022 - 17.9K bytes - Viewed (0) -
src/crypto/md5/gen.go
a, b, c, d string Shift1 []int Shift2 []int Shift3 []int Shift4 []int Table1 []uint32 Table2 []uint32 Table3 []uint32 Table4 []uint32 } var funcs = template.FuncMap{ "dup": dup, "relabel": relabel, "rotate": rotate, "idx": idx, "seq": seq, } func dup(count int, x []int) []int { var out []int for i := 0; i < count; i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 4.7K bytes - Viewed (0) -
src/cmd/go/internal/help/help.go
w.err = err } return n, err } // tmpl executes the given template text on data, writing the result to w. func tmpl(w io.Writer, text string, data any) { t := template.New("top") t.Funcs(template.FuncMap{"trim": strings.TrimSpace, "capitalize": capitalize}) template.Must(t.Parse(text)) ew := &errWriter{w: w} err := t.Execute(ew, data) if ew.err != nil { // I/O error writing. Ignore write on closed pipe.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 18:15:22 UTC 2024 - 4.7K bytes - Viewed (0) -
src/text/template/parse/parse.go
} t.backup() return nil } // hasFunction reports if a function name exists in the Tree's maps. func (t *Tree) hasFunction(name string) bool { for _, funcMap := range t.funcs { if funcMap == nil { continue } if funcMap[name] != nil { return true } } return false } // popVars trims the variable list to the specified length func (t *Tree) popVars(n int) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 20:57:51 UTC 2024 - 21.3K bytes - Viewed (0) -
pkg/ctrlz/ctrlz.go
allTopics = append(allTopics, coreTopics...) allTopics = append(allTopics, customTopics...) topicMutex.Unlock() exec, _ := os.Executable() instance := exec + " - " + getLocalIP() funcs := template.FuncMap{ "getTopics": getTopics, "normalize": normalize, } baseLayout := assets.ParseTemplate(template.New("base"), "templates/layouts/base.html") baseLayout = baseLayout.Funcs(funcs)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Jun 11 21:22:53 UTC 2024 - 5.9K bytes - Viewed (0) -
src/cmd/cover/html.go
for i := 0; i < 11; i++ { fmt.Fprintf(&buf, ".cov%v { color: %v }\n", i, rgb(i)) } return template.CSS(buf.String()) } var htmlTemplate = template.Must(template.New("html").Funcs(template.FuncMap{ "colors": colors, }).Parse(tmplHTML)) type templateData struct { Files []*templateFile Set bool } // PackageName returns a name for the package being shown.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 08 14:33:36 UTC 2022 - 6.8K bytes - Viewed (0) -
src/go/doc/doc_test.go
const dataDir = "testdata" var templateTxt = readTemplate("template.txt") func readTemplate(filename string) *template.Template { t := template.New(filename) t.Funcs(template.FuncMap{ "node": nodeFmt, "synopsis": synopsisFmt, "indent": indentFmt, }) return template.Must(t.ParseFiles(filepath.Join(dataDir, filename))) } func nodeFmt(node any, fset *token.FileSet) string {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:31:52 UTC 2022 - 6.7K bytes - Viewed (0)