meta,args: add missing Include, add iterator to use normal or Readonly the same way

This commit is contained in:
Michael Muré
2024-11-20 18:27:01 +01:00
parent 4ec409edc6
commit caae2f58bf
7 changed files with 206 additions and 18 deletions

View File

@@ -1,17 +1,25 @@
package args
import "github.com/ipld/go-ipld-prime"
import (
"iter"
"github.com/ipld/go-ipld-prime"
)
type ReadOnly struct {
args *Args
}
func (r ReadOnly) Iter() iter.Seq2[string, ipld.Node] {
return r.args.Iter()
}
func (r ReadOnly) ToIPLD() (ipld.Node, error) {
return r.args.ToIPLD()
}
func (r ReadOnly) Equals(other *Args) bool {
return r.args.Equals(other)
func (r ReadOnly) Equals(other ReadOnly) bool {
return r.args.Equals(other.args)
}
func (r ReadOnly) String() string {