I have a struct in main
package :
package main
type DispatchesDetailsStruct struct{}
And I created another struct in package store
With same fields as of struct created in main
package.
package store
type DispatchesDetails struct{}
Here what I'm going to do, I created a function inside store
package with return DispatchesDetails
struct.
func (s *DispatchStore) GetDispatchByCondition(dispatchObject DispatchesRequestStruct, objRaouteAvailability Availability) (dds []DispatchesDetails, err error) {}
Now i call this store
function from main
package and assign returned value to main
package struct but its showing error message
can not assign store.DispatchesDetails to DispatchesDetailsStruct type.
I'm confused please help me. Thanks