From fe323099e75766376f307d626e1128f80a274a36 Mon Sep 17 00:00:00 2001 From: Tom <73077675+tmzane@users.noreply.github.com> Date: Fri, 27 Oct 2023 21:06:55 +0300 Subject: [PATCH] fix: report the argument position --- musttag.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/musttag.go b/musttag.go index ebcf91c..b7e41f3 100644 --- a/musttag.go +++ b/musttag.go @@ -138,7 +138,7 @@ func run(pass *analysis.Pass, mainModule string, funcs map[string]Func) (_ any, return // nothing to report. } - pass.Reportf(call.Pos(), "the given struct should be annotated with the `%s` tag", fn.Tag) + pass.Reportf(arg.Pos(), "the given struct should be annotated with the `%s` tag", fn.Tag) }) return nil, err