Skip to content

Commit 9656675

Browse files
committed
add import to ipld in ipldsch_types.go
cleanup from ipld#105
1 parent 35b4a4f commit 9656675

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

schema/gen/go/generate.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ func Generate(pth string, pkgName string, ts schema.TypeSystem, adjCfg *AdjunctC
8080
// Emit headers, import statements, etc.
8181
fmt.Fprintf(f, "package %s\n\n", pkgName)
8282
fmt.Fprintf(f, doNotEditComment+"\n\n")
83+
fmt.Fprintf(f, "import (\n")
84+
fmt.Fprintf(f, "\tipld \"github.com/ipld/go-ipld-prime\"\n") // referenced for links
85+
fmt.Fprintf(f, ")\n")
86+
fmt.Fprintf(f, "var _ ipld.Node = nil // suppress errors when this dependency is not referenced\n")
8387

8488
// Emit the type table.
8589
EmitTypeTable(pkgName, ts, adjCfg, f)

0 commit comments

Comments
 (0)