Skip to content

Commit 6e52744

Browse files
committed
remove mage, update go and deps
1 parent 5d200d7 commit 6e52744

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+400
-1414
lines changed

.github/workflows/ci.yaml

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: ci
23

34
on:
@@ -15,9 +16,9 @@ on:
1516
env:
1617
VAULT_ADDR: https://vault.eng.aserto.com/
1718
PRE_RELEASE: ${{ github.ref == 'refs/heads/main' && 'main' || '' }}
18-
GO_VERSION: "1.22"
19-
GO_RELEASER_VERSION: "v1.24.0"
20-
GO_LANGCI_LINT_VERSION: "v1.56.2"
19+
GO_VERSION: "1.23"
20+
GO_RELEASER_VERSION: "v2.3.2"
21+
GO_LANGCI_LINT_VERSION: "v1.61.0"
2122
GO_TESTSUM_VERSION: "1.11.0"
2223

2324
jobs:
@@ -31,6 +32,7 @@ jobs:
3132
- "./cli"
3233
- "./plugins/auth0"
3334
- "./plugins/azuread"
35+
- "./plugins/azureadb2c"
3436
- "./plugins/cognito"
3537
- "./plugins/fusionauth"
3638
- "./plugins/google"
@@ -57,7 +59,7 @@ jobs:
5759
go-version: ${{ env.GO_VERSION }}
5860
-
5961
name: Lint package ${{ matrix.package }}
60-
uses: golangci/golangci-lint-action@v4
62+
uses: golangci/golangci-lint-action@v6
6163
with:
6264
version: ${{ env.GO_LANGCI_LINT_VERSION }}
6365
install-mode: binary

.golangci.yaml

+10-32
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ linters-settings:
1515
funlen:
1616
lines: 100
1717
statements: 80
18-
gci:
19-
local-prefixes: github.com/golangci/golangci-lint
2018
goconst:
2119
min-len: 2
2220
min-occurrences: 2
@@ -40,16 +38,13 @@ linters-settings:
4038
golint:
4139
min-confidence: 0
4240
gomnd:
43-
settings:
44-
mnd:
45-
# don't include the "operation" and "assign"
46-
checks:
47-
- argument
48-
- case
49-
- condition
50-
- return
41+
checks:
42+
- argument
43+
- case
44+
- condition
45+
- return
5146
govet:
52-
check-shadowing: true
47+
shadow: true
5348
settings:
5449
printf:
5550
funcs:
@@ -75,15 +70,15 @@ linters:
7570
- bodyclose
7671
- dogsled
7772
- errcheck
78-
- exportloopref
73+
- copyloopvar
7974
- exhaustive
8075
- funlen
8176
- gochecknoinits
8277
- goconst
8378
- gocritic
8479
- gocyclo
8580
- godot
86-
- goerr113
81+
- err113
8782
- gofmt
8883
- goimports
8984
- goprintffuncname
@@ -94,7 +89,7 @@ linters:
9489
- misspell
9590
- nakedret
9691
- noctx
97-
# - rowserrcheck https://github.com/golangci/golangci-lint/issues/2649.
92+
- rowserrcheck
9893
- staticcheck
9994
- stylecheck
10095
- testpackage
@@ -138,23 +133,6 @@ issues:
138133
- text: "unnamedResult:"
139134
linters:
140135
- gocritic
141-
- path: \.resolvers\.go
142-
text: "typeDefFirst:"
143-
linters:
144-
- gocritic
145-
- path: \.resolvers\.go
146-
text: "paramTypeCombine:"
147-
linters:
148-
- gocritic
149-
- path: \.resolvers\.go
150-
text: "hugeParam:"
151-
linters:
152-
- gocritic
153136
- text: "G404"
154137
linters:
155-
- gosec
156-
157-
run:
158-
timeout: 5m
159-
skip-dirs:
160-
- pkg/testharness/testdata
138+
- gosec

.goreleaser.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
---
2+
version: 2
13
project_name: ds-load
24

35
env:
@@ -259,7 +261,7 @@ checksum:
259261

260262
snapshot:
261263
# https://goreleaser.com/customization/snapshots/
262-
name_template: "{{ incpatch .Version }}-{{ .ShortCommit }}{{ if .IsGitDirty }}-dirty{{ end }}"
264+
version_template: "{{ incpatch .Version }}-{{ .ShortCommit }}{{ if .IsGitDirty }}-dirty{{ end }}"
263265

264266
source:
265267
# https://goreleaser.com/customization/source/
@@ -318,6 +320,7 @@ brews:
318320
bin.install "ds-load"
319321
bin.install "ds-load-auth0"
320322
bin.install "ds-load-azuread"
323+
bin.install "ds-load-azureadb2c"
321324
bin.install "ds-load-cognito"
322325
bin.install "ds-load-fusionauth"
323326
bin.install "ds-load-google"

Depfile

-30
This file was deleted.

