Преглед на файлове

Enforce model for the json image format

creack преди 12 години
родител
ревизия
3e8d1dfb69
променени са 1 файла, в които са добавени 4 реда и са изтрити 4 реда
  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
 }