Pārlūkot izejas kodu

Enforce model for the json image format

creack 12 gadi atpakaļ
vecāks
revīzija
3e8d1dfb69
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  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
 }