mirror of
https://github.com/ap-pauloafonso/ratio-spoof.git
synced 2026-01-11 20:10:22 +00:00
print usage refactor
This commit is contained in:
parent
144c8adf3c
commit
b4ae3705a1
1 changed files with 2 additions and 10 deletions
12
cmd/main.go
12
cmd/main.go
|
|
@ -4,7 +4,7 @@ import (
|
|||
"flag"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"runtime"
|
||||
"os"
|
||||
|
||||
"github.com/ap-pauloafonso/ratio-spoof/emulation"
|
||||
"github.com/ap-pauloafonso/ratio-spoof/ratiospoof"
|
||||
|
|
@ -24,15 +24,7 @@ func main() {
|
|||
debug := flag.Bool("debug", false, "")
|
||||
|
||||
flag.Usage = func() {
|
||||
var osExecutableSuffix string
|
||||
if runtime.GOOS == "windows" {
|
||||
fmt.Println(`usage:
|
||||
ratio-spoof.exe -t <TORRENT_PATH> -d <INITIAL_DOWNLOADED> -ds <DOWNLOAD_SPEED> -u <INITIAL_UPLOADED> -us <UPLOAD_SPEED>`, osExecutableSuffix)
|
||||
} else {
|
||||
fmt.Println(`usage:
|
||||
./ratio-spoof -t <TORRENT_PATH> -d <INITIAL_DOWNLOADED> -ds <DOWNLOAD_SPEED> -u <INITIAL_UPLOADED> -us <UPLOAD_SPEED>`, osExecutableSuffix)
|
||||
}
|
||||
|
||||
fmt.Printf("usage: %s -t <TORRENT_PATH> -d <INITIAL_DOWNLOADED> -ds <DOWNLOAD_SPEED> -u <INITIAL_UPLOADED> -us <UPLOAD_SPEED>\n", os.Args[0])
|
||||
fmt.Print(`
|
||||
optional arguments:
|
||||
-h show this help message and exit
|
||||
|
|
|
|||
Loading…
Reference in a new issue