mirror of
https://github.com/godruoyi/go-snowflake.git
synced 2025-12-23 05:25:15 +00:00
🚛 first commit
This commit is contained in:
14
privateip_test.go
Normal file
14
privateip_test.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package snowflake_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/godruoyi/go-snowflake"
|
||||
)
|
||||
|
||||
func TestPrivateIPToMachineID(t *testing.T) {
|
||||
mid := snowflake.PrivateIPToMachineID()
|
||||
if mid <= 0 {
|
||||
t.Error("MachineID should be > 0")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user