No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-10-27 18:27:57 +00:00
.github add Go 1.25.x, drop 1.23.x 2025-10-27 18:24:15 +00:00
check apply a couple of gopls suggestions 2025-10-27 18:27:57 +00:00
testdata/script add test for the panic fix in a recent commit 2025-10-27 18:25:31 +00:00
.gitattributes rework CI with Go 1.14 and Windows support 2020-03-14 16:27:35 +00:00
go.mod update deps 2025-10-27 18:24:15 +00:00
go.sum update deps 2025-10-27 18:24:15 +00:00
LICENSE First commit 2017-03-04 01:08:03 +01:00
main.go update testscript to drop func() int 2024-12-26 12:34:37 +00:00
main_test.go add test for the panic fix in a recent commit 2025-10-27 18:25:31 +00:00
README.md ignore underscore-prefixed parameters 2022-11-09 08:35:36 +00:00

unparam

go install mvdan.cc/unparam@latest

Reports unused function parameters and results in your code.

To minimise false positives, it ignores certain cases such as:

  • Exported functions (by default, see -exported)
  • Unnamed and underscore parameters (like _ and _foo)
  • Funcs that may satisfy an interface
  • Funcs that may satisfy a function signature
  • Funcs that are stubs (empty, only error, immediately return, etc)
  • Funcs that have multiple implementations via build tags

It also reports results that always return the same value, parameters that always receive the same value, and results that are never used. In the last two cases, a minimum number of calls is required to ensure that the warnings are useful.

False positives can still occur by design. The aim of the tool is to be as precise as possible - if you find any mistakes, file a bug.