mirror of
https://github.com/terraform-docs/terraform-docs.git
synced 2026-03-27 04:48:33 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user