@@ -12,43 +12,42 @@ the root directory of this source tree.
12
12
//
13
13
// Usage
14
14
//
15
- // import (
16
- // "fmt"
17
- // gotemplate "text/template"
18
- //
19
- // "github.com/terraform-docs/terraform-docs/print"
20
- // "github.com/terraform-docs/terraform-docs/template"
21
- // "github.com/terraform-docs/terraform-docs/terraform"
22
- // )
23
- //
24
- // const mainTpl =`
25
- // {{- if .Config.Sections.Header -}}
26
- // {{- with .Module.Header -}}
27
- // {{ colorize "\033[90m" . }}
28
- // {{ end -}}
29
- // {{- printf "\n\n" -}}
30
- // {{ end -}}`
31
- //
32
- // func render(config *print.Config, module *terraform.Module) (string, error) {
33
- // tt := template.New(config, &template.Item{
34
- // Name: "main",
35
- // Text: mainTpl,
36
- // TrimSpace: true,
37
- // })
38
- //
39
- // tt := template.New(config, items...)
40
- // tt.CustomFunc(gotemplate.FuncMap{
41
- // "colorize": func(color string, s string) string {
42
- // reset := "\033[0m"
43
- // if !config.Settings.Color {
44
- // color = ""
45
- // reset = ""
46
- // }
47
- // return fmt.Sprintf("%s%s%s", color, s, reset)
48
- // },
49
- // })
50
- //
51
- // return tt.Render("main", module)
52
- // }
53
- //
15
+ // import (
16
+ // "fmt"
17
+ // gotemplate "text/template"
18
+ //
19
+ // "github.com/terraform-docs/terraform-docs/print"
20
+ // "github.com/terraform-docs/terraform-docs/template"
21
+ // "github.com/terraform-docs/terraform-docs/terraform"
22
+ // )
23
+ //
24
+ // const mainTpl =`
25
+ // {{- if .Config.Sections.Header -}}
26
+ // {{- with .Module.Header -}}
27
+ // {{ colorize "\033[90m" . }}
28
+ // {{ end -}}
29
+ // {{- printf "\n\n" -}}
30
+ // {{ end -}}`
31
+ //
32
+ // func render(config *print.Config, module *terraform.Module) (string, error) {
33
+ // tt := template.New(config, &template.Item{
34
+ // Name: "main",
35
+ // Text: mainTpl,
36
+ // TrimSpace: true,
37
+ // })
38
+ //
39
+ // tt := template.New(config, items...)
40
+ // tt.CustomFunc(gotemplate.FuncMap{
41
+ // "colorize": func(color string, s string) string {
42
+ // reset := "\033[0m"
43
+ // if !config.Settings.Color {
44
+ // color = ""
45
+ // reset = ""
46
+ // }
47
+ // return fmt.Sprintf("%s%s%s", color, s, reset)
48
+ // },
49
+ // })
50
+ //
51
+ // return tt.Render("main", module)
52
+ // }
54
53
package template
0 commit comments