Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_executor_0_filetest.gno

0.35 Kb · 23 lines
 1// PKGPATH: gno.land/r/definition/test
 2package test
 3
 4import "gno.land/p/nt/commondao/v0/exts/definition"
 5
 6func executor(realm) error {
 7	return nil
 8}
 9
10func main() {
11	// Arrange
12	def := definition.MustNew("Title", "Body", definition.WithExecutor(executor))
13	fn := def.Executor()
14
15	// Act
16	err := fn(cross)
17
18	// Assert
19	println(err == nil)
20}
21
22// Output:
23// true