Skip to content

Commit 55d13e5

Browse files
authored
Merge pull request #1 from wreulicke/add-patchr-comment
Add patchr comment
2 parents 048d7ce + 154ad7c commit 55d13e5

File tree

8 files changed

+24
-5
lines changed

8 files changed

+24
-5
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626
version: "v2"
2727
args: release --clean
2828
env:
29-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ jobs:
2525
- uses: actions/checkout@v4
2626
- name: test
2727
run: make test
28-
- uses: k1LoW/octocov-action@v1
28+
- uses: k1LoW/octocov-action@v1

.golangci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ issues:
3232
- path: _test\.go
3333
linters:
3434
- errcheck
35-
- forcetypeassert
35+
- forcetypeassert

.goreleaser.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
builds:
2+
# patchr:replace - main: ./cmd/{{ input "name" }}
23
- main: ./cmd/go-cli-template
4+
# patchr:replace binary: {{ input "name" }}
35
binary: go-cli-template
46
goos:
57
- windows
@@ -27,4 +29,5 @@ changelog:
2729
release:
2830
github:
2931
owner: wreulicke
30-
name: go-cli-template
32+
# patchr:replace name: {{ input "name" }}
33+
name: go-cli-template

.octocov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ diff:
2020
report:
2121
if: is_default_branch
2222
datastores:
23-
- artifact://${GITHUB_REPOSITORY}
23+
- artifact://${GITHUB_REPOSITORY}

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<!-- patchr:template-start -->
2+
<!-- # {{ input "name" }} -->
3+
<!-- patchr:template-end -->
4+
<!-- patchr:remove -->
15
# go-cli-template
26

37
This is my repository template for cli tool in go.
@@ -9,6 +13,7 @@ This is my repository template for cli tool in go.
913

1014
## Usage
1115

16+
<!-- patchr:cut-start -->
1217
```bash
1318
go-cli-template
1419

@@ -26,6 +31,7 @@ Flags:
2631

2732
Use "go-cli-template [command] --help" for more information about a command.
2833
```
34+
<!-- patchr:cut-end -->
2935

3036
## License
3137

cmd/go-cli-template/main.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package main
22

3+
// patchr:cut-start
4+
//go:generate go run github.com/wreulicke/patchr/cmd/patchr@v0.0.4 ../../
5+
// patchr:cut-end
36
import (
47
"debug/buildinfo"
58
"fmt"
@@ -22,8 +25,14 @@ func main() {
2225

2326
func NewApp() *cobra.Command {
2427
c := cobra.Command{
28+
// patchr:template-start
29+
// Use: "{{ input "name" }}",
30+
// Short: "{{ input "name" }}",
31+
// patchr:template-end
32+
// patchr:cut-start
2533
Use: "go-cli-template",
2634
Short: "go-cli-template",
35+
// patchr:cut-end
2736
RunE: func(cmd *cobra.Command, args []string) error {
2837
// nop
2938
return nil

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// patchr:replace module github.com/wreulicke/{{ input "repo" }}
12
module github.com/wreulicke/go-cli-template
23

34
go 1.22

0 commit comments

Comments
 (0)