diff --git a/simplelog/simplelog.go b/simplelog/simplelog.go index aaa6606..a8a88c3 100644 --- a/simplelog/simplelog.go +++ b/simplelog/simplelog.go @@ -19,7 +19,7 @@ func (l LogLevel) String() string { return l.s } -type LevelFlag uint8 +type LevelFlag int const ( FlagInfo LevelFlag = 0x1 @@ -127,6 +127,7 @@ var defaultOption = &Option{ LevelFlag: FlagInfo | FlagWarn | FlagError | FlagDebug, } +// NewOption 构造 Option 参数 func NewOption(opts ...OptionFunc) (opt *Option) { opt = defaultOption for _, o := range opts {