Skip to content

Commit

Permalink
v2: update mod to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
flowerinthenight committed Jul 16, 2024
1 parent 9fe5bca commit 50c9ae6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions examples/simple/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"syscall"

"cloud.google.com/go/spanner"
"github.com/flowerinthenight/spindle"
"github.com/flowerinthenight/spindle/v2"
)

func main() {
Expand All @@ -36,7 +36,7 @@ func main() {
lock.Run(quit, done) // start main loop

go func() {
sigch := make(chan os.Signal)
sigch := make(chan os.Signal, 1)
signal.Notify(sigch, syscall.SIGINT, syscall.SIGTERM)
<-sigch
cancel()
Expand Down
6 changes: 3 additions & 3 deletions examples/testlock/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package main
import (
"context"
"fmt"
"io/ioutil"
"io"
"log"
"sync"
"time"

"cloud.google.com/go/spanner"
spindlelock "github.com/flowerinthenight/spindle/lock"
spindlelock "github.com/flowerinthenight/spindle/v2/lock"
)

func main() {
Expand All @@ -36,7 +36,7 @@ func main() {
Table: "curmxdlock",
Name: lockname,
Duration: 2000,
Logger: log.New(ioutil.Discard, "", 0), // don't set if you want to see spindle logs
Logger: log.New(io.Discard, "", 0), // don't set if you want to see spindle logs
})

ctx := context.Background()
Expand Down
7 changes: 2 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
module github.com/flowerinthenight/spindle
module github.com/flowerinthenight/spindle/v2

go 1.21

require (
cloud.google.com/go/spanner v1.64.0
github.com/cespare/xxhash/v2 v2.3.0
github.com/flowerinthenight/spindle v1.2.7
github.com/google/uuid v1.6.0
github.com/googleapis/gax-go/v2 v2.12.5
google.golang.org/api v0.187.0
Expand All @@ -16,8 +17,6 @@ require (
cloud.google.com/go/auth v0.6.1 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect
cloud.google.com/go/compute/metadata v0.4.0 // indirect
cloud.google.com/go/iam v1.1.10 // indirect
cloud.google.com/go/longrunning v0.5.9 // indirect
github.com/GoogleCloudPlatform/grpc-gcp-go/grpcgcp v1.5.0 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b // indirect
Expand All @@ -35,7 +34,6 @@ require (
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/net v0.26.0 // indirect
Expand All @@ -45,7 +43,6 @@ require (
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
google.golang.org/grpc v1.65.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,8 @@ github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU
github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/flowerinthenight/spindle v1.2.7 h1:cSq4StAaiJBKQNt3ASJpK4H03jofU/FwsDhH3Wz3Igs=
github.com/flowerinthenight/spindle v1.2.7/go.mod h1:kIJMeGJ/Sa9JHqohtHjf7CNXp8gB4aoOtUTpcW2a6/A=
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
Expand Down

0 comments on commit 50c9ae6

Please sign in to comment.