utils

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstUpper added in v0.2.4

func FirstUpper(s string) string

FirstUpper 首字母大写方法

func GenFile

func GenFile(fileName, content string, isOverlay bool) error

GenFile 生成文件 fileName 文件路径名 content 文件内容 isOverlay 是否替换之前生成的文件

func GetDb added in v0.2.4

func GetDb() (db *gorm.DB, err error)

GetDb 获取数据库实例 使用前需要加载viper

Types

type ProjectConfig added in v0.2.6

type ProjectConfig struct {
	AppName string `json:"app_name"`
	UseDb   bool   `json:"use_db"`
}

func GetProjectConfig added in v0.2.6

func GetProjectConfig() (ProjectConfig, error)

GetProjectConfig 获取项目工具配置信息

Jump to

Keyboard shortcuts

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