Simplified file structure
This commit is contained in:
parent
cacee7260a
commit
a466281307
219 changed files with 453 additions and 457 deletions
15
src/errors/NumberExceedsBounds.go
Normal file
15
src/errors/NumberExceedsBounds.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package errors
|
||||
|
||||
import "fmt"
|
||||
|
||||
// NumberExceedsBounds error is created when the number doesn't fit into the destination.
|
||||
type NumberExceedsBounds struct {
|
||||
Number int
|
||||
Size byte
|
||||
ExpectedSize byte
|
||||
}
|
||||
|
||||
// Error generates the string representation.
|
||||
func (err *NumberExceedsBounds) Error() string {
|
||||
return fmt.Sprintf("Number %d needs %d bytes but the maximum is %d bytes", err.Number, err.Size, err.ExpectedSize)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue