Middle and Senior developers, please help me with this

Hi developers! I am self-studying Go (Golang). Could you please give me some advice on how to fully understand functions? Also, where can I find practice problems on this topic?

Additionally, could you provide a roadmap for learning backend development using the Gin library? My goal is to get a job as quickly as possible to earn money for my university tuition. Any advice you share will be incredibly helpful to me!

1 Like

First use oficial docs: A Tour of Go

Try Python Tutor to see running line by line, or try use debugger to understand functions.

Maybe can help this small piece of code
```
#include <stdio.h> // This call a lib with function printf
// in Go you don’t need this lib, because print it is inside standard.

// This is MyFunction and return a int
int MyFunction(int x) {
// Now we are inside this block of code, only to organize
return x;
}

// main it is the heart, all begins here
int main() {
printf(“let’s start the code”);

// Now to organize all code, I separate some code inside a group of code,
// and call as MyFunction
MyFunction(2); // Now you are inside this function

// Program finish
return 0;
}
```

Paste C code in link below and run

Hi :waving_hand: Once you’re comfortable with Go syntax and data types (strings/runes, slices vs arrays, maps, structs), functions start to make more sense because you understand what you’re passing around.
Focus on:

* named vs unnamed returns

* functions that take/return other functions

* methods vs functions (methods attach to structs)

* pointers in function params (when you need to modify data)

For practice, just build small things:

* calculator

* string utilities (reverse, palindrome, count chars)

* slice helpers (filter/map-style functions)

* a simple CLI like a result/grade calculator using structs or maps

which takes the students name and score from the cli and gives a grade based on the score

For practice platforms: Exercism, Codewars, LeetCode (easy problems).

Also, don’t only do exercises—building small projects helps it click faster, roadmap.sh is a place to find great projects.

For Gin, I’m still practicing REST APIs manually before fully relying on frameworks.

-–