Remove terminal newline from quad.Quad stringer

This is the conventional implementation of a fmt.Stringer.

Also went through and fixed up some lint.
This commit is contained in:
kortschak 2014-07-31 11:43:20 +09:30
parent a81005ba21
commit b17334ea36
6 changed files with 37 additions and 39 deletions

View file

@ -125,8 +125,7 @@ func (q *Quad) Equals(o *Quad) bool {
// Pretty-prints a triple.
func (q *Quad) String() string {
// TODO(kortschak) String methods should generally not terminate in '\n'.
return fmt.Sprintf("%s -- %s -> %s\n", q.Subject, q.Predicate, q.Object)
return fmt.Sprintf("%s -- %s -> %s", q.Subject, q.Predicate, q.Object)
}
func (q *Quad) IsValid() bool {