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:
|
||||
switch m.Dest {
|
||||
case "start_create":
|
||||
if e := u.Create(ctx); e != nil {
|
||||
if triggerErr := u.stater.Trigger("created"); triggerErr != nil {
|
||||
// transition error
|
||||
if e := u.Create(ctx); e == nil {
|
||||
if triggerErr := u.stater.Trigger("created"); triggerErr == nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
u.State = "absent"
|
||||
case "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)
|
||||
}
|
||||
if e := t.Open(); e != nil {
|
||||
// open target
|
||||
return nil
|
||||
}
|
||||
return t
|
||||
}
|
||||
@ -71,7 +71,7 @@ func init() {
|
||||
}
|
||||
}
|
||||
if e := t.Open(); e != nil {
|
||||
// open target
|
||||
return nil
|
||||
}
|
||||
return t
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user