package discoverer import ( "fmt" omd "git.loafle.net/overflow/model/discovery" omm "git.loafle.net/overflow/model/meta" "git.loafle.net/overflow_scanner/probe/discoverer/ipv4" "git.loafle.net/overflow_scanner/probe/discoverer/ipv6" ) func scanService(port *omd.Port, ds *omd.DiscoverService, resultChan chan interface{}, errChan chan error, doneChan chan<- struct{}, stopChan chan struct{}) { defer func() { doneChan <- struct{}{} }() switch omm.ToMetaIPTypeEnum(port.Host.MetaIPType) { case omm.MetaIPTypeEnumV4: ipv4.ScanService(port, ds, resultChan, errChan, stopChan) case omm.MetaIPTypeEnumV6: ipv6.ScanService(port, ds, resultChan, errChan, stopChan) default: errChan <- fmt.Errorf("Discovery: Not supported MetaIPType") } }