Skip to content

Commit 44bf2ee

Browse files
author
Charith Ellawala
committed
Update README
1 parent 4def8bf commit 44bf2ee

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
build:
2-
@GO111MODULE=on go build -ldflags '-s -w' -o durationcheck cmd/main.go
2+
@GO111MODULE=on go build -ldflags '-s -w' -o durationcheck ./cmd/durationcheck/main.go
33

4-
install: build
5-
@mv durationcheck $(GOPATH)/bin/durationcheck
4+
install:
5+
@GO111MODULE=on go install -ldflags '-s -w' ./cmd/durationcheck

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Duration Check
22
===============
33

4-
A Go linter that detects cases where two `time.Duration` values are being multiplied in possibly erroneous ways.
4+
A Go linter to detect cases where two `time.Duration` values are being multiplied in possibly erroneous ways.
55

66
For example, consider the following snippet:
77

@@ -18,23 +18,18 @@ reasonably expect `waitFor(5 * time.Seconds)` to wait for ~5 seconds but they wo
1818
A majority of these problems would be spotted almost immediately but some could still slip through unnoticed. Hopefully
1919
this linter will help catch those rare cases before they cause a production issue.
2020

21+
See the [test cases](testdata/src/a/a.go) for more examples of the types of errors detected by the linter.
22+
2123

2224
Installation
2325
-------------
2426

25-
Grab the sources with go-get
26-
27-
```
28-
go get -d github.com/charithe/durationcheck
29-
```
30-
31-
To install a standalone binary in `$GOPATH/bin`:
27+
Requires Go 1.11 or above.
3228

3329
```
34-
cd $GOPATH/src/github.com/charithe/durationcheck && make install
30+
go get -u github.com/charithe/durationcheck/cmd/durationcheck
3531
```
3632

37-
3833
Usage
3934
-----
4035

File renamed without changes.

0 commit comments

Comments
 (0)