File tree Expand file tree Collapse file tree 3 files changed +8
-13
lines changed
Expand file tree Collapse file tree 3 files changed +8
-13
lines changed Original file line number Diff line number Diff line change 11build :
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
Original file line number Diff line number Diff line change 11Duration 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
66For example, consider the following snippet:
77
@@ -18,23 +18,18 @@ reasonably expect `waitFor(5 * time.Seconds)` to wait for ~5 seconds but they wo
1818A majority of these problems would be spotted almost immediately but some could still slip through unnoticed. Hopefully
1919this 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
2224Installation
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-
3833Usage
3934-----
4035
File renamed without changes.
You can’t perform that action at this time.
0 commit comments