new: [repo] MIT licence, hash package
commit
e209e99757
|
@ -0,0 +1,12 @@
|
||||||
|
# Binaries for programs and plugins
|
||||||
|
*.exe
|
||||||
|
*.exe~
|
||||||
|
*.dll
|
||||||
|
*.so
|
||||||
|
*.dylib
|
||||||
|
|
||||||
|
# Test binary, build with `go test -c`
|
||||||
|
*.test
|
||||||
|
|
||||||
|
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||||
|
*.out
|
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2019 D4 project
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
|
@ -0,0 +1,20 @@
|
||||||
|
package hash
|
||||||
|
|
||||||
|
import (
|
||||||
|
uuid "github.com/gofrs/uuid"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewV4 returns a randomly generated UUID.
|
||||||
|
func NewV4() (uuid.UUID, error) {
|
||||||
|
return uuid.NewV4()
|
||||||
|
}
|
||||||
|
|
||||||
|
// FromString returns a UUID parsed from the input string.
|
||||||
|
func FromString(input string) (uuid.UUID, error) {
|
||||||
|
return uuid.FromString(input)
|
||||||
|
}
|
||||||
|
|
||||||
|
// FromBytesOrNil returns a UUID generated from the raw byte slice input.
|
||||||
|
func FromBytesOrNil(input []byte) uuid.UUID {
|
||||||
|
return uuid.FromBytesOrNil(input)
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
module requirements.go
|
||||||
|
|
||||||
|
go 1.12
|
||||||
|
|
||||||
|
require github.com/gofrs/uuid v3.2.0+incompatible
|
|
@ -0,0 +1,2 @@
|
||||||
|
github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE=
|
||||||
|
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
|
@ -0,0 +1,7 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
_ "github.com/gofrs/uuid"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {}
|
Loading…
Reference in New Issue