Skip to content

Commit

Permalink
Merge pull request #3 from moul/dev/moul/v1
Browse files Browse the repository at this point in the history
  • Loading branch information
moul authored Jun 29, 2021
2 parents d36b9bc + 8cdbc79 commit a75954f
Show file tree
Hide file tree
Showing 22 changed files with 685 additions and 104 deletions.
2 changes: 1 addition & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
],
"contributorsPerLine": 7,
"projectName": "golang-repo-template",
"projectName": "midcat",
"projectOwner": "moul",
"repoType": "github",
"repoHost": "https://github.com",
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Build the container image
uses: docker/build-push-action@v2.5.0
with:
repository: golang-repo-template
repository: midcat

- name: Push to GitHub Packages
uses: docker/build-push-action@v2.5.0
Expand All @@ -41,7 +41,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: moul/golang-repo-template/golang-repo-template
repository: moul/midcat/midcat
tag_with_ref: true

- name: Check Docker Hub Credentials
Expand Down Expand Up @@ -70,5 +70,5 @@ jobs:
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: moul/golang-repo-template
repository: moul/midcat
tag_with_ref: true
30 changes: 15 additions & 15 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,21 @@ jobs:
args: release --rm-dist --snapshot --skip-publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
golangci-lint:
runs-on: ubuntu-latest
strategy:
matrix:
golangci_lint: [v1.38]
steps:
- uses: actions/checkout@v2.3.4
- name: golangci-lint
uses: golangci/golangci-lint-action@v2.5.2
with:
version: ${{ matrix.golangci_lint }}
#github-token: ${{ secrets.GITHUB_TOKEN }}
args: --timeout=2m
only-new-issues: false
working-directory: .
#golangci-lint:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# golangci_lint: [v1.38]
# steps:
# - uses: actions/checkout@v2.3.4
# - name: golangci-lint
# uses: golangci/golangci-lint-action@v2.5.2
# with:
# version: ${{ matrix.golangci_lint }}
# #github-token: ${{ secrets.GITHUB_TOKEN }}
# args: --timeout=2m
# only-new-issues: false
# working-directory: .
tests-on-windows:
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
runs-on: windows-latest
Expand Down
6 changes: 3 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ linters:
- gocritic
- gocyclo
- godot
- goerr113
#- goerr113
- gofmt
- gofumpt
- goimports
- golint
- gomnd
#- gomnd
- gomodguard
- gosec
- gosimple
Expand All @@ -51,7 +51,7 @@ linters:
- maligned
- misspell
- nakedret
- nestif
#- nestif
- noctx
- nolintlint
- prealloc
Expand Down
10 changes: 5 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,20 @@ archives:
wrap_in_directory: true
brews:
-
name: golang-repo-template
name: midcat
# 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/midcat
description: "midcat"
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/midcat
description: "midcat"
maintainer: "Manfred Touron <https://manfred.life>"
license: "Apache-2.0 OR MIT"
vendor: moul
Expand Down
7 changes: 0 additions & 7 deletions AUTHORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Copyright 2021 Manfred Touron and other golang-repo-template Developers.
Copyright 2021 Manfred Touron and other midcat Developers.

Intellectual Property Notice
----------------------------

golang-repo-template is licensed under the Apache License, Version 2.0
midcat 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 midcats project are retained
by contributors.
No copyright assignment is required to contribute to golang-repo-template.
No copyright assignment is required to contribute to midcat.

SPDX-License-Identifier: (Apache-2.0 OR MIT)

Expand Down
19 changes: 10 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ ARG VERSION

# build
FROM golang:1.16.5-alpine as builder
RUN apk add --no-cache git gcc musl-dev make
RUN apk add --no-cache git gcc musl-dev make g++ alsa-lib-dev
ENV GO111MODULE=on
WORKDIR /go/src/moul.io/golang-repo-template
WORKDIR /go/src/moul.io/midcat
COPY go.* ./
RUN go mod download
COPY . ./
Expand All @@ -16,16 +16,17 @@ RUN make install
# minimalist runtime
FROM alpine:3.13
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="golang-repo-template" \
org.label-schema.name="midcat" \
org.label-schema.description="" \
org.label-schema.url="https://moul.io/golang-repo-template/" \
org.label-schema.url="https://moul.io/midcat/" \
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/midcat" \
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/midcat" \
org.label-schema.help="docker exec -it $CONTAINER midcat --help"
COPY --from=builder /go/bin/midcat /bin/
RUN apk add --no-cache gcc alsa-lib
ENTRYPOINT ["/bin/midcat"]
#CMD []
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GOPKG ?= moul.io/golang-repo-template
DOCKER_IMAGE ?= moul/golang-repo-template
GOPKG ?= moul.io/midcat
DOCKER_IMAGE ?= moul/midcat
GOBINS ?= .
NPM_PACKAGES ?= .

Expand All @@ -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:~$$ midcat -h' > .tmp/usage.txt
midcat -h 2>> .tmp/usage.txt
embedmd -w README.md
rm -rf .tmp
.PHONY: generate
72 changes: 46 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,68 @@
# golang-repo-template
# midcat

:smile: golang-repo-template
:smile: midcat

