MCPcopy Index your code
hub / github.com/coder/coder / TemplateContent

Function TemplateContent

scaletest/dynamicparameters/template.go:29–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27var templateContent string
28
29func TemplateContent() (string, error) {
30 randomString, err := cryptorand.String(8)
31 if err != nil {
32 return "", err
33 }
34 tmpl, err := template.New("workspace-template").Parse(templateContent)
35 if err != nil {
36 return "", err
37 }
38 var result strings.Builder
39 err = tmpl.Execute(&result, map[string]string{
40 "RandomString": randomString,
41 })
42 if err != nil {
43 return "", err
44 }
45 return result.String(), nil
46}
47
48//go:embed tf/modules/two/main.tf
49var moduleTwoMainTF string

Callers 2

TestRunFunction · 0.92
TemplateTarDataFunction · 0.85

Calls 5

StringFunction · 0.92
ParseMethod · 0.65
NewMethod · 0.65
ExecuteMethod · 0.65
StringMethod · 0.45

Tested by 1

TestRunFunction · 0.74