Package autoinc implements a serial AUTO_INCREMENT
type, for the Go programming language.
This is similar to the AUTO_INCREMENT
found in many databases.
Online documentation, which includes examples, can be found at: http://godoc.org/github.com/reiver/go-autoinc
Here is an example autoincional-type that can hold a string:
import "github.com/reiver/go-autoinc"
//
var serial autoinc.AutoInc[uint64]
// ...
next, err := serial.Next()
To import package autoinc use import
code like the following:
import "github.com/reiver/go-autoinc"
To install package autoinc do the following:
GOPROXY=direct go get github.com/reiver/go-autoinc
Package autoinc was written by Charles Iliya Krempeaux