---
title: "Discussion on \"#02 The Basic Structure of the Go file\" | Hashnode"
description: "Discussion on \"#02 The Basic Structure of the Go file\". A go file has the following parts:\n\nPackage declaration\nImport packages\nmain() function\n\nExample:\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n  fmt.Println(\"Hello World!\")\n}\n\npackage keyword defines the package name because every program is a part of t..."
url: "https://hashnode.com/posts/02-the-basic-structure-of-the-go-file/626efcddd02237eb3fc7d113"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [#02 The Basic Structure of the Go file](https://blog.rudra0x01.xyz/02-the-basic-structure-of-the-go-file?utm_source=hashnode&utm_medium=feed)

A go file has the following parts: Package declaration Import packages main() function Example: package main import "fmt" func main() { fmt.Println("Hello World!") } package keyword defines the package name because every program is a part of t...

May 1, 2022 · 1 min read · blog.rudra0x01.xyz  
Read the article

-   [#go](https://hashnode.com/tag/go)
-   [#google](https://hashnode.com/tag/google)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#programming-languages](https://hashnode.com/tag/programming-languages)

## Written by

[Rudra](https://hashnode.com/@rudra0x01)

@rudra0x01

  
[View profile](https://hashnode.com/@rudra0x01)

Security Engineer

Security Engineer, DevSecOps

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
