mirror of https://github.com/statping/statping
vue
parent
f4b11f0d17
commit
51a03bd574
2
Makefile
2
Makefile
|
@ -269,7 +269,7 @@ clean:
|
|||
find . -name "*.out" -type f -delete
|
||||
find . -name "*.cpu" -type f -delete
|
||||
find . -name "*.mem" -type f -delete
|
||||
rm -rf build
|
||||
rm -rf {build,tmp}
|
||||
|
||||
# tag version using git
|
||||
tag:
|
||||
|
|
|
@ -110,7 +110,7 @@ func LoadUsingEnv() (*DbConfig, error) {
|
|||
}
|
||||
|
||||
// defaultPort accepts a database type and returns its default port
|
||||
func defaultPort(db string) int64 {
|
||||
func defaultPort(db string) int {
|
||||
switch db {
|
||||
case "mysql":
|
||||
return 3306
|
||||
|
@ -132,7 +132,7 @@ func EnvToConfig() (*DbConfig, error) {
|
|||
dbUser := utils.Getenv("DB_USER", "").(string)
|
||||
dbPass := utils.Getenv("DB_PASS", "").(string)
|
||||
dbData := utils.Getenv("DB_DATABASE", "").(string)
|
||||
dbPort := utils.Getenv("DB_PORT", defaultPort(dbConn)).(int64)
|
||||
dbPort := utils.Getenv("DB_PORT", defaultPort(dbConn)).(int)
|
||||
name := utils.Getenv("NAME", "Statping").(string)
|
||||
desc := utils.Getenv("DESCRIPTION", "Statping Monitoring Sample Data").(string)
|
||||
user := utils.Getenv("ADMIN_USER", "admin").(string)
|
||||
|
|
|
@ -58,7 +58,7 @@ func processSetupHandler(w http.ResponseWriter, r *http.Request) {
|
|||
DbUser: dbUser,
|
||||
DbPass: dbPass,
|
||||
DbData: dbDatabase,
|
||||
DbPort: dbPort,
|
||||
DbPort: int(dbPort),
|
||||
Project: project,
|
||||
Description: description,
|
||||
Domain: domain,
|
||||
|
|
|
@ -43,7 +43,7 @@ type DbConfig struct {
|
|||
DbUser string `yaml:"user" json:"-"`
|
||||
DbPass string `yaml:"password" json:"-"`
|
||||
DbData string `yaml:"database" json:"-"`
|
||||
DbPort int64 `yaml:"port" json:"-"`
|
||||
DbPort int `yaml:"port" json:"-"`
|
||||
ApiKey string `yaml:"api_key" json:"-"`
|
||||
ApiSecret string `yaml:"api_secret" json:"-"`
|
||||
Project string `yaml:"-" json:"-"`
|
||||
|
|
Loading…
Reference in New Issue