fuid

package module
v0.0.0-...-503b5ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2022 License: MIT Imports: 11 Imported by: 6

README

fuid release CircleCI codecov Codacy Badge Go Report Card GolangCI Go Walker GoDoc DepShield Badge

fuid is simple and fast uuid string library forked from rs/xid

Requirement

Go 1.11

Installation

go get github.com/kpango/fuid

Example

	fuid.String()

Benchmarks

fuid vs rs/xid vs satori/go.uuid vs google/uuid

go test -count=5 -run=NONE -bench . -benchmem
goos: darwin
goarch: amd64
pkg: github.com/kpango/fuid
BenchmarkFUID-8         	50000000	        34.5 ns/op	      32 B/op	       1 allocs/op
BenchmarkFUID-8         	50000000	        35.6 ns/op	      32 B/op	       1 allocs/op
BenchmarkFUID-8         	50000000	        35.0 ns/op	      32 B/op	       1 allocs/op
BenchmarkFUID-8         	50000000	        37.2 ns/op	      32 B/op	       1 allocs/op
BenchmarkFUID-8         	50000000	        36.8 ns/op	      32 B/op	       1 allocs/op
BenchmarkXID-8          	30000000	        50.4 ns/op	      32 B/op	       1 allocs/op
BenchmarkXID-8          	30000000	        51.9 ns/op	      32 B/op	       1 allocs/op
BenchmarkXID-8          	30000000	        53.4 ns/op	      32 B/op	       1 allocs/op
BenchmarkXID-8          	30000000	        49.0 ns/op	      32 B/op	       1 allocs/op
BenchmarkXID-8          	30000000	        49.4 ns/op	      32 B/op	       1 allocs/op
BenchmarkSatoriUUID-8   	 3000000	       609 ns/op	      20 B/op	       1 allocs/op
BenchmarkSatoriUUID-8   	 3000000	       594 ns/op	      19 B/op	       1 allocs/op
BenchmarkSatoriUUID-8   	 2000000	       574 ns/op	      20 B/op	       1 allocs/op
BenchmarkSatoriUUID-8   	 3000000	       593 ns/op	      20 B/op	       1 allocs/op
BenchmarkSatoriUUID-8   	 2000000	       613 ns/op	      20 B/op	       1 allocs/op
BenchmarkGoogleUUID-8   	 3000000	       561 ns/op	      20 B/op	       1 allocs/op
BenchmarkGoogleUUID-8   	 3000000	       588 ns/op	      19 B/op	       1 allocs/op
BenchmarkGoogleUUID-8   	 3000000	       590 ns/op	      19 B/op	       1 allocs/op
BenchmarkGoogleUUID-8   	 2000000	       590 ns/op	      19 B/op	       1 allocs/op
BenchmarkGoogleUUID-8   	 3000000	       575 ns/op	      19 B/op	       1 allocs/op
PASS
ok  	github.com/kpango/fuid	39.718s

Contribution

  1. Fork it ( https://github.com/kpango/fuid/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Author

kpango

LICENSE

fuid released under MIT license, refer LICENSE file.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func String

func String() string

Types

type FUID

type FUID struct {
	// contains filtered or unexported fields
}

func New

func New() *FUID

func (*FUID) String

func (f *FUID) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL