filebuffer
filebuffer copied to clipboard
panic: runtime error: slice bounds out of range

Why is this line giving an error
@xiejunshi I'm afraid that without more context, I can't tell for sure. It looks like your buffer might be empty (no bytes) or something is wrong with the indexing. From what I can tell, our index is not the same length as the buffer, the index is actually lower so we are trying to get a sub slice and it's crashing for you on line 124, in f.Bytes()[:f.Index].
Could you maybe set a breakpoint and check the index and the number of bytes?