Skip to content

[Question]: I know that is not possible to use more than 16 bit payload, but what's the reason? #71

@mirusky

Description

@mirusky

If there's no technical problem could make it configurable? Like:

// It will return a configurable instance.
instance := ksuid.NewInstance(ksuid.Config{
   MaxPayloadLength: 32,
})

And if possible a method to replace the global instance like golang zap:

instance := ksuid.NewInstance(ksuid.Config{
   MaxPayloadLength: 32,
})

// instance will create a 32 bit payload while ksuid.New() will create a 16 bit payload.
// to avoid that we could do something like:

undo := ksuid.ReplaceGlobals(instance)
defer undo()

// here the ksuid and instance are both configurable in the same way so I could call 
// ksuid.New() or instance.New() and both will create a 32 bit payload.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions