Painless alphabetical sequential IDs.
Visit godoc.
$ go get github.com/sugoiuguu/go-seq
// create a new sequence
seq := sequence.NewSeq()
fmt.Printf("%q\n", seq.Next())
// create a new sequence
seq := sequence.NewSeq()
// create a new encoder that outputs to stdout
dec := json.NewEncoder(os.Stdout)
if err := enc.Encode(seq); err != nil {
panic(err)
}
// the sequence we'll initialize
var seq sequence.Seq
// create a new decoder that reads from stdin
dec := json.NewDecoder(os.Stdin)
if err := dec.Decode(&seq); err != nil {
panic(err)
}
fmt.Printf("%q\n", seq.Next())