# Structure

## Program Structure

* Documentation block
* Preprocessor Statements
* The main ( ) function
* Local Variable Declarations
* Program statements
* User defined functions

```go
/* This is my first Go program. */
package main
import "fmt"
func main() {
    fmt.Println("Hello, World!")
}
```

## Documentation Block

```go
/*
Program Name: First Go Program
Version: 1.0
Description: Go program basic program structure.
Author: @Oliver
Date Created 04/01/2021
*/
```

## Package Declaration

```go
package main
```

## Preprocessor Statements

```go
import "fmt"
```

## The main() function

Mandatory to have in Go.

## Local Variable Declarations

Variables in main

## Statements and Expressions

This is the section where we place our main logic of the program which included the executable statements, that tell the computer to perform a specification action. Program statement can be an input-output statements, arithmetic statements, control statements, simple assignment statements and any other statements and it also includes comments that are enclosed within /\* *and \**/.

## User Defined Functions

Functions in main


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blog.yushunchen.com/golang-notes/basics/structure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
