| 
									
										
										
										
											2019-08-17 15:55:25 +03:00
										 |  |  | // For more tutorials: https://blog.learngoprogramming.com | 
					
						
							|  |  |  | // | 
					
						
							|  |  |  | // Copyright © 2018 Inanc Gumus | 
					
						
							|  |  |  | // Learn Go Programming Course | 
					
						
							|  |  |  | // License: https://creativecommons.org/licenses/by-nc-sa/4.0/ | 
					
						
							|  |  |  | // | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | package main | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-19 10:21:11 +03:00
										 |  |  | import "fmt" | 
					
						
							| 
									
										
										
										
											2019-08-17 15:55:25 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-19 10:21:11 +03:00
										 |  |  | type book struct { | 
					
						
							|  |  |  | 	title string | 
					
						
							| 
									
										
										
										
											2019-08-21 23:53:47 +03:00
										 |  |  | 	price money | 
					
						
							| 
									
										
										
										
											2019-08-19 10:21:11 +03:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2019-08-17 15:55:25 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-19 10:21:11 +03:00
										 |  |  | func (b book) print() { | 
					
						
							| 
									
										
										
										
											2019-08-21 23:53:47 +03:00
										 |  |  | 	fmt.Printf("%-15s: %s\n", b.title, b.price.string()) | 
					
						
							| 
									
										
										
										
											2019-08-17 15:55:25 +03:00
										 |  |  | } |