#335 caller skip count. #338
@ -176,3 +176,16 @@ func WithMicroKeys() options.Option {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func WithIncCallerSkipCount(n int) options.Option {
|
||||
return func(src interface{}) error {
|
||||
c, err := options.Get(src, ".CallerSkipCount")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = options.Set(src, c.(int)+n, ".CallerSkipCount"); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user