From a56127be353c177e4e4ff4035110f406a167f8c6 Mon Sep 17 00:00:00 2001 From: Liangbin Lian Date: Mon, 27 Jul 2026 19:17:32 +0800 Subject: [PATCH] chore(deps): remove the unimplemented FUSE mount functionality and its dependencies FUSE was introduced years ago but never implemented, let's remove it to reduce dependencies. Signed-off-by: Liangbin Lian --- go.mod | 1 - go.sum | 4 - internal/fuse/fs.go | 170 ----------------------------------------- internal/fuse/mount.go | 9 --- 4 files changed, 184 deletions(-) delete mode 100644 internal/fuse/fs.go delete mode 100644 internal/fuse/mount.go diff --git a/go.mod b/go.mod index fc1b5e393..71f8452f9 100644 --- a/go.mod +++ b/go.mod @@ -74,7 +74,6 @@ require ( github.com/tchap/go-patricia/v2 v2.3.3 github.com/u2takey/ffmpeg-go v0.5.0 github.com/upyun/go-sdk/v3 v3.0.4 - github.com/winfsp/cgofuse v1.6.1-0.20260126094232-f2c4fccdb286 github.com/zzzhr1990/go-common-entity v0.0.0-20250202070650-1a200048f0d3 golang.org/x/crypto v0.53.0 golang.org/x/image v0.43.0 diff --git a/go.sum b/go.sum index 56a7167a1..d23d09506 100644 --- a/go.sum +++ b/go.sum @@ -724,10 +724,6 @@ github.com/unknwon/goconfig v1.0.0 h1:rS7O+CmUdli1T+oDm7fYj1MwqNWtEJfNj+FqcUHML8 github.com/unknwon/goconfig v1.0.0/go.mod h1:qu2ZQ/wcC/if2u32263HTVC39PeOQRSmidQk3DuDFQ8= github.com/upyun/go-sdk/v3 v3.0.4 h1:2DCJa/Yi7/3ZybT9UCPATSzvU3wpPPxhXinNlb1Hi8Q= github.com/upyun/go-sdk/v3 v3.0.4/go.mod h1:P/SnuuwhrIgAVRd/ZpzDWqCsBAf/oHg7UggbAxyZa0E= -github.com/winfsp/cgofuse v1.6.0 h1:re3W+HTd0hj4fISPBqfsrwyvPFpzqhDu8doJ9nOPDB0= -github.com/winfsp/cgofuse v1.6.0/go.mod h1:uxjoF2jEYT3+x+vC2KJddEGdk/LU8pRowXmyVMHSV5I= -github.com/winfsp/cgofuse v1.6.1-0.20260126094232-f2c4fccdb286 h1:tw5GqRXqExB/xghPoPLtVujBe9w9Pg1G78tvXCJNJAA= -github.com/winfsp/cgofuse v1.6.1-0.20260126094232-f2c4fccdb286/go.mod h1:uxjoF2jEYT3+x+vC2KJddEGdk/LU8pRowXmyVMHSV5I= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= diff --git a/internal/fuse/fs.go b/internal/fuse/fs.go deleted file mode 100644 index 7783b169f..000000000 --- a/internal/fuse/fs.go +++ /dev/null @@ -1,170 +0,0 @@ -package fuse - -import "github.com/winfsp/cgofuse/fuse" - -type Fs struct { - RootFolder string - fuse.FileSystemBase -} - -func (fs *Fs) Init() { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Destroy() { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Statfs(path string, stat *fuse.Statfs_t) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Mknod(path string, mode uint32, dev uint64) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Mkdir(path string, mode uint32) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Unlink(path string) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Rmdir(path string) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Link(oldpath string, newpath string) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Symlink(target string, newpath string) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Readlink(path string) (int, string) { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Rename(oldpath string, newpath string) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Chmod(path string, mode uint32) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Chown(path string, uid uint32, gid uint32) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Utimens(path string, tmsp []fuse.Timespec) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Access(path string, mask uint32) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Create(path string, flags int, mode uint32) (int, uint64) { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Open(path string, flags int) (int, uint64) { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Getattr(path string, stat *fuse.Stat_t, fh uint64) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Truncate(path string, size int64, fh uint64) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Read(path string, buff []byte, ofst int64, fh uint64) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Write(path string, buff []byte, ofst int64, fh uint64) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Flush(path string, fh uint64) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Release(path string, fh uint64) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Fsync(path string, datasync bool, fh uint64) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Opendir(path string) (int, uint64) { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Readdir(path string, fill func(name string, stat *fuse.Stat_t, ofst int64) bool, ofst int64, fh uint64) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Releasedir(path string, fh uint64) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Fsyncdir(path string, datasync bool, fh uint64) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Setxattr(path string, name string, value []byte, flags int) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Getxattr(path string, name string) (int, []byte) { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Removexattr(path string, name string) int { - //TODO implement me - panic("implement me") -} - -func (fs *Fs) Listxattr(path string, fill func(name string) bool) int { - //TODO implement me - panic("implement me") -} - -var _ fuse.FileSystemInterface = (*Fs)(nil) diff --git a/internal/fuse/mount.go b/internal/fuse/mount.go deleted file mode 100644 index 30e3d5464..000000000 --- a/internal/fuse/mount.go +++ /dev/null @@ -1,9 +0,0 @@ -package fuse - -import "github.com/winfsp/cgofuse/fuse" - -func Mount(mountSrc, mountDst string, opts []string) { - fs := &Fs{RootFolder: mountSrc} - host := fuse.NewFileSystemHost(fs) - go host.Mount(mountDst, opts) -}