mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-10-29 15:02:30 +00:00
Apply go fix to simplify using modern features
This patch contains the result of running `go fix ./...`, which applies simplifications that make use of modern language features. There are no logic or behaviour changes.
This commit is contained in:
@@ -38,7 +38,7 @@ func (t *Trace) NewChild(family, title string) *Trace {
|
||||
}
|
||||
|
||||
// Printf adds this message to the trace's log.
|
||||
func (t *Trace) Printf(format string, a ...interface{}) {
|
||||
func (t *Trace) Printf(format string, a ...any) {
|
||||
t.t.Printf(format, a...)
|
||||
|
||||
log.Log(log.Info, 1, "%s %s: %s", t.family, t.title,
|
||||
@@ -46,7 +46,7 @@ func (t *Trace) Printf(format string, a ...interface{}) {
|
||||
}
|
||||
|
||||
// Debugf adds this message to the trace's log, with a debugging level.
|
||||
func (t *Trace) Debugf(format string, a ...interface{}) {
|
||||
func (t *Trace) Debugf(format string, a ...any) {
|
||||
t.t.Printf(format, a...)
|
||||
|
||||
log.Log(log.Debug, 1, "%s %s: %s",
|
||||
@@ -54,7 +54,7 @@ func (t *Trace) Debugf(format string, a ...interface{}) {
|
||||
}
|
||||
|
||||
// Errorf adds this message to the trace's log, with an error level.
|
||||
func (t *Trace) Errorf(format string, a ...interface{}) error {
|
||||
func (t *Trace) Errorf(format string, a ...any) error {
|
||||
// Note we can't just call t.Error here, as it breaks caller logging.
|
||||
err := fmt.Errorf(format, a...)
|
||||
t.t.SetError()
|
||||
|
||||
Reference in New Issue
Block a user