Create root command via function

This commit is contained in:
Michael Eischer
2025-02-07 21:29:33 +01:00
parent aa9cdf93cf
commit 412d6d9ec5
43 changed files with 163 additions and 215 deletions
+4 -4
View File
@@ -22,6 +22,10 @@ import (
"github.com/anacrolix/fuse/fs"
)
func registerMountCommand(cmdRoot *cobra.Command) {
cmdRoot.AddCommand(newMountCommand())
}
func newMountCommand() *cobra.Command {
var opts MountOptions
@@ -84,10 +88,6 @@ Exit status is 12 if the password is incorrect.
return cmd
}
func init() {
cmdRoot.AddCommand(newMountCommand())
}
// MountOptions collects all options for the mount command.
type MountOptions struct {
OwnerRoot bool