fix: lint issues

This commit is contained in:
yanghao05
2023-03-09 10:23:23 +08:00
parent 8d1bd191df
commit 5943b9e1d5
17 changed files with 88 additions and 78 deletions

View File

@@ -53,5 +53,4 @@ func Load() (*Config, error) {
}
return config, nil
}

View File

@@ -21,10 +21,10 @@ type MySQL struct {
Username string
Password string
Prefix string // 表前缀
Singular bool //是否开启全局禁用复数true表示开启
Singular bool // 是否开启全局禁用复数true表示开启
MaxIdleConns int // 空闲中的最大连接数
MaxOpenConns int // 打开到数据库的最大连接数
Engine string //数据库引擎默认InnoDB
Engine string // 数据库引擎默认InnoDB
}
func (m *MySQL) CreateDatabaseSql() string {
@@ -66,7 +66,7 @@ type PostgreSQL struct {
SslMode string
TimeZone string
Prefix string // 表前缀
Singular bool //是否开启全局禁用复数true表示开启
Singular bool // 是否开启全局禁用复数true表示开启
MaxIdleConns int // 空闲中的最大连接数
MaxOpenConns int // 打开到数据库的最大连接数
}

View File

@@ -42,10 +42,10 @@ type Whitelist struct {
AllowCredentials bool
}
func (h Http) Address() string {
func (h *Http) Address() string {
return fmt.Sprintf("%s:%d", h.Host, h.Port)
}
func (h Http) PortString() string {
func (h *Http) PortString() string {
return fmt.Sprintf(":%d", h.Port)
}