Skip to content

Commit f2b317a

Browse files
committed
uuid from stdlib
1 parent 4824f3e commit f2b317a

22 files changed

Lines changed: 77 additions & 60 deletions

e2e/calendars_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import (
77
"path/filepath"
88
"testing"
99
"time"
10+
"uuid"
1011

1112
"github.com/git-calendar/core/pkg/core"
1213
"github.com/git-calendar/core/pkg/filesystem"
1314
gogit "github.com/go-git/go-git/v5"
1415
"github.com/go-git/go-git/v5/plumbing/object"
15-
"github.com/google/uuid"
1616
)
1717

1818
const testCalendarName = "test"

e2e/encryption_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import (
77
"path/filepath"
88
"testing"
99
"time"
10+
"uuid"
1011

1112
"github.com/git-calendar/core/pkg/core"
1213
"github.com/git-calendar/core/pkg/filesystem"
13-
"github.com/google/uuid"
1414
aessiv "github.com/jedisct1/go-aes-siv"
1515
)
1616

e2e/events_basic_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import (
88
"reflect"
99
"testing"
1010
"time"
11+
"uuid"
1112

1213
"github.com/git-calendar/core/pkg/core"
1314
"github.com/git-calendar/core/pkg/filesystem"
14-
"github.com/google/uuid"
1515
)
1616

1717
func TestAddEvent_CreatesJsonFile(t *testing.T) {

e2e/events_repeating_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66
"fmt"
77
"testing"
88
"time"
9+
"uuid"
910

1011
"github.com/git-calendar/core/pkg/core"
11-
"github.com/google/uuid"
1212
rrule "github.com/teambition/rrule-go"
1313
)
1414

e2e/ical_import_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ func TestImportICalFilePersistsEvents(t *testing.T) {
3737
if len(events) != 1 {
3838
t.Fatalf("got %d imported events, want 1", len(events))
3939
}
40-
if events[0].ID.Version() != 5 {
41-
t.Errorf("event ID version = %d, want 5", events[0].ID.Version())
40+
if version := events[0].ID[6] >> 4; version != 5 {
41+
t.Errorf("event ID version = %d, want 5", version)
4242
}
4343
id := events[0].ID
4444

@@ -275,8 +275,8 @@ func TestImportICalURLCachesUntilSync(t *testing.T) {
275275
if len(events) != 1 || events[0].Title != "First title" {
276276
t.Fatalf("first URL import = %+v", events)
277277
}
278-
if events[0].ID.Version() != 5 {
279-
t.Errorf("event ID version = %d, want 5", events[0].ID.Version())
278+
if version := events[0].ID[6] >> 4; version != 5 {
279+
t.Errorf("event ID version = %d, want 5", version)
280280
}
281281
id := events[0].ID
282282

e2e/tags_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package e2e
33
import (
44
"testing"
55
"time"
6+
"uuid"
67

78
"github.com/git-calendar/core/pkg/core"
8-
"github.com/google/uuid"
99
)
1010

1111
func TestTag_CreateTag_CreatesTag(t *testing.T) {
@@ -222,7 +222,7 @@ func TestTag_RemoveTag_UntagsAffectedEvents(t *testing.T) {
222222
func TestTag_RemoveTag_InvalidIDReturnsError(t *testing.T) {
223223
c := newTestCore(t)
224224

225-
err := c.RemoveTag(testCalendarName, uuid.Nil)
225+
err := c.RemoveTag(testCalendarName, uuid.Nil())
226226
if err == nil {
227227
t.Fatalf("expected invalid tag id error")
228228
}

e2e/zip_restore_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
"path/filepath"
88
"testing"
99
"time"
10+
"uuid"
1011

1112
"github.com/git-calendar/core/pkg/core"
12-
"github.com/google/uuid"
1313
)
1414

1515
func TestRestoreZipRoundTrip(t *testing.T) {

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ require (
77
github.com/go-git/go-billy/v5 v5.9.1
88
github.com/go-git/go-git/v5 v5.19.2
99
github.com/google/go-cmp v0.7.0
10-
github.com/google/uuid v1.6.0
1110
github.com/jedisct1/go-aes-siv v1.0.0
1211
github.com/rdleal/intervalst v1.5.0
1312
github.com/teambition/rrule-go v1.8.2

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8J
3838
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw=
3939
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
4040
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
41-
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
42-
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
4341
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
4442
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
4543
github.com/jedisct1/go-aes-siv v1.0.0 h1:1LUqYiKEvQhv1Pmwgi5DQMPPFxqT0cWmMPnzCNVYCO8=

pkg/api/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import (
1414
"net/url"
1515
"strings"
1616
"time"
17+
"uuid"
1718

1819
"github.com/git-calendar/core/pkg/core"
19-
"github.com/google/uuid"
2020
"github.com/teambition/rrule-go"
2121
)
2222

0 commit comments

Comments
 (0)