make internal/multipart use internal/cerr constant errors
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
- instead of defining its own
This commit is contained in:
parent
0126a551b3
commit
635773218f
|
@ -1,21 +1,15 @@
|
||||||
package multipart
|
package multipart
|
||||||
|
|
||||||
// ConstError is a wrapper to set constant errors
|
import "git.xdrm.io/go/aicra/internal/cerr"
|
||||||
type ConstError string
|
|
||||||
|
|
||||||
// Error implements error
|
|
||||||
func (err ConstError) Error() string {
|
|
||||||
return string(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ErrMissingDataName is set when a multipart variable/file has no name="..."
|
// ErrMissingDataName is set when a multipart variable/file has no name="..."
|
||||||
const ErrMissingDataName = ConstError("data has no name")
|
const ErrMissingDataName = cerr.Error("data has no name")
|
||||||
|
|
||||||
// ErrDataNameConflict is set when a multipart variable/file name is already used
|
// ErrDataNameConflict is set when a multipart variable/file name is already used
|
||||||
const ErrDataNameConflict = ConstError("data name conflict")
|
const ErrDataNameConflict = cerr.Error("data name conflict")
|
||||||
|
|
||||||
// ErrNoHeader is set when a multipart variable/file has no (valid) header
|
// ErrNoHeader is set when a multipart variable/file has no (valid) header
|
||||||
const ErrNoHeader = ConstError("data has no header")
|
const ErrNoHeader = cerr.Error("data has no header")
|
||||||
|
|
||||||
// Component represents a multipart variable/file
|
// Component represents a multipart variable/file
|
||||||
type Component struct {
|
type Component struct {
|
||||||
|
|
Loading…
Reference in New Issue