[![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/main/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/midcat)
[![License](https://img.shields.io/badge/license-Apache--2.0%20%2F%20MIT-%2397ca00.svg)](https://github.com/moul/midcat/blob/main/COPYRIGHT)
[![GitHub release](https://img.shields.io/github/release/moul/midcat.svg)](https://github.com/moul/midcat/releases)
[![Docker Metrics](https://images.microbadger.com/badges/image/moul/midcat.svg)](https://microbadger.com/images/moul/midcat)
[![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/main/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/midcat/workflows/Go/badge.svg)](https://github.com/moul/midcat/actions?query=workflow%3AGo)
[![Release](https://github.com/moul/midcat/workflows/Release/badge.svg)](https://github.com/moul/midcat/actions?query=workflow%3ARelease)
[![PR](https://github.com/moul/midcat/workflows/PR/badge.svg)](https://github.com/moul/midcat/actions?query=workflow%3APR)
[![GolangCI](https://golangci.com/badges/github.com/moul/midcat.svg)](https://golangci.com/r/github.com/moul/midcat)
[![codecov](https://codecov.io/gh/moul/midcat/branch/main/graph/badge.svg)](https://codecov.io/gh/moul/midcat)
[![Go Report Card](https://goreportcard.com/badge/moul.io/midcat)](https://goreportcard.com/report/moul.io/midcat)
[![CodeFactor](https://www.codefactor.io/repository/github/moul/midcat/badge)](https://www.codefactor.io/repository/github/moul/midcat)

[![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/midcat)

## Usage

[embedmd]:# (.tmp/usage.txt console)
```console
foo@bar:~$ golang-repo-template hello world
_ _ _ _
__ _ ___ | | __ _ _ _ __ _ ___ _ _ ___ _ __ ___ ___ | |_ ___ _ __ _ __ | | __ _ | |_ ___
/ _` |/ _ \| |/ _` || ' \ / _` ||___|| '_|/ -_)| '_ \/ _ \|___|| _|/ -_)| ' \ | '_ \| |/ _` || _|/ -_)
\__, |\___/|_|\__,_||_||_|\__, | |_| \___|| .__/\___/ \__|\___||_|_|_|| .__/|_|\__,_| \__|\___|
|___/ |___/ |_| |_|
12 CPUs, /home/moul/.gvm/pkgsets/go1.16/global/bin/golang-repo-template, fwrz, go1.16
args ["golang-repo-template","hello","world"]
foo@bar:~$ midcat -h
_ _ _
_ __ (_) __| | __ __ _ | |_
| ' \ | |/ _` |/ _|/ _` || _|
|_|_|_||_|\__,_|\__|\__,_| \__|
4 CPUs, /Users/moul/.local/bin/midcat, manfred-spacegray, go1.16.5


USAGE
midcat [FLAGS] <ADDRESS>[,OPTS] [FILTERS] <ADDRESS>[,OPTS]

FLAGS
-debug false debug mode

ADDRESS
midi midi port id=FIRST
- stdio
nop dummy driver

OPTS
TODO

HARDWARE
IN: id=0 is-open=false name="IAC Driver Bus 1"
OUT: id=0 is-open=false name="IAC Driver Bus 1"

FILTER
TODO
```

## Install

### Using go

```sh
go get moul.io/golang-repo-template
go get moul.io/midcat
```

### Releases

See https://github.com/moul/golang-repo-template/releases
See https://github.com/moul/midcat/releases

## Contribute

Expand Down Expand Up @@ -73,7 +93,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="http://manfred.life"><img src="https://avatars1.githubusercontent.com/u/94029?v=4" width="100px;" alt=""/><br /><sub><b>Manfred Touron</b></sub></a><br /><a href="#maintenance-moul" title="Maintenance">🚧</a> <a href="https://github.com/moul/golang-repo-template/commits?author=moul" title="Documentation">📖</a> <a href="https://github.com/moul/golang-repo-template/commits?author=moul" title="Tests">⚠️</a> <a href="https://github.com/moul/golang-repo-template/commits?author=moul" title="Code">💻</a></td>
<td align="center"><a href="http://manfred.life"><img src="https://avatars1.githubusercontent.com/u/94029?v=4" width="100px;" alt=""/><br /><sub><b>Manfred Touron</b></sub></a><br /><a href="#maintenance-moul" title="Maintenance">🚧</a> <a href="https://github.com/moul/midcat/commits?author=moul" title="Documentation">📖</a> <a href="https://github.com/moul/midcat/commits?author=moul" title="Tests">⚠️</a> <a href="https://github.com/moul/midcat/commits?author=moul" title="Code">💻</a></td>
<td align="center"><a href="https://manfred.life/moul-bot"><img src="https://avatars1.githubusercontent.com/u/41326314?v=4" width="100px;" alt=""/><br /><sub><b>moul-bot</b></sub></a><br /><a href="#maintenance-moul-bot" title="Maintenance">🚧</a></td>
</tr>
</table>
Expand All @@ -87,7 +107,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/midcat.svg)](https://starchart.cc/moul/midcat)

## License

Expand Down
10 changes: 5 additions & 5 deletions depaware.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
// |/ | | \ \ / / ' \/ _ \/ // / / |
// || | | | | | /_/_/_/\___/\_,_/_/ |
// +--------------------------------------------------------------+
package main // import "moul.io/golang-repo-template"
package main // import "moul.io/midcat"
Loading

0 comments on commit a75954f

Please sign in to comment.