From 4b6bfe73cdb0a1353379adbd545ca2db37df7efa Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sun, 11 Jun 2023 09:51:30 -0700 Subject: [PATCH] Initial commit --- .gitignore | 1 + go.mod | 5 +++++ go.sum | 2 ++ justfile | 18 ++++++++++++++++++ main.go | 11 +++++++++++ 5 files changed, 37 insertions(+) create mode 100644 .gitignore create mode 100644 go.mod create mode 100644 go.sum create mode 100644 justfile create mode 100644 main.go 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()) +}