fix error handling

This commit is contained in:
yugo kobayashi
2022-08-26 14:38:51 +00:00
parent f086269d6e
commit a54226e0a9
5 changed files with 12 additions and 9 deletions

View File

@@ -206,9 +206,12 @@ func GetFunctionSpec(n *yaml.RNode) (*FunctionSpec, error) {
if err != nil {
return nil, nil
}
if fn, err := getFunctionSpecFromAnnotation(n, meta); err != nil {
fn, err := getFunctionSpecFromAnnotation(n, meta)
if err != nil {
return nil, err
} else if fn != nil {
}
if fn != nil {
return fn, nil
}