Skip to content

Commit 264e7d6

Browse files
committed
refactor: Don't initialize non-nested option fields
1 parent 3e31a6f commit 264e7d6

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pkg/client/nbd.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,7 @@ func negotiateNewstyle(conn net.Conn) error {
5252

5353
func Connect(conn net.Conn, device *os.File, options *Options) error {
5454
if options == nil {
55-
options = &Options{
56-
ExportName: "default",
57-
BlockSize: 0,
58-
OnConnected: func() {},
59-
Timeout: 0,
60-
}
55+
options = &Options{}
6156
}
6257

6358
if options.ExportName == "" {

0 commit comments

Comments
 (0)