Skip to content

Commit a67478e

Browse files
committed
stub: update setIdentify to ensureIdentify
Signed-off-by: Iceber Gu <[email protected]>
1 parent 2a8b655 commit a67478e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pkg/stub/stub.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ func New(p interface{}, opts ...Option) (Stub, error) {
290290
return nil, err
291291
}
292292

293-
if err := stub.getIdentity(); err != nil {
293+
if err := stub.ensureIdentity(); err != nil {
294294
return nil, err
295295
}
296296

@@ -678,8 +678,8 @@ func (stub *stub) StateChange(ctx context.Context, evt *api.StateChangeEvent) (*
678678
return &api.StateChangeResponse{}, err
679679
}
680680

681-
// getIdentity gets plugin index and name from the binary if those are unset.
682-
func (stub *stub) getIdentity() error {
681+
// ensureIdentity sets plugin index and name from the binary if those are unset.
682+
func (stub *stub) ensureIdentity() error {
683683
if stub.idx != "" && stub.name != "" {
684684
return nil
685685
}

0 commit comments

Comments
 (0)