From f89704bebbe4a95944b539fbdceea6ae0d63ec0c Mon Sep 17 00:00:00 2001 From: Manfred Touron <94029+moul@users.noreply.github.com> Date: Tue, 22 Dec 2020 17:30:52 +0100 Subject: [PATCH] feat: post-template clone massive update --- .all-contributorsrc | 2 +- .github/workflows/docker.yml | 6 +++--- .goreleaser.yml | 10 ++++----- COPYRIGHT | 8 +++---- Dockerfile | 16 +++++++------- Makefile | 8 +++---- README.md | 42 ++++++++++++++++++------------------ depaware.txt | 10 ++++----- doc.go | 2 +- go.mod | 2 +- main.go | 31 -------------------------- main_test.go | 18 ---------------- package.json | 10 ++++----- tool/lint/.spelling | 2 +- 14 files changed, 59 insertions(+), 108 deletions(-) delete mode 100644 main.go delete mode 100644 main_test.go diff --git a/.all-contributorsrc b/.all-contributorsrc index 70a3520..a704670 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -29,7 +29,7 @@ } ], "contributorsPerLine": 7, - "projectName": "golang-repo-template", + "projectName": "progress", "projectOwner": "moul", "repoType": "github", "repoHost": "https://github.com", diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 69b83c5..ed4b230 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -18,7 +18,7 @@ jobs: - name: Build the container image uses: docker/build-push-action@v2 with: - repository: golang-repo-template + repository: progress - name: Push to GitHub Packages uses: docker/build-push-action@v2 @@ -27,7 +27,7 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} registry: docker.pkg.github.com - repository: moul/golang-repo-template/golang-repo-template + repository: moul/progress/progress tag_with_ref: true - name: Check Docker Hub Credentials @@ -56,5 +56,5 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - repository: moul/golang-repo-template + repository: moul/progress tag_with_ref: true diff --git a/.goreleaser.yml b/.goreleaser.yml index 93b75c1..fc07d43 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -51,20 +51,20 @@ archives: wrap_in_directory: true brews: - - name: golang-repo-template + name: progress # github: # owner: moul # name: homebrew-moul commit_author: name: moul-bot email: "bot@moul.io" - homepage: https://github.com/moul/golang-repo-template - description: "golang-repo-template" + homepage: https://github.com/moul/progress + description: "progress" nfpms: - file_name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' - homepage: https://github.com/moul/golang-repo-template - description: "golang-repo-template" + homepage: https://github.com/moul/progress + description: "progress" maintainer: "Manfred Touron " license: "Apache-2.0 OR MIT" vendor: moul diff --git a/COPYRIGHT b/COPYRIGHT index 1795e38..54984fe 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,16 +1,16 @@ -Copyright 2020 Manfred Touron and other golang-repo-template Developers. +Copyright 2020 Manfred Touron and other progress Developers. Intellectual Property Notice ---------------------------- -golang-repo-template is licensed under the Apache License, Version 2.0 +progress is licensed under the Apache License, Version 2.0 (see LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) or the MIT license (see LICENSE-MIT or http://opensource.org/licenses/MIT), at your option. -Copyrights and patents in the golang-repo-templates project are retained +Copyrights and patents in the progresss project are retained by contributors. -No copyright assignment is required to contribute to golang-repo-template. +No copyright assignment is required to contribute to progress. SPDX-License-Identifier: (Apache-2.0 OR MIT) diff --git a/Dockerfile b/Dockerfile index 9abec12..507a3e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ ARG VERSION FROM golang:1.15.6-alpine as builder RUN apk add --no-cache git gcc musl-dev make ENV GO111MODULE=on -WORKDIR /go/src/moul.io/golang-repo-template +WORKDIR /go/src/moul.io/progress COPY go.* ./ RUN go mod download COPY . ./ @@ -16,16 +16,16 @@ RUN make install # minimalist runtime FROM alpine:3.12 LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name="golang-repo-template" \ + org.label-schema.name="progress" \ org.label-schema.description="" \ - org.label-schema.url="https://moul.io/golang-repo-template/" \ + org.label-schema.url="https://moul.io/progress/" \ org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url="https://github.com/moul/golang-repo-template" \ + org.label-schema.vcs-url="https://github.com/moul/progress" \ org.label-schema.vendor="Manfred Touron" \ org.label-schema.version=$VERSION \ org.label-schema.schema-version="1.0" \ - org.label-schema.cmd="docker run -i -t --rm moul/golang-repo-template" \ - org.label-schema.help="docker exec -it $CONTAINER golang-repo-template --help" -COPY --from=builder /go/bin/golang-repo-template /bin/ -ENTRYPOINT ["/bin/golang-repo-template"] + org.label-schema.cmd="docker run -i -t --rm moul/progress" \ + org.label-schema.help="docker exec -it $CONTAINER progress --help" +COPY --from=builder /go/bin/progress /bin/ +ENTRYPOINT ["/bin/progress"] #CMD [] diff --git a/Makefile b/Makefile index 8a46d75..e45e8b7 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -GOPKG ?= moul.io/golang-repo-template -DOCKER_IMAGE ?= moul/golang-repo-template +GOPKG ?= moul.io/progress +DOCKER_IMAGE ?= moul/progress GOBINS ?= . NPM_PACKAGES ?= . @@ -8,8 +8,8 @@ include rules.mk generate: install GO111MODULE=off go get github.com/campoy/embedmd mkdir -p .tmp - echo 'foo@bar:~$$ golang-repo-template hello world' > .tmp/usage.txt - golang-repo-template hello world 2>&1 >> .tmp/usage.txt + echo 'foo@bar:~$$ progress hello world' > .tmp/usage.txt + progress hello world 2>&1 >> .tmp/usage.txt embedmd -w README.md rm -rf .tmp .PHONY: generate diff --git a/README.md b/README.md index b5c5bf1..264420f 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,35 @@ -# golang-repo-template +# progress -:smile: golang-repo-template +:smile: progress -[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/moul.io/golang-repo-template) -[![License](https://img.shields.io/badge/license-Apache--2.0%20%2F%20MIT-%2397ca00.svg)](https://github.com/moul/golang-repo-template/blob/master/COPYRIGHT) -[![GitHub release](https://img.shields.io/github/release/moul/golang-repo-template.svg)](https://github.com/moul/golang-repo-template/releases) -[![Docker Metrics](https://images.microbadger.com/badges/image/moul/golang-repo-template.svg)](https://microbadger.com/images/moul/golang-repo-template) +[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/moul.io/progress) +[![License](https://img.shields.io/badge/license-Apache--2.0%20%2F%20MIT-%2397ca00.svg)](https://github.com/moul/progress/blob/master/COPYRIGHT) +[![GitHub release](https://img.shields.io/github/release/moul/progress.svg)](https://github.com/moul/progress/releases) +[![Docker Metrics](https://images.microbadger.com/badges/image/moul/progress.svg)](https://microbadger.com/images/moul/progress) [![Made by Manfred Touron](https://img.shields.io/badge/made%20by-Manfred%20Touron-blue.svg?style=flat)](https://manfred.life/) -[![Go](https://github.com/moul/golang-repo-template/workflows/Go/badge.svg)](https://github.com/moul/golang-repo-template/actions?query=workflow%3AGo) -[![Release](https://github.com/moul/golang-repo-template/workflows/Release/badge.svg)](https://github.com/moul/golang-repo-template/actions?query=workflow%3ARelease) -[![PR](https://github.com/moul/golang-repo-template/workflows/PR/badge.svg)](https://github.com/moul/golang-repo-template/actions?query=workflow%3APR) -[![GolangCI](https://golangci.com/badges/github.com/moul/golang-repo-template.svg)](https://golangci.com/r/github.com/moul/golang-repo-template) -[![codecov](https://codecov.io/gh/moul/golang-repo-template/branch/master/graph/badge.svg)](https://codecov.io/gh/moul/golang-repo-template) -[![Go Report Card](https://goreportcard.com/badge/moul.io/golang-repo-template)](https://goreportcard.com/report/moul.io/golang-repo-template) -[![CodeFactor](https://www.codefactor.io/repository/github/moul/golang-repo-template/badge)](https://www.codefactor.io/repository/github/moul/golang-repo-template) +[![Go](https://github.com/moul/progress/workflows/Go/badge.svg)](https://github.com/moul/progress/actions?query=workflow%3AGo) +[![Release](https://github.com/moul/progress/workflows/Release/badge.svg)](https://github.com/moul/progress/actions?query=workflow%3ARelease) +[![PR](https://github.com/moul/progress/workflows/PR/badge.svg)](https://github.com/moul/progress/actions?query=workflow%3APR) +[![GolangCI](https://golangci.com/badges/github.com/moul/progress.svg)](https://golangci.com/r/github.com/moul/progress) +[![codecov](https://codecov.io/gh/moul/progress/branch/master/graph/badge.svg)](https://codecov.io/gh/moul/progress) +[![Go Report Card](https://goreportcard.com/badge/moul.io/progress)](https://goreportcard.com/report/moul.io/progress) +[![CodeFactor](https://www.codefactor.io/repository/github/moul/progress/badge)](https://www.codefactor.io/repository/github/moul/progress) -[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/moul/golang-repo-template) +[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/moul/progress) ## Usage [embedmd]:# (.tmp/usage.txt console) ```console -foo@bar:~$ golang-repo-template hello world +foo@bar:~$ progress hello world _ _ _ _ __ _ ___ | | __ _ _ _ __ _ ___ _ _ ___ _ __ ___ ___ | |_ ___ _ __ _ __ | | __ _ | |_ ___ / _` |/ _ \| |/ _` || ' \ / _` ||___|| '_|/ -_)| '_ \/ _ \|___|| _|/ -_)| ' \ | '_ \| |/ _` || _|/ -_) \__, |\___/|_|\__,_||_||_|\__, | |_| \___|| .__/\___/ \__|\___||_|_|_|| .__/|_|\__,_| \__|\___| |___/ |___/ |_| |_| -12 CPUs, /home/moul/go/bin/golang-repo-template, fwrz, go1.15.5 -args ["golang-repo-template","hello","world"] +12 CPUs, /home/moul/go/bin/progress, fwrz, go1.15.5 +args ["progress","hello","world"] ``` ## Install @@ -37,12 +37,12 @@ args ["golang-repo-template","hello","world"] ### Using go ```sh -go get moul.io/golang-repo-template +go get moul.io/progress ``` ### Releases -See https://github.com/moul/golang-repo-template/releases +See https://github.com/moul/progress/releases ## Contribute @@ -69,7 +69,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d - +

