Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit acfd904

Browse files
committed
Removed KeysOfMapOfString* method
1 parent 5fd49b6 commit acfd904

File tree

3 files changed

+4
-21
lines changed

3 files changed

+4
-21
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 & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,6 @@ import (
5252
"golang.org/x/text/unicode/norm"
5353
)
5454

55-
func KeysOfMapOfStringInterface(input map[string]interface{}) []string {
56-
var keys []string
57-
for key, _ := range input {
58-
keys = append(keys, key)
59-
}
60-
return keys
61-
}
62-
63-
func KeysOfMapOfString(input map[string]string) []string {
64-
var keys []string
65-
for key, _ := range input {
66-
keys = append(keys, key)
67-
}
68-
return keys
69-
}
70-
7155
func PrettyOSName() string {
7256
switch osName := runtime.GOOS; osName {
7357
case "darwin":

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /