github.com/crossplane/upjet@v1.3.0/pkg/migration/errors.go (about)

     1  // SPDX-FileCopyrightText: 2023 The Crossplane Authors <https://crossplane.io>
     2  //
     3  // SPDX-License-Identifier: Apache-2.0
     4  
     5  package migration
     6  
     7  import "fmt"
     8  
     9  type errUnsupportedStepType struct {
    10  	planStep Step
    11  }
    12  
    13  func (e errUnsupportedStepType) Error() string {
    14  	return fmt.Sprintf("executor does not support steps of type %q in step: %s", e.planStep.Type, e.planStep.Name)
    15  }
    16  
    17  func NewUnsupportedStepTypeError(s Step) error {
    18  	return errUnsupportedStepType{
    19  		planStep: s,
    20  	}
    21  }