data2minio/global/global.go

31 lines
467 B
Go

package global
import (
"fmt"
"github.com/minio/minio-go/v7"
"os"
"git.hpds.cc/Component/logging"
"go.uber.org/zap"
"xorm.io/xorm"
"data_minio/config"
)
var (
DB *xorm.Engine
Cfg *config.DataMinioConfig
Logger *logging.Logger
MinioClient *minio.Client
)
func Must(err error) {
if err != nil {
_, _ = fmt.Fprint(os.Stderr, err)
Logger.With(
zap.String("应用名称", Cfg.Name),
).Error(err.Error())
//os.Exit(1)
}
}