mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-09-01 22:57:25 -04:00
Use correct string gen mode for generating device ID suffix
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ import (
|
|||||||
func DeviceIDGen(oldDeviceID string) (string, string) {
|
func DeviceIDGen(oldDeviceID string) (string, string) {
|
||||||
// generate new device ID
|
// generate new device ID
|
||||||
deviceIDPrefix, _ := os.Hostname()
|
deviceIDPrefix, _ := os.Hostname()
|
||||||
deviceIDSuffix := core.StringGen(rand.Intn(32)+48, 0.2, 0) + "-" + strconv.FormatInt(time.Now().Unix(), 10)
|
deviceIDSuffix := core.StringGen(rand.Intn(32)+48, 0.2, 1) + "-" + strconv.FormatInt(time.Now().Unix(), 10)
|
||||||
newDeviceID := deviceIDPrefix + "-" + deviceIDSuffix
|
newDeviceID := deviceIDPrefix + "-" + deviceIDSuffix
|
||||||
|
|
||||||
// create new device ID file (locally)
|
// create new device ID file (locally)
|
||||||
|
|||||||
Reference in New Issue
Block a user