From ab778e442ac0384dd8963979c32bfb09c256cfa1 Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Sun, 11 Dec 2016 18:56:28 -0500 Subject: Correctable can now be stored --- modern.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modern.go') diff --git a/modern.go b/modern.go index fe66164..a01f29b 100644 --- a/modern.go +++ b/modern.go @@ -1,6 +1,7 @@ package main import ( + "database/sql/driver" "encoding/json" "encoding/xml" "fmt" @@ -42,6 +43,10 @@ type Correctable struct { Corrected int `xml:"corrected,attr" json:"corrected"` } +func (field Correctable) Value() (driver.Value, error) { + return field.Name, nil +} + func NewCorrectable(name string) Correctable { return Correctable{ Corrected: 0, -- cgit v1.2.3-70-g09d2