From 220522e1b2076f948124ae040018b3e44f1111cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20G=C3=B6r?= Date: Sun, 14 Jan 2024 00:33:09 +0300 Subject: [PATCH] userName string example for SayHello function --- functions/demo1.go | 4 ++-- main.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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)