fixed bug with valid quantity values array
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user