Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (20 sloc) 519 Bytes


gosnow is a snowflake implementation in golang.

This is a fork of the upstream that replaces the the usage of panic() by returning errors instead.

package main

import (

func main() {

    v, err := gosnow.Default()
    // Alternatively you can set the worker id if you are running multiple snowflakes
    // v, err := gosnow.NewSnowFlake(100)
    for i := 0; i < 10; i++ {
        id, err := v.Next()