Skip to content

Commit 07e5524

Browse files
committed
lint: fix staticcheck errors
1 parent fb8ab5e commit 07e5524

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

pkg/exporter/exporter.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package exporter provides the base export functionality with support for multiple workers.
12
package exporter
23

34
import (

pkg/exporter/worker.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type WorkerParams struct {
3333
Count uint
3434
}
3535

36-
// TileWorker processes tiles for a single worker
36+
// Do processes a slice of tiles for a single worker
3737
func (p *WorkerParams) Do() {
3838
defer p.Wg.Done()
3939

@@ -121,7 +121,7 @@ func (p *WorkerParams) FetchTile(coord tileutils.TileCoords) error {
121121
p.TileBufferCache[p.TileCachePosition] = buf
122122
_, err := p.GzipCompressor.Compress(mvtTile, buf)
123123
if err != nil {
124-
return fmt.Errorf("error compressing tile: %w\n", err)
124+
return fmt.Errorf("error compressing tile: %w", err)
125125
}
126126
mvtTile = buf.Bytes()
127127
}
@@ -139,7 +139,7 @@ func (p *WorkerParams) FetchTile(coord tileutils.TileCoords) error {
139139
if p.TileCachePosition == MbTilesBatchSize {
140140
err := p.BulkWriter.BulkWrite(p.TileCache)
141141
if err != nil {
142-
return fmt.Errorf("error writing tiles: %w\n", err)
142+
return fmt.Errorf("error writing tiles: %w", err)
143143
}
144144
p.TileCachePosition = 0
145145
for i, buf := range p.TileBufferCache {
@@ -152,7 +152,7 @@ func (p *WorkerParams) FetchTile(coord tileutils.TileCoords) error {
152152
} else {
153153
err := p.Writer.Write(coord.Z, coord.X, coord.Y, mvtTile)
154154
if err != nil {
155-
return fmt.Errorf("error writing tile (%d, %d, %d): %w\n", coord.Z, coord.X, coord.Y, err)
155+
return fmt.Errorf("error writing tile (%d, %d, %d): %w", coord.Z, coord.X, coord.Y, err)
156156
}
157157
}
158158
return nil

pkg/tileutils/tileutils_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ func TestTilesInBbox(t *testing.T) {
3535
t.Parallel()
3636
tiles := tilesInBbox(test.bbox, test.zoom)
3737
assert.Equal(t, test.numTiles, len(tiles))
38-
if test.numTiles != len(tiles) {
39-
// fmt.Println(tiles)
40-
}
4138
})
4239
}
4340

0 commit comments

Comments
 (0)