Bump golangci-lint to 1.55.2 and fix issues

Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
This commit is contained in:
Khosrow Moossavi
2023-12-19 12:51:04 -05:00
parent 4552242276
commit 5cfb2f2615
11 changed files with 108 additions and 111 deletions

View File

@@ -19,44 +19,43 @@ the root directory of this source tree.
// Implementation details are hidden in go-plugin. This package is
// essentially a wrapper for go-plugin.
//
// Usage
// # Usage
//
// A simple plugin can look like this:
//
// package main
// package main
//
// import (
// _ "embed" //nolint
// import (
// _ "embed" //nolint
//
// "github.com/terraform-docs/terraform-docs/plugin"
// "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/plugin"
// "github.com/terraform-docs/terraform-docs/print"
// "github.com/terraform-docs/terraform-docs/template"
// "github.com/terraform-docs/terraform-docs/terraform"
// )
//
// func main() {
// plugin.Serve(&plugin.ServeOpts{
// Name: "template",
// Version: "0.1.0",
// Printer: printerFunc,
// })
// }
// func main() {
// plugin.Serve(&plugin.ServeOpts{
// Name: "template",
// Version: "0.1.0",
// Printer: printerFunc,
// })
// }
//
// //go:embed sections.tmpl
// var tplCustom []byte
// //go:embed sections.tmpl
// var tplCustom []byte
//
// // printerFunc the function being executed by the plugin client.
// func printerFunc(config *print.Config, module *terraform.Module) (string, error) {
// tpl := template.New(config,
// &template.Item{Name: "custom", Text: string(tplCustom)},
// )
// // printerFunc the function being executed by the plugin client.
// func printerFunc(config *print.Config, module *terraform.Module) (string, error) {
// tpl := template.New(config,
// &template.Item{Name: "custom", Text: string(tplCustom)},
// )
//
// rendered, err := tpl.Render("custom", module)
// if err != nil {
// return "", err
// }
//
// return rendered, nil
// }
// rendered, err := tpl.Render("custom", module)
// if err != nil {
// return "", err
// }
//
// return rendered, nil
// }
package plugin