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.
This commit is contained in:
Jimmy Zelinskie 2015-11-25 11:16:33 -05:00
parent a2622536e9
commit 7d18978492

View file

@ -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}
}