ble-sensors/lib/bluetooth/description.go

14 lines
279 B
Go

package bluetooth
import (
"fmt"
"github.com/go-ble/ble"
"github.com/spf13/viper"
)
// GetDescription returns a description given a Bluetooth address
func GetDescription(address ble.Addr) string {
return viper.GetString(fmt.Sprintf("bluetooth.%s.description", address))
}