mirror of
https://github.com/terraform-docs/terraform-docs.git
synced 2026-03-27 12:58:35 +07:00
Bump golangci-lint to 1.55.2 and fix issues
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
This commit is contained in:
@@ -12,43 +12,42 @@ the root directory of this source tree.
|
||||
//
|
||||
// Usage
|
||||
//
|
||||
// import (
|
||||
// "fmt"
|
||||
// gotemplate "text/template"
|
||||
// import (
|
||||
// "fmt"
|
||||
// gotemplate "text/template"
|
||||
//
|
||||
// "github.com/terraform-docs/terraform-docs/print"
|
||||
// "github.com/terraform-docs/terraform-docs/template"
|
||||
// "github.com/terraform-docs/terraform-docs/terraform"
|
||||
// )
|
||||
// "github.com/terraform-docs/terraform-docs/print"
|
||||
// "github.com/terraform-docs/terraform-docs/template"
|
||||
// "github.com/terraform-docs/terraform-docs/terraform"
|
||||
// )
|
||||
//
|
||||
// const mainTpl =`
|
||||
// {{- if .Config.Sections.Header -}}
|
||||
// {{- with .Module.Header -}}
|
||||
// {{ colorize "\033[90m" . }}
|
||||
// {{ end -}}
|
||||
// {{- printf "\n\n" -}}
|
||||
// {{ end -}}`
|
||||
// const mainTpl =`
|
||||
// {{- if .Config.Sections.Header -}}
|
||||
// {{- with .Module.Header -}}
|
||||
// {{ colorize "\033[90m" . }}
|
||||
// {{ end -}}
|
||||
// {{- printf "\n\n" -}}
|
||||
// {{ end -}}`
|
||||
//
|
||||
// func render(config *print.Config, module *terraform.Module) (string, error) {
|
||||
// tt := template.New(config, &template.Item{
|
||||
// Name: "main",
|
||||
// Text: mainTpl,
|
||||
// TrimSpace: true,
|
||||
// })
|
||||
// func render(config *print.Config, module *terraform.Module) (string, error) {
|
||||
// tt := template.New(config, &template.Item{
|
||||
// Name: "main",
|
||||
// Text: mainTpl,
|
||||
// TrimSpace: true,
|
||||
// })
|
||||
//
|
||||
// tt := template.New(config, items...)
|
||||
// tt.CustomFunc(gotemplate.FuncMap{
|
||||
// "colorize": func(color string, s string) string {
|
||||
// reset := "\033[0m"
|
||||
// if !config.Settings.Color {
|
||||
// color = ""
|
||||
// reset = ""
|
||||
// }
|
||||
// return fmt.Sprintf("%s%s%s", color, s, reset)
|
||||
// },
|
||||
// })
|
||||
//
|
||||
// return tt.Render("main", module)
|
||||
// }
|
||||
// tt := template.New(config, items...)
|
||||
// tt.CustomFunc(gotemplate.FuncMap{
|
||||
// "colorize": func(color string, s string) string {
|
||||
// reset := "\033[0m"
|
||||
// if !config.Settings.Color {
|
||||
// color = ""
|
||||
// reset = ""
|
||||
// }
|
||||
// return fmt.Sprintf("%s%s%s", color, s, reset)
|
||||
// },
|
||||
// })
|
||||
//
|
||||
// return tt.Render("main", module)
|
||||
// }
|
||||
package template
|
||||
|
||||
Reference in New Issue
Block a user