mirror of
				https://github.com/actions/setup-go.git
				synced 2025-11-03 22:20:38 -05:00 
			
		
		
		
	
		
			
	
	
		
			14 lines
		
	
	
		
			241 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
		
		
			
		
	
	
			14 lines
		
	
	
		
			241 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| 
								 | 
							
								  
							 | 
						||
| 
								 | 
							
								#!/bin/sh
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								if [ -z "$1" ]; then
							 | 
						||
| 
								 | 
							
								  echo "Must supply go version argument"
							 | 
						||
| 
								 | 
							
								  exit 1
							 | 
						||
| 
								 | 
							
								fi
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								go_version="$(go version)"
							 | 
						||
| 
								 | 
							
								echo "Found go version '$go_version'"
							 | 
						||
| 
								 | 
							
								if [ -z "$(echo $go_version | grep $1)" ]; then
							 | 
						||
| 
								 | 
							
								  echo "Unexpected version"
							 | 
						||
| 
								 | 
							
								  exit 1
							 | 
						||
| 
								 | 
							
								fi
							 |