Skip to content

Commit 6ff24ee

Browse files
committed
settings: m update DialerOpts stringer
1 parent 4219d09 commit 6ff24ee

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

intra/settings/dialeropts.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ func (d DialerOpts) String() string {
6262
return "Unknown"
6363
}
6464
}()
65+
sz := func() string {
66+
if d.ReadBufferSize != d.WriteBufferSize {
67+
return "r: " + strconv.Itoa(int(d.ReadBufferSize)) + "b w: " + strconv.Itoa(int(d.WriteBufferSize)) + "b"
68+
}
69+
return "rw: " + strconv.Itoa(int(d.ReadBufferSize)) + "b"
70+
}()
6571
ka := func() string {
6672
if d.LowerKeepAlive {
6773
return "LowerKeepAlive"
@@ -74,7 +80,7 @@ func (d DialerOpts) String() string {
7480
"s"
7581
}()
7682

77-
return strings.Join([]string{s, r, ka, tmo}, ",")
83+
return strings.Join([]string{s, r, sz, ka, tmo}, ",")
7884
}
7985

8086
// Dial strategies

0 commit comments

Comments
 (0)