Explorar o código

Enforce model for the json image format

creack %!s(int64=12) %!d(string=hai) anos
pai
achega
3e8d1dfb69
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      graph/image.go

+ 4 - 4
graph/image.go

@@ -15,10 +15,10 @@ import (
 )
 
 type Image struct {
-	Id      string
-	Parent  string
-	Comment string
-	Created time.Time
+	Id      string    `json:"id"`
+	Parent  string    `json:"parent,omitempty"`
+	Comment string    `json:"comment,omitempty"`
+	Created time.Time `json:"created"`
 	graph   *Graph
 }