If you are using a Unix-based system (e.g. Linux or Mac OSX) you could try removing the debugging information included in the executable by building it with the -w flag:
go build -ldflags "-w" prog.go
The file sizes are reduced dramatically.
For more details visit the GDB’s page: http://golang.org/doc/gdb
Related Contents:
- Function declaration syntax: things in parenthesis before function name
- How to multiply duration by integer?
- Difference between := and = operators in Go
- Contains method for a slice
- What is a rune?
- What does an underscore in front of an import statement mean?
- How to import local packages without gopath
- Go naming conventions for const
- Does the Go language have function/method overloading?
- What’s the meaning of interface{}?
- How to do one-liner if else statement? [duplicate]
- Why does Go have a “goto” statement? [closed]
- Using forked package import in Go
- How to write log to file
- How to get all dependency files for a program
- What’s Go’s equivalent of argv[0]?
- How do I compare strings in GoLang?
- Read text file into string array (and write)
- Redirect stdout pipe of child process in Go
- Execute gofmt on file save in IntelliJ
- How to convert byte array to string in Go [duplicate]
- How do I install requirements in Go? “cannot find package”
- Check for nil and nil interface in Go
- go run: cannot run non-main package
- How to iterate through a map in Golang in order?
- Convert array to slice in Go
- How to check variable type at runtime in Go language
- GoLand (JetBrains) shows error message “Unresolved Reference”. But Code compiles and runs
- can’t load package: package .: no buildable Go source files
- Why are interfaces needed in Golang?
- One-liner to transform []int into string
- How to have an in-place string that updates on stdout
- Go: local import in non-local package
- How to strings.Split on newline?
- How can I read a header from an http request in golang?
- Copy one struct to another where structs have same members and different types
- Convert between slices of different types
- How to get a value from map
- VSCode: Could not import Golang package
- How do I escape “{{” and “}}” delimiters in Go templates?
- Nameless fields in Go structs?
- Call a method from a Go template
- go mod: cannot find module providing package
- Why add “()” after closure body in Golang?
- Is there an efficient way to calculate execution time in golang?
- pass ENV VAR to exec.Command?
- Month to int in Go
- What is the third parameter of a Go struct field?
- Tail Call Optimization in Go
- Making golang Gorilla CORS handler work