-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hideo Hattori
committed
Apr 4, 2016
1 parent
76749f6
commit a0ac80a
Showing
2 changed files
with
27 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package main | ||
|
||
type ClocFile struct { | ||
name string | ||
code int32 | ||
comments int32 | ||
blanks int32 | ||
lines int32 | ||
} | ||
|
||
type ClocFiles []ClocFile | ||
|
||
func (cf ClocFiles) Len() int { | ||
return len(cf) | ||
} | ||
func (cf ClocFiles) Swap(i, j int) { | ||
cf[i], cf[j] = cf[j], cf[i] | ||
} | ||
func (cf ClocFiles) Less(i, j int) bool { | ||
return cf[i].code > cf[j].code | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters