package error import "fmt" const ( EntityAlreadyExists = "EntityAlreadyExists" NoDataWritten = "NoDataWritten" NoDataFound = "NoDataFound" DatabaseIsNotConnected = "database is not connected" DuplicateKey = "DuplicateKey" ) type Database struct { Reason string } func (e Database) Error() string { return fmt.Sprintf("Database error: %s", e.Reason) }