mirror of
https://github.com/minio/minio.git
synced 2025-08-03 12:34:31 -04:00
Prevent unnecessary (superfluous) initialization of return variable (#4490)
This commit is contained in:
parent
999ae1cb96
commit
7dcc1e92b4
@ -259,15 +259,14 @@ func validateNotificationConfig(nConfig notificationConfig) APIErrorCode {
|
|||||||
// - kafka
|
// - kafka
|
||||||
// - webhook
|
// - webhook
|
||||||
func unmarshalSqsARN(queueARN string) (mSqs arnSQS) {
|
func unmarshalSqsARN(queueARN string) (mSqs arnSQS) {
|
||||||
mSqs = arnSQS{}
|
|
||||||
strs := strings.SplitN(queueARN, ":", -1)
|
strs := strings.SplitN(queueARN, ":", -1)
|
||||||
if len(strs) != 6 {
|
if len(strs) != 6 {
|
||||||
return mSqs
|
return
|
||||||
}
|
}
|
||||||
if serverConfig.GetRegion() != "" {
|
if serverConfig.GetRegion() != "" {
|
||||||
region := strs[3]
|
region := strs[3]
|
||||||
if region != serverConfig.GetRegion() {
|
if region != serverConfig.GetRegion() {
|
||||||
return mSqs
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sqsType := strs[5]
|
sqsType := strs[5]
|
||||||
@ -294,5 +293,5 @@ func unmarshalSqsARN(queueARN string) (mSqs arnSQS) {
|
|||||||
|
|
||||||
mSqs.AccountID = strs[4]
|
mSqs.AccountID = strs[4]
|
||||||
|
|
||||||
return mSqs
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user