dependencies: update
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package tdesktop
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-faster/errors"
|
||||
|
||||
"go.mau.fi/mautrix-telegram/pkg/gotd/bin"
|
||||
@@ -118,7 +120,7 @@ func (m *MTPDCOptions) deserialize(r *qtReader) error {
|
||||
for i := 0; i < int(count); i++ {
|
||||
var o MTPDCOption
|
||||
if err := o.deserialize(r, version); err != nil {
|
||||
return errors.Errorf("read option %d: %w", i, err)
|
||||
return fmt.Errorf("read option %d: %w", i, err)
|
||||
}
|
||||
m.Options = append(m.Options, o)
|
||||
}
|
||||
|
||||
@@ -46,24 +46,24 @@ func generate(w io.Writer, pkgName string, g Generator) error {
|
||||
},
|
||||
}).Parse(g.Template())
|
||||
if err != nil {
|
||||
return errors.Errorf("parse: %w", err)
|
||||
return fmt.Errorf("parse: %w", err)
|
||||
}
|
||||
|
||||
if err := t.Execute(&buf, Config{
|
||||
PackageName: pkgName,
|
||||
Data: data,
|
||||
}); err != nil {
|
||||
return errors.Errorf("execute: %w", err)
|
||||
return fmt.Errorf("execute: %w", err)
|
||||
}
|
||||
|
||||
formatted, err := format.Source(buf.Bytes())
|
||||
if err != nil {
|
||||
_, _ = os.Stderr.Write(buf.Bytes())
|
||||
return errors.Errorf("format: %w", err)
|
||||
return fmt.Errorf("format: %w", err)
|
||||
}
|
||||
|
||||
if _, err := w.Write(formatted); err != nil {
|
||||
return errors.Errorf("write: %w", err)
|
||||
return fmt.Errorf("write: %w", err)
|
||||
}
|
||||
writeTime := time.Since(start)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user