Closed concaf closed 7 years ago
Ah :rofl: This is similar to what I suggested to @surajssd while reviewing his volumes PR. see https://github.com/redhat-developer/opencompose/pull/88#discussion_r112960763
I agree with basic idea, but i think that you shouldn't pass allMounts
as argument to function.
Its required only for checking colliding paths. And that one chack can be done in (c *Container) validate()
. as it requires information form container, its kind of container validation.
(m *Mount) validate() error
should validate only single mount nothing more.
@kadel agreed, fixed, PTAL :)
This is exactly how I was imagining it ;-) What do you thing @surajssd ?
This abstracts out the validate() methoud for Mount type in object.go, as has been done for other types in the file.
Also, added relevant tests.
Fixes #142