Plugins: Replace CDN class with FS CDN type (#113968)
replace cdn class with fs type
This commit is contained in:
+16
-1
@@ -72,12 +72,27 @@ type UpdateInfo struct {
|
||||
type FS interface {
|
||||
fs.FS
|
||||
|
||||
Type() string
|
||||
Type() FSType
|
||||
Base() string
|
||||
Files() ([]string, error)
|
||||
Rel(string) (string, error)
|
||||
}
|
||||
|
||||
type FSType string
|
||||
|
||||
const (
|
||||
FSTypeCDN FSType = "cdn"
|
||||
FSTypeLocal FSType = "local"
|
||||
)
|
||||
|
||||
func (f FSType) CDN() bool {
|
||||
return f == FSTypeCDN
|
||||
}
|
||||
|
||||
func (f FSType) Local() bool {
|
||||
return f == FSTypeLocal
|
||||
}
|
||||
|
||||
type FSRemover interface {
|
||||
Remove() error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user