You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The connection is opened automatically when creating a client with `NewClient()`. For use cases that require explicit connection management, use `Reopen()` to reestablish closed connections and `IsClosed()` to check connection state:
182
+
The client uses lazy connection - the connection is established automatically on the first operation. For explicit connection control, use `Open()` to establish the connection immediately, and `IsClosed()` to check connection state:
171
183
172
184
```go
173
-
// Create client (connection opens automatically)
185
+
// Create client without connecting
174
186
client, err:= netconf.NewClient(
175
187
"192.168.1.1",
176
188
netconf.Username("admin"),
@@ -180,18 +192,17 @@ if err != nil {
180
192
log.Fatal(err)
181
193
}
182
194
183
-
//Use client for first operation
195
+
//Connection opens automatically on first operation
0 commit comments