Skip to content

Commit

Permalink
Add example to README; check ~ only in base
Browse files Browse the repository at this point in the history
  • Loading branch information
egonelbre committed Jul 27, 2015
1 parent 6e004ec commit 4862494
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
`qloc` does a quick line count ignoring binary file types.
`qloc` does a quick line count over files.

Example output for this folder:

```
extension files binary blank code
----------------------------------------------------------------
go 3 0 43 211
1 0 5 20
gitignore 1 0 5 19
md 1 0 1 5
----------------------------------------------------------------
summary 6 0 54 255
```

To install:
```
Expand Down
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ func IterateDir(root string, work chan string) {
return nil
}

if strings.Contains(path, "~") {
// if a filename contains ~ we assume it's a temporary file
if strings.Contains(filepath.Base(path), "~") {
return nil
}

Expand Down

0 comments on commit 4862494

Please sign in to comment.