fix lint errors
This commit is contained in:
parent
6df89a7a38
commit
3a33bed423
@ -97,11 +97,12 @@ func (u *User) Notify(m *machine.EventMessage) {
|
|||||||
case machine.ENTERSTATEEVENT:
|
case machine.ENTERSTATEEVENT:
|
||||||
switch m.Dest {
|
switch m.Dest {
|
||||||
case "start_create":
|
case "start_create":
|
||||||
if e := u.Create(ctx); e != nil {
|
if e := u.Create(ctx); e == nil {
|
||||||
if triggerErr := u.stater.Trigger("created"); triggerErr != nil {
|
if triggerErr := u.stater.Trigger("created"); triggerErr == nil {
|
||||||
// transition error
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
u.State = "absent"
|
||||||
case "present":
|
case "present":
|
||||||
u.State = "present"
|
u.State = "present"
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ func NewFileDocTarget(u *url.URL, format string, gzip bool, fileUri bool) DocTar
|
|||||||
t.Path = filepath.Join(u.Hostname(), u.Path)
|
t.Path = filepath.Join(u.Hostname(), u.Path)
|
||||||
}
|
}
|
||||||
if e := t.Open(); e != nil {
|
if e := t.Open(); e != nil {
|
||||||
// open target
|
return nil
|
||||||
}
|
}
|
||||||
return t
|
return t
|
||||||
}
|
}
|
||||||
@ -71,7 +71,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if e := t.Open(); e != nil {
|
if e := t.Open(); e != nil {
|
||||||
// open target
|
return nil
|
||||||
}
|
}
|
||||||
return t
|
return t
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user