1 Star 0 Fork 0

Laomo. / golangci-lint

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
utils.go 474 Bytes
一键复制 编辑 原始数据 按行查看 历史
package golinters
import (
"fmt"
"strings"
"github.com/golangci/golangci-lint/pkg/config"
)
func formatCode(code string, cfg *config.Config) string {
if strings.Contains(code, "`") {
return code // TODO: properly escape or remove
}
return fmt.Sprintf("`%s`", code)
}
func formatCodeBlock(code string, cfg *config.Config) string {
if strings.Contains(code, "`") {
return code // TODO: properly escape or remove
}
return fmt.Sprintf("```\n%s\n```", code)
}
1
https://gitee.com/LaomoBK/golangci-lint.git
git@gitee.com:LaomoBK/golangci-lint.git
LaomoBK
golangci-lint
golangci-lint
v1.3.5

搜索帮助