chore: fix lint problems

This commit is contained in:
2023-07-22 06:50:57 +00:00
parent 9bb2865a65
commit 5533361547
3 changed files with 6 additions and 4 deletions

View File

@@ -13,5 +13,4 @@ linters:
- goimports - goimports
- revive - revive
- gofmt - gofmt
- depguard
- godot - godot

3
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"go.lintTool": "golangci-lint"
}

View File

@@ -27,14 +27,14 @@ type wrapLogger struct {
func (n *wrapLogger) WithValues(map[string]interface{}) log.Logger { return n } func (n *wrapLogger) WithValues(map[string]interface{}) log.Logger { return n }
func (n *wrapLogger) WithCtxValues(context.Context) log.Logger { return n } func (n *wrapLogger) WithCtxValues(context.Context) log.Logger { return n }
func (n *wrapLogger) SetValuesOnCtx(parent context.Context, values map[string]interface{}) context.Context { func (n *wrapLogger) SetValuesOnCtx(parent context.Context, _ map[string]interface{}) context.Context {
return parent return parent
} }
func (n *wrapLogger) Warningf(template string, args ...interface{}) { func (n *wrapLogger) Warningf(template string, args ...interface{}) {
n.Warnf(template, args...) n.Warnf(template, args...)
} }
type CmdConfig struct { type Config struct {
WebhookListenAddr string WebhookListenAddr string
TLSCertFilePath string TLSCertFilePath string
TLSKeyFilePath string TLSKeyFilePath string
@@ -46,7 +46,7 @@ type CmdConfig struct {
} }
var ( var (
cmdConfig = &CmdConfig{ cmdConfig = &Config{
LabelMarks: map[string]string{}, LabelMarks: map[string]string{},
} }
serverCmd = &cobra.Command{ serverCmd = &cobra.Command{