Remove flag.Parse() line from go basic guide (#1241)

This commit is contained in:
Pavel Mokeev 2024-01-02 21:26:37 +03:00 committed by GitHub
parent ed84ebd9ae
commit 523b917672
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -359,8 +359,7 @@ so that clients can actually use our service. The following snippet shows how we
do this for our `RouteGuide` service:
```go
flag.Parse()
lis, err := net.Listen("tcp", fmt.Sprintf("localhost:%d", *port))
lis, err := net.Listen("tcp", fmt.Sprintf("localhost:%d", port))
if err != nil {
log.Fatalf("failed to listen: %v", err)
}