db

package
v0.0.0-...-3716ba0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Discard = New(log.New(ioutil.Discard, "", log.LstdFlags), customConfig{})
	Default = New(log.New(os.Stdout, "\r\n", log.LstdFlags), customConfig{
		SlowThreshold: 200 * time.Millisecond,
		LogLevel:      gormLog.Warn,
		Colorful:      true,
	})
	Recorder = traceRecorder{Interface: Default, BeginAt: time.Now()}
)

Functions

func Init

func Init()

@description: 初始化Mysql数据库 @return: *gorm.DB

func New

func New(writer writer, config customConfig) gormLog.Interface

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL