add an alias for AddDetails method's functionality
This change deprecates the method AddDetails over the method AppendDetails for more clarity. The functionality has not been changed. HH-129
This commit is contained in:
parent
f4f995e24f
commit
d8e3f3604e
|
@ -103,8 +103,14 @@ func (e *Err) Stack() *Stacktrace {
|
||||||
return e.stack
|
return e.stack
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddDetails records variable info to the error mostly for debugging purposes
|
// AddDetails is a alias for AppendDetail [DEPRECATED]
|
||||||
func (e *Err) AddDetails(v ...interface{}) *Err {
|
func (e *Err) AddDetails(v ...interface{}) *Err {
|
||||||
|
return e.AppendDetails(v...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// AppendDetails appends formated variable information at the end of a text
|
||||||
|
// field in the error mostly for debugging purposes.
|
||||||
|
func (e *Err) AppendDetails(v ...interface{}) *Err {
|
||||||
buff := new(bytes.Buffer)
|
buff := new(bytes.Buffer)
|
||||||
fmt.Fprintln(buff, e.details)
|
fmt.Fprintln(buff, e.details)
|
||||||
spew.Fdump(buff, v...)
|
spew.Fdump(buff, v...)
|
||||||
|
|
Loading…
Reference in New Issue