mirror of
https://github.com/genuinetools/reg.git
synced 2024-06-16 06:04:45 -04:00
fix a potential tabwriter panic (#49)
use tabwriter's native write for: - sometimes tabwriter panic with goroutine - goroutine with fmt.Fprintf cause dirty data
This commit is contained in:
parent
29f6d2fab9
commit
cb41c7a396
3
main.go
3
main.go
|
@ -148,7 +148,8 @@ func main() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Get tags of [%s] error: %s", repo, err)
|
fmt.Printf("Get tags of [%s] error: %s", repo, err)
|
||||||
}
|
}
|
||||||
fmt.Fprintf(w, "%s\t%s\n", repo, strings.Join(tags, ", "))
|
out := fmt.Sprintf("%s\t%s\n", repo, strings.Join(tags, ", "))
|
||||||
|
w.Write([]byte(out))
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}(repo)
|
}(repo)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue