fixed bug with valid quantity values array
This commit is contained in:
@@ -36,7 +36,7 @@ var stickerMuleWebPageDocument *goquery.Document
|
|||||||
|
|
||||||
|
|
||||||
func getListOfQuantities() error {
|
func getListOfQuantities() error {
|
||||||
listOfValidQuantities := make([]int16, maxExpectedNumberOfQuantities)
|
result := make([]int16, maxExpectedNumberOfQuantities)
|
||||||
resultCount := 0
|
resultCount := 0
|
||||||
wasError := false
|
wasError := false
|
||||||
whichError := error(nil)
|
whichError := error(nil)
|
||||||
@@ -53,7 +53,7 @@ func getListOfQuantities() error {
|
|||||||
wasError = true
|
wasError = true
|
||||||
whichError = err
|
whichError = err
|
||||||
}else{
|
}else{
|
||||||
listOfValidQuantities[resultCount] = int16(sizeInt64)
|
result[resultCount] = int16(sizeInt64)
|
||||||
}
|
}
|
||||||
resultCount+=1
|
resultCount+=1
|
||||||
if resultCount == 15 {
|
if resultCount == 15 {
|
||||||
@@ -65,6 +65,8 @@ func getListOfQuantities() error {
|
|||||||
return whichError
|
return whichError
|
||||||
}
|
}
|
||||||
|
|
||||||
|
listOfValidQuantities = result[:resultCount]
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,7 +165,6 @@ func main() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
http.HandleFunc("/prices/diecut/", diecutHandler)
|
http.HandleFunc("/prices/diecut/", diecutHandler)
|
||||||
http.HandleFunc("/", defaultHandler)
|
http.HandleFunc("/", defaultHandler)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user