cmd

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DMFCmd = &cobra.Command{
	Use:   "dmf",
	Short: "Starts DropMyFile application",
	Long:  `Starts DropMyFile application to transfer files between users over the same LAN.`,
	Args: func(cmd *cobra.Command, args []string) error {
		if _, err := os.Stat(global.TransferFolder); global.TransferFolder != "" && os.IsNotExist(err) {
			return fmt.Errorf("a valid --folder-path is required")
		}

		if global.SessionLength < 0 {
			return fmt.Errorf("--session-length must be greater than 0")
		}

		if global.ServerPort < 0 {
			return fmt.Errorf("--port must be greater than 0")
		}

		return nil
	},
	Run: func(cmd *cobra.Command, args []string) {

		appInit()
	},
}

Functions

func Execute

func Execute()

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL