Allow custom url
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
func main() {
|
||||
var configPath string // Variable to hold the config path
|
||||
var testURL string // Variable to hold the download URL
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "zurg",
|
||||
@@ -49,10 +50,13 @@ func main() {
|
||||
Use: "network-test",
|
||||
Short: "Test your network with RD servers",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
internal.NetworkTest()
|
||||
internal.NetworkTest(testURL) // Pass the downloadURL to NetworkTest
|
||||
},
|
||||
}
|
||||
|
||||
// Adding a flag for the test URL with a default value
|
||||
networkTestCmd.Flags().StringVarP(&testURL, "test-url", "t", "", "URL to test network with")
|
||||
|
||||
rootCmd.AddCommand(versionCmd, clearDownloadsCmd, clearTorrentsCmd, networkTestCmd)
|
||||
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user