add lint action (#19)
All checks were successful
Go Action / goaction (push) Successful in 19m15s
All checks were successful
Go Action / goaction (push) Successful in 19m15s
Reviewed-on: #19
This commit was merged in pull request #19.
This commit is contained in:
@@ -82,13 +82,13 @@ type Source struct {
|
||||
}
|
||||
|
||||
func (l Source) MarshalText() ([]byte, error) {
|
||||
return []byte(fmt.Sprintf("%s:%d", l.File, l.Line)), nil
|
||||
return fmt.Appendf(nil, "%s:%d", l.File, l.Line), nil
|
||||
}
|
||||
|
||||
func (l Source) MarshalJSON() ([]byte, error) {
|
||||
return fmt.Appendf([]byte{}, `{"file":"%s","line":%d,"func":"%s"}`, l.File, l.Line, l.Func), nil
|
||||
}
|
||||
|
||||
func errSourceField(skip, max int) field.Field {
|
||||
return field.String(KeySource, fmt.Sprintf("source not found by frames[%d:%d]", skip, max))
|
||||
func errSourceField(skip, mframe int) field.Field {
|
||||
return field.String(KeySource, fmt.Sprintf("source not found by frames[%d:%d]", skip, mframe))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user