From d86cca419ccdbdb25893efefb4fa1fcf649a0ed4 Mon Sep 17 00:00:00 2001 From: Franklin Collin Tamboto Date: Thu, 13 Oct 2022 13:57:43 +0700 Subject: [PATCH] Fix minor bug on parsing process --- proxies.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/proxies.go b/proxies.go index f9d2b7e..59631b8 100644 --- a/proxies.go +++ b/proxies.go @@ -158,8 +158,12 @@ func parse(raw []byte) ([]Proxy, error) { Anonymity: node.Child[4].Child[0].Data, } - if node.Child[5].Child[0].Data == "yes" { - item.Google = true + if node.Child[5].Child != nil { + if len(node.Child[5].Child) >= 1 { + if node.Child[5].Child[0].Data == "yes" { + item.Google = true + } + } } else { item.Google = false }