tools

package
v0.0.0-...-90a3c3a Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Camel2Case

func Camel2Case(name string) string

驼峰式写法转为下划线写法

func Case2Camel

func Case2Camel(name string) string

下划线写法转为驼峰写法

func GetMysqlDb

func GetMysqlDb() (db *gorm.DB)

func Lcfirst

func Lcfirst(str string) string

首字母小写

func PathExists

func PathExists(path string) (bool, error)

PathExists 判断文件夹是否存在

func Ucfirst

func Ucfirst(str string) string

首字母大写

func Write

func Write(filename string, Name string, content string, path string) string

Types

type Buffer

type Buffer struct {
	*bytes.Buffer
}

内嵌bytes.Buffer,支持连写

func NewBuffer

func NewBuffer() *Buffer

func (*Buffer) Append

func (b *Buffer) Append(i interface{}) *Buffer

type MysqlConnectPool

type MysqlConnectPool struct {
}

* MysqlConnectiPool * 数据库连接操作库 * 基于gorm封装开发

func GetMysqlInstance

func GetMysqlInstance() *MysqlConnectPool

func (*MysqlConnectPool) GetMysqlPool

func (m *MysqlConnectPool) GetMysqlPool() *gorm.DB

* @fuc 对外获取数据库连接对象db

func (*MysqlConnectPool) InitMysqlPool

func (m *MysqlConnectPool) InitMysqlPool() (issucc bool)

* @fuc 初始化数据库连接(可在mail()适当位置调用)

Jump to

Keyboard shortcuts

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