diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7406bbf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +cover.* diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..129bd2e --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module github.com/gopatchy/rand + +go 1.20 + +require github.com/dchest/uniuri v1.2.0 diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..5bf0fba --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/dchest/uniuri v1.2.0 h1:koIcOUdrTIivZgSLhHQvKgqdWZq5d7KdMEWF1Ud6+5g= +github.com/dchest/uniuri v1.2.0/go.mod h1:fSzm4SLHzNZvWLvWJew423PhAzkpNQYq+uNLq4kxhkY= diff --git a/justfile b/justfile new file mode 100644 index 0000000..c2dd020 --- /dev/null +++ b/justfile @@ -0,0 +1,18 @@ +go := env_var_or_default('GOCMD', 'go') + +default: tidy test + +tidy: + {{go}} mod tidy + goimports -l -w . + gofumpt -l -w . + {{go}} fmt ./... + +test: + {{go}} vet ./... + golangci-lint run ./... + {{go}} test -race -coverprofile=cover.out -timeout=60s ./... + {{go}} tool cover -html=cover.out -o=cover.html + +todo: + -git grep -e TODO --and --not -e ignoretodo diff --git a/main.go b/main.go new file mode 100644 index 0000000..b13b222 --- /dev/null +++ b/main.go @@ -0,0 +1,11 @@ +package main + +import ( + "fmt" + + "github.com/dchest/uniuri" +) + +func main() { + fmt.Printf("%s\n", uniuri.New()) +}