comparison pkg/imports/misc.go @ 1785:614c6c766691

Waterway area import: Implemented.
author Sascha L. Teichmann <teichmann@intevation.de>
date Sat, 12 Jan 2019 19:53:31 +0100
parents
children 00b0a7b2225a
comparison
equal deleted inserted replaced
1784:724758455a4e 1785:614c6c766691
1 // SPDX-License-Identifier: AGPL-3.0-or-later
2 // License-Filename: LICENSES/AGPL-3.0.txt
3 //
4 // Copyright (C) 2018 by via donau
5 // – Österreichische Wasserstraßen-Gesellschaft mbH
6 // Software engineering by Intevation GmbH
7 //
8 // Author(s):
9 // * Sascha L. Teichmann <sascha.teichmann@intevation.de>
10
11 package imports
12
13 import (
14 "fmt"
15 "strings"
16 )
17
18 type stringCounter map[string]int
19
20 func (sc stringCounter) String() string {
21 var b strings.Builder
22 for t, c := range sc {
23 if b.Len() > 0 {
24 b.WriteString(", ")
25 }
26 b.WriteString(fmt.Sprintf("%s: %d", t, c))
27 }
28 return b.String()
29 }