Golang Built In Functions

Review built-in functions in Golang. See examples of how these built-ins are used.
Built-ins. Go programs use packages to add functionality. But core functions are built into the language. With built-ins we perform common tasks.
A list. Here is a list of built-in functions in the Go language. These methods can be called directly, in any program, as they are part of the core.appendcapcopydeletelenmakenewpanicprintprintlnrecover
Keywords. In Go we find many keywords. We use these keywords to act upon variables and more complex types (as from packages). These are available in all programs.breakcasechanconstcontinuedefaultdeferelsefallthroughforfuncgoifimportinterfaceiotamapnilrangereturnstructswitchtypevar
Packages. We use the "import" keyword to add a package to a Go program. Once we import package "Y" we can invoke methods on it like Y.Do().bufiobytescompress/gzipcontainer/listencoding/base64encoding/csvencoding/jsonflagfmthtml/templateio/ioutilindex/suffixarraymathmath/bitsnet/httposos/execpathpath/filepathregexpsortstrconvrandstringstimeunicode
Funcs. In Go we rely on funcs from packages. To display to the console, for example, we use the Println method from the fmt package. Some strings methods are listed here.AtoiFormatIntIndexItoaJoinLastIndexMatchStringNowParseIntPrintPrintlnReplaceSortSplit
Go specification. For detailed descriptions of Go keywords, I recommend reading the official Go specification. This document is not exciting, but it is excellent in every other way.Go Specification:
Some notes. Operators are another key part of the Go language. These include the plus + and other arithmetic ones. These operators too are built in.
In Go we find a newer, well-designed set of features. The Go compiler itself is an impressive technical feat. A Go developer will do great things in the world.
© 2007-2019 Sam Allen. Every person is special and unique. Send bug reports to
Dot Net Perls