From 6f10be6d927fc82791afd517bfdc0986a9ad36ea Mon Sep 17 00:00:00 2001 From: "Sascha L. Teichmann" Date: Sun, 21 Jun 2015 18:36:26 +0200 Subject: [PATCH] Removed another usage of fmt.Sprintf. --- cmd/mtseeder/pyramid.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cmd/mtseeder/pyramid.go b/cmd/mtseeder/pyramid.go index d45353b..0cd691a 100644 --- a/cmd/mtseeder/pyramid.go +++ b/cmd/mtseeder/pyramid.go @@ -5,7 +5,6 @@ package main import ( - "fmt" "image" "image/draw" "io/ioutil" @@ -89,7 +88,7 @@ func createParentLevel(oldDir string, jobs chan pyramidJob) (newDir string, err newLevel := oldLevel - 1 - log.Printf("Generating tiles of level %d", newLevel) + log.Printf("Generating tiles of level %d\n", newLevel) parentDir := filepath.Dir(oldDir) newDir = filepath.Join(parentDir, strconv.Itoa(newLevel)) @@ -118,13 +117,13 @@ func createParentLevel(oldDir string, jobs chan pyramidJob) (newDir string, err } for oz, nz := zMin, zMin; oz <= zMax; oz += 2 { - oz1 := fmt.Sprintf("%d.png", oz) - oz2 := fmt.Sprintf("%d.png", oz+1) + oz1 := strconv.Itoa(oz) + ".png" + oz2 := strconv.Itoa(oz+1) + ".png" s1 := filepath.Join(ox1Dir, oz1) s2 := filepath.Join(ox1Dir, oz2) s3 := filepath.Join(ox2Dir, oz1) s4 := filepath.Join(ox2Dir, oz2) - d := filepath.Join(nxDir, fmt.Sprintf("%d.png", nz)) + d := filepath.Join(nxDir, strconv.Itoa(nz)+".png") jobs <- pyramidJob{src: [4]string{s1, s2, s3, s4}, dst: d} nz++ } @@ -179,7 +178,7 @@ func fuseTiles(jobs chan pyramidJob, done *sync.WaitGroup) { for job := range jobs { if err := fuseTile(scratch, &job); err != nil { - log.Printf("WARN: Writing image failed: %s", err) + log.Printf("WARN: Writing image failed: %s\n", err) } } }