mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
mark pubsub type safe via generics (#15961)
This commit is contained in:
@@ -67,6 +67,7 @@ const (
|
||||
ObjectReplicationAll
|
||||
ObjectRestorePostAll
|
||||
ObjectTransitionAll
|
||||
Everything
|
||||
)
|
||||
|
||||
// The number of single names should not exceed 64.
|
||||
@@ -112,6 +113,12 @@ func (name Name) Expand() []Name {
|
||||
ObjectTransitionFailed,
|
||||
ObjectTransitionComplete,
|
||||
}
|
||||
case Everything:
|
||||
res := make([]Name, objectSingleTypesEnd-1)
|
||||
for i := range res {
|
||||
res[i] = Name(i + 1)
|
||||
}
|
||||
return res
|
||||
default:
|
||||
return []Name{name}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user