Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

Commit

Permalink
Removed pb
Browse files Browse the repository at this point in the history
  • Loading branch information
babarot committed Feb 28, 2017
1 parent 362b377 commit 7304e38
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@ import (
"encoding/json"
"flag"
"fmt"
"log"
"os"
"regexp"
"strings"
"sync"

"gopkg.in/cheggaaa/pb.v1"
)

var (
Expand All @@ -35,24 +32,12 @@ func main() {
wg := sync.WaitGroup{}
hasError := false

total := len(q.Articles)
bar := pb.New(total)
if !*debug {
bar.Start()
}

for _, article := range q.Articles {
wg.Add(1)
go func(a Articles) {
err := qiita2crowi(a)
if err != nil {
hasError = true
if *debug {
log.Printf("[ERROR] %s", err.Error())
}
}
if !*debug {
bar.Increment()
}
wg.Done()
}(article)
Expand Down

0 comments on commit 7304e38

Please sign in to comment.