From faf9bb495d30f15d55a0707c1c42bb4af756c52b Mon Sep 17 00:00:00 2001 From: storezhang Date: Wed, 7 Dec 2022 17:34:52 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E9=A1=B9=E7=9B=AE):=20=E4=BB=8Eid?= =?UTF-8?q?=E6=94=B9=E4=B8=BApid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- autoincrement.go | 2 +- config.go | 2 +- generator.go | 3 ++- pangu.go | 2 +- pangu_config.go | 2 +- snowflake.go | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/autoincrement.go b/autoincrement.go index 8d41a6d..161c5ea 100644 --- a/autoincrement.go +++ b/autoincrement.go @@ -1,4 +1,4 @@ -package id +package pid type autoincrement struct { // 起始值 diff --git a/config.go b/config.go index 410008d..505ed89 100644 --- a/config.go +++ b/config.go @@ -1,4 +1,4 @@ -package id +package pid type config struct { // 自增算法配置 diff --git a/generator.go b/generator.go index d45f4fc..beaf649 100644 --- a/generator.go +++ b/generator.go @@ -1,4 +1,4 @@ -package id +package pid import ( "github.com/goexl/id" @@ -6,6 +6,7 @@ import ( "github.com/pangum/pangu" ) +// Generator 点位,以直接引入带替间接引入 type Generator struct { id.Generator } diff --git a/pangu.go b/pangu.go index b15630c..a6c0bc0 100644 --- a/pangu.go +++ b/pangu.go @@ -1,4 +1,4 @@ -package id +package pid import ( "github.com/pangum/pangu" diff --git a/pangu_config.go b/pangu_config.go index 3a8908d..90b0e6c 100644 --- a/pangu_config.go +++ b/pangu_config.go @@ -1,4 +1,4 @@ -package id +package pid type panguConfig struct { Id *config diff --git a/snowflake.go b/snowflake.go index 1c5a9fc..7025f5c 100644 --- a/snowflake.go +++ b/snowflake.go @@ -1,4 +1,4 @@ -package id +package pid type snowflake struct { // 节点