Skip to content

Commit fc41149

Browse files
committed
Merge branch 'master' into 'cli-inception'
2 parents b796399 + acfd904 commit fc41149

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

dump_build_properties.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@
3030
package builder
3131

3232
import (
33-
"github.com/arduino/arduino-builder/types"
34-
"github.com/arduino/arduino-builder/utils"
3533
"fmt"
3634
"sort"
35+
36+
"github.com/arduino/arduino-builder/types"
3737
)
3838

3939
type DumpBuildProperties struct{}
4040

4141
func (s *DumpBuildProperties) Run(ctx *types.Context) error {
4242
buildProperties := ctx.BuildProperties
4343

44-
keys := utils.KeysOfMapOfString(buildProperties)
44+
keys := buildProperties.Keys()
4545
sort.Strings(keys)
4646

4747
for _, key := range keys {

platform_keys_rewrite_loader.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import (
3939
"github.com/arduino/arduino-builder/constants"
4040
"github.com/arduino/arduino-builder/i18n"
4141
"github.com/arduino/arduino-builder/types"
42-
"github.com/arduino/arduino-builder/utils"
4342
"github.com/arduino/go-properties-map"
4443
)
4544

@@ -63,7 +62,7 @@ func (s *PlatformKeysRewriteLoader) Run(ctx *types.Context) error {
6362
if err != nil {
6463
return i18n.WrapError(err)
6564
}
66-
keys := utils.KeysOfMapOfString(txt)
65+
keys := txt.Keys()
6766
sort.Strings(keys)
6867

6968
for _, key := range keys {

utils/utils.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,6 @@ import (
5353
"golang.org/x/text/unicode/norm"
5454
)
5555

56-
func KeysOfMapOfString(input map[string]string) []string {
57-
var keys []string
58-
for key, _ := range input {
59-
keys = append(keys, key)
60-
}
61-
return keys
62-
}
63-
6456
func PrettyOSName() string {
6557
switch osName := runtime.GOOS; osName {
6658
case "darwin":

0 commit comments

Comments
 (0)