Skip to content

Commit 98d61bf

Browse files
committed
incorporate review
1 parent a088511 commit 98d61bf

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

api/ocm/plugin/ppi/utils.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ func NewEnforceTransportDesision(desc string, h ComponentReferenceQuestionFunc,
242242
return NewDecisionHandler(Q_ENFORCE_TRANSPORT, desc, ForComponentReferenceQuestion(h))
243243
}
244244

245-
func NewTransferversionDecision(desc string, h ComponentReferenceQuestionFunc, labels ...string) DecisionHandler {
245+
func NewTransferVersionDecision(desc string, h ComponentReferenceQuestionFunc, labels ...string) DecisionHandler {
246246
return NewDecisionHandler(Q_TRANSFER_VERSION, desc, ForComponentReferenceQuestion(h))
247247
}
248248

@@ -254,10 +254,6 @@ func NewUpdateVersionDecision(desc string, h ComponentReferenceQuestionFunc, lab
254254
return NewDecisionHandler(Q_UPDATE_VERSION, desc, ForComponentReferenceQuestion(h))
255255
}
256256

257-
func NewOUpdateVersionDecision(desc string, h ComponentReferenceQuestionFunc, labels ...string) DecisionHandler {
258-
return NewDecisionHandler(Q_UPDATE_VERSION, desc, ForComponentReferenceQuestion(h))
259-
}
260-
261257
////////////////////////////////////////////////////////////////////////////////
262258

263259
// Config is a generic structured config stored in a string map.

api/ocm/tools/transfer/transferhandler/options.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ import (
66

77
//////////////////////////////////////////////////////////////////////////////
88

9-
// ConfigOption describes generic non-standard options.
10-
// Specialized option set implementation maps such generic
9+
// ConfigOptionConsumer is an interface for option sets supporting generic
10+
// non-standard options.
11+
// Specialized option set implementations map such generic
1112
// config to their specialized settings. The format depends
1213
// on the option target. For example, for spiff it is a spiff
1314
// script.
14-
type ConfigOption interface {
15+
type ConfigOptionConsumer interface {
1516
SetConfig([]byte)
1617
GetConfig() []byte
1718
}
@@ -21,7 +22,7 @@ type configOption struct {
2122
}
2223

2324
func (o *configOption) ApplyTransferOption(to TransferOptions) error {
24-
if eff, ok := to.(ConfigOption); ok {
25+
if eff, ok := to.(ConfigOptionConsumer); ok {
2526
eff.SetConfig(o.config)
2627
return nil
2728
} else {
@@ -30,7 +31,7 @@ func (o *configOption) ApplyTransferOption(to TransferOptions) error {
3031
}
3132

3233
// WithConfig configures a handler specific configuration.
33-
// It is accepted by all handler featuring such a config possibility.
34+
// It is accepted by all handlers featuring such a config possibility.
3435
func WithConfig(config []byte) TransferOption {
3536
return &configOption{
3637
config: config,

api/ocm/tools/transfer/transferhandler/plugin/options.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ type Options struct {
2222
}
2323

2424
var (
25-
_ transferhandler.TransferOption = (*Options)(nil)
26-
_ transferhandler.ConfigOption = (*Options)(nil)
25+
_ transferhandler.TransferOption = (*Options)(nil)
26+
_ transferhandler.ConfigOptionConsumer = (*Options)(nil)
2727

2828
_ PluginNameOption = (*Options)(nil)
2929
_ TransferHandlerOption = (*Options)(nil)

0 commit comments

Comments
 (0)