Skip to content

Commit 07fa138

Browse files
AmeerMoustafaAmeerMoustafa
authored andcommitted
Added category for Go and a basic hello world snippet
1 parent 11625c1 commit 07fa138

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

snippets/go/basics/hello-world.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Hello, World!
3+
description: A simple function that outputs "Hello, World!"
4+
author: AmeerMoustafa
5+
tags: golang,basics,formatting
6+
---
7+
8+
```go
9+
package main // A package in Go is how Golang knows which files are related
10+
11+
import "fmt" // Imports the fmt package, commonly used for printing
12+
13+
func main() { // the main function in Go acts as the entry point to our program
14+
15+
fmt.Println("Hello, World!") // Calling the Println function from the fmt package
16+
}
17+
```

snippets/go/icon.svg

Lines changed: 6 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)