Debian Codegraph @

src/cmd/vet/testdata/hostport/hostport.go

raw
1 // Copyright 2025 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // This file contains tests for the hostport checker.
6
7 package hostport
8
9 import (
10 "fmt"
11 "net"
12 )
13
14 func _(host string, port int) {
15 addr := fmt.Sprintf("%s:%d", host, port) // ERROR "address format .%s:%d. does not work with IPv6"
16 net.Dial("tcp", addr)
17 }