Use pointer to not copy service.

This commit is contained in:
Cody Soyland 2013-12-17 18:12:41 -06:00
parent d2dc3b4cb6
commit 5a337e576e

View file

@ -9,7 +9,7 @@ import (
)
type Cruncher struct {
core.Service
*core.Service
close_chan chan bool
api *index.FragmentContainer
}
@ -33,7 +33,7 @@ func (cruncher *Cruncher) Run(port int) {
func NewCruncher() *Cruncher {
service := core.NewService()
fragment_container := index.NewFragmentContainer()
cruncher := Cruncher{*service, make(chan bool), fragment_container}
cruncher := Cruncher{service, make(chan bool), fragment_container}
cruncher.Transport = transport.NewTcpTransport(service)
cruncher.Dispatch = dispatch.NewCruncherDispatch(service)
return &cruncher