mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
add gocritic/ruleguard checks back again, cleanup code. (#13665)
- remove some duplicated code - reported a bug, separately fixed in #13664 - using strings.ReplaceAll() when needed - using filepath.ToSlash() use when needed - remove all non-Go style comments from the codebase Co-authored-by: Aditya Manthramurthy <donatello@users.noreply.github.com>
This commit is contained in:
@@ -37,7 +37,7 @@ type Destination struct {
|
||||
Bucket string `xml:"Bucket" json:"Bucket"`
|
||||
StorageClass string `xml:"StorageClass" json:"StorageClass"`
|
||||
ARN string
|
||||
//EncryptionConfiguration TODO: not needed for MinIO
|
||||
// EncryptionConfiguration TODO: not needed for MinIO
|
||||
}
|
||||
|
||||
func (d Destination) isValidStorageClass() bool {
|
||||
@@ -57,14 +57,14 @@ func (d Destination) String() string {
|
||||
|
||||
}
|
||||
|
||||
//LegacyArn returns true if arn format has prefix "arn:aws:s3:::" which was used
|
||||
// prior to multi-destination
|
||||
// LegacyArn returns true if arn format has prefix "arn:aws:s3:::" which was
|
||||
// used prior to multi-destination
|
||||
func (d Destination) LegacyArn() bool {
|
||||
return strings.HasPrefix(d.ARN, DestinationARNPrefix)
|
||||
}
|
||||
|
||||
//TargetArn returns true if arn format has prefix "arn:minio:replication:::" used
|
||||
// for multi-destination targets
|
||||
// TargetArn returns true if arn format has prefix "arn:minio:replication:::"
|
||||
// used for multi-destination targets
|
||||
func (d Destination) TargetArn() bool {
|
||||
return strings.HasPrefix(d.ARN, DestinationARNMinIOPrefix)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user