> For the complete documentation index, see [llms.txt](https://derslik.kerteriz.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://derslik.kerteriz.net/go/temel-dersler/go-veri-tipleri/go-boolen.md).

# # Go Boolen

Matematikte mantık dediğimizde aklımıza nasıl **doğru** ve **yanlış** terimleri geliyorsa Go programlama dilinde de **`bool`**  veri tipinde **True** ve **False** değerleri karşımıza çıkıyor. Herhangi iki değeri karşılaştırdığınızda veya bir ifadenin doğrulunu kontrol ederken **bool** veri tipini kullanabilirsiniz.

```go
var (
    durum bool = true
    kontrol bool = false
)

fmt.Println(durum)        // true
fmt.Println(kontrol)       // false
```

Değişkenlerimizi `bool` veri tipinde oluşturup değerlerini atadık. Herhangi bir değer atamadan bile koşullar bize `bool` veri tipinde sonuç döndürürler.

```go
fmt.Println(5 > 4)        // true
fmt.Println(5 == 4)       // false
fmt.Println(5 < 4)        // false
```

Örnekteki gibi Go ile bir durumu kontrol ettiğinizde size True veya False olarak cevap döner. Aynı şekilde **if** kontrol durumları ile de `bool` ifadeleri kullanabilirsiniz.

```go
a := 10
b := 20

if a > b {
		fmt.Println("a büyüktür b den")
} else {
	fmt.Println("b büyüktür a dan")
}

// b büyüktür a dan
```

{% hint style="info" %}
&#x20;Bir `bool` veri tipindeki değişkene hiçbir değer atamazsanız öntanımlı olarak **false** değerini döndürür.
{% endhint %}

```go
var x bool

fmt.Println(x)    // false
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://derslik.kerteriz.net/go/temel-dersler/go-veri-tipleri/go-boolen.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.
