MCPcopy Index your code
hub / github.com/celer-pkg/celer / Remove

Method Remove

pkgcache/cache_setup.go:195–216  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193}
194
195func (n *NFSClientSetup) Remove() error {
196 mountPoint, serverExport, err := parseNFSClientDir(n.nfsClientDir)
197 if err != nil {
198 return err
199 }
200
201 mountPoint = filepath.Clean(mountPoint)
202 if err := n.unmountExisting(mountPoint); err != nil {
203 return err
204 }
205
206 if err := n.removeFSTabEntry(serverExport, mountPoint); err != nil {
207 return err
208 }
209 if err := removeSystemGroupAndUser(nfsUser); err != nil {
210 return err
211 }
212
213 fmt.Println() // Just a blank line.
214 color.PrintSuccess("NFS cache client setup removed: %q unmounted from %q", mountPoint, serverExport)
215 return nil
216}
217
218func (n *NFSServerSetup) validateDir() error {
219 info, err := os.Stat(n.nfsDir)

Callers 1

doSetupMethod · 0.95

Calls 6

unmountExistingMethod · 0.95
removeFSTabEntryMethod · 0.95
PrintSuccessFunction · 0.92
parseNFSClientDirFunction · 0.85
removeSystemGroupAndUserFunction · 0.85
CleanMethod · 0.65

Tested by

no test coverage detected