Skip to content

gtn1024/snowflake4cj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snowflake4cj

Snowflake algorithm for Cangjie

介绍 / Introduction

snowflake4cj 是一个基于 Cangjie 的雪花算法实现。

snowflake4cj is a snowflake algorithm implementation based on Cangjie.

安装 / Installation

# In the `dependencies` section of `cjpm.toml`
snowflake4cj = { git = "https://github.com/gtn1024/snowflake4cj.git", tag = "1.1.0" }

使用 / Usage

import snowflake4cj.Snowflake

main(): Int64 {
    let snowflake = Snowflake(0, 0)
    for (i in 0..1000) {
        let id = snowflake.nextId()
        println(id)
    }
    return 0
}

QQ 群

欢迎加入 仓颉交流群(非官方):985038695

qqgroup