Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit c1417b3

Browse files
author
Craig Furman
authored
chore(deps): replace internal/slices (#63386)
With an open-source package with more features. Ran: ``` sg bazel configure bazel run //:gazelle-update-repos ``` Between writing that little slices package, and wanting more from it in an upcoming PR, I found out this 3rd party library existed. It seems very good.
1 parent 4641bc5 commit c1417b3

File tree

8 files changed

+16
-51
lines changed

8 files changed

+16
-51
lines changed

deps.bzl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4063,6 +4063,13 @@ def go_dependencies():
40634063
sum = "h1:JLvn7D+wXjH9g4Jsjo+VqmzTUpl/LX7vfr6VOfSWTdM=",
40644064
version = "v0.0.0-20240327125255-dbf53b6cbf06",
40654065
)
4066+
go_repository(
4067+
name = "com_github_life4_genesis",
4068+
build_file_proto_mode = "disable_global",
4069+
importpath = "github.com/life4/genesis",
4070+
sum = "h1:Ww36apMVRnC7gdB7RDI5B66Q1tjmO8g1QEW5nq2c/SU=",
4071+
version = "v1.10.3",
4072+
)
40664073
go_repository(
40674074
name = "com_github_linode_linodego",
40684075
build_file_proto_mode = "disable_global",
@@ -4179,8 +4186,8 @@ def go_dependencies():
41794186
name = "com_github_matryer_is",
41804187
build_file_proto_mode = "disable_global",
41814188
importpath = "github.com/matryer/is",
4182-
sum = "h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A=",
4183-
version = "v1.2.0",
4189+
sum = "h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=",
4190+
version = "v1.4.0",
41844191
)
41854192
go_repository(
41864193
name = "com_github_matryer_moq",

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ require (
282282
github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa
283283
github.com/jackc/pgx/v5 v5.5.5
284284
github.com/jomei/notionapi v1.13.0
285+
github.com/life4/genesis v1.10.3
285286
github.com/maxbrunsfeld/counterfeiter/v6 v6.8.1
286287
github.com/mitchellh/hashstructure/v2 v2.0.2
287288
github.com/mroth/weightedrand/v2 v2.0.1
@@ -409,7 +410,6 @@ require (
409410
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
410411
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
411412
github.com/magiconair/properties v1.8.7 // indirect
412-
github.com/matryer/is v1.2.0 // indirect
413413
github.com/mazznoer/csscolorparser v0.1.3 // indirect
414414
github.com/mfridman/interpolate v0.0.2 // indirect
415415
github.com/mitchellh/go-homedir v1.1.0 // indirect

go.sum

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,8 @@ github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
12021202
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
12031203
github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw=
12041204
github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
1205+
github.com/life4/genesis v1.10.3 h1:Ww36apMVRnC7gdB7RDI5B66Q1tjmO8g1QEW5nq2c/SU=
1206+
github.com/life4/genesis v1.10.3/go.mod h1:jhY+sEN403+0uE54fjVAdVCYY8SCIrKioAatOlVJoGo=
12051207
github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc=
12061208
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
12071209
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
@@ -1219,8 +1221,8 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN
12191221
github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
12201222
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
12211223
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
1222-
github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A=
1223-
github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA=
1224+
github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
1225+
github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
12241226
github.com/matryer/moq v0.2.3/go.mod h1:9RtPYjTnH1bSBIkpvtHkFN7nbWAnO7oRpdJkEIn6UtE=
12251227
github.com/mattermost/xml-roundtrip-validator v0.1.0 h1:RXbVD2UAl7A7nOTR4u7E3ILa4IbtvKBHw64LDsmu9hU=
12261228
github.com/mattermost/xml-roundtrip-validator v0.1.0/go.mod h1:qccnGMcpgwcNaBnxqpJpWWUiPNr5H3O8eDgGV9gT5To=

internal/appliance/reconciler/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ go_test(
102102
deps = [
103103
"//internal/appliance/config",
104104
"//internal/appliance/yaml",
105-
"//internal/slices",
106105
"@com_github_go_logr_stdr//:stdr",
106+
"@com_github_life4_genesis//slices",
107107
"@com_github_stretchr_testify//require",
108108
"@com_github_stretchr_testify//suite",
109109
"@io_bazel_rules_go//go/runfiles:go_default_library",

internal/appliance/reconciler/golden_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import (
66
"regexp"
77
"time"
88

9+
"github.com/life4/genesis/slices"
910
rbacv1 "k8s.io/api/rbac/v1"
1011
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1112
"k8s.io/apimachinery/pkg/runtime/schema"
1213
"sigs.k8s.io/controller-runtime/pkg/client"
1314
k8syaml "sigs.k8s.io/yaml"
1415

1516
applianceyaml "github.com/sourcegraph/sourcegraph/internal/appliance/yaml"
16-
"github.com/sourcegraph/sourcegraph/internal/slices"
1717
)
1818

1919
// Test helpers

internal/slices/BUILD.bazel

Lines changed: 0 additions & 18 deletions
This file was deleted.

internal/slices/sliceutils.go

Lines changed: 0 additions & 9 deletions
This file was deleted.

internal/slices/sliceutils_test.go

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)