Clean up residual changes
Remove done TODOs and unnecessary helpers.
This commit is contained in:
parent
6acfdcc5d6
commit
2c6f0f7345
8 changed files with 129 additions and 136 deletions
11
quad/quad.go
11
quad/quad.go
|
|
@ -100,9 +100,6 @@ func (d Direction) String() string {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO(kortschak) Consider writing methods onto the concrete type
|
||||
// instead of the pointer. This needs benchmarking to make the decision.
|
||||
|
||||
// Per-field accessor for triples
|
||||
func (q Quad) Get(d Direction) string {
|
||||
switch d {
|
||||
|
|
@ -119,10 +116,6 @@ func (q Quad) Get(d Direction) string {
|
|||
}
|
||||
}
|
||||
|
||||
func (q Quad) Equals(o Quad) bool {
|
||||
return q == o
|
||||
}
|
||||
|
||||
// Pretty-prints a triple.
|
||||
func (q Quad) String() string {
|
||||
return fmt.Sprintf("%s -- %s -> %s", q.Subject, q.Predicate, q.Object)
|
||||
|
|
@ -132,10 +125,6 @@ func (q Quad) IsValid() bool {
|
|||
return q.Subject != "" && q.Predicate != "" && q.Object != ""
|
||||
}
|
||||
|
||||
// TODO(kortschak) NTriple looks like a good candidate for conversion
|
||||
// to MarshalText() (text []byte, err error) and then move parsing code
|
||||
// from nquads to here to provide UnmarshalText(text []byte) error.
|
||||
|
||||
// Prints a triple in N-Quad format.
|
||||
func (q Quad) NTriple() string {
|
||||
if q.Label == "" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue