github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/examples/gno.land/r/demo/tests_foo/foo.gno (about)

     1  package tests_foo
     2  
     3  import (
     4  	"gno.land/r/demo/tests"
     5  )
     6  
     7  // for testing gno.land/r/demo/tests/interfaces.go
     8  
     9  type FooStringer struct {
    10  	FieldA string
    11  }
    12  
    13  func (fs *FooStringer) String() string {
    14  	return "&FooStringer{" + fs.FieldA + "}"
    15  }
    16  
    17  func AddFooStringer(fa string) {
    18  	tests.AddStringer(&FooStringer{fa})
    19  }