mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
chore: modernize the codebase using go 1.26 (#278)
This runs: ``` go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix ./... ``` over the codebase, as this is using go 1.26, it can also use the new new() functionallity so AsPtr and boolPtr is are needed anymore. Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
+12
-12
@@ -17,57 +17,57 @@ func newIPFSLogger(l *slog.Logger) *ipfsLogger {
|
||||
return &ipfsLogger{log: *l}
|
||||
}
|
||||
|
||||
func (l *ipfsLogger) Debug(args ...interface{}) {
|
||||
func (l *ipfsLogger) Debug(args ...any) {
|
||||
l.log.Debug(fmt.Sprint(args...))
|
||||
}
|
||||
|
||||
func (l *ipfsLogger) Debugf(format string, args ...interface{}) {
|
||||
func (l *ipfsLogger) Debugf(format string, args ...any) {
|
||||
l.log.Debug(fmt.Sprintf(format, args...))
|
||||
}
|
||||
|
||||
func (l *ipfsLogger) Error(args ...interface{}) {
|
||||
func (l *ipfsLogger) Error(args ...any) {
|
||||
l.log.Error(fmt.Sprint(args...))
|
||||
}
|
||||
|
||||
func (l *ipfsLogger) Errorf(format string, args ...interface{}) {
|
||||
func (l *ipfsLogger) Errorf(format string, args ...any) {
|
||||
l.log.Error(fmt.Sprintf(format, args...))
|
||||
}
|
||||
|
||||
func (l *ipfsLogger) Fatal(args ...interface{}) {
|
||||
func (l *ipfsLogger) Fatal(args ...any) {
|
||||
l.log.Error(fmt.Sprint(args...))
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
func (l *ipfsLogger) Fatalf(format string, args ...interface{}) {
|
||||
func (l *ipfsLogger) Fatalf(format string, args ...any) {
|
||||
l.log.Error(fmt.Sprintf(format, args...))
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
func (l *ipfsLogger) Info(args ...interface{}) {
|
||||
func (l *ipfsLogger) Info(args ...any) {
|
||||
l.log.Info(fmt.Sprint(args...))
|
||||
}
|
||||
|
||||
func (l *ipfsLogger) Infof(format string, args ...interface{}) {
|
||||
func (l *ipfsLogger) Infof(format string, args ...any) {
|
||||
l.log.Info(fmt.Sprintf(format, args...))
|
||||
}
|
||||
|
||||
func (l *ipfsLogger) Panic(args ...interface{}) {
|
||||
func (l *ipfsLogger) Panic(args ...any) {
|
||||
msg := fmt.Sprint(args...)
|
||||
l.log.Error(msg)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
func (l *ipfsLogger) Panicf(format string, args ...interface{}) {
|
||||
func (l *ipfsLogger) Panicf(format string, args ...any) {
|
||||
msg := fmt.Sprintf(format, args...)
|
||||
l.log.Error(msg)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
func (l *ipfsLogger) Warn(args ...interface{}) {
|
||||
func (l *ipfsLogger) Warn(args ...any) {
|
||||
l.log.Warn(fmt.Sprint(args...))
|
||||
}
|
||||
|
||||
func (l *ipfsLogger) Warnf(format string, args ...interface{}) {
|
||||
func (l *ipfsLogger) Warnf(format string, args ...any) {
|
||||
l.log.Warn(fmt.Sprintf(format, args...))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user