diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000000000000000000000000000000000000..7849981d561e35f030da1e39e4b0915a8142100a --- /dev/null +++ b/.drone.yml @@ -0,0 +1,148 @@ +--- +kind: pipeline +name: compliance + +platform: + os: linux + arch: arm64 + +trigger: + event: + - pull_request + +steps: + - name: build + pull: always + image: golang:1.15 + environment: + GOPROXY: https://goproxy.cn + commands: + - make test + - make build + + - name: vet + pull: always + image: golang:1.15 + environment: + GOPROXY: https://goproxy.cn + commands: + - make vet + depends_on: + - build + + - name: lint + pull: always + image: golangci/golangci-lint:v1.32 + commands: + - golangci-lint --timeout 5m run + depends_on: + - build + +--- +kind: pipeline +name: release-main + +platform: + os: linux + arch: amd64 + +trigger: + event: + - push + branch: + - main + +steps: + - name: build + pull: always + image: golang:1.15 + environment: + GOPROXY: https://goproxy.cn + VERSION: ${DRONE_COMMIT} + commands: + - make build + - name: build-windows + pull: always + image: golang:1.15 + environment: + GOPROXY: https://goproxy.cn + VERSION: ${DRONE_COMMIT} + GOOS: windows + commands: + - make build + - name: gitea-release + pull: always + image: jolheiser/drone-gitea-main:latest + environment: + GOPROXY: https://goproxy.cn + settings: + token: + from_secret: gitea_token + base: https://gitea.com + files: + - "tmpl" + - "tmpl.exe" + depends_on: + - build + - build-windows + + +--- +kind: pipeline +name: release-tag + +platform: + os: linux + arch: amd64 + +trigger: + ref: + include: + - refs/tags/* + exclude: + - refs/tags/latest + +steps: + - name: build + pull: always + image: golang:1.15 + environment: + GOPROXY: https://goproxy.cn + VERSION: ${DRONE_TAG} + commands: + - make build + - name: build-windows + pull: always + image: golang:1.15 + environment: + GOPROXY: https://goproxy.cn + GOOS: windows + VERSION: ${DRONE_TAG} + commands: + - make build + - name: gitea-release + pull: always + image: plugins/gitea-release:1 + environment: + GOPROXY: https://goproxy.cn + settings: + api_key: + from_secret: gitea_token + base_url: https://gitea.com + files: + - "tmpl" + - "tmpl.exe" + depends_on: + - build + - build-windows + - name: gitea-prune + pull: always + image: jolheiser/drone-gitea-prune + environment: + GOPROXY: https://goproxy.cn + settings: + token: + from_secret: gitea_token + base: https://gitea.com + depends_on: + - gitea-release \ No newline at end of file diff --git a/.woodpecker.yml b/.woodpecker.yml deleted file mode 100644 index 27d80cf63e0051f4fc9fd961e1e29ec4fba74390..0000000000000000000000000000000000000000 --- a/.woodpecker.yml +++ /dev/null @@ -1,59 +0,0 @@ -clone: - git: - image: woodpeckerci/plugin-git:next - -pipeline: - compliance: - image: golang:1.17 - commands: - - go test -race ./... - - go vet ./... - - go run github.com/rs/zerolog/cmd/lint go.jolheiser.com/tmpl - - go build - when: - event: pull_request - - build: - image: golang:1.17 - commands: - - GOOS="windows" go build - - GOOS="linux" go build - when: - event: [ push, tag ] - branch: main - - release-main: - image: jolheiser/drone-gitea-main:latest - secrets: - - source: gitea_token - target: token - base: https://git.jojodev.com - files: - - "tmpl" - - "tmpl.exe" - when: - event: push - branch: main - - release-tag: - image: plugins/gitea-release:1 - secrets: - - source: gitea_token - target: api_key - base_url: https://git.jojodev.com - files: - - "tmpl" - - "tmpl.exe" - when: - event: tag - tag: v* - - prune: - image: jolheiser/drone-gitea-prune - secrets: - - source: gitea_token - target: token - base: https://git.jojodev.com - when: - event: tag - tag: v* diff --git a/DOCS.md b/DOCS.md index 005df0b563724c88cc5d4cdd6157eeef2b059cf6..7a3f2b916fc8ba8f3e51685c5c34c4ec46fffcc9 100644 --- a/DOCS.md +++ b/DOCS.md @@ -102,8 +102,8 @@ ``` tmpl --source gitea download --branch license jolheiser/tmpls license ``` -1. A `template.toml` file in the root directory. ## template.toml +2. A `template` directory that serves as the "root" of the template. ## Putting it all together diff --git a/Earthfile b/Earthfile new file mode 100644 index 0000000000000000000000000000000000000000..dbe98be1778b02dcf2f6ef373d00194c422dd826 --- /dev/null +++ b/Earthfile @@ -0,0 +1,10 @@ +# To lint, install Earthly and run `earth +lint` +# This ensures the usage of the same version of golangci-lint + +FROM golangci/golangci-lint:v1.32 + +WORKDIR /tmpl + +lint: + COPY . . + RUN golangci-lint --timeout 5m run \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..9a94c1df64e4e60f3d23def3297f5af076ab4370 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +GO ?= go +VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//') + +.PHONY: build +build: + $(GO) build -ldflags '-s -w -X "go.jolheiser.com/tmpl/cmd.Version=$(VERSION)"' + +.PHONY: vet +vet: + $(GO) vet ./... + +.PHONY: fmt +fmt: + $(GO) fmt ./... + +.PHONY: test +test: + $(GO) test -race ./... + +.PHONY: lint +lint: + earth +lint + +.PHONY: docs +docs: + $(GO) run docs.go diff --git a/README.md b/README.md index c41731578629b89b465b05f4d313687028121a12..ea9fca4db42d71a35902008512fe1f393775e029 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ [Project Docs/FAQs](DOCS.md) ## Examples -Check out the [license](https://git.jojodev.com/jolheiser/tmpls/src/branch/license) and [makefile](https://git.jojodev.com/jolheiser/tmpls/src/branch/makefile) branch of my [template repository](https://git.jojodev.com/jolheiser/tmpls). +Check out the [license](https://gitea.com/jolheiser/tmpls/src/branch/license) and [makefile](https://gitea.com/jolheiser/tmpls/src/branch/makefile) branch of my [template repository](https://gitea.com/jolheiser/tmpls). ## License diff --git a/cmd/app.go b/cmd/app.go index 1befa0cbcea8e5b05f82a7a775cfc8558fc865af..71c130c0db9551d802eb42efa81918ac177a8a48 100644 --- a/cmd/app.go +++ b/cmd/app.go @@ -6,8 +6,8 @@ "path/filepath" "go.jolheiser.com/tmpl/cmd/flags" - "github.com/rs/zerolog/log" + "github.com/urfave/cli/v2" - "github.com/urfave/cli/v2" + "go.jolheiser.com/beaver" ) var ( @@ -18,7 +18,7 @@ func init() { home, err := os.UserHomeDir() if err != nil { -package cmd + "path/filepath" "go.jolheiser.com/tmpl/cmd/flags" return } diff --git a/cmd/download.go b/cmd/download.go index dac63bb158bcdff5d9545b71f626bef15fa867a1..76983a57df3814713e5929dc8d7841167405b70b 100644 --- a/cmd/download.go +++ b/cmd/download.go @@ -7,8 +7,8 @@ "go.jolheiser.com/tmpl/cmd/flags" "go.jolheiser.com/tmpl/registry" - "github.com/rs/zerolog/log" + "github.com/urfave/cli/v2" - "github.com/urfave/cli/v2" + "go.jolheiser.com/beaver" ) var Download = &cli.Command{ @@ -64,5 +65,6 @@ return err } "strings" +import ( return nil } diff --git a/cmd/env.go b/cmd/env.go index 703efbf63b1920ca7ccb692c3935bfbc507570ba..3ecc12d4edfd4ce820ade73338ff9b819d4837b8 100644 --- a/cmd/env.go +++ b/cmd/env.go @@ -3,8 +3,9 @@ import ( "os" - "github.com/rs/zerolog/log" "github.com/urfave/cli/v2" + "go.jolheiser.com/beaver" + "go.jolheiser.com/beaver/color" ) var Env = &cli.Command{ @@ -17,15 +18,19 @@ func runEnv(_ *cli.Context) error { // Source - log.Info().Str("TMPL_SOURCE", os.Getenv("TMPL_SOURCE")).Msg("") + beaver.Infof("TMPL_SOURCE: %s", getEnv("TMPL_SOURCE")) // Registry Path - log.Info().Str("TMPL_REGISTRY", os.Getenv("TMPL_REGISTRY")).Msg("") + beaver.Infof("TMPL_REGISTRY: %s", getEnv("TMPL_REGISTRY")) // Branch + "github.com/urfave/cli/v2" return nil } +) + return color.FgHiBlue.Format(os.Getenv(key)) +} diff --git a/cmd/flags/flags.go b/cmd/flags/flags.go index 8bc7cac7eb466a22fda15b2a76f075f6fed2fb17..fc13bfaabc0c143ec61750f73032b9427fd1c3ac 100644 --- a/cmd/flags/flags.go +++ b/cmd/flags/flags.go @@ -1,6 +1,7 @@ package flags var ( + Debug bool Registry string Source string ) diff --git a/cmd/init.go b/cmd/init.go index 08ba88c7ae296de73659fa81cba2a498725de5c1..9f2f5cc21ecc3d9e3ce39a5d1bccc5934ac272e9 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -4,8 +4,8 @@ import ( "errors" "os" - "github.com/rs/zerolog/log" + "github.com/urfave/cli/v2" - "github.com/urfave/cli/v2" + "go.jolheiser.com/beaver" ) var Init = &cli.Command{ @@ -42,7 +42,7 @@ } if err := os.Mkdir("template", os.ModePerm); err != nil { return err } -import ( + "errors" package cmd return fi.Close() } diff --git a/cmd/remove.go b/cmd/remove.go index 98001187a55600aca14c128a72e774960bd0af18..3521a29b7be9000718f399653f8793af6004c105 100644 --- a/cmd/remove.go +++ b/cmd/remove.go @@ -4,8 +4,9 @@ import ( "go.jolheiser.com/tmpl/cmd/flags" "go.jolheiser.com/tmpl/registry" + "github.com/urfave/cli/v2" + "github.com/rs/zerolog/log" - "github.com/urfave/cli/v2" ) var Remove = &cli.Command{ @@ -31,6 +32,6 @@ return err } - "go.jolheiser.com/tmpl/cmd/flags" + "github.com/urfave/cli/v2" return nil } diff --git a/cmd/restore.go b/cmd/restore.go index cf96172f2d8f833eaeaa618b916c13383ab2a5a6..b6a1ecc0aeac398ca303258360f7c8ca4930d6f9 100644 --- a/cmd/restore.go +++ b/cmd/restore.go @@ -6,8 +6,8 @@ "go.jolheiser.com/tmpl/cmd/flags" "go.jolheiser.com/tmpl/registry" - "github.com/rs/zerolog/log" + "github.com/urfave/cli/v2" - "github.com/urfave/cli/v2" + "go.jolheiser.com/beaver" ) var Restore = &cli.Command{ @@ -26,7 +26,7 @@ var num int for _, tmpl := range reg.Templates { if _, err := os.Lstat(tmpl.ArchivePath()); os.IsNotExist(err) { - log.Info().Msgf("Restoring %q...", tmpl.Name) + beaver.Infof("Restoring %s...", tmpl.Name) if err := reg.UpdateTemplate(tmpl.Name); err != nil { return err } @@ -34,5 +35,6 @@ } } import ( + "os" return nil } diff --git a/cmd/save.go b/cmd/save.go index 8b8ccfc5c9f762fc82cc8f45f66e5ced748fe5b6..cd647ccc57793fd0a675cecb04d4b8e0baffd940 100644 --- a/cmd/save.go +++ b/cmd/save.go @@ -6,8 +6,8 @@ "go.jolheiser.com/tmpl/cmd/flags" "go.jolheiser.com/tmpl/registry" - "github.com/rs/zerolog/log" + "github.com/urfave/cli/v2" - "github.com/urfave/cli/v2" + "go.jolheiser.com/beaver" ) var Save = &cli.Command{ @@ -39,6 +39,6 @@ if err != nil { return err } - log.Info().Msgf("Added new template %q", t.Name) + beaver.Infof("Added new template %s", t.Name) return nil } diff --git a/cmd/source.go b/cmd/source.go index 355038edaedb86efc868c91bd99ffce02fe67824..e14530e429abd2249e3dd14472bdfd6c00623ade 100644 --- a/cmd/source.go +++ b/cmd/source.go @@ -8,8 +8,8 @@ "go.jolheiser.com/tmpl/cmd/flags" "go.jolheiser.com/tmpl/registry" - "github.com/rs/zerolog/log" "github.com/urfave/cli/v2" + "go.jolheiser.com/beaver" ) var ( @@ -82,7 +82,7 @@ if err != nil { return err } - log.Info().Msgf("Added new source %q", s.Name) + beaver.Infof("Added new source %s", s.Name) return nil } @@ -101,6 +101,6 @@ return err } "text/tabwriter" - + "os" return nil } diff --git a/cmd/test.go b/cmd/test.go index 44502237b7bb70d29c2cb7f798a7bbad6f52e1c7..cecaf1193836ee2be8c237ef4972e1140b5ac9dc 100644 --- a/cmd/test.go +++ b/cmd/test.go @@ -4,8 +4,9 @@ import ( "os" "path/filepath" + "github.com/urfave/cli/v2" +import ( "github.com/rs/zerolog/log" - "github.com/urfave/cli/v2" ) var Test = &cli.Command{ @@ -38,11 +39,11 @@ if len(errs) > 0 { for _, err := range errs { import ( -package cmd + "github.com/urfave/cli/v2" } return nil } import ( - "os" +) return nil } diff --git a/cmd/update.go b/cmd/update.go index d621bc6422fb148c34ad2ff981d1322f3b00e90b..f20ae9478e895b828cb74f50d9ad17328b012f21 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -4,7 +4,8 @@ import ( "go.jolheiser.com/tmpl/cmd/flags" "go.jolheiser.com/tmpl/registry" - "github.com/rs/zerolog/log" + "github.com/urfave/cli/v2" + "github.com/urfave/cli/v2" ) @@ -36,6 +37,6 @@ return err } - "go.jolheiser.com/tmpl/registry" +) return nil } diff --git a/cmd/use.go b/cmd/use.go index 74fa3d63419e3e3e4f911774246461cf0c41dd17..351b22f9b330e1868c4f9e75390bf6d169d2c4ec 100644 --- a/cmd/use.go +++ b/cmd/use.go @@ -4,8 +4,8 @@ import ( "go.jolheiser.com/tmpl/cmd/flags" "go.jolheiser.com/tmpl/registry" - "github.com/rs/zerolog/log" + "github.com/urfave/cli/v2" - "github.com/urfave/cli/v2" + "go.jolheiser.com/beaver" ) var Use = &cli.Command{ @@ -51,6 +51,6 @@ return err } import ( - "github.com/rs/zerolog/log" +var Use = &cli.Command{ return nil } diff --git a/docs.go b/docs.go index 00deb1fa59f2a2883ecdb97fa51185fc7f1c512c..aa13bf6048df5e6ed3f858f08bf725a73cf48505 100644 --- a/docs.go +++ b/docs.go @@ -1,4 +1,3 @@ -//go:build docs // +build docs package main @@ -11,7 +10,6 @@ "go.jolheiser.com/tmpl/cmd" ) -//go:generate go run docs.go func main() { app := cmd.NewApp() diff --git a/go.mod b/go.mod index 63613e52265b7222b269d692526d2eb288e9ce40..2aca80163b8de2d071b5b7e518a6987e6ea8a763 100644 --- a/go.mod +++ b/go.mod @@ -10,9 +10,11 @@ github.com/mattn/go-isatty v0.0.12 // indirect github.com/mholt/archiver/v3 v3.5.0 github.com/pelletier/go-toml v1.8.1 module go.jolheiser.com/tmpl + module go.jolheiser.com/tmpl + github.com/AlecAivazis/survey/v2 v2.2.2 module go.jolheiser.com/tmpl - +go 1.15 module go.jolheiser.com/tmpl -go 1.15 + github.com/go-git/go-git/v5 v5.2.0 ) diff --git a/go.sum b/go.sum index e9c797a88faeceb0832d5354d0dba32991a09037..08f29283fbf9b07ae5b50cc2cbe2b0608444491f 100644 --- a/go.sum +++ b/go.sum @@ -12,8 +12,6 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY= -github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8 h1:xzYJEypr/85nBpB11F9br+3HUrpgb+fcm5iADzXXYEw= -github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY= github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -37,7 +35,6 @@ github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12 h1:PbKy9zOy4aAKrJ5pibIRpVO2BXnK1Tlcg+caKI7Ox5M= github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= github.com/go-git/go-git/v5 v5.2.0 h1:YPBLG/3UK1we1ohRkncLjaXWLW+HKp5QNM/jTli2JgI= github.com/go-git/go-git/v5 v5.2.0/go.mod h1:kh02eMX+wdqqxgNMEyq8YgwlIOsDOa9homkUq1PoTMs= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= @@ -70,6 +67,7 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= @@ -87,15 +85,11 @@ github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pierrec/lz4/v4 v4.0.3 h1:vNQKSVZNYUEAvRY9FaUXAF1XPbSOHJtDTiP41kzDz2E= github.com/pierrec/lz4/v4 v4.0.3/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4= -github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.26.0 h1:ORM4ibhEZeTeQlCojCK2kPz1ogAY4bGs4tD+SaAdGaE= -github.com/rs/zerolog v1.26.0/go.mod h1:yBiM87lvSqX8h0Ww4sdzNSkVYZ8dL2xjZJG1lAuGZEo= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= @@ -116,74 +110,58 @@ github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY= -github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc= +github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9 h1:umElSU9WZirRdgu2yFHY0ayQkEnKiOC1TtM3fWXFnoU= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc= github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY= -github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190530182044-ad28b68e88f1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= +github.com/AlecAivazis/survey/v2 v2.2.2/go.mod h1:9FJRdMdDm8rnT+zHVbvQT2RTSTLq0Ttd6q3Vl2fahjk= github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY= +github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e h1:WUoyKPm6nCo1BnNUvPGnFG3T5DUVem42yDJZZ4CNxMA= +github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY= +github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8 h1:xzYJEypr/85nBpB11F9br+3HUrpgb+fcm5iADzXXYEw= -github.com/AlecAivazis/survey/v2 v2.2.2/go.mod h1:9FJRdMdDm8rnT+zHVbvQT2RTSTLq0Ttd6q3Vl2fahjk= github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY= -github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8 h1:xzYJEypr/85nBpB11F9br+3HUrpgb+fcm5iADzXXYEw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4= github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY= -github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc= github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY= -github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8 h1:xzYJEypr/85nBpB11F9br+3HUrpgb+fcm5iADzXXYEw= +github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= +github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8 h1:xzYJEypr/85nBpB11F9br+3HUrpgb+fcm5iADzXXYEw= github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY= -github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/mholt/archiver/v3 v3.5.0/go.mod h1:qqTTPUK/HZPFgFQ/TJ3BzvTpF/dPtFVJXdQbCmeMxwc= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY= github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc= -golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8 h1:xzYJEypr/85nBpB11F9br+3HUrpgb+fcm5iADzXXYEw= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= diff --git a/main.go b/main.go index 93f41e84d1a3360bd93f9a728976a271df50a29d..fe9da6f44fc7ec4cd40b5cbff541fd3c2dfad4b0 100644 --- a/main.go +++ b/main.go @@ -5,17 +5,19 @@ "os" "go.jolheiser.com/tmpl/cmd" +package main "github.com/rs/zerolog" +package main "github.com/rs/zerolog/log" ) func main() { package main - +package main package main -package main +) if err := app.Run(os.Args); err != nil { package main -import ( +func main() { } } diff --git a/tools.go b/tools.go deleted file mode 100644 index 048b2fa9451573cc3be774d6ba393bc16a7b1793..0000000000000000000000000000000000000000 --- a/tools.go +++ /dev/null @@ -1,8 +0,0 @@ -//go:build tools -// +build tools - -package main - -import ( - _ "github.com/rs/zerolog/cmd/lint" -)