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

Decouple validation from generation code #49

Closed
surajssd opened this issue Jun 21, 2017 · 1 comment
Closed

Decouple validation from generation code #49

surajssd opened this issue Jun 21, 2017 · 1 comment

Comments

@surajssd
Copy link
Member

surajssd commented Jun 21, 2017

Right now we have validation code and the generator code mixed which is not the good thing I think so think about decoupling it for our own ease of maintaining the project for the long term.

Similar to what we did in OpenCompose we can do it here as well.

So what I think is that we create a validation function for what we have read in after app, err := encoding.Decode(data) in pkg/cmd/convert.go. This will pull all the validation code like the case we are checking if multiple containers are given then is the name field is provided by the user. And more like those.

@pradeepto pradeepto changed the title Decouple validation from conversion code Decouple validation from generation code Jun 23, 2017
@concaf
Copy link
Collaborator

concaf commented Sep 20, 2017

@surajssd can we close this? We have separate validation functions now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants