-
Notifications
You must be signed in to change notification settings - Fork 2
/
process.go
58 lines (51 loc) · 1.23 KB
/
process.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package types
import (
"github.com/gookit/color"
)
type LogBlockInterface interface {
Options(func(options LogBlockOptionsInterface)) LogBlockInterface
Disable() LogBlockInterface
Enable() LogBlockInterface
Do(func())
DoError(func() error) error
}
type LogBlockOptionsInterface interface {
DisableIfLevelNotAccepted()
Mute()
WithIndent()
WithoutLogOptionalLn()
Style(color.Style)
}
type LogProcessInlineInterface interface {
Options(func(options LogProcessInlineOptionsInterface)) LogProcessInlineInterface
Disable() LogProcessInlineInterface
Enable() LogProcessInlineInterface
Do(func())
DoError(func() error) error
}
type LogProcessInlineOptionsInterface interface {
DisableIfLevelNotAccepted()
Mute()
Style(color.Style)
}
type LogProcessInterface interface {
Options(func(options LogProcessOptionsInterface)) LogProcessInterface
Disable() LogProcessInterface
Enable() LogProcessInterface
Do(func())
DoError(func() error) error
Start()
StepEnd(format string, a ...interface{})
End()
Fail()
}
type LogProcessOptionsInterface interface {
DisableIfLevelNotAccepted()
Mute()
WithIndent()
WithoutLogOptionalLn()
WithoutElapsedTime()
InfoSectionFunc(func(err error))
SuccessInfoSectionFunc(func())
Style(color.Style)
}