Do not save Var.Time to the database.

This commit is contained in:
Greg 2018-08-09 09:58:40 -04:00
parent ee4657a0ed
commit c52d8702b2

View File

@ -28,6 +28,10 @@ type Var struct {
opt Option
}
type encVar struct {
X interface{}
}
type Option struct {
Permanent bool
}
@ -224,12 +228,13 @@ type encoded struct {
func encode(p *Var,chs ...chan struct{}) encoded {
ret := encoded{name:[]byte(p.name)}
ep := encVar{ p.X }
if len(chs) > 0 {
ret.donech = chs[0]
}
var buf bytes.Buffer
enc := gob.NewEncoder(&buf)
err := enc.Encode(*p)
err := enc.Encode(ep)
if err != nil {
fmt.Println("encode(): ",err)
}