File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 11package main
22
33import (
4+ "errors"
45 "net/http"
56 "strings"
67
@@ -50,10 +51,19 @@ func TibiaBoostableBossesOverviewImpl(BoxContentHTML string) (BoostableBossesOve
5051 bodyIdx := strings .Index (
5152 BoxContentHTML , bodyIndexer ,
5253 )
54+
55+ if bodyIdx == - 1 {
56+ return BoostableBossesOverviewResponse {}, errors .New ("[error] body passd to TibiaBoostableBossesOverviewImpl is not valid" )
57+ }
58+
5359 endBodyIdx := strings .Index (
5460 BoxContentHTML [bodyIdx :], endBodyIndexer ,
5561 ) + bodyIdx + len (endBodyIndexer )
5662
63+ if endBodyIdx == - 1 {
64+ return BoostableBossesOverviewResponse {}, errors .New ("[error] body passd to TibiaBoostableBossesOverviewImpl is not valid" )
65+ }
66+
5767 data := BoxContentHTML [bodyIdx :endBodyIdx ]
5868
5969 var (
You can’t perform that action at this time.
0 commit comments