Skip to content

Commit

Permalink
Fix the number of arguments expected by the server and client demos
Browse files Browse the repository at this point in the history
On my subsequent branch that adds TCP, I added a second argument that is
the protocol to use. That's why these scripts currently expect 2
arguments. However, on _this_ branch, only the first argument is used,
and that first argument is the port. I ended up b0rking this when I
extracted this branch from the rest to make PR review easier.

This commit fixes it so that the scripts expect the correct number of
arguments, which is 1 argument, the port.
  • Loading branch information
daveyarwood committed Feb 10, 2021
1 parent 7086e2f commit 5c384f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/basic_server/basic_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func main() {

numArgs := len(os.Args[1:])

if numArgs != 2 {
if numArgs != 1 {
printUsage()
os.Exit(1)
}
Expand Down
2 changes: 1 addition & 1 deletion examples/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func main() {

numArgs := len(os.Args[1:])

if numArgs != 2 {
if numArgs != 1 {
printUsage()
os.Exit(1)
}
Expand Down

0 comments on commit 5c384f5

Please sign in to comment.