File tree 2 files changed +4
-6
lines changed
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ type DeviceInfo struct {
35
35
36
36
func getDeviceInfo (device * iotclient.ArduinoDevicev2 ) (* DeviceInfo , error ) {
37
37
// Retrieve device tags
38
- tags , err := tag .Tags (device .Tags ). Info ( )
38
+ tags , err := tag .TagsInfo (device .Tags )
39
39
if err != nil {
40
40
return nil , err
41
41
}
Original file line number Diff line number Diff line change @@ -2,13 +2,11 @@ package tag
2
2
3
3
import "fmt"
4
4
5
- type Tags map [string ]interface {}
6
-
7
- // Info transforms tags into user-readable strings
5
+ // TagsInfo transforms tags into user-readable strings
8
6
// An error is returned if a tag value is not a string
9
- func ( t Tags ) Info ( ) ([]string , error ) {
7
+ func TagsInfo ( tags map [ string ] interface {} ) ([]string , error ) {
10
8
var str []string
11
- for key , value := range t {
9
+ for key , value := range tags {
12
10
if valStr , ok := value .(string ); ok {
13
11
str = append (str , key + ": " + valStr )
14
12
} else {
You can’t perform that action at this time.
0 commit comments