mirror of
https://github.com/ap-pauloafonso/ratio-spoof.git
synced 2026-04-21 16:41:57 +00:00
Merge pull request #6 from ap-pauloafonso/usage-print-refactor
print usage refactor
This commit is contained in:
commit
1ab6b86dd2
1 changed files with 2 additions and 10 deletions
12
cmd/main.go
12
cmd/main.go
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"runtime"
|
"os"
|
||||||
|
|
||||||
"github.com/ap-pauloafonso/ratio-spoof/emulation"
|
"github.com/ap-pauloafonso/ratio-spoof/emulation"
|
||||||
"github.com/ap-pauloafonso/ratio-spoof/ratiospoof"
|
"github.com/ap-pauloafonso/ratio-spoof/ratiospoof"
|
||||||
|
|
@ -24,15 +24,7 @@ func main() {
|
||||||
debug := flag.Bool("debug", false, "")
|
debug := flag.Bool("debug", false, "")
|
||||||
|
|
||||||
flag.Usage = func() {
|
flag.Usage = func() {
|
||||||
var osExecutableSuffix string
|
fmt.Printf("usage: %s -t <TORRENT_PATH> -d <INITIAL_DOWNLOADED> -ds <DOWNLOAD_SPEED> -u <INITIAL_UPLOADED> -us <UPLOAD_SPEED>\n", os.Args[0])
|
||||||
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.Print(`
|
fmt.Print(`
|
||||||
optional arguments:
|
optional arguments:
|
||||||
-h show this help message and exit
|
-h show this help message and exit
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue