mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 04:00:25 +03:00
Migrate golanglint-ci config to V2 (#21081)
This commit is contained in:
@@ -30,7 +30,7 @@ type ARN struct {
|
||||
|
||||
// String - returns string representation.
|
||||
func (arn ARN) String() string {
|
||||
if arn.TargetID.ID == "" && arn.TargetID.Name == "" && arn.region == "" {
|
||||
if arn.ID == "" && arn.Name == "" && arn.region == "" {
|
||||
return ""
|
||||
}
|
||||
|
||||
|
||||
@@ -55,9 +55,11 @@ type AMQPArgs struct {
|
||||
QueueLimit uint64 `json:"queueLimit"`
|
||||
}
|
||||
|
||||
//lint:file-ignore ST1003 We cannot change these exported names.
|
||||
|
||||
// AMQP input constants.
|
||||
//
|
||||
// ST1003 We cannot change these exported names.
|
||||
//
|
||||
//nolint:staticcheck
|
||||
const (
|
||||
AmqpQueueDir = "queue_dir"
|
||||
AmqpQueueLimit = "queue_limit"
|
||||
|
||||
@@ -62,11 +62,11 @@ type XDGSCRAMClient struct {
|
||||
// and authzID via the SASLprep algorithm, as recommended by RFC-5802. If
|
||||
// SASLprep fails, the method returns an error.
|
||||
func (x *XDGSCRAMClient) Begin(userName, password, authzID string) (err error) {
|
||||
x.Client, err = x.HashGeneratorFcn.NewClient(userName, password, authzID)
|
||||
x.Client, err = x.NewClient(userName, password, authzID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
x.ClientConversation = x.Client.NewConversation()
|
||||
x.ClientConversation = x.NewConversation()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -375,7 +375,7 @@ func (target *MySQLTarget) initMySQL() error {
|
||||
|
||||
err = target.db.Ping()
|
||||
if err != nil {
|
||||
if !(xnet.IsConnRefusedErr(err) || xnet.IsConnResetErr(err)) {
|
||||
if !xnet.IsConnRefusedErr(err) && !xnet.IsConnResetErr(err) {
|
||||
target.loggerOnce(context.Background(), err, target.ID().String())
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -243,7 +243,7 @@ func (target *NSQTarget) initNSQ() error {
|
||||
err = target.producer.Ping()
|
||||
if err != nil {
|
||||
// To treat "connection refused" errors as errNotConnected.
|
||||
if !(xnet.IsConnRefusedErr(err) || xnet.IsConnResetErr(err)) {
|
||||
if !xnet.IsConnRefusedErr(err) && !xnet.IsConnResetErr(err) {
|
||||
target.loggerOnce(context.Background(), err, target.ID().String())
|
||||
}
|
||||
target.producer.Stop()
|
||||
|
||||
@@ -376,7 +376,7 @@ func (target *PostgreSQLTarget) initPostgreSQL() error {
|
||||
|
||||
err = target.db.Ping()
|
||||
if err != nil {
|
||||
if !(xnet.IsConnRefusedErr(err) || xnet.IsConnResetErr(err)) {
|
||||
if !xnet.IsConnRefusedErr(err) && !xnet.IsConnResetErr(err) {
|
||||
target.loggerOnce(context.Background(), err, target.ID().String())
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -293,7 +293,7 @@ func (target *RedisTarget) initRedis() error {
|
||||
|
||||
_, pingErr := conn.Do("PING")
|
||||
if pingErr != nil {
|
||||
if !(xnet.IsConnRefusedErr(pingErr) || xnet.IsConnResetErr(pingErr)) {
|
||||
if !xnet.IsConnRefusedErr(pingErr) && !xnet.IsConnResetErr(pingErr) {
|
||||
target.loggerOnce(context.Background(), pingErr, target.ID().String())
|
||||
}
|
||||
return pingErr
|
||||
|
||||
@@ -114,7 +114,6 @@ func (list *TargetList) incCurrentSendCalls(id TargetID) {
|
||||
|
||||
stats.currentSendCalls++
|
||||
list.targetStats[id] = stats
|
||||
return
|
||||
}
|
||||
|
||||
func (list *TargetList) decCurrentSendCalls(id TargetID) {
|
||||
@@ -129,7 +128,6 @@ func (list *TargetList) decCurrentSendCalls(id TargetID) {
|
||||
|
||||
stats.currentSendCalls--
|
||||
list.targetStats[id] = stats
|
||||
return
|
||||
}
|
||||
|
||||
func (list *TargetList) incFailedEvents(id TargetID) {
|
||||
@@ -143,7 +141,6 @@ func (list *TargetList) incFailedEvents(id TargetID) {
|
||||
|
||||
stats.failedEvents++
|
||||
list.targetStats[id] = stats
|
||||
return
|
||||
}
|
||||
|
||||
func (list *TargetList) incTotalEvents(id TargetID) {
|
||||
@@ -157,7 +154,6 @@ func (list *TargetList) incTotalEvents(id TargetID) {
|
||||
|
||||
stats.totalEvents++
|
||||
list.targetStats[id] = stats
|
||||
return
|
||||
}
|
||||
|
||||
type asyncEvent struct {
|
||||
|
||||
Reference in New Issue
Block a user