From 5d1e793a3b5bb3e73f682d4c5a3d415e802f6659 Mon Sep 17 00:00:00 2001 From: Sol Fisher Romanoff Date: Tue, 5 Sep 2023 10:34:57 +0300 Subject: [PATCH] cmd/scan: use strings.Cut instead of Split solves the issue with nil Disallow values --- cmd/scan.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/scan.go b/cmd/scan.go index 95c6965..b7043df 100644 --- a/cmd/scan.go +++ b/cmd/scan.go @@ -68,7 +68,7 @@ func Scan(url string, timeout time.Duration, threads int, logdir string) { continue } - sanitizedRobot := strings.Split(robot, ": ")[1] + _, sanitizedRobot, _ := strings.Cut(robot, ": ") log.Debugf("%s", robot) resp, err := client.Get(url + "/" + sanitizedRobot) if err != nil {