mirror of
				https://github.com/restic/rest-server.git
				synced 2025-10-31 13:21:00 +00:00 
			
		
		
		
	Check version in build.go
Print a sensible error for Go < 1.7 (the "context" package is missing there)
f8dd5d5088
			
			
This commit is contained in:
		
							parent
							
								
									a029785c73
								
							
						
					
					
						commit
						4bc2581b47
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		
							
								
								
									
										6
									
								
								build.go
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								build.go
									
										
									
									
									
								
							|  | @ -291,6 +291,12 @@ func (cs Constants) LDFlags() string { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func main() { | func main() { | ||||||
|  | 	ver := runtime.Version() | ||||||
|  | 	if strings.HasPrefix(ver, "go1") && ver < "go1.7" { | ||||||
|  | 		fmt.Fprintf(os.Stderr, "Go version %s detected, restic requires at least Go 1.7\n", ver) | ||||||
|  | 		os.Exit(1) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	buildTags := []string{} | 	buildTags := []string{} | ||||||
| 
 | 
 | ||||||
| 	skipNext := false | 	skipNext := false | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Zlatko Čalušić
						Zlatko Čalušić