mirror of
https://github.com/iLoveElysia/openbilibili.git
synced 2026-09-02 23:58:04 -05:00
18 lines
245 B
Go
18 lines
245 B
Go
|
|
package trace
|
||
|
|
|
||
|
|
var defaultOption = option{}
|
||
|
|
|
||
|
|
type option struct {
|
||
|
|
Debug bool
|
||
|
|
}
|
||
|
|
|
||
|
|
// Option dapper Option
|
||
|
|
type Option func(*option)
|
||
|
|
|
||
|
|
// EnableDebug enable debug mode
|
||
|
|
func EnableDebug() Option {
|
||
|
|
return func(opt *option) {
|
||
|
|
opt.Debug = true
|
||
|
|
}
|
||
|
|
}
|