Skip to content

Commit

Permalink
Merge pull request #115 from willscott/fix/105
Browse files Browse the repository at this point in the history
add import to ipld in ipldsch_types.go
  • Loading branch information
warpfork committed Nov 18, 2020
2 parents 35b4a4f + 9656675 commit 16fdc47
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions schema/gen/go/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ func Generate(pth string, pkgName string, ts schema.TypeSystem, adjCfg *AdjunctC
// Emit headers, import statements, etc.
fmt.Fprintf(f, "package %s\n\n", pkgName)
fmt.Fprintf(f, doNotEditComment+"\n\n")
fmt.Fprintf(f, "import (\n")
fmt.Fprintf(f, "\tipld \"github.com/ipld/go-ipld-prime\"\n") // referenced for links
fmt.Fprintf(f, ")\n")
fmt.Fprintf(f, "var _ ipld.Node = nil // suppress errors when this dependency is not referenced\n")

// Emit the type table.
EmitTypeTable(pkgName, ts, adjCfg, f)
Expand Down

0 comments on commit 16fdc47

Please sign in to comment.