Skip to content
New issue

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

Runtime Error: index out range #60

Open
TekTimmy opened this issue Feb 9, 2023 · 0 comments
Open

Runtime Error: index out range #60

TekTimmy opened this issue Feb 9, 2023 · 0 comments

Comments

@TekTimmy
Copy link

TekTimmy commented Feb 9, 2023

While comparing 2 CSV files I get the following runtime error:

panic: runtime error: index out of range [2] with length 0

goroutine 1 [running]:
github.com/aswinkarthik/csvdiff/pkg/digest.Positions.String(0xc0000b2380, 0xc, 0x10, 0x0, 0x0, 0x0, 0xc00000003b, 0xc004774b60, 0xd6)
        /home/travis/gopath/src/github.com/aswinkarthik/csvdiff/pkg/digest/positions.go:35 +0x332
github.com/aswinkarthik/csvdiff/cmd.(*Formatter).json(0xc00010bac0, 0xb1a638, 0x0, 0x0, 0xc005bc6000, 0x78fe, 0x8f55, 0xb1a638, 0x0, 0x0, ...)
        /home/travis/gopath/src/github.com/aswinkarthik/csvdiff/cmd/formatter.go:130 +0x4de
github.com/aswinkarthik/csvdiff/cmd.(*Formatter).Format(0xc00010bac0, 0xb1a638, 0x0, 0x0, 0xc005bc6000, 0x78fe, 0x8f55, 0xb1a638, 0x0, 0x0, ...)
        /home/travis/gopath/src/github.com/aswinkarthik/csvdiff/cmd/formatter.go:45 +0x1a5
github.com/aswinkarthik/csvdiff/cmd.runContext(0xc000104000, 0x884060, 0xc000010018, 0x884060, 0xc000010020, 0x0, 0x0)
        /home/travis/gopath/src/github.com/aswinkarthik/csvdiff/cmd/root.go:108 +0x4c5
github.com/aswinkarthik/csvdiff/cmd.glob..func2(0xaf89c0, 0xc0000b50e0, 0x2, 0xa, 0x0, 0x0)
        /home/travis/gopath/src/github.com/aswinkarthik/csvdiff/cmd/root.go:87 +0x283
github.com/spf13/cobra.(*Command).execute(0xaf89c0, 0xc0000120c0, 0xa, 0xa, 0xaf89c0, 0xc0000120c0)
        /home/travis/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:826 +0x460
github.com/spf13/cobra.(*Command).ExecuteC(0xaf89c0, 0xc00006eda0, 0xc00006bf20, 0x43cb8a)
        /home/travis/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:914 +0x2fb
github.com/spf13/cobra.(*Command).Execute(...)
        /home/travis/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:864
github.com/aswinkarthik/csvdiff/cmd.Execute()
        /home/travis/gopath/src/github.com/aswinkarthik/csvdiff/cmd/root.go:115 +0x76
main.main()
        /home/travis/gopath/src/github.com/aswinkarthik/csvdiff/main.go:29 +0x59

When I change the primary key column the problem does not occur anymore.
I'm sorry for not providing the CSVs but they contain sensitive data and are 24MB of size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant