Initial commit
This commit is contained in:
30
03-packages-and-scopes/exercises/01-packages/main.go
Normal file
30
03-packages-and-scopes/exercises/01-packages/main.go
Normal file
@ -0,0 +1,30 @@
|
||||
// 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
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// EXERCISE
|
||||
// Create a few Go files and call their functions from
|
||||
// the main function.
|
||||
//
|
||||
// 1- Create main.go, greet.go and bye.go files
|
||||
// 2- In main.go: Call greet and bye functions.
|
||||
// 3- Run `main.go`
|
||||
//
|
||||
// HINT
|
||||
// greet function should be in greet.go
|
||||
// bye function should be in bye.go
|
||||
//
|
||||
// EXPECTED OUTPUT
|
||||
// hi there
|
||||
// goodbye
|
||||
// ---------------------------------------------------------
|
||||
|
||||
func main() {
|
||||
// call functions of the other files here
|
||||
}
|
Reference in New Issue
Block a user