buf.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ deps:
88
commit: a6c49f84cc0f4e038680d390392e2ab0
99
digest: b5:e968392e88ff7915adcbd1635d670b45bff8836ec2415d81fc559ca5470a695dbdc30030bad8bc5764647c731079e9e7bba0023ea25c4e4a1672a7d2561d4a19
1010
- name: buf.build/googleapis/googleapis
11-
commit: 8bc2c51e08c447cd8886cdea48a73e14
12-
digest: b5:b7e0ac9d192bd0eae88160101269550281448c51f25121cd0d51957661a350aab07001bc145fe9029a8da10b99ff000ae5b284ecaca9c75f2a99604a04d9b4ab
11+
commit: c0913f24652a4cfc95f77d97443a5005
12+
digest: b5:4edb1480036c60f7867d75417d7faa87c851c96a4988a9746058a24e8e9bb4978daed0af35d57f6043de5a60355978dceaaa93dc992be99193260ac8823cbb8f
1313
- name: buf.build/grpc-ecosystem/grpc-gateway
1414
commit: a48fcebcf8f140dd9d09359b9bb185a4
1515
digest: b5:330af8a71b579ab96c4f3ee26929d1a68a5a9e986c7cfe0a898591fc514216bb6e723dc04c74d90fdee3f3f14f9100a54b4f079eb273e6e7213f0d5baca36ff8

cli/go.mod

+5-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
module github.com/aserto-dev/ds-load/cli
22

3-
go 1.21
3+
go 1.23.2
44

55
replace github.com/aserto-dev/ds-load/sdk => ../sdk
66

77
require (
88
github.com/alecthomas/kong v0.9.0
9-
github.com/aserto-dev/clui v0.8.3
109
github.com/aserto-dev/ds-load/sdk v0.0.0-00010101000000-000000000000
1110
github.com/aserto-dev/go-aserto v0.31.4
1211
github.com/aserto-dev/go-directory v0.31.5
@@ -17,7 +16,7 @@ require (
1716
github.com/rs/zerolog v1.33.0
1817
github.com/stretchr/testify v1.9.0
1918
golang.org/x/exp v0.0.0-20240707233637-46b078467d37
20-
golang.org/x/sync v0.7.0
19+
golang.org/x/sync v0.8.0
2120
google.golang.org/grpc v1.65.0
2221
)
2322

@@ -30,28 +29,22 @@ require (
3029
github.com/davecgh/go-spew v1.1.1 // indirect
3130
github.com/envoyproxy/go-control-plane v0.12.0 // indirect
3231
github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect
33-
github.com/fatih/color v1.17.0 // indirect
3432
github.com/go-http-utils/headers v0.0.0-20181008091004-fed159eddc2a // indirect
3533
github.com/golang/protobuf v1.5.4 // indirect
3634
github.com/google/cel-go v0.20.1 // indirect
3735
github.com/google/uuid v1.6.0 // indirect
3836
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
3937
github.com/jhump/protoreflect v1.16.0 // indirect
40-
github.com/kyokomi/emoji v2.2.4+incompatible // indirect
4138
github.com/magefile/mage v1.15.0 // indirect
4239
github.com/mattn/go-colorable v0.1.13 // indirect
4340
github.com/mattn/go-isatty v0.0.20 // indirect
44-
github.com/mattn/go-runewidth v0.0.15 // indirect
45-
github.com/olekukonko/tablewriter v0.0.5 // indirect
4641
github.com/pmezard/go-difflib v1.0.0 // indirect
47-
github.com/rivo/uniseg v0.4.7 // indirect
4842
github.com/samber/lo v1.44.0 // indirect
4943
github.com/sirupsen/logrus v1.9.3 // indirect
5044
github.com/stoewer/go-strcase v1.3.0 // indirect
51-
golang.org/x/net v0.27.0 // indirect
52-
golang.org/x/sys v0.22.0 // indirect
53-
golang.org/x/term v0.22.0 // indirect
54-
golang.org/x/text v0.16.0 // indirect
45+
golang.org/x/net v0.29.0 // indirect
46+
golang.org/x/sys v0.25.0 // indirect
47+
golang.org/x/text v0.18.0 // indirect
5548
google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect
5649
google.golang.org/genproto/googleapis/rpc v0.0.0-20240708141625-4ad9e859172b // indirect
5750
google.golang.org/protobuf v1.34.2 // indirect

cli/go.sum

+10-21
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc
88
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
99
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
1010
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
11-
github.com/aserto-dev/clui v0.8.3 h1:foEJuVpMFVP4La3SxUcinxRLOZx/TyS2BRuahbywYFg=
12-
github.com/aserto-dev/clui v0.8.3/go.mod h1:KsL/g2x5LAbkEE4ofW/ZoA4FDOIdAyLes/5ullvzUt8=
1311
github.com/aserto-dev/go-aserto v0.31.4 h1:i4EYTNwyARhEZrN00CU7OnXJCE5xwo6w67ncwJcxmBM=
1412
github.com/aserto-dev/go-aserto v0.31.4/go.mod h1:6mW3wUC62a8TbqYH64lq350MBj+W3WwtlxXNZRybbOY=
1513
github.com/aserto-dev/go-directory v0.31.5 h1:DPGE8SGW2Z3EFS7VB6v0ds81meKXtHGpI0YYrZ7Ea80=
@@ -32,8 +30,6 @@ github.com/envoyproxy/go-control-plane v0.12.0 h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjl
3230
github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0=
3331
github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A=
3432
github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew=
35-
github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4=
36-
github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI=
3733
github.com/fullstorydev/grpcurl v1.9.1 h1:YxX1aCcCc4SDBQfj9uoWcTLe8t4NWrZe1y+mk83BQgo=
3834
github.com/fullstorydev/grpcurl v1.9.1/go.mod h1:i8gKLIC6s93WdU3LSmkE5vtsCxyRmihUj5FK1cNW5EM=
3935
github.com/go-http-utils/headers v0.0.0-20181008091004-fed159eddc2a h1:v6zMvHuY9yue4+QkG/HQ/W67wvtQmWJ4SDo9aK/GIno=
@@ -57,8 +53,6 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
5753
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
5854
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
5955
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
60-
github.com/kyokomi/emoji v2.2.4+incompatible h1:np0woGKwx9LiHAQmwZx79Oc0rHpNw3o+3evou4BEPv4=
61-
github.com/kyokomi/emoji v2.2.4+incompatible/go.mod h1:mZ6aGCD7yk8j6QY6KICwnZ2pxoszVseX1DNoGtU2tBA=
6256
github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg=
6357
github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
6458
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
@@ -67,18 +61,10 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/
6761
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
6862
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
6963
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
70-
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
71-
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
72-
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
73-
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
74-
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
7564
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
7665
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
7766
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
7867
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
79-
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
80-
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
81-
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
8268
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
8369
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
8470
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
@@ -101,19 +87,22 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT
10187
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
10288
golang.org/x/exp v0.0.0-20240707233637-46b078467d37 h1:uLDX+AfeFCct3a2C7uIWBKMJIR3CJMhcgfrUAqjRK6w=
10389
golang.org/x/exp v0.0.0-20240707233637-46b078467d37/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY=
104-
golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
105-
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
106-
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
90+
golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
91+
golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
92+
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
93+
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
10794
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
10895
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
10996
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
11097
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
111-
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
112-
golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk=
113-
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
114-
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
98+
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
99+
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
100+
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
101+
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
115102
google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0=
103+
google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw=
116104
google.golang.org/genproto/googleapis/rpc v0.0.0-20240708141625-4ad9e859172b h1:04+jVzTs2XBnOZcPsLnmrTGqltqJbZQ1Ey26hjYdQQ0=
105+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240708141625-4ad9e859172b/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=
117106
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
118107
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
119108
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=

cli/pkg/app/exec.go

+5-12
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,13 @@ func (e *ExecCmd) Run(c *cc.CommonCtx) error {
6969
}
7070

7171
if !e.Print {
72-
if e.V2 {
73-
dirClient, err := clients.NewDirectoryV2ImportClient(c.Context, &e.Config)
74-
if err != nil {
75-
return errors.Wrap(err, "Could not connect to the directory")
76-
}
77-
e.publisher = publish.NewDirectoryV2Publisher(c, dirClient)
78-
} else {
79-
dirClient, err := clients.NewDirectoryV3ImportClient(c.Context, &e.Config)
80-
if err != nil {
81-
return errors.Wrap(err, "Could not connect to the directory")
82-
}
83-
e.publisher = publish.NewDirectoryPublisher(c, dirClient)
72+
dirClient, err := clients.NewDirectoryV3ImportClient(c.Context, &e.Config)
73+
if err != nil {
74+
return errors.Wrap(err, "Could not connect to the directory")
8475
}
76+
e.publisher = publish.NewDirectoryPublisher(c, dirClient)
8577
}
78+
8679
return e.LaunchPlugin(c)
8780
}
8881

cli/pkg/app/publish.go

+4-13
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,16 @@ import (
1313

1414
type PublishCmd struct {
1515
clients.Config
16-
V2 bool `name:"v2" help:"use directory v2 api"`
1716
}
1817

1918
func (l *PublishCmd) Run(commonCtx *cc.CommonCtx) error {
2019
var publisher publish.Publisher
2120

22-
if l.V2 {
23-
dirClient, err := clients.NewDirectoryV2ImportClient(commonCtx.Context, &l.Config)
24-
if err != nil {
25-
return errors.Wrap(err, "Could not connect to the directory")
26-
}
27-
publisher = publish.NewDirectoryV2Publisher(commonCtx, dirClient)
28-
} else {
29-
dirClient, err := clients.NewDirectoryV3ImportClient(commonCtx.Context, &l.Config)
30-
if err != nil {
31-
return errors.Wrap(err, "Could not connect to the directory")
32-
}
33-
publisher = publish.NewDirectoryPublisher(commonCtx, dirClient)
21+
dirClient, err := clients.NewDirectoryV3ImportClient(commonCtx.Context, &l.Config)
22+
if err != nil {
23+
return errors.Wrap(err, "Could not connect to the directory")
3424
}
25+
publisher = publish.NewDirectoryPublisher(commonCtx, dirClient)
3526

3627
return l.processMessagesFromStdIn(commonCtx, publisher)
3728
}

0 commit comments

Comments
 (0)