Co-authored-by: sneak <sneak@sneak.berlin> Reviewed-on: #5
This commit was merged in pull request #5.
This commit is contained in:
15
internal/bork/error.go
Normal file
15
internal/bork/error.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package bork
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
var (
|
||||
ErrMissingMagic = errors.New("missing magic bytes in file")
|
||||
ErrFileTruncated = errors.New("file/stream is truncated abnormally")
|
||||
)
|
||||
|
||||
func Newf(format string, args ...interface{}) error {
|
||||
return fmt.Errorf(format, args...)
|
||||
}
|
||||
11
internal/bork/error_test.go
Normal file
11
internal/bork/error_test.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package bork
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestBuild(t *testing.T) {
|
||||
assert.NotNil(t, ErrMissingMagic)
|
||||
}
|
||||
Reference in New Issue
Block a user