snapshot of https://github.com/ThreeDotsLabs/watermill.git (master, 2026-09-15; blobs > 131072B omitted)
Some checks failed
master / ci (push) Failing after 0s

This commit is contained in:
upstream-mirror
2026-09-15 21:27:46 +05:00
commit ce933d1277
538 changed files with 46504 additions and 0 deletions

23
components/cqrs/object.go Normal file
View File

@@ -0,0 +1,23 @@
package cqrs
import (
"reflect"
)
func isPointer(v interface{}) error {
rv := reflect.ValueOf(v)
if rv.Kind() != reflect.Pointer || rv.IsNil() {
return NonPointerError{rv.Type()}
}
return nil
}
type NonPointerError struct {
Type reflect.Type
}
func (e NonPointerError) Error() string {
return "non-pointer command: " + e.Type.String() + ", handler.NewCommand() should return pointer to the command"
}