From 7d18978492a97df205d0ac8d2e918fac45ca148f Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Wed, 25 Nov 2015 11:16:33 -0500 Subject: [PATCH] add Triple function This is a shortcut for those that are not using the label field. It can become very verbose always calling Quad with an empty string as the last parameter. --- imports.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/imports.go b/imports.go index c855ce9..f47c41f 100644 --- a/imports.go +++ b/imports.go @@ -27,6 +27,10 @@ type Handle struct { graph.QuadWriter } +func Triple(subject, predicate, object string) quad.Quad { + return quad.Quad{subject, predicate, object, ""} +} + func Quad(subject, predicate, object, label string) quad.Quad { return quad.Quad{subject, predicate, object, label} }