mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	pkg: version: add String method
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
		
							parent
							
								
									905f3336b2
								
							
						
					
					
						commit
						0d9f1e344a
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -37,6 +37,11 @@ func (v Version) compareTo(other Version) int {
 | 
			
		|||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// String returns the version string
 | 
			
		||||
func (v Version) String() string {
 | 
			
		||||
	return string(v)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// LessThan checks if a version is less than another
 | 
			
		||||
func (v Version) LessThan(other Version) bool {
 | 
			
		||||
	return v.compareTo(other) == -1
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue