refactor: move const to constant pkg (#1205)

This commit is contained in:
Kota Kanbe
2021-04-02 15:33:02 +09:00
committed by GitHub
parent 6fef4db8a0
commit a2a697900a
2 changed files with 4 additions and 3 deletions

View File

@@ -357,15 +357,13 @@ func (l *base) detectDeepSecurity() (string, error) {
return "", xerrors.Errorf("Failed to detect deepsecurity %s", l.ServerInfo.ServerName)
}
const deepSecurity string = "deepsecurity"
func (l *base) detectIPS() {
ips := map[string]string{}
fingerprint, err := l.detectDeepSecurity()
if err != nil {
return
}
ips[deepSecurity] = fingerprint
ips[constant.DeepSecurity] = fingerprint
l.ServerInfo.IPSIdentifiers = ips
}