Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

Commit

Permalink
Revert "enabled port to be comand-line configurable"
Browse files Browse the repository at this point in the history
This reverts commit 68bee8f.
  • Loading branch information
sergeyfrolov committed Oct 1, 2017
1 parent 792010c commit 0c1451b
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions cli/main.go
@@ -1,24 +1,15 @@
package main

import (
"flag"
"fmt"
"github.com/pkg/profile"
"github.com/sergeyfrolov/gotapdance/tdproxy"
"os"
)

func main() {
defer profile.Start().Stop()
portPtr := flag.Int("port", 10500, "port number")
flag.Parse()

if *portPtr < 1 || *portPtr > 65535 {
fmt.Println("Invalid port:", *portPtr)
return
}

tapdanceProxy := tdproxy.NewTapDanceProxy(*portPtr)
tapdanceProxy := tdproxy.NewTapDanceProxy(10500)
err := tapdanceProxy.ListenAndServe()
if err != nil {
tdproxy.Logger.Errorf("Failed to ListenAndServe(): %v\n", err)
Expand Down

0 comments on commit 0c1451b

Please sign in to comment.