소스 검색

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
 }