Closed larien closed 5 years ago
closes #56, closes #59, closes #60
This one was tricky. The following error was showing up:
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x5fe493] goroutine 1 [running]: github.com/larien/family-tree/controller.(*Person).FindAll(0xc0001a29c0, 0x1, 0x1, 0x0, 0x0, 0x0) /home/larien/go/src/github.com/larien/family-tree/controller/person.go:31 +0x73 main.main() /home/larien/go/src/github.com/larien/family-tree/main.go:30 +0x1f9 exit status 2
That's because the Controller layer didn't have access to the Person's Repository method via interface. That was fixed by injecting Repository methods in the newPersonController function.
newPersonController
closes #56, closes #59, closes #60
This one was tricky. The following error was showing up:
That's because the Controller layer didn't have access to the Person's Repository method via interface. That was fixed by injecting Repository methods in the
newPersonController
function.