Skip to content

Commit c48428e

Browse files
author
Franck Rupin
committed
Rename cli structure
- Previous name was not compliant with staticchecks - Rename the struct name to make the checks pass
1 parent bde72d9 commit c48428e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ovs/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ func New(options ...OptionFunc) *Client {
244244
c.App = app
245245

246246
c.DataPath = &DataPathService{
247-
CLI: &OvsCLI{
247+
CLI: &DpCLI{
248248
c: c,
249249
},
250250
}

ovs/datapath.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ type DataPathService struct {
104104
// sudo is defined as a default option.
105105
func NewDataPathService() *DataPathService {
106106
return &DataPathService{
107-
CLI: &OvsCLI{
107+
CLI: &DpCLI{
108108
c: New(Sudo()),
109109
},
110110
}
@@ -321,15 +321,15 @@ func getZoneString(z []uint64) string {
321321
return sb.String()
322322
}
323323

324-
// OvsCLI implements the CLI interface by invoking the Client exec
324+
// DpCLI implements the CLI interface by invoking the Client exec
325325
// method.
326-
type OvsCLI struct {
326+
type DpCLI struct {
327327
// Wrapped client for ovs-dpctl
328328
c *Client
329329
}
330330

331331
// Exec executes 'ovs-dpctl' + args passed in argument
332-
func (cli *OvsCLI) Exec(args ...string) ([]byte, error) {
332+
func (cli *DpCLI) Exec(args ...string) ([]byte, error) {
333333
if cli.c == nil {
334334
return nil, errUninitializedClient
335335
}

0 commit comments

Comments
 (0)