Minor changes

This commit is contained in:
Mihalis Tsoukalos 2019-05-09 18:52:27 +03:00
commit fefd230fd8
3 changed files with 3 additions and 3 deletions

View file

@ -10,6 +10,7 @@ import (
)
type MyInterface struct{}
var PORT = ":1234"
func Power(x, y float64) float64 {
return math.Pow(x, y)
@ -26,7 +27,6 @@ func (t *MyInterface) Power(arguments *sharedRPC.MyFloats, reply *float64) error
}
func main() {
PORT := ":1234"
arguments := os.Args
if len(arguments) != 1 {
PORT = ":" + arguments[1]

View file

@ -16,7 +16,6 @@ func main() {
}
CONNECT := arguments[1]
tcpAddr, err := net.ResolveTCPAddr("tcp4", CONNECT)
if err != nil {
fmt.Println("ResolveTCPAddr:", err.Error())
@ -44,3 +43,4 @@ func main() {
}
}
}

View file

@ -15,7 +15,6 @@ func main() {
}
SERVER := "localhost" + ":" + arguments[1]
s, err := net.ResolveTCPAddr("tcp", SERVER)
if err != nil {
fmt.Println(err)
@ -56,3 +55,4 @@ func main() {
}
}
}