token: ditch the generic bundle in favor of specialized struct

It's kust cleaner that way, the generic has no upside.
This commit is contained in:
Michael Muré
2025-01-29 14:28:13 +01:00
parent 126177b9e5
commit 506ed21b94
9 changed files with 53 additions and 40 deletions

View File

@@ -217,7 +217,6 @@ func (g *generator) writeGoFile() error {
Println("import (")
Println("\t\"github.com/ipfs/go-cid\"")
Println()
Println("\t\"github.com/ucan-wg/go-ucan/token\"")
Println("\t\"github.com/ucan-wg/go-ucan/token/delegation\"")
Println(")")
@@ -243,7 +242,7 @@ func (g *generator) writeGoFile() error {
Println("}")
Println()
Println("var AllBundles = []token.Bundle[*delegation.Token]{")
Println("var AllBundles = []delegation.Bundle{")
for _, d := range g.dlgs {
Printf("\t%sBundle,\n", d.name)
}