Manfred Touron

🚧 📖 ⚠️ 💻

Manfred Touron

🚧 📖 ⚠️ 💻

moul-bot

🚧
@@ -83,7 +83,7 @@ specification. Contributions of any kind welcome! ### Stargazers over time -[![Stargazers over time](https://starchart.cc/moul/golang-repo-template.svg)](https://starchart.cc/moul/golang-repo-template) +[![Stargazers over time](https://starchart.cc/moul/progress.svg)](https://starchart.cc/moul/progress) ## License diff --git a/depaware.txt b/depaware.txt index 74abba9..cb18d70 100644 --- a/depaware.txt +++ b/depaware.txt @@ -1,4 +1,4 @@ -moul.io/golang-repo-template dependencies: (generated by github.com/tailscale/depaware) +moul.io/progress dependencies: (generated by github.com/tailscale/depaware) go.uber.org/atomic from go.uber.org/multierr+ go.uber.org/multierr from go.uber.org/zap+ @@ -9,10 +9,10 @@ moul.io/golang-repo-template dependencies: (generated by github.com/tailscale/de go.uber.org/zap/internal/exit from go.uber.org/zap/zapcore go.uber.org/zap/zapcore from go.uber.org/zap+ moul.io/banner from moul.io/motd - moul.io/motd from moul.io/golang-repo-template - moul.io/srand from moul.io/golang-repo-template - moul.io/u from moul.io/golang-repo-template - moul.io/zapconfig from moul.io/golang-repo-template + moul.io/motd from moul.io/progress + moul.io/srand from moul.io/progress + moul.io/u from moul.io/progress + moul.io/zapconfig from moul.io/progress golang.org/x/crypto/chacha20 from golang.org/x/crypto/chacha20poly1305 golang.org/x/crypto/chacha20poly1305 from crypto/tls golang.org/x/crypto/cryptobyte from crypto/ecdsa+ diff --git a/doc.go b/doc.go index 8d18902..520cb64 100644 --- a/doc.go +++ b/doc.go @@ -26,4 +26,4 @@ // |/ | | \ \ / / ' \/ _ \/ // / / | // || | | | | | /_/_/_/\___/\_,_/_/ | // +--------------------------------------------------------------+ -package main // import "moul.io/golang-repo-template" +package progress // import "moul.io/progress" diff --git a/go.mod b/go.mod index b4b1db0..25a56a3 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module moul.io/golang-repo-template +module moul.io/progress go 1.13 diff --git a/main.go b/main.go deleted file mode 100644 index b520fe8..0000000 --- a/main.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "math/rand" - "os" - - "moul.io/motd" - "moul.io/srand" - "moul.io/u" - "moul.io/zapconfig" -) - -func main() { - if err := run(os.Args); err != nil { - fmt.Fprintf(os.Stderr, "error: %v\n", err) - os.Exit(1) - } -} - -func run(args []string) error { - rand.Seed(srand.Fast()) - fmt.Print(motd.Default()) - logger, err := zapconfig.Configurator{}.Build() - if err != nil { - return err - } - logger.Info("Hello World!") - fmt.Println("args", u.JSON(args)) - return nil -} diff --git a/main_test.go b/main_test.go deleted file mode 100644 index af8507f..0000000 --- a/main_test.go +++ /dev/null @@ -1,18 +0,0 @@ -package main - -import ( - "testing" - - "go.uber.org/goleak" -) - -func TestRun(t *testing.T) { - err := run(nil) - if err != nil { - t.Fatalf("err should be nil: %v", err) - } -} - -func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) -} diff --git a/package.json b/package.json index db963f8..5be424e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "_comment": "this project is not a node.js one, package.json is just used to define some metadata", - "name": "@moul.io/golang-repo-template", + "name": "@moul.io/progress", "version": "0.0.1", "author": "Manfred Touron (https://manfred.life)", "contributors": [ @@ -8,14 +8,14 @@ ], "license": "(Apache-2.0 OR MIT)", "scripts": { - "start": "golang-repo-template", + "start": "progress", "install": "make install", "test": "make test" }, "repository": { "type": "git", - "url": "https://github.com/moul/golang-repo-template.git" + "url": "https://github.com/moul/progress.git" }, - "bugs": "https://github.com/moul/golang-repo-template/issues", - "homepage": "https://moul.io/golang-repo-template" + "bugs": "https://github.com/moul/progress/issues", + "homepage": "https://moul.io/progress" } diff --git a/tool/lint/.spelling b/tool/lint/.spelling index ebfe3b0..6a75650 100644 --- a/tool/lint/.spelling +++ b/tool/lint/.spelling @@ -1,3 +1,3 @@ -golang-repo-template +progress Touron CONTRIBUTING.md