Backend: Add comments (#562)

This commit is contained in:
Simon Waldherr 2020-11-22 10:38:45 +01:00 committed by GitHub
parent 4be12cd33e
commit f10459c447
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)