# Anonymous struct

Go dilində **struct** əlaqəli məlumatları qruplaşdırmaq üçün istifadə olunur. Adətən, struct-lar müəyyən bir adla elan olunur və bu, kod daxilində onlara müraciət etməyə və təkrar istifadə etməyə imkan verir. Lakin Go həmçinin **anonim struct**-ları da dəstəkləyir, yəni müəyyən olunmuş adı olmayan struct-lar.

Anonim struct-lar, yalnız müəyyən bir kontekstdə istifadə edilən, sadə və müvəqqəti strukturlar üçün faydalıdır. Onlar əsasən qısamüddətli məlumat strukturları üçün istifadə olunur.

### Anonim Struct Nümunəsi:

```go
package main

import "fmt"

func main() {
    person := struct {
        Name string
        Age  int
    }{
        Name: "Alice",
        Age:  30,
    }
	
    fmt.Println("Name:", person.Name)
    fmt.Println("Age:", person.Age)
}
```

### Output:

```
Name: Alice
Age: 30
```

Bu nümunədə, anonim struct "Name" və "Age" məlumatlarını saxlamaq üçün yaradılır və `person` dəyişəninə təyin edilir. Struct-ın adı yoxdur və yalnız bu kod blokunda istifadə olunur.


---

# 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://docs.golang.az/anonim-struct.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.
