Hey there
The README states this:
In short, running a set of KSUIDs through the UNIX sort command will result in a list ordered by generation time.
I have the following code:
func TestKsuidOrder(t *testing.T) {
k1 := ksuid.New()
k2 := ksuid.New()
assert.Equal(t, -1, ksuid.Compare(k1, k2))
}
Running it like this go test ./ -v -count=100 -run=TestKsuidOrder results in
ksuid_test.go:31:
Error Trace: ./ksuid_test.go:31
Error: Not equal:
expected: -1
actual : 1
Test: TestKsuidOrder
I was expecting that ksuid.New is generating sequences which can be naturally ordered?
If this is the expected behaviour which I see - then I guess the README should be more clear about that.
Hey there
The README states this:
I have the following code:
Running it like this
go test ./ -v -count=100 -run=TestKsuidOrderresults inI was expecting that
ksuid.Newis generating sequences which can be naturally ordered?If this is the expected behaviour which I see - then I guess the README should be more clear about that.