Added another cla
This commit is contained in:
parent
c08969d913
commit
d2c545bee3
1 changed files with 8 additions and 2 deletions
|
|
@ -31,8 +31,8 @@ func meanValue(x []float64) float64 {
|
|||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
if len(flag.Args()) == 0 {
|
||||
fmt.Printf("usage: stats filename\n")
|
||||
if len(flag.Args()) != 2 {
|
||||
fmt.Printf("usage: stats filename limit\n")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -44,6 +44,12 @@ func main() {
|
|||
}
|
||||
defer f.Close()
|
||||
|
||||
limit, err := strconv.ParseFloat(flag.Args()[1], 64)
|
||||
if err == nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
|
||||
data := make([]float64, 0)
|
||||
r := bufio.NewReader(f)
|
||||
for {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue