You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- package utils
-
- import (
- clitypes "gitlink.org.cn/cloudream/jcs-pub/client/types"
- cortypes "gitlink.org.cn/cloudream/jcs-pub/coordinator/types"
- )
-
- func FindFeature[T cortypes.StorageFeature](detail *clitypes.UserSpaceDetail) T {
- for _, f := range detail.UserSpace.Features {
- f2, ok := f.(T)
- if ok {
- return f2
- }
- }
-
- var def T
- return def
- }
|