Improved variable lifetime tracking

This commit is contained in:
Eduard Urbach 2024-06-30 00:17:14 +02:00
parent 1510f88165
commit b8c011d742
Signed by: eduard
GPG key ID: 49226B848C78F6C8
17 changed files with 114 additions and 31 deletions

View file

@ -0,0 +1,13 @@
package errors
import "fmt"
// UnusedVariable error is created when a defined variable is never used.
type UnusedVariable struct {
Name string
}
// Error generates the string representation.
func (err *UnusedVariable) Error() string {
return fmt.Sprintf("Unused variable '%s'", err.Name)
}