Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Fix order of controller functions #266

Merged
merged 1 commit into from
Sep 14, 2017
Merged

Conversation

cdrage
Copy link
Collaborator

@cdrage cdrage commented Sep 13, 2017

Rearranges Validate to match the functions within controller.go

if err := kController.Unmarshal(data); err != nil {
        return nil, nil, errors.Wrap(err, "unable to unmarshal data")
}

if err := kController.Validate(); err != nil {
        return nil, nil, errors.Wrap(err, "unable to validate data")
}

if err := kController.Fix(); err != nil {
        return nil, nil, errors.Wrap(err, "unable to fix data")
}

ros, extraResources, err := kController.Transform()
if err != nil {
        return nil, nil, errors.Wrap(err, "unable to transform data")
}

Rearranges Validate to match the functions within `controller.go`

```go
if err := kController.Unmarshal(data); err != nil {
        return nil, nil, errors.Wrap(err, "unable to unmarshal data")
}

if err := kController.Validate(); err != nil {
        return nil, nil, errors.Wrap(err, "unable to validate data")
}

if err := kController.Fix(); err != nil {
        return nil, nil, errors.Wrap(err, "unable to fix data")
}

ros, extraResources, err := kController.Transform()
if err != nil {
        return nil, nil, errors.Wrap(err, "unable to transform data")
}
```
@concaf concaf merged commit 6ad3957 into kedgeproject:master Sep 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants