Skip to content

Commit 5f6962d

Browse files
committed
refactor and cleanup
1 parent b3b53cd commit 5f6962d

12 files changed

+214
-629
lines changed

admin.go

Lines changed: 3 additions & 515 deletions
Large diffs are not rendered by default.

admin_groups.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"github.com/Shopify/sarama"
77
)
88

9+
// RemoveGroup deletes a Group from Kafka.
910
func (kc *KClient) RemoveGroup(name string) (errMsg error) {
1011
var brokerErr error
1112
var found bool

admin_offsets.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const (
1919
OffsetOldest int64 = -2
2020
)
2121

22+
// OffsetAdmin is used for managing offsets.
2223
type OffsetAdmin interface {
2324
Group(group string) OffsetAdmin
2425
Topic(topic string) OffsetAdmin
@@ -37,6 +38,7 @@ type offsetAdmin struct {
3738
pom sarama.PartitionOffsetManager
3839
}
3940

41+
// GroupLag details Group Lag.
4042
type GroupLag struct {
4143
Group string
4244
Topic string
@@ -51,28 +53,33 @@ type grpPartLag struct {
5153
lag int64
5254
}
5355

56+
// GroupOffsetMap details offsets for each partition in a map.
5457
type GroupOffsetMap struct {
5558
Group string
5659
Topic string
5760
PartitionOffset map[int32]int64
5861
}
5962

63+
// OffSetAdmin returns the underlying OffsetAdmin used to chain commands for offset management.
6064
func (kc *KClient) OffSetAdmin() OffsetAdmin {
6165
return &offsetAdmin{
6266
client: kc.cl,
6367
}
6468
}
6569

70+
// Group to target.
6671
func (oa *offsetAdmin) Group(group string) OffsetAdmin {
6772
oa.grp = group
6873
return oa
6974
}
7075

76+
// Topic to Target.
7177
func (oa *offsetAdmin) Topic(topic string) OffsetAdmin {
7278
oa.top = topic
7379
return oa
7480
}
7581

82+
// Valid returns true if offset admin has both a target group and topic entered, false otherwise.
7683
func (oa *offsetAdmin) Valid() bool {
7784
if oa.grp == "" || oa.top == "" {
7885
return false
@@ -108,6 +115,7 @@ func (oa *offsetAdmin) GetOffsetLag(partition int32) (groupOffset int64, partiti
108115
return
109116
}
110117

118+
// GetTotalLag returns the total lag for a Group.
111119
func (oa *offsetAdmin) GetTotalLag(partitions []int32) (groupLag GroupLag, err error) {
112120
if !oa.Valid() {
113121
err = fmt.Errorf("No specified Group and/or Topic")
@@ -202,6 +210,7 @@ func (oa *offsetAdmin) GetGroupOffsets(partitions []int32) (groupOffsetMap Group
202210
return
203211
}
204212

213+
// ResetOffset resets an partition to the target Offset.
205214
func (oa *offsetAdmin) ResetOffset(partition int32, targetOffset int64) (err error) {
206215
if !oa.Valid() {
207216
err = fmt.Errorf("No specified Group and/or Topic")

admin_topics.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"github.com/Shopify/sarama"
55
)
66

7+
// AddTopic creates a new Topic.
78
func (kc *KClient) AddTopic(name string, partitions int32, replication int16) error {
89
details := sarama.TopicDetail{
910
NumPartitions: partitions,
@@ -12,6 +13,7 @@ func (kc *KClient) AddTopic(name string, partitions int32, replication int16) er
1213
return kc.Admin().CreateTopic(name, &details, false)
1314
}
1415

16+
// RemoveTopic deletes a Topic.
1517
func (kc *KClient) RemoveTopic(name string) error {
1618
return kc.Admin().DeleteTopic(name)
1719
}
@@ -21,6 +23,7 @@ func (kc *KClient) AddPartitions(name string, count int32, validateOnly bool) er
2123
return kc.Admin().CreatePartitions(name, count, nil, validateOnly)
2224
}
2325

26+
// GetTopicConfig returns the configuration for the given topic.
2427
func (kc *KClient) GetTopicConfig(topic string, configName ...string) ([]sarama.ConfigEntry, error) {
2528
if len(configName) > 0 {
2629
if configName[0] == "" {
@@ -35,6 +38,7 @@ func (kc *KClient) GetTopicConfig(topic string, configName ...string) ([]sarama.
3538
return kc.Admin().DescribeConfig(resource)
3639
}
3740

41+
// SetTopicConfig sets a Topic Configuration parameter.
3842
func (kc *KClient) SetTopicConfig(topic, configName, value string) error {
3943
entry := make(map[string]*string)
4044
existing, err := kc.GetTopicConfig(topic)
@@ -49,17 +53,20 @@ func (kc *KClient) SetTopicConfig(topic, configName, value string) error {
4953
return kc.Admin().AlterConfig(sarama.TopicResource, topic, entry, false)
5054
}
5155

56+
// ResetTopicConfig resets a Topics configuration.
5257
func (kc *KClient) ResetTopicConfig(topic string) error {
5358
entry := make(map[string]*string)
5459
return kc.Admin().AlterConfig(sarama.TopicResource, topic, entry, false)
5560
}
5661

62+
// DeleteToOffset deletes a partition to the desired offset.
5763
func (kc *KClient) DeleteToOffset(topic string, partition int32, offset int64) error {
5864
partitionOffset := make(map[int32]int64, 1)
5965
partitionOffset[partition] = offset
6066
return kc.Admin().DeleteRecords(topic, partitionOffset)
6167
}
6268

69+
// RefreshMetadata refreshes metadata for the given topic.
6370
func (kc *KClient) RefreshMetadata(topics ...string) error {
6471
return kc.cl.RefreshMetadata(topics...)
6572
}

client.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,21 @@ var (
1818
logging bool
1919
)
2020

21+
// KClient is a Kafka Client ...
2122
type KClient struct {
2223
apiVers map[int16]int16
2324
brokers []*sarama.Broker
2425

2526
cl sarama.Client
26-
ca clusterAdmin
27+
ca sarama.ClusterAdmin
2728
config *sarama.Config
2829
logger *log.Logger
2930
stopChan chan none
3031
}
3132

3233
type none struct{}
3334

35+
// NewClient returns a new KClient.
3436
func NewClient(brokerList ...string) (*KClient, error) {
3537
conf := GetConf("")
3638
client, err := getClient(conf, brokerList...)
@@ -47,6 +49,7 @@ func NewClient(brokerList ...string) (*KClient, error) {
4749
return &kc, nil
4850
}
4951

52+
// NewCustomClient returns a new KClient using an sarama Config.
5053
func NewCustomClient(conf *sarama.Config, brokerList ...string) (*KClient, error) {
5154
var client sarama.Client
5255
switch {
@@ -76,10 +79,12 @@ func NewCustomClient(conf *sarama.Config, brokerList ...string) (*KClient, error
7679
return &kc, nil
7780
}
7881

82+
// Controller returns the Controller Broker.
7983
func (kc *KClient) Controller() (*sarama.Broker, error) {
8084
return kc.cl.Controller()
8185
}
8286

87+
// Connect connects to the Brokers.
8388
func (kc *KClient) Connect() error {
8489
for _, broker := range kc.brokers {
8590
if ok, _ := broker.Connected(); !ok {
@@ -91,6 +96,7 @@ func (kc *KClient) Connect() error {
9196
return nil
9297
}
9398

99+
// IsConnected returns true if the client is connected to at least on Broker.
94100
func (kc *KClient) IsConnected() bool {
95101
for _, broker := range kc.brokers {
96102
if ok, _ := broker.Connected(); ok {
@@ -100,6 +106,7 @@ func (kc *KClient) IsConnected() bool {
100106
return false
101107
}
102108

109+
// Close closes the KClients connections to the Brokers.
103110
func (kc *KClient) Close() error {
104111
errString := fmt.Sprintf("ERROR:\n")
105112
var errFound bool

client_test.go

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ import (
1010
)
1111

1212
func TestNewClient(t *testing.T) {
13-
seedBroker := sarama.NewMockBroker(t, 1)
14-
metaResponse := new(sarama.MetadataResponse)
15-
seedBroker.Returns(metaResponse)
16-
client, err := NewClient(seedBroker.Addr())
13+
seedBroker, controllerBroker := getTestingBrokers(t)
14+
client, err := NewClient(seedBroker.Addr(), controllerBroker.Addr())
1715
if err != nil {
1816
t.Fatal(err)
1917
}
@@ -25,12 +23,10 @@ func TestNewClient(t *testing.T) {
2523
}
2624

2725
func TestCustomClient(t *testing.T) {
28-
seedBroker := sarama.NewMockBroker(t, 1)
29-
metaResponse := new(sarama.MetadataResponse)
30-
seedBroker.Returns(metaResponse)
26+
seedBroker, controllerBroker := getTestingBrokers(t)
3127
conf := GetConf("testID")
3228
conf.Metadata.Retry.Max = 0
33-
client, err := NewCustomClient(conf, seedBroker.Addr())
29+
client, err := NewCustomClient(conf, seedBroker.Addr(), controllerBroker.Addr())
3430
if err != nil {
3531
t.Fatal(err)
3632
}
@@ -49,10 +45,8 @@ func TestLogging(t *testing.T) {
4945
}
5046

5147
func TestClientLogging(t *testing.T) {
52-
seedBroker := sarama.NewMockBroker(t, 1)
53-
metaResponse := new(sarama.MetadataResponse)
54-
seedBroker.Returns(metaResponse)
55-
client, err := NewClient(seedBroker.Addr())
48+
seedBroker, controllerBroker := getTestingBrokers(t)
49+
client, err := NewClient(seedBroker.Addr(), controllerBroker.Addr())
5650
if err != nil {
5751
t.Fatal(err)
5852
}

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module github.com/jbvmio/kafka
22

3+
go 1.14
4+
35
require (
4-
github.com/Shopify/sarama v1.21.0
5-
github.com/alecthomas/chroma v0.6.3 // indirect
6-
github.com/bsm/sarama-cluster v2.1.15+incompatible
7-
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a
6+
github.com/Shopify/sarama v1.27.0
7+
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0
88
github.com/sirupsen/logrus v1.3.0
9-
github.com/spf13/cast v1.3.0
9+
github.com/spf13/cast v1.3.1
1010
)

go.sum

Lines changed: 75 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,92 @@
1-
github.com/DataDog/zstd v1.3.5 h1:DtpNbljikUepEPD16hD4LvIcmhnhdLTiW/5pHgbmp14=
2-
github.com/DataDog/zstd v1.3.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
3-
github.com/Shopify/sarama v1.20.1 h1:Bb0h3I++r4eX333Y0uZV2vwUXepJbt6ig05TUU1qt9I=
4-
github.com/Shopify/sarama v1.20.1/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
5-
github.com/Shopify/sarama v1.21.0 h1:0GKs+e8mn1RRUzfg9oUXv3v7ZieQLmOZF/bfnmmGhM8=
6-
github.com/Shopify/sarama v1.21.0/go.mod h1:yuqtN/pe8cXRWG5zPaO7hCfNJp5MwmkoJEoLjkm5tCQ=
1+
github.com/Shopify/sarama v1.27.0 h1:tqo2zmyzPf1+gwTTwhI6W+EXDw4PVSczynpHKFtVAmo=
2+
github.com/Shopify/sarama v1.27.0/go.mod h1:aCdj6ymI8uyPEux1JJ9gcaDT6cinjGhNCAhs54taSUo=
3+
github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc=
74
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
8-
github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI=
9-
github.com/alecthomas/chroma v0.6.3 h1:8H1D0yddf0mvgvO4JDBKnzLd9ERmzzAijBxnZXGV/FA=
10-
github.com/alecthomas/chroma v0.6.3/go.mod h1:quT2EpvJNqkuPi6DmBHB+E33FXBgBBPzyH5++Dn1LPc=
11-
github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0=
12-
github.com/alecthomas/kong v0.1.15/go.mod h1:0m2VYms8rH0qbCqVB2gvGHk74bqLIq0HXjCs5bNbNQU=
13-
github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ=
14-
github.com/bsm/sarama-cluster v2.1.15+incompatible h1:RkV6WiNRnqEEbp81druK8zYhmnIgdOjqSVi0+9Cnl2A=
15-
github.com/bsm/sarama-cluster v2.1.15+incompatible/go.mod h1:r7ao+4tTNXvWm+VRpRJchr2kQhqxgmAp2iEX5W96gMM=
16-
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ=
17-
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk=
5+
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
6+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
187
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
198
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
20-
github.com/dlclark/regexp2 v1.1.6 h1:CqB4MjHw0MFCDj+PHHjiESmHX+N7t0tJzKvC6M97BRg=
21-
github.com/dlclark/regexp2 v1.1.6/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
22-
github.com/eapache/go-resiliency v1.1.0 h1:1NtRmCAqadE2FN4ZcN6g90TP3uk8cg9rn9eNK2197aU=
23-
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
9+
github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q=
10+
github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
2411
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw=
2512
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
2613
github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=
2714
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
28-
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w=
29-
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
15+
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
16+
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
17+
github.com/frankban/quicktest v1.10.0 h1:Gfh+GAJZOAoKZsIZeZbdn2JF10kN1XHNvjsvQK8gVkE=
18+
github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y=
19+
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
20+
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
21+
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
22+
github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
23+
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
24+
github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE=
25+
github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
26+
github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8=
27+
github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o=
28+
github.com/klauspost/compress v1.10.10 h1:a/y8CglcM7gLGYmlbP/stPE5sR3hbhFRUjCBfd/0B3I=
29+
github.com/klauspost/compress v1.10.10/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
30+
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
3031
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
31-
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
32-
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
33-
github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I=
34-
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
32+
github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
33+
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
34+
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
35+
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
36+
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
37+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
38+
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
39+
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
40+
github.com/pierrec/lz4 v2.5.2+incompatible h1:WCjObylUIOlKy/+7Abdn34TLIkXiA4UWUMhxq9m9ZXI=
41+
github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
42+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
3543
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
36-
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ=
37-
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
38-
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
44+
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ=
45+
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
3946
github.com/sirupsen/logrus v1.3.0 h1:hI/7Q+DtNZ2kINb6qt/lS+IyXnHQe9e90POfeewL/ME=
4047
github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
41-
github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
42-
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
48+
github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng=
49+
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
50+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
4351
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
52+
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
4453
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
54+
github.com/stretchr/testify v1.6.0 h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgho=
55+
github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
56+
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=
57+
github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
4558
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I=
4659
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
60+
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
61+
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 h1:cg5LA/zNPRzIXIWSCxQW10Rvpy94aQh3LT/ShoCpkHw=
62+
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
63+
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
64+
golang.org/x/net v0.0.0-20200528225125-3c3fba18258b h1:IYiJPiJfzktmDAO1HQiwjMjwjlYKHAL7KzeD544RJPs=
65+
golang.org/x/net v0.0.0-20200528225125-3c3fba18258b/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
4766
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 h1:I6FyU15t786LL7oL/hn43zqTuEGr4PN7F4XJ1p4E3Y8=
4867
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
49-
golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35 h1:YAFjXN64LMvktoUZH9zgY4lGc/msGN7HQfoSuKCgaDU=
50-
golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
68+
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
69+
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
70+
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884=
71+
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
72+
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
73+
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
74+
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
75+
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
76+
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
77+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
78+
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
79+
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
80+
gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw=
81+
gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo=
82+
gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM=
83+
gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q=
84+
gopkg.in/jcmturner/goidentity.v3 v3.0.0 h1:1duIyWiTaYvVx3YX2CYtpJbUFd7/UuPYCfgXtQ3VTbI=
85+
gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4=
86+
gopkg.in/jcmturner/gokrb5.v7 v7.5.0 h1:a9tsXlIDD9SKxotJMK3niV7rPZAJeX2aD/0yg3qlIrg=
87+
gopkg.in/jcmturner/gokrb5.v7 v7.5.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM=
88+
gopkg.in/jcmturner/rpc.v1 v1.1.0 h1:QHIUxTX1ISuAv9dD2wJ9HWQVuWDX/Zc0PfeC2tjc4rU=
89+
gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8=
90+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
91+
gopkg.in/yaml.v3 v3.0.0-20200601152816-913338de1bd2 h1:VEmvx0P+GVTgkNu2EdTN988YCZPcD3lo9AoczZpucwc=
92+
gopkg.in/yaml.v3 v3.0.0-20200601152816-913338de1bd2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 commit comments

Comments
 (0)