From 9656675bb9bac41d9b54b64aede96fd1ffbf3afe Mon Sep 17 00:00:00 2001 From: Will Scott Date: Tue, 17 Nov 2020 13:58:13 -0800 Subject: [PATCH] add import to ipld in ipldsch_types.go cleanup from #105 --- schema/gen/go/generate.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/schema/gen/go/generate.go b/schema/gen/go/generate.go index 50915a33..af489b1b 100644 --- a/schema/gen/go/generate.go +++ b/schema/gen/go/generate.go @@ -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)