owl-blogs/main.go

31 lines
539 B
Go
Raw Normal View History

2023-06-25 18:04:06 +00:00
package main
import (
"fmt"
"owl-blogs/domain/model"
"reflect"
)
func Persist(entry model.Entry) error {
t := reflect.TypeOf(entry).Elem().Name()
fmt.Println(t)
return nil
}
func main() {
// repo := infra.NewEntryRepository()
// repo.RegisterEntryType(&model.ImageEntry{})
// var img model.Entry = &model.ImageEntry{}
// img.Create("id", "content", nil, &model.ImageEntryMetaData{ImagePath: "path"})
// repo.Save(img)
// img2, err := repo.FindById("id")
// if err != nil {
// panic(err)
// }
// fmt.Println(img2)
}