(conn *grpc.ClientConn)
| 384 | } |
| 385 | |
| 386 | func cleanup(conn *grpc.ClientConn) error { |
| 387 | cleanupPlugins() |
| 388 | if conn != nil { |
| 389 | if err := conn.Close(); err != nil { |
| 390 | return err |
| 391 | } |
| 392 | } |
| 393 | return nil |
| 394 | } |
| 395 | |
| 396 | // Load the controlplane based on the following order: |
| 397 | // 1. If the command requires an API token, we load it and fail otherwise |