fixed bug with valid quantity values array

This commit is contained in:
GotPPay
2018-04-23 22:28:30 +02:00
parent eb8c0f941e
commit 8e34bbab63

View File

@@ -36,7 +36,7 @@ var stickerMuleWebPageDocument *goquery.Document
func getListOfQuantities() error {
listOfValidQuantities := make([]int16, maxExpectedNumberOfQuantities)
result := make([]int16, maxExpectedNumberOfQuantities)
resultCount := 0
wasError := false
whichError := error(nil)
@@ -53,7 +53,7 @@ func getListOfQuantities() error {
wasError = true
whichError = err
}else{
listOfValidQuantities[resultCount] = int16(sizeInt64)
result[resultCount] = int16(sizeInt64)
}
resultCount+=1
if resultCount == 15 {
@@ -65,6 +65,8 @@ func getListOfQuantities() error {
return whichError
}
listOfValidQuantities = result[:resultCount]
return nil
}
@@ -163,7 +165,6 @@ func main() {
return
}
http.HandleFunc("/prices/diecut/", diecutHandler)
http.HandleFunc("/", defaultHandler)