mirror of
https://github.com/google/gops.git
synced 2024-11-24 08:22:25 +02:00
parent
2209de1300
commit
f4d96179f3
2
cmd.go
2
cmd.go
@ -169,7 +169,7 @@ func cmdWithPrint(addr net.TCPAddr, c byte, params ...byte) error {
|
|||||||
// targetToAddr tries to parse the target string, be it remote host:port
|
// targetToAddr tries to parse the target string, be it remote host:port
|
||||||
// or local process's PID.
|
// or local process's PID.
|
||||||
func targetToAddr(target string) (*net.TCPAddr, error) {
|
func targetToAddr(target string) (*net.TCPAddr, error) {
|
||||||
if strings.Index(target, ":") != -1 {
|
if strings.Contains(target, ":") {
|
||||||
// addr host:port passed
|
// addr host:port passed
|
||||||
var err error
|
var err error
|
||||||
addr, err := net.ResolveTCPAddr("tcp", target)
|
addr, err := net.ResolveTCPAddr("tcp", target)
|
||||||
|
Loading…
Reference in New Issue
Block a user