init commit
This commit is contained in:
21
pkg/resp/resp.go
Normal file
21
pkg/resp/resp.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package resp
|
||||
|
||||
type Data struct {
|
||||
Error bool
|
||||
Cause string
|
||||
Data interface{}
|
||||
}
|
||||
|
||||
func Done(data interface{}) *Data {
|
||||
return &Data{
|
||||
Error: false,
|
||||
Data: data,
|
||||
}
|
||||
}
|
||||
|
||||
func Fail(cause string) *Data {
|
||||
return &Data{
|
||||
Error: true,
|
||||
Cause: cause,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user