# Go

### Resources

* IDE -> <https://www.jetbrains.com/go/download/>&#x20;
* How to use -> <https://www.jetbrains.com/go/learn/>
* <https://go.dev/doc/> - Official Docs
* <https://quii.gitbook.io/learn-go-with-tests/>&#x20;
* <https://gobyexample.com/> -> Learn go by exaples
* <https://go.dev/tour/welcome/1> -> tour of Go
* <https://github.com/stars/zomasec/lists/allaboutgolang> -> Collection for studying go
* <https://gophercises.com/> -> Practice go&#x20;
* <https://www.youtube.com/playlist?list=PL-s79PvYsn56nex_VS-ms_APNmfDgmc3k> -> youtube Course&#x20;
* <https://github.com/blackhat-go/bhg> -> BlacHatGo Notes
* <https://www.youtube.com/@anthonygg_> -> Antony GG Chanel
* <https://www.programiz.com/golang/getting-started> -> Toturials from programiz&#x20;
* <https://devhints.io/go> -> Go *cheatsheet*

### *Go Commands*

* `go run main.go`  *-> Run a file*
* `go build hello.go`  -> this command should create an executable file with the name *hello*
* `$ go build -ldflags "-w -s"` will reduce the binary size by approximately 30 percent:
* `go doc fmt.Println`  -> The go doc command lets you interrogate documentation about a package, function, method, or variable
* `go get` -> To obtain package source code
* `go get github.com/stacktitan/ldapauth`
* `go fmt` Automatically formats your source code
* `go vet` Attempts to identify issues, some of which might be legitimate bugs, that a compiler might miss
* `golint` reports style mistakes such as missing comments, variable naming that doesn’t follow conventions, useless type specifications, and more
* use the `go test` tool to run unit tests and benchmarks, cover to check for test coverage, imports to fix import statements, and more.
*


---

# 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://sallam.gitbook.io/sec-88/programming/go.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.
