package
0.0.0-20240925070155-7e401e5804bf
Repository: https://github.com/mhaatha/go-learn.git
Documentation: pkg.go.dev

# README

Functions

Functions in Go can take zero or more arguments.

To make Go code easier to read, the variable type comes after the variable name.

For example, the following function:

func sub(x int, y int) int {
  return x-y
}

Accepts two integer parameters and returns another integer.

Here, func sub(x int, y int) int is known as the "function signature".

Assignment

We often will need to manipulate strings in our messaging app. For example, adding some personalization by using a customer's name within a template. The concat function should take two strings and smash them together.

  • hello + world = helloworld

Fix the function signature of concat to reflect its behavior.