fix lint errors
This commit is contained in:
parent
cf61b1504c
commit
0bcea916a2
@ -84,16 +84,18 @@ func (n *ContainerNetwork) Notify(m *machine.EventMessage) {
|
||||
case machine.ENTERSTATEEVENT:
|
||||
switch m.Dest {
|
||||
case "start_create":
|
||||
if e := n.Create(ctx); e != nil {
|
||||
if triggerErr := n.stater.Trigger("created"); triggerErr != nil {
|
||||
// transition error
|
||||
if e := n.Create(ctx); e == nil {
|
||||
if triggerErr := n.stater.Trigger("created"); triggerErr == nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
n.State = "absent"
|
||||
case "present":
|
||||
n.State = "present"
|
||||
}
|
||||
case machine.EXITSTATEEVENT:
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (n *ContainerNetwork) URI() string {
|
||||
|
@ -119,11 +119,12 @@ func (f *File) Notify(m *machine.EventMessage) {
|
||||
case machine.ENTERSTATEEVENT:
|
||||
switch m.Dest {
|
||||
case "start_create":
|
||||
if e := f.Create(ctx); e != nil {
|
||||
if triggerErr := f.stater.Trigger("created"); triggerErr != nil {
|
||||
// transition error
|
||||
if e := f.Create(ctx); e == nil {
|
||||
if triggerErr := f.stater.Trigger("created"); triggerErr == nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
f.State = "absent"
|
||||
case "present":
|
||||
f.State = "present"
|
||||
}
|
||||
|
@ -70,11 +70,12 @@ func (h *HTTP) Notify(m *machine.EventMessage) {
|
||||
case machine.ENTERSTATEEVENT:
|
||||
switch m.Dest {
|
||||
case "start_create":
|
||||
if e := h.Create(ctx); e != nil {
|
||||
if triggerErr := h.stater.Trigger("created"); triggerErr != nil {
|
||||
// transition error
|
||||
if e := h.Create(ctx); e == nil {
|
||||
if triggerErr := h.stater.Trigger("created"); triggerErr == nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
h.State = "absent"
|
||||
case "present":
|
||||
h.State = "present"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user