From 51ab92a67bcd375cae9e4ec5c79d726316b26101 Mon Sep 17 00:00:00 2001 From: Rangel Reale Date: Fri, 13 Oct 2023 07:56:50 -0300 Subject: [PATCH] move cmd to root --- .goreleaser.yaml | 6 +++--- README.md | 6 +++--- cmd/{qdiimpl => }/qdiimpl.go | 4 ++-- main.go | 7 +++++++ 4 files changed, 15 insertions(+), 8 deletions(-) rename cmd/{qdiimpl => }/qdiimpl.go (99%) create mode 100644 main.go diff --git a/.goreleaser.yaml b/.goreleaser.yaml index d4ddcd5..ab6fd43 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -9,19 +9,19 @@ builds: goos: [darwin] goarch: [amd64, arm64] binary: bin/qdiimpl - main: ./cmd/qdiimpl + main: . - id: linux #build:linux goos: [linux] goarch: [386, arm, amd64, arm64] binary: bin/qdiimpl - main: ./cmd/qdiimpl + main: . - id: windows #build:windows goos: [windows] goarch: [386, amd64, arm64] binary: bin/qdiimpl - main: ./cmd/qdiimpl + main: . archives: - format: tar.gz diff --git a/README.md b/README.md index 4bd72da..fbe95e7 100644 --- a/README.md +++ b/README.md @@ -13,14 +13,14 @@ expectations and usually are limited by execution amounts. ## Install ```shell -go install github.com/RangelReale/qdiimpl/cmd/qdiimpl@latest +go install github.com/RangelReale/qdiimpl@latest ``` ## Usage ```shell $ cd app/pkg/client -$ go run github.com/RangelReale/qdiimpl/cmd/qdiimpl@latest -type=StorageClient +$ go run github.com/RangelReale/qdiimpl@latest -type=StorageClient Writing file storageclient_qdii.go... ``` @@ -65,7 +65,7 @@ Flags: ### io.Reader ```shell -go run github.com/RangelReale/qdiimpl/cmd/qdiimpl@latest -type=Reader -type-package=io -force-package-name=main +go run github.com/RangelReale/qdiimpl@latest -type=Reader -type-package=io -force-package-name=main ``` File: `reader_qdii.go` diff --git a/cmd/qdiimpl/qdiimpl.go b/cmd/qdiimpl.go similarity index 99% rename from cmd/qdiimpl/qdiimpl.go rename to cmd/qdiimpl.go index 4f0b265..ea43d97 100644 --- a/cmd/qdiimpl/qdiimpl.go +++ b/cmd/qdiimpl.go @@ -1,4 +1,4 @@ -package main +package cmd import ( "flag" @@ -37,7 +37,7 @@ func Usage() { flag.PrintDefaults() } -func main() { +func Main() { log.SetFlags(0) log.SetPrefix("qdiimpl: ") flag.Usage = Usage diff --git a/main.go b/main.go new file mode 100644 index 0000000..fe57fd6 --- /dev/null +++ b/main.go @@ -0,0 +1,7 @@ +package main + +import "github.com/RangelReale/qdiimpl/cmd" + +func main() { + cmd.Main() +}