teris-io / shortid Goto Github PK
View Code? Open in Web Editor NEWSuper short, fully unique, non-sequential and URL friendly Ids
License: MIT License
Super short, fully unique, non-sequential and URL friendly Ids
License: MIT License
when I deploy my application in a docker cluster (k8s or docker-compose), I have no method to assign a worker id for different container, I can only get an docker container ID in my app by $HOSTNAME.I want to know what is the best practice to use the lib or generate an shortid by myself?
Is that safe to remove symbols from DefaultABC
?
Basically, use the string "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
instead.
I am using it to generate shorten URL and do not wish to see symbols from the URL.
Thanks a lot for your project.
Sorry that I didn't try it before asking this question. I tried to remove those two symbols and return error message panic: alphabet must contain 64 unique characters
. I think that means I can NOT remove symbols. It will be nice I can remove symbols from URL. The id does not have to be 100% unique. I will check the id existence before insert and re-generate if it exists.
Hi, thanks for this awesome library. My question is can it be use in a distributed environment?
Is it possible to mock shortids?
The key feature of shortid is to guarantee its uniqueness, however for testing purpose, is it possible to return a fixed series each time I run my tests? thx.
Even though this library doesn't use any external dependencies, it's annoying that it doesn't have a go.mod file.
Is it possible to add it?
First of all really good job creating this library! Coming from Node.js I was searching for a shortid alternative a year ago, you finally created it!
When can I expect this library to return an error?
Could this happen randomly, should I panic at this point? Or will this only happen during the first Generate()
call?
I'm asking because my current ID generation module does not return an error and I'd prefer to keep my code this way.
Hi I was looking to use the package and I noticed there is a v1 tagged and released however the latest available package for "go get" is
https://pkg.go.dev/github.com/teris-io/[email protected]
Would it be possible to publish the v1 package?
Does it possible to use only base58 default chars? I wan to avoid symbols that looks identically and also have double click - copy/paste friendly string
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.