tmpl @main -
refs -
log -
-
https://git.jolheiser.com/tmpl.git
Template automation
Update and move to woodpecker (#18)
Reviewed-on: https://git.jojodev.com/jolheiser/tmpl/pulls/18
Co-authored-by: jolheiser <john.olheiser@gmail.com>
Co-committed-by: jolheiser <john.olheiser@gmail.com>
23 changed files, 147 additions(+), 237 deletions(-)
diff --git a/.drone.yml b/.drone.yml
deleted file mode 100644
index 7849981d561e35f030da1e39e4b0915a8142100a..0000000000000000000000000000000000000000
--- a/.drone.yml
+++ /dev/null
@@ -1,148 +0,0 @@
----
-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
new file mode 100644
index 0000000000000000000000000000000000000000..27d80cf63e0051f4fc9fd961e1e29ec4fba74390
--- /dev/null
+++ b/.woodpecker.yml
@@ -0,0 +1,59 @@
+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 7a3f2b916fc8ba8f3e51685c5c34c4ec46fffcc9..005df0b563724c88cc5d4cdd6157eeef2b059cf6 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
deleted file mode 100644
index dbe98be1778b02dcf2f6ef373d00194c422dd826..0000000000000000000000000000000000000000
--- a/Earthfile
+++ /dev/null
@@ -1,10 +0,0 @@
-# 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
deleted file mode 100644
index 9a94c1df64e4e60f3d23def3297f5af076ab4370..0000000000000000000000000000000000000000
--- a/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-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 ea9fca4db42d71a35902008512fe1f393775e029..c41731578629b89b465b05f4d313687028121a12 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ [Project Docs/FAQs](DOCS.md)
## Examples
-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).
+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).
## License
diff --git a/cmd/app.go b/cmd/app.go
index 71c130c0db9551d802eb42efa81918ac177a8a48..1befa0cbcea8e5b05f82a7a775cfc8558fc865af 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"
- "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 76983a57df3814713e5929dc8d7841167405b70b..dac63bb158bcdff5d9545b71f626bef15fa867a1 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"
- "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 3ecc12d4edfd4ce820ade73338ff9b819d4837b8..703efbf63b1920ca7ccb692c3935bfbc507570ba 100644
--- a/cmd/env.go
+++ b/cmd/env.go
@@ -3,9 +3,9 @@
import (
"os"
+
"github.com/urfave/cli/v2"
- "go.jolheiser.com/beaver"
- "go.jolheiser.com/beaver/color"
+ "github.com/urfave/cli/v2"
)
var Env = &cli.Command{
@@ -18,19 +18,16 @@
func runEnv(_ *cli.Context) error {
// Source
- beaver.Infof("TMPL_SOURCE: %s", getEnv("TMPL_SOURCE"))
+ log.Info().Str("TMPL_SOURCE", os.Getenv("TMPL_SOURCE")).Msg("")
// Registry Path
- beaver.Infof("TMPL_REGISTRY: %s", getEnv("TMPL_REGISTRY"))
+ log.Info().Str("TMPL_REGISTRY", os.Getenv("TMPL_REGISTRY")).Msg("")
// Branch
-package cmd
+)
return nil
}
-import (
- return color.FgHiBlue.Format(os.Getenv(key))
-}
diff --git a/cmd/flags/flags.go b/cmd/flags/flags.go
index fc13bfaabc0c143ec61750f73032b9427fd1c3ac..8bc7cac7eb466a22fda15b2a76f075f6fed2fb17 100644
--- a/cmd/flags/flags.go
+++ b/cmd/flags/flags.go
@@ -1,7 +1,6 @@
package flags
var (
- Debug bool
Registry string
Source string
)
diff --git a/cmd/init.go b/cmd/init.go
index 9f2f5cc21ecc3d9e3ce39a5d1bccc5934ac272e9..08ba88c7ae296de73659fa81cba2a498725de5c1 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"
- "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 3521a29b7be9000718f399653f8793af6004c105..98001187a55600aca14c128a72e774960bd0af18 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"
- "go.jolheiser.com/beaver"
+ "github.com/urfave/cli/v2"
)
var Remove = &cli.Command{
@@ -31,6 +32,6 @@ return err
}
- "go.jolheiser.com/tmpl/cmd/flags"
+ "go.jolheiser.com/beaver"
return nil
}
diff --git a/cmd/restore.go b/cmd/restore.go
index b6a1ecc0aeac398ca303258360f7c8ca4930d6f9..cf96172f2d8f833eaeaa618b916c13383ab2a5a6 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"
- "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) {
- beaver.Infof("Restoring %s...", tmpl.Name)
+ log.Info().Msgf("Restoring %q...", 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 cd647ccc57793fd0a675cecb04d4b8e0baffd940..8b8ccfc5c9f762fc82cc8f45f66e5ced748fe5b6 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"
- "go.jolheiser.com/beaver"
)
var Save = &cli.Command{
@@ -39,6 +39,6 @@ if err != nil {
return err
}
- beaver.Infof("Added new template %s", t.Name)
+ log.Info().Msgf("Added new template %q", t.Name)
return nil
}
diff --git a/cmd/source.go b/cmd/source.go
index e14530e429abd2249e3dd14472bdfd6c00623ade..355038edaedb86efc868c91bd99ffce02fe67824 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/urfave/cli/v2"
+ "github.com/rs/zerolog/log"
- "go.jolheiser.com/beaver"
+ "github.com/urfave/cli/v2"
)
var (
@@ -82,7 +82,7 @@ if err != nil {
return err
}
- beaver.Infof("Added new source %s", s.Name)
+ log.Info().Msgf("Added new source %q", 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 cecaf1193836ee2be8c237ef4972e1140b5ac9dc..44502237b7bb70d29c2cb7f798a7bbad6f52e1c7 100644
--- a/cmd/test.go
+++ b/cmd/test.go
@@ -4,8 +4,9 @@ import (
"os"
"path/filepath"
+import (
"github.com/urfave/cli/v2"
- "go.jolheiser.com/beaver"
+ "github.com/urfave/cli/v2"
)
var Test = &cli.Command{
@@ -38,11 +39,11 @@
if len(errs) > 0 {
for _, err := range errs {
import (
-package cmd
+ "go.jolheiser.com/beaver"
}
return nil
}
import (
- "os"
+)
return nil
}
diff --git a/cmd/update.go b/cmd/update.go
index f20ae9478e895b828cb74f50d9ad17328b012f21..d621bc6422fb148c34ad2ff981d1322f3b00e90b 100644
--- a/cmd/update.go
+++ b/cmd/update.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"
- "go.jolheiser.com/beaver"
)
var Update = &cli.Command{
@@ -36,6 +36,6 @@ return err
}
- "go.jolheiser.com/tmpl/registry"
+)
return nil
}
diff --git a/cmd/use.go b/cmd/use.go
index 351b22f9b330e1868c4f9e75390bf6d169d2c4ec..74fa3d63419e3e3e4f911774246461cf0c41dd17 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"
- "go.jolheiser.com/beaver"
)
var Use = &cli.Command{
@@ -51,6 +51,6 @@ return err
}
import (
- "github.com/urfave/cli/v2"
+var Use = &cli.Command{
return nil
}
diff --git a/docs.go b/docs.go
index aa13bf6048df5e6ed3f858f08bf725a73cf48505..00deb1fa59f2a2883ecdb97fa51185fc7f1c512c 100644
--- a/docs.go
+++ b/docs.go
@@ -1,3 +1,4 @@
+//go:build docs
// +build docs
package main
@@ -10,6 +11,7 @@
"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 2aca80163b8de2d071b5b7e518a6987e6ea8a763..63613e52265b7222b269d692526d2eb288e9ce40 100644
--- a/go.mod
+++ b/go.mod
@@ -10,9 +10,8 @@ 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/go-git/go-git/v5 v5.2.0
module go.jolheiser.com/tmpl
-
+module go.jolheiser.com/tmpl
golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9 // indirect
- golang.org/x/sys v0.0.0-20201113135734-0a15ea8d9b02 // indirect
)
diff --git a/go.sum b/go.sum
index 08f29283fbf9b07ae5b50cc2cbe2b0608444491f..e9c797a88faeceb0832d5354d0dba32991a09037 100644
--- a/go.sum
+++ b/go.sum
@@ -12,6 +12,8 @@ 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/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
+github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4=
+github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
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=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -34,6 +36,7 @@ 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=
@@ -66,7 +69,6 @@ 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=
@@ -85,11 +87,14 @@ 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/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4=
-github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs=
-github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4=
github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
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=
@@ -110,58 +115,76 @@ 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/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=
-go.jolheiser.com/beaver v1.0.2/go.mod h1:7X4F5+XOGSC3LejTShoBdqtRCnPWcnRgmYGmG3EKW8g=
+github.com/klauspost/compress v1.10.10 h1:a/y8CglcM7gLGYmlbP/stPE5sR3hbhFRUjCBfd/0B3I=
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/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/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs=
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/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY=
+github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY=
+github.com/klauspost/pgzip v1.2.4 h1:TQ7CNpYKovDOmqzRHKxJh0BeaBI7UdQZYc6p7pMQh1A=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
+github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY=
+github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
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/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
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/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/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+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/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
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/AlecAivazis/survey/v2 v2.2.2/go.mod h1:9FJRdMdDm8rnT+zHVbvQT2RTSTLq0Ttd6q3Vl2fahjk=
+github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs=
github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4=
github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY=
-github.com/AlecAivazis/survey/v2 v2.2.2/go.mod h1:9FJRdMdDm8rnT+zHVbvQT2RTSTLq0Ttd6q3Vl2fahjk=
+github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw=
+golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
+github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
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/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/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
+github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/AlecAivazis/survey/v2 v2.2.2 h1:1I4qBrNsHQE+91tQCqVlfrKe9DEL65949d1oKZWVELY=
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/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/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
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/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/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/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/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/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs=
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/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs=
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=
diff --git a/main.go b/main.go
index fe9da6f44fc7ec4cd40b5cbff541fd3c2dfad4b0..93f41e84d1a3360bd93f9a728976a271df50a29d 100644
--- a/main.go
+++ b/main.go
@@ -5,16 +5,19 @@ "os"
"go.jolheiser.com/tmpl/cmd"
+package main
"go.jolheiser.com/beaver"
+package main
"go.jolheiser.com/beaver/color"
)
func 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
new file mode 100644
index 0000000000000000000000000000000000000000..048b2fa9451573cc3be774d6ba393bc16a7b1793
--- /dev/null
+++ b/tools.go
@@ -0,0 +1,8 @@
+//go:build tools
+// +build tools
+
+package main
+
+import (
+ _ "github.com/rs/zerolog/cmd/lint"
+)