-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
I tried to start my first analysis....
panic: runtime error: index out of range [0] with length 0
I found the problem in extparser.go
in function parseFileLine()
is a regex query
my variables look like this:
line: 2 drwxr-xr-x root root 1024 6-May-2020 18:31 .
e.fileinfoReg: ^\s*(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+-\w+-\d+)\s+(\d+:\d+)\s+([\S ]+)
Command: res := e.fileinfoReg.FindAllStringSubmatch(line, -1)
Result of the command: res = []
The next step is to try to access res
:
size, _ := strconv.Atoi(res[0][5])
This query throws the error that you see in the main program
The question is: what is the goal of the regex query and how can I modify it to make it work?
Metadata
Metadata
Assignees
Labels
No labels