fix -1
All checks were successful
Build and push container / Build-Docker-Container (push) Successful in 1m51s

This commit is contained in:
TheArrayser 2025-01-12 14:47:16 +01:00
parent f388664482
commit 85d5705c77

View File

@ -53,7 +53,7 @@ func HandlePrimeNumberChecker(question dns.Question) dns.RR {
return nil return nil
} }
mainDomainPart := question.Name[0 : mainDomainPartindex-1] // subtract 1 for the p in prime mainDomainPart := question.Name[0:mainDomainPartindex] // subtract 1 for the p in prime
log.Println("10:" + mainDomainPart) log.Println("10:" + mainDomainPart)
if !strings.HasSuffix(mainDomainPart, ".") { if !strings.HasSuffix(mainDomainPart, ".") {
@ -62,7 +62,7 @@ func HandlePrimeNumberChecker(question dns.Question) dns.RR {
return nil return nil
} }
mainDomainPart = mainDomainPart[0 : len(mainDomainPart)-2] // subtract 1 to accomodate for the length being one bigger then the last index, and subtract another one for the dot at the end mainDomainPart = mainDomainPart[0 : len(mainDomainPart)-1] // subtract 1 to accomodate for the length being one bigger then the last index, and subtract another one for the dot at the end
log.Println("12:" + mainDomainPart) log.Println("12:" + mainDomainPart)
if len(mainDomainPart) == 0 { if len(mainDomainPart) == 0 {
@ -77,7 +77,7 @@ func HandlePrimeNumberChecker(question dns.Question) dns.RR {
if firstIsIndex == 0 || firstIsIndex == 1 { if firstIsIndex == 0 || firstIsIndex == 1 {
// word "is." found at the beginning of the question.. trim // word "is." found at the beginning of the question.. trim
mainDomainPart = mainDomainPart[len("is.") : len(mainDomainPart)-1] mainDomainPart = mainDomainPart[len("is."):len(mainDomainPart)]
} }
log.Println("15: " + mainDomainPart) log.Println("15: " + mainDomainPart)