mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 16:00:24 +08:00 
			
		
		
		
	
		
			
	
	
		
			21 lines
		
	
	
		
			395 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			21 lines
		
	
	
		
			395 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								package setup
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import (
							 | 
						||
| 
								 | 
							
									teaconst "github.com/TeaOSLab/EdgeAPI/internal/const"
							 | 
						||
| 
								 | 
							
									"strings"
							 | 
						||
| 
								 | 
							
								)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func ComposeSQLVersion() string {
							 | 
						||
| 
								 | 
							
									var version = teaconst.Version
							 | 
						||
| 
								 | 
							
									if len(teaconst.SQLVersion) == 0 {
							 | 
						||
| 
								 | 
							
										return version
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									if strings.Count(version, ".") <= 2 {
							 | 
						||
| 
								 | 
							
										return version + "." + teaconst.SQLVersion
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
									return version
							 | 
						||
| 
								 | 
							
								}
							 |