-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
…mpose file, Add pause/unpause methods to start without creating and stop without deleting services.
compose.go
Outdated
// Stop shuts down and clean the project | ||
func (p *Project) Stop() error { | ||
// FIXME(vdemeester) handle timeout | ||
func (p *Project) Pause(services ...string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method Project.Pause should have comment or be unexported
compose.go
Outdated
return p.UnPause(services...) | ||
} | ||
|
||
func (p *Project) UnPause(services ...string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method Project.UnPause should have comment or be unexported
Codecov Report
@@ Coverage Diff @@
## master #6 +/- ##
====================================
Coverage 0% 0%
====================================
Files 1 1
Lines 91 125 +34
====================================
- Misses 91 125 +34 |
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #6 +/- ##
====================================
Coverage 0% 0%
====================================
Files 1 1
Lines 91 125 +34
====================================
- Misses 91 125 +34 |
compose.go
Outdated
return p.UnPause(services...) | ||
} | ||
|
||
// Unpause only starts created services which are stopped. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment on exported method Project.UnPause should be of the form "UnPause ..."
compose.go
Outdated
} | ||
|
||
// UnPause only starts created services which are stopped. | ||
func (p *Project) UnPause(services ...string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 pause
/unpause
are already docker and docker-compose commands so I think it's the wrong name for the method here (i.e. it's going to be confusing).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, does it need to be exported ? 👼
compose.go
Outdated
func (p *Project) Stop() error { | ||
// FIXME(vdemeester) handle timeout | ||
// Pause only stop services without delete them. | ||
func (p *Project) Pause(services ...string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🐯
This feature allows users to add services as parameters when project is started/stopped.
The pause/unpause methods are added in the way to separate :