Popularity
4.1
Stable
Activity
2.6
Declining
98
1
12
Programming language: Go
License: MIT License
Tags:
Miscellaneous
Latest version: v1.0.1
indigo alternatives and similar packages
Based on the "Miscellaneous" category.
Alternatively, view indigo alternatives based on common mentions on social networks and blogs.
-
go-formatter
A curated list of awesome Go frameworks, libraries and software -
golang-standards/project-layout
Standard Go Project Layout -
archiver
Easily create & extract archives, and compress & decompress files of various formats -
ardanlabs/service
Starter code for writing web services in Go using Kubernetes. -
go-multierror
A Go (golang) package for representing a list of errors as a single error. -
go-restful-api
An idiomatic Go REST API starter kit (boilerplate) following the SOLID principles and Clean Architecture -
ghorg
Quickly clone an entire org/users repositories into one directory - Supports GitHub, GitLab, Bitbucket, and more 🥚 -
xstrings
Implements string functions widely used in other languages but absent in Go. -
go-shortid
Super short, fully unique, non-sequential and URL friendly Ids -
health
An easy to use, extensible health check library for Go applications. -
gountries
Gountries provides: Countries (ISO-3166-1), Country Subdivisions(ISO-3166-2), Currencies (ISO 4217), Geo Coordinates(ISO-6709) as well as translations, country borders and other stuff exposed as struct data. -
container
A lightweight yet powerful IoC dependency injection container for the Go programming language -
golang-templates/seed
Go application GitHub repository template. -
go-starter
An opinionated production-ready SQL-/Swagger-first RESTful JSON API written in Go, highly integrated with VSCode DevContainers by allaboutapps. -
antch
Antch, a fast, powerful and extensible web crawling & scraping framework for Go -
healthcheck
An simple, easily extensible and concurrent health-check library for Go services
Static code analysis for 29 languages.
Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.
Promo
www.sonarqube.org
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of indigo or a related project?
Popular Comparisons
README
Indigo
About
- A distributed unique ID generator of using Sonyflake and encoded by Base58.
- Base58 logic is optimized unsigned int64.
- ID max length is 11 characters by unsigned int64 max value.
- An Encoder can change your original encoder ;)
Install
$ go get -u github.com/osamingo/indigo
Usage
package main
import (
"log"
"sync"
"time"
"github.com/osamingo/indigo"
)
var g *indigo.Generator
func init() {
t := time.Unix(1257894000, 0) // 2009-11-10 23:00:00 UTC
g = indigo.New(nil, indigo.StartTime(t))
_, err := g.NextID()
if err != nil {
log.Fatalln(err)
}
}
func main() {
wg := sync.WaitGroup{}
wg.Add(100)
for i := 0; i < 100; i++ {
go func() {
defer wg.Done()
id, err := g.NextID()
if err != nil {
log.Fatalln(err)
} else {
log.Println("ID:", id)
}
}()
}
wg.Wait()
}
Benchmark
# Machine: MacBook Pro (13-inch, 2018, Four Thunderbolt 3 Ports)
# CPU : 2.7 GHz Intel Core i7
# Memory : 16 GB 2133 MHz LPDDR3
BenchmarkEncoder_Encode-8 20000000 66.0 ns/op 46 B/op 1 allocs/op
BenchmarkEncoder_Decode-8 50000000 29.8 ns/op 0 B/op 0 allocs/op
PASS
ok github.com/osamingo/indigo/base58 2.930s
# Machine: MacBook Pro (13-inch, 2018, Four Thunderbolt 3 Ports)
# CPU : 2.7 GHz Intel Core i7
# Memory : 16 GB 2133 MHz LPDDR3
BenchmarkGenerator_NextID-8 50000 39175 ns/op 7 B/op 1 allocs/op
PASS
ok github.com/osamingo/indigo 8.548s
Bibliography
- Sonyflake - A distributed unique ID generator inspired by Twitter's Snowflake.
- Base58 - Base58 is a group of binary-to-text encoding schemes used to represent large integers as alphanumeric text.
License
Released under the MIT License.
*Note that all licence references and agreements mentioned in the indigo README section above
are relevant to that project's source code only.