Fix tui
This commit is contained in:
		
							
								
								
									
										12
									
								
								util/util.go
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								util/util.go
									
									
									
									
									
								
							@@ -136,6 +136,18 @@ func Truncate(str string, length int) string {
 | 
			
		||||
	return str
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Distinct a slice
 | 
			
		||||
func Distinct(ss []string) (distincted []string) {
 | 
			
		||||
	m := map[string]bool{}
 | 
			
		||||
	for _, s := range ss {
 | 
			
		||||
		if _, found := m[s]; !found {
 | 
			
		||||
			m[s] = true
 | 
			
		||||
			distincted = append(distincted, s)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// VendorLink returns a URL of the given OS family and CVEID
 | 
			
		||||
//TODO
 | 
			
		||||
//  func VendorLink(family, cveID string) string {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user