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 get an exception, while comparing two simple files using csvdiff -o word-diff:
csvdiff -o word-diff
x,[-C-]{+A+} panic: runtime error: index out of range [0] with length 0 goroutine 1 [running]: github.com/aswinkarthik/csvdiff/cmd.(*Formatter).wordLevelDiffs(0xc0000f7ac0, 0xb1a638, 0x0, 0x0, 0xc000182000, 0x2, 0x2, 0xb1a638, 0x0, 0x0, ...) /home/travis/gopath/src/github.com/aswinkarthik/csvdiff/cmd/formatter.go:242 +0x1338 github.com/aswinkarthik/csvdiff/cmd.(*Formatter).wordDiff(...) /home/travis/gopath/src/github.com/aswinkarthik/csvdiff/cmd/formatter.go:216 github.com/aswinkarthik/csvdiff/cmd.(*Formatter).Format(0xc0000f7ac0, 0xb1a638, 0x0, 0x0, 0xc000182000, 0x2, 0x2, 0xb1a638, 0x0, 0x0, ...) /home/travis/gopath/src/github.com/aswinkarthik/csvdiff/cmd/formatter.go:51 +0x504 github.com/aswinkarthik/csvdiff/cmd.runContext(0xc0000f0000, 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, 0xc0000243c0, 0x2, 0x4, 0x0, 0x0) /home/travis/gopath/src/github.com/aswinkarthik/csvdiff/cmd/root.go:87 +0x283 github.com/spf13/cobra.(*Command).execute(0xaf89c0, 0xc000012060, 0x4, 0x4, 0xaf89c0, 0xc000012060) /home/travis/gopath/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:826 +0x460 github.com/spf13/cobra.(*Command).ExecuteC(0xaf89c0, 0xc00005cda0, 0xc000059f20, 0x43cb8a) /home/travis/gopath/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fb github.com/spf13/cobra.(*Command).Execute(...) /home/travis/gopath/pkg/mod/github.com/spf13/cobra@v0.0.5/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
Interestingly enough, this even happens with two equal files, including the difference found ([-C-]{+A+}). My example data, for both files:
[-C-]{+A+}
x,A x,B x,C
I tested both DOS (CRLF) and UNIX (LF) line endings. I'm running version 1.4.0 in Ubuntu via WSL2.
The text was updated successfully, but these errors were encountered:
You are using the first field (default: -p0) as primary key. The issue is that three times "x" isn't a unique primary key.
Sorry, something went wrong.
Ah! I still would not expect a crash. Plus finding a difference where there is none is not helpful as default behavior...
The same thing happened to me too. i agree with your opinion
No branches or pull requests
I get an exception, while comparing two simple files using
csvdiff -o word-diff
:Interestingly enough, this even happens with two equal files, including the difference found (
[-C-]{+A+}
).My example data, for both files:
I tested both DOS (CRLF) and UNIX (LF) line endings. I'm running version 1.4.0 in Ubuntu via WSL2.
The text was updated successfully, but these errors were encountered: