From f10459c447f8c1f022947ce5b4f84528d5a1e9d0 Mon Sep 17 00:00:00 2001 From: Simon Waldherr Date: Sun, 22 Nov 2020 10:38:45 +0100 Subject: [PATCH] Backend: Add comments (#562) --- internal/form/photo.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/form/photo.go b/internal/form/photo.go index ef1155722..db34f192e 100644 --- a/internal/form/photo.go +++ b/internal/form/photo.go @@ -6,6 +6,7 @@ import ( "github.com/ulule/deepcopier" ) +// Details contains detailed photo information type Details struct { PhotoID uint `json:"PhotoID" deepcopier:"skip"` Keywords string `json:"Keywords"` @@ -55,6 +56,7 @@ type Photo struct { OriginalName string `json:"OriginalName"` } +// NewPhoto creates Photo struct from interface func NewPhoto(m interface{}) (f Photo, err error) { err = deepcopier.Copy(m).To(&f)