| 
									
										
										
										
											2018-10-13 23:30:21 +03:00
										 |  |  | // Copyright © 2018 Inanc Gumus | 
					
						
							|  |  |  | // Learn Go Programming Course | 
					
						
							|  |  |  | // License: https://creativecommons.org/licenses/by-nc-sa/4.0/ | 
					
						
							|  |  |  | // | 
					
						
							| 
									
										
										
										
											2019-10-30 19:34:44 +03:00
										 |  |  | // For more tutorials  : https://learngoprogramming.com | 
					
						
							|  |  |  | // In-person training  : https://www.linkedin.com/in/inancgumus/ | 
					
						
							|  |  |  | // Follow me on twitter: https://twitter.com/inancgumus | 
					
						
							| 
									
										
										
										
											2018-10-13 23:30:21 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | package main | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import ( | 
					
						
							|  |  |  | 	"fmt" | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // --------------------------------------------------------- | 
					
						
							| 
									
										
										
										
											2018-10-27 17:15:23 +03:00
										 |  |  | // EXERCISE: Trim It | 
					
						
							|  |  |  | // | 
					
						
							| 
									
										
										
										
											2018-10-13 23:30:21 +03:00
										 |  |  | //  1. Look at the documentation of strings package | 
					
						
							|  |  |  | //  2. Find a function that trims the spaces from | 
					
						
							|  |  |  | //     the given string | 
					
						
							|  |  |  | //  3. Trim the text variable and print it | 
					
						
							|  |  |  | // | 
					
						
							|  |  |  | // EXPECTED OUTPUT | 
					
						
							|  |  |  | //  The weather looks good. | 
					
						
							|  |  |  | //  I should go and play. | 
					
						
							|  |  |  | // --------------------------------------------------------- | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | func main() { | 
					
						
							|  |  |  | 	msg := ` | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	The weather looks good. | 
					
						
							|  |  |  | I should go and play. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	fmt.Println(msg) | 
					
						
							|  |  |  | } |