mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	* Clean up oauth2 providers Signed-off-by: Andrew Thornton <art27@cantab.net> * Add AzureAD, AzureADv2, MicrosoftOnline OAuth2 providers Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review * remove unused Scopes Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
		
			
				
	
	
		
			37 lines
		
	
	
		
			411 B
		
	
	
	
		
			Go
		
	
	
	
		
			Vendored
		
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			411 B
		
	
	
	
		
			Go
		
	
	
	
		
			Vendored
		
	
	
	
package defaults
 | 
						|
 | 
						|
func String(s1, s2 string) string {
 | 
						|
	if s1 == "" {
 | 
						|
		return s2
 | 
						|
	}
 | 
						|
	return s1
 | 
						|
}
 | 
						|
 | 
						|
func Int(i1, i2 int) int {
 | 
						|
	if i1 == 0 {
 | 
						|
		return i2
 | 
						|
	}
 | 
						|
	return i1
 | 
						|
}
 | 
						|
 | 
						|
func Int64(i1, i2 int64) int64 {
 | 
						|
	if i1 == 0 {
 | 
						|
		return i2
 | 
						|
	}
 | 
						|
	return i1
 | 
						|
}
 | 
						|
 | 
						|
func Float32(i1, i2 float32) float32 {
 | 
						|
	if i1 == 0.0 {
 | 
						|
		return i2
 | 
						|
	}
 | 
						|
	return i1
 | 
						|
}
 | 
						|
 | 
						|
func Float64(i1, i2 float64) float64 {
 | 
						|
	if i1 == 0.0 {
 | 
						|
		return i2
 | 
						|
	}
 | 
						|
	return i1
 | 
						|
}
 |