Simplified file structure

This commit is contained in:
2024-08-07 19:39:10 +02:00
parent 1b13539b22
commit 66569446b1
219 changed files with 453 additions and 457 deletions

View File

@ -0,0 +1,18 @@
package errors
import "fmt"
// UnknownPackage represents unknown package errors.
type UnknownPackage struct {
Name string
CorrectName string
}
// Error generates the string representation.
func (err *UnknownPackage) Error() string {
if err.CorrectName != "" {
return fmt.Sprintf("Unknown package '%s', did you mean '%s'?", err.Name, err.CorrectName)
}
return fmt.Sprintf("Unknown package '%s'", err.Name)
}