mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-19 18:15:25 +00:00
26 lines
593 B
Go
26 lines
593 B
Go
|
|
// Warning - This is generated code
|
||
|
|
package pop3
|
||
|
|
|
||
|
|
import (
|
||
|
|
"errors"
|
||
|
|
"fmt"
|
||
|
|
|
||
|
|
"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/protocolstate"
|
||
|
|
)
|
||
|
|
|
||
|
|
func memoizedisPoP3(host string, port int) (IsPOP3Response, error) {
|
||
|
|
hash := "isPoP3" + ":" + fmt.Sprint(host) + ":" + fmt.Sprint(port)
|
||
|
|
|
||
|
|
v, err, _ := protocolstate.Memoizer.Do(hash, func() (interface{}, error) {
|
||
|
|
return isPoP3(host, port)
|
||
|
|
})
|
||
|
|
if err != nil {
|
||
|
|
return IsPOP3Response{}, err
|
||
|
|
}
|
||
|
|
if value, ok := v.(IsPOP3Response); ok {
|
||
|
|
return value, nil
|
||
|
|
}
|
||
|
|
|
||
|
|
return IsPOP3Response{}, errors.New("could not convert cached result")
|
||
|
|
}
|