(name string)
| 48 | return nil |
| 49 | } |
| 50 | func (s *storageStruct) CheckAndMountByName(name string) error { |
| 51 | storages, _ := MyService.Storage().GetStorages() |
| 52 | currentRemote, _ := httper.GetConfigByName(name) |
| 53 | mountPoint := currentRemote["mount_point"] |
| 54 | isMount := false |
| 55 | for _, v := range storages.MountPoints { |
| 56 | if v.MountPoint == mountPoint { |
| 57 | isMount = true |
| 58 | break |
| 59 | } |
| 60 | } |
| 61 | if !isMount { |
| 62 | return MyService.Storage().MountStorage(mountPoint, name+":") |
| 63 | } |
| 64 | return nil |
| 65 | } |
| 66 | func (s *storageStruct) CheckAndMountAll() error { |
| 67 | storages, err := MyService.Storage().GetStorages() |
| 68 | if err != nil { |
nothing calls this directly
no test coverage detected