gitee.com/zhongguo168a/gocodes@v0.0.0-20230609140523-e1828349603f/myx/identx/mongoid/ident_test.go (about)

     1  package mongoid
     2  
     3  import (
     4  	"fmt"
     5  	"gitee.com/zhongguo168a/gocodes/myx/scale"
     6  	"strings"
     7  	"testing"
     8  	"time"
     9  )
    10  
    11  func TestGenMongo(t *testing.T) {
    12  	fmt.Println(strings.ToUpper(GenMongoID()))
    13  }
    14  
    15  func TestGenOther(t *testing.T) {
    16  	num := int(time.Now().Unix())
    17  	fmt.Println(scale.DecimalTo(num, 62))
    18  }