Browse Source

recodeGo

tags/v1.0.0
zhouzj 3 years ago
parent
commit
dd8e0a1a43
12 changed files with 9 additions and 8 deletions
  1. +1
    -1
      Go/README.md
  2. +0
    -0
      Go/source/contract/IIdGenerator.go
  3. +0
    -0
      Go/source/contract/ISnowWorker.go
  4. +0
    -0
      Go/source/contract/IdGeneratorException.go
  5. +0
    -0
      Go/source/contract/IdGeneratorOptions.go
  6. +0
    -0
      Go/source/contract/OverCostActionArg.go
  7. +1
    -1
      Go/source/core/snowWorkerM1.go
  8. +1
    -1
      Go/source/core/snowWorkerM2.go
  9. +1
    -0
      Go/source/go.mod
  10. +2
    -2
      Go/source/idgen/DefaultIdGenerator.go
  11. +1
    -1
      Go/source/idgen/YitIdHelper.go
  12. +2
    -2
      Go/source/test/main.go

+ 1
- 1
Go/README.md View File

@@ -4,7 +4,7 @@

1.go 1.16

2. 默认采用GOROOT方式编译,你可修改为Go-Modules
2. 启用Go-Modules


## Go代码示例


Go/source/yitidgen/contract/IIdGenerator.go → Go/source/contract/IIdGenerator.go View File


Go/source/yitidgen/contract/ISnowWorker.go → Go/source/contract/ISnowWorker.go View File


Go/source/yitidgen/contract/IdGeneratorException.go → Go/source/contract/IdGeneratorException.go View File


Go/source/yitidgen/contract/IdGeneratorOptions.go → Go/source/contract/IdGeneratorOptions.go View File


Go/source/yitidgen/contract/OverCostActionArg.go → Go/source/contract/OverCostActionArg.go View File


Go/source/yitidgen/core/snowWorkerM1.go → Go/source/core/snowWorkerM1.go View File

@@ -7,10 +7,10 @@
package core

import (
"../contract"
"math"
"sync"
"time"
"yitidgen/contract"
)

type SnowWorkerM1 struct {

Go/source/yitidgen/core/snowWorkerM2.go → Go/source/core/snowWorkerM2.go View File

@@ -7,10 +7,10 @@
package core

import (
"../contract"
"fmt"
"strconv"
"sync/atomic"
"yitidgen/contract"
)

type SnowWorkerM2 struct {

+ 1
- 0
Go/source/go.mod View File

@@ -0,0 +1 @@
module "yitidgen"

Go/source/yitidgen/idgen/DefaultIdGenerator.go → Go/source/idgen/DefaultIdGenerator.go View File

@@ -7,10 +7,10 @@
package idgen

import (
"../contract"
"../core"
"math"
"time"
"yitidgen/contract"
"yitidgen/core"
)

type DefaultIdGenerator struct {

Go/source/yitidgen/idgen/YitIdHelper.go → Go/source/idgen/YitIdHelper.go View File

@@ -7,8 +7,8 @@
package idgen

import (
"../contract"
"sync"
"yitidgen/contract"
)

var ins *YitIdHelper

+ 2
- 2
Go/source/test/main.go View File

@@ -1,10 +1,10 @@
package main

import (
"../yitidgen/contract"
"../yitidgen/idgen"
"fmt"
"time"
"yitidgen/contract"
"yitidgen/idgen"
)

func main() {


Loading…
Cancel
Save