We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I tried to start my first analysis.... panic: runtime error: index out of range [0] with length 0
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
parseFileLine()
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 ]+)
2 drwxr-xr-x root root 1024 6-May-2020 18:31 .
^\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 = []
res := e.fileinfoReg.FindAllStringSubmatch(line, -1)
[]
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
res
size, _ := strconv.Atoi(res[0][5])
The question is: what is the goal of the regex query and how can I modify it to make it work?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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 querymy 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?
The text was updated successfully, but these errors were encountered: