INNER CODE UNIT · Go

isValidDatabaseType

sy-vendor/Gobi · config/config.go:636

func isValidDatabaseType(dbType string) bool {
	validTypes := []string{"sqlite", "mysql", "postgres"}
	for _, validType := range validTypes {
		if dbType == validType {
			return true
		}
	}
	return false
}

func generateSecureSecret(length int) string {
	bytes := make([]byte, length)
	rand.Read(bytes)
	return hex.EncodeToString(bytes)
}

// 配置工具函数
func (c *Config) IsDevelopment() bool {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…