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 scanPort(host *omd.Host, dp *omd.DiscoverPort, resultChan chan interface{}, errChan chan error, doneChan chan<- struct{}, stopChan chan struct{}) { defer func() { doneChan <- struct{}{} }() switch omm.ToMetaIPTypeEnum(host.MetaIPType) { case omm.MetaIPTypeEnumV4: ipv4.ScanPort(host, dp, resultChan, errChan, stopChan) case omm.MetaIPTypeEnumV6: ipv6.ScanPort(host, dp, resultChan, errChan, stopChan) default: errChan <- fmt.Errorf("Discovery: Not supported MetaIPType") } }