github.com/lovung/GoCleanArchitecture@v0.0.0-20210302152432-50d91fd29f9f/pkg/copier/copier.go (about) 1 package copier 2 3 import "github.com/jinzhu/copier" 4 5 // MustCopy panic if copy the wrong structure 6 func MustCopy(toValue, fromValue interface{}) { 7 err := copier.Copy(toValue, fromValue) 8 if err != nil { 9 panic(err) 10 } 11 }