mirror of
https://github.com/minio/minio.git
synced 2025-11-25 03:56:17 -05:00
fix: remove all unused code (#12360)
This commit is contained in:
@@ -135,12 +135,12 @@ func TestMarshalLifecycleConfig(t *testing.T) {
|
||||
{
|
||||
Status: "Enabled",
|
||||
Filter: Filter{Prefix: Prefix{string: "prefix-1", set: true}},
|
||||
Expiration: Expiration{Date: ExpirationDate(midnightTS)},
|
||||
Expiration: Expiration{Date: midnightTS},
|
||||
},
|
||||
{
|
||||
Status: "Enabled",
|
||||
Filter: Filter{Prefix: Prefix{string: "prefix-1", set: true}},
|
||||
Expiration: Expiration{Date: ExpirationDate(midnightTS)},
|
||||
Expiration: Expiration{Date: midnightTS},
|
||||
NoncurrentVersionTransition: NoncurrentVersionTransition{NoncurrentDays: 2, StorageClass: "TEST"},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -65,7 +65,7 @@ func getNewUUID() (string, error) {
|
||||
|
||||
// validateID - checks if ID is valid or not.
|
||||
func (r Rule) validateID() error {
|
||||
IDLen := len(string(r.ID))
|
||||
IDLen := len(r.ID)
|
||||
// generate new ID when not provided
|
||||
// cannot be longer than 255 characters
|
||||
if IDLen == 0 {
|
||||
|
||||
@@ -33,10 +33,11 @@ func GetInfo(path string) (info Info, err error) {
|
||||
}
|
||||
reservedBlocks := s.Bfree - s.Bavail
|
||||
info = Info{
|
||||
Total: uint64(s.Frsize) * (s.Blocks - reservedBlocks),
|
||||
Free: uint64(s.Frsize) * s.Bavail,
|
||||
Files: s.Files,
|
||||
Ffree: s.Ffree,
|
||||
Total: uint64(s.Frsize) * (s.Blocks - reservedBlocks),
|
||||
Free: uint64(s.Frsize) * s.Bavail,
|
||||
Files: s.Files,
|
||||
Ffree: s.Ffree,
|
||||
//nolint:unconvert
|
||||
FSType: getFSType(int64(s.Type)),
|
||||
}
|
||||
// Check for overflows.
|
||||
|
||||
@@ -65,7 +65,7 @@ func (e *FuncExpr) getFunctionName() FuncName {
|
||||
case e.SFunc != nil:
|
||||
return FuncName(strings.ToUpper(e.SFunc.FunctionName))
|
||||
case e.Count != nil:
|
||||
return FuncName(aggFnCount)
|
||||
return aggFnCount
|
||||
case e.Cast != nil:
|
||||
return sqlFnCast
|
||||
case e.Substring != nil:
|
||||
|
||||
@@ -113,43 +113,6 @@ type nvmeIdentController struct {
|
||||
Vs [1024]byte // Vendor Specific
|
||||
} // 4096 bytes
|
||||
|
||||
type nvmeLBAF struct {
|
||||
Ms uint16
|
||||
Ds uint8
|
||||
Rp uint8
|
||||
}
|
||||
|
||||
//nolint:deadcode
|
||||
type nvmeIdentNamespace struct {
|
||||
Nsze uint64
|
||||
Ncap uint64
|
||||
Nuse uint64
|
||||
Nsfeat uint8
|
||||
Nlbaf uint8
|
||||
Flbas uint8
|
||||
Mc uint8
|
||||
Dpc uint8
|
||||
Dps uint8
|
||||
Nmic uint8
|
||||
Rescap uint8
|
||||
Fpi uint8
|
||||
Rsvd33 uint8
|
||||
Nawun uint16
|
||||
Nawupf uint16
|
||||
Nacwu uint16
|
||||
Nabsn uint16
|
||||
Nabo uint16
|
||||
Nabspf uint16
|
||||
Rsvd46 [2]byte
|
||||
Nvmcap [16]byte
|
||||
Rsvd64 [40]byte
|
||||
Nguid [16]byte
|
||||
EUI64 [8]byte
|
||||
Lbaf [16]nvmeLBAF
|
||||
Rsvd192 [192]byte
|
||||
Vs [3712]byte
|
||||
} // 4096 bytes
|
||||
|
||||
//nolint:deadcode
|
||||
type nvmeSMARTLog struct {
|
||||
CritWarning uint8
|
||||
|
||||
@@ -70,6 +70,7 @@ func getSysinfoMemoryLimit() (limit uint64, err error) {
|
||||
|
||||
// Total RAM is always the multiplicative value
|
||||
// of unit size and total ram.
|
||||
//nolint:unconvert
|
||||
return uint64(unit) * uint64(totalRAM), nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user