diff --git a/functions/demo1.go b/functions/demo1.go index e5ff0aa..1e24727 100644 --- a/functions/demo1.go +++ b/functions/demo1.go @@ -7,6 +7,6 @@ func Addition(number1 int, number2 int) int{ return total } -func SayHello() { - fmt.Println("Hello There !") +func SayHello(userName string) { + fmt.Println("Hello There !", userName) } diff --git a/main.go b/main.go index 32d614e..1e5e2f0 100644 --- a/main.go +++ b/main.go @@ -17,7 +17,7 @@ func main() { loops.Demo5() arrays.Demo4() slices.Demo2() - functions.SayHello() + functions.SayHello("Mert Gör") // functions.Addition(2,6) var total = functions.Addition(3,8) fmt.Println(total)