Skip to content

Commit abe32df

Browse files
committed
tutorial1 - the basics
1 parent 302a55d commit abe32df

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ go build tutorial1/main.go
4040
```shell
4141
go run tutorial1/main.go
4242
```
43+
44+
### Topics covered:
45+
- [x] [Basics](tutorial1)

tutorial1/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Tutorial-1 - Basics
2+
3+
This package contains a simple Go program, `main.go`, which is explained below:
4+
5+
## main.go
6+
7+
The `main.go` file is a simple Go program that prints "Radhe Radhe" to the standard output.
8+
9+
Here's a breakdown of the [code](main.go):
10+
11+
- `package main`: This line defines the package name of this Go program. Every Go program starts running in a package called `main`.
12+
13+
- `import "fmt"`: This line imports the built-in `fmt` package in Go which provides functions for formatted I/O.
14+
15+
- `func main()`: The `main()` function is the entry point of our program. The Go runtime calls this function when the program starts, and where the program execution begins.
16+
17+
- `fmt.Println("Radhe Radhe")`: This line calls the `Println` function from the `fmt` package to print the string "Radhe Radhe" to the standard output.
18+
19+
- This program, when run, will simply print "Radhe Radhe" to your console.
20+
21+

0 commit comments

Comments
 (0)