Show warning when referencing nonexistent resources in spec (#1415)

This commit is contained in:
Ta-Ching Chen
2019-11-18 13:46:28 +08:00
committed by GitHub
parent 81ece23bfe
commit 3aca0edfcc
7 changed files with 166 additions and 34 deletions
+2 -2
View File
@@ -233,7 +233,7 @@ func SpecSave(resource interface{}, specFile string) error {
return errors.Wrap(err, fmt.Sprintf("error reading spec in '%v'", specDir))
}
exists, err := fr.existsInSpecs(resource)
exists, err := fr.ExistsInSpecs(resource)
if err != nil {
return err
}
@@ -664,7 +664,7 @@ func (fr *FissionResources) SpecExists(resource interface{}, compareMetadata boo
}
}
func (fr *FissionResources) existsInSpecs(resource interface{}) (bool, error) {
func (fr *FissionResources) ExistsInSpecs(resource interface{}) (bool, error) {
switch typedres := resource.(type) {
case types.ArchiveUploadSpec:
for _, obj := range fr.ArchiveUploadSpecs {