Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Charith Ellawala committed Feb 19, 2019
1 parent 4def8bf commit 44bf2ee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
build:
@GO111MODULE=on go build -ldflags '-s -w' -o durationcheck cmd/main.go
@GO111MODULE=on go build -ldflags '-s -w' -o durationcheck ./cmd/durationcheck/main.go

install: build
@mv durationcheck $(GOPATH)/bin/durationcheck
install:
@GO111MODULE=on go install -ldflags '-s -w' ./cmd/durationcheck
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Duration Check
===============

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

For example, consider the following snippet:

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

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


Installation
-------------

Grab the sources with go-get

```
go get -d github.com/charithe/durationcheck
```

To install a standalone binary in `$GOPATH/bin`:
Requires Go 1.11 or above.

```
cd $GOPATH/src/github.com/charithe/durationcheck && make install
go get -u github.com/charithe/durationcheck/cmd/durationcheck
```


Usage
-----

Expand Down
File renamed without changes.

0 comments on commit 44bf2ee

Please sign in to comment.