mirror of
https://gitee.com/winc-link/hummingbird.git
synced 2025-04-21 08:52:42 +00:00
23 lines
330 B
Go
23 lines
330 B
Go
package leveldb
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
const (
|
|
DeviceIdDpId = "DeviceIdDpId"
|
|
Tab = ":"
|
|
)
|
|
|
|
func genDeviceIdDpId(deviceId, dpId string) string {
|
|
return getJointIds(DeviceIdDpId, deviceId, dpId)
|
|
}
|
|
|
|
func getJointIds(ids ...string) (ret string) {
|
|
if len(ids) == 0 {
|
|
return ""
|
|
}
|
|
ret = strings.Join(ids, Tab)
|
|
return
|
|
}
|