Skip to content

Commit

Permalink
avoid using optional for param
Browse files Browse the repository at this point in the history
  • Loading branch information
felipemadero committed Jan 6, 2023
1 parent f3bed14 commit fa34ce1
Show file tree
Hide file tree
Showing 3 changed files with 311 additions and 316 deletions.
8 changes: 4 additions & 4 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (c *client) Start(ctx context.Context, execPath string, opts ...OpOption) (
req.RootDataDir = &ret.rootDataDir
}
if ret.pluginDir != "" {
req.PluginDir = &ret.pluginDir
req.PluginDir = ret.pluginDir
}
if len(ret.blockchainSpecs) > 0 {
req.BlockchainSpecs = ret.blockchainSpecs
Expand Down Expand Up @@ -239,7 +239,7 @@ func (c *client) AddNode(ctx context.Context, name string, execPath string, opts
}

if ret.pluginDir != "" {
req.PluginDir = &ret.pluginDir
req.PluginDir = ret.pluginDir
}

c.log.Info("add node", zap.String("name", name))
Expand All @@ -260,7 +260,7 @@ func (c *client) RestartNode(ctx context.Context, name string, opts ...OpOption)
req.ExecPath = &ret.execPath
}
if ret.pluginDir != "" {
req.PluginDir = &ret.pluginDir
req.PluginDir = ret.pluginDir
}
if ret.whitelistedSubnets != "" {
req.WhitelistedSubnets = &ret.whitelistedSubnets
Expand Down Expand Up @@ -307,7 +307,7 @@ func (c *client) LoadSnapshot(ctx context.Context, snapshotName string, opts ...
req.ExecPath = &ret.execPath
}
if ret.pluginDir != "" {
req.PluginDir = &ret.pluginDir
req.PluginDir = ret.pluginDir
}
if ret.rootDataDir != "" {
req.RootDataDir = &ret.rootDataDir
Expand Down
Loading

0 comments on commit fa34ce1

Please sign in to comment.