14 lines
295 B
Go
14 lines
295 B
Go
|
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)
|
||
|
}
|