# gounused **Repository Path**: mirrors_tarm/gounused ## Basic Information - **Project Name**: gounused - **Description**: Find unused variable assignments in Go code - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-11-24 - **Last Updated**: 2026-10-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # . 'gounused' finds unused assignements in your code. The compiler checks for unused variables, but sometimes assignments are never read before getting overwriten or ignored. For example this code: package main import "fmt" func main() { _, err := fmt.Println("Hello") _, err = fmt.Println(" world") _, err = fmt.Println(err) } The err variable is used so the compiler does not complain, but the first and third assignment to the err variable are never checked. 'gounused' finds that mistake as follows: $ gounused ./testdata/ Unused assignment for 'err' ./testdata/test.go:6:5 Unused assignment for 'err' ./testdata/test.go:8:5 $ echo $? 1 - - - Generated by [godoc2md](http://godoc.org/github.com/davecheney/godoc2md)