Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
projectdiscovery
GitHub Repository: projectdiscovery/nuclei
Path: blob/dev/pkg/js/libs/pop3/memo.pop3.go
2858 views
1
// Warning - This is generated code
2
package pop3
3
4
import (
5
"errors"
6
"fmt"
7
8
"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/protocolstate"
9
)
10
11
func memoizedisPoP3(executionId string, host string, port int) (IsPOP3Response, error) {
12
hash := "isPoP3" + ":" + fmt.Sprint(executionId) + ":" + fmt.Sprint(host) + ":" + fmt.Sprint(port)
13
14
v, err, _ := protocolstate.Memoizer.Do(hash, func() (interface{}, error) {
15
return isPoP3(executionId, host, port)
16
})
17
if err != nil {
18
return IsPOP3Response{}, err
19
}
20
if value, ok := v.(IsPOP3Response); ok {
21
return value, nil
22
}
23
24
return IsPOP3Response{}, errors.New("could not convert cached result")
25
}
26
27