Skip to content

Commit 02a2c48

Browse files
committed
fix: add main package for ergocheck to enable go install
Fixes #3 The ergocheck package was a library package, not a main package, so `go install github.com/newmo-oss/ergo/ergocheck@v0.1.0` failed. Added cmd/ergocheck/main.go with singlechecker.Main() to make it installable as a CLI tool. Signed-off-by: sivchari <shibuuuu5@gmail.com>
1 parent 7204e13 commit 02a2c48

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

ergocheck/README.ja.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var ErrNotFound = ergo.NewSentinel("not found")
6565
## インストール
6666

6767
```bash
68-
go install github.com/newmo-oss/ergo/ergocheck@latest
68+
go install github.com/newmo-oss/ergo/ergocheck/cmd/ergocheck@latest
6969
```
7070

7171
## 使い方

ergocheck/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var ErrNotFound = ergo.NewSentinel("not found")
6565
## Installation
6666

6767
```bash
68-
go install github.com/newmo-oss/ergo/ergocheck@latest
68+
go install github.com/newmo-oss/ergo/ergocheck/cmd/ergocheck@latest
6969
```
7070

7171
## Usage

ergocheck/cmd/ergocheck/main.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package main
2+
3+
import (
4+
"github.com/newmo-oss/ergo/ergocheck"
5+
"golang.org/x/tools/go/analysis/singlechecker"
6+
)
7+
8+
func main() {
9+
singlechecker.Main(ergocheck.Analyzer)
10+
}

0 commit comments

Comments
 (0)