Git Product home page Git Product logo

uuid-gen's Introduction

uuid-gen

To pull the code:

go get github.com/abhi-bit/uuid-gen

Run the Server:

go run server/uuidServer.go

To grab UUID's:

$ curl -X GET "http://127.0.0.1:12345/_uuid?count=4"
{"uuid":["0dbacda040c9ece580410bf63c156ab2"]}
{"uuid":["a60faa2040a5ebb1804e3b7a98b90e9f"]}
{"uuid":["91085f0740e76ba180a5449231a0384e"]}
{"uuid":["12c31ccc400ebb618030a8554f67451d"]}

Benchmark results:

go test -v -bench=".*" uuid.go uuid_test.go    
=== RUN TestUUIDv4
--- PASS: TestUUIDv4 (0.00 seconds)
        uuid_test.go:12: uuid[3d87de8f-4648-4f29-9425-319f4dbfa154]
=== RUN TestUUIDRand
--- PASS: TestUUIDRand (0.00 seconds)
        uuid_test.go:20: uuid[3b57686f-f1e9-011e-dd6e-182ca109ba42]
PASS
BenchmarkUUIDv4   500000              4143 ns/op
BenchmarkUUIDRand         200000             12628 ns/op
ok      command-line-arguments  61.632s

uuid-gen's People

Contributors

abhi-bit avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.