From 553336154790bc1182441e5bb28f86adccddb334 Mon Sep 17 00:00:00 2001 From: yoshino-s Date: Sat, 22 Jul 2023 06:50:57 +0000 Subject: [PATCH] chore: fix lint problems --- .golangci.yml | 1 - .vscode/settings.json | 3 +++ cmd/server.go | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.golangci.yml b/.golangci.yml index 90f2de5..192020c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -13,5 +13,4 @@ linters: - goimports - revive - gofmt - - depguard - godot diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9012f14 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "go.lintTool": "golangci-lint" +} \ No newline at end of file diff --git a/cmd/server.go b/cmd/server.go index b92eb02..184c8a3 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -27,14 +27,14 @@ type wrapLogger struct { func (n *wrapLogger) WithValues(map[string]interface{}) 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 } func (n *wrapLogger) Warningf(template string, args ...interface{}) { n.Warnf(template, args...) } -type CmdConfig struct { +type Config struct { WebhookListenAddr string TLSCertFilePath string TLSKeyFilePath string @@ -46,7 +46,7 @@ type CmdConfig struct { } var ( - cmdConfig = &CmdConfig{ + cmdConfig = &Config{ LabelMarks: map[string]string{}, } serverCmd = &cobra.Command{