Go (Programming Language)
Go (Programming Language)
Paradigm Multi-paradigm:
procedural,
Contents object-oriented,[1]
History concurrent
Version history
Designed by Robert Griesemer
Implementations
Rob Pike
Language design Ken Thompson
Syntax
Types Developer Google
Interface system First appeared 10 November
Package system 2009
Concurrency: goroutines and channels
Suitability for parallel programming Stable release 1.11 / 24 August
Lack of race condition safety 2018[2]
Binaries Typing Strong, static,
Omissions
discipline inferred,
Criticism
structural[3][4]
Conventions and code style
Implementation Go, assembly
Tools
language language (gc);
Examples
C++ (gccgo)
Hello world
Concurrency example OS DragonFly BSD,
Projects
FreeBSD, Linux,
macOS, NetBSD,
Reception
OpenBSD,[5] Plan
Naming dispute
9,[6] Solaris,
See also
Windows
Notes
License BSD-style[7] +
References
patent grant[8]
External links
Filename .go
extensions
In April 2018, the original logo (Gopher mascot) was replaced with a stylized GO slanting right with trailing streamlines. However,
the mascot remained the same.
In August 2018, the Go principal contributors published two ″draft designs″ for new language features, Generics and Error Handling,
and asked Go users to submit feedback on them.[24][25] Lack of support for generic programming and the verbosity of error handling
in Go 1.x had drawn considerablecriticism.
Version history
There exist a Go 1 compatibility guarantee[26] for the language specification and
major parts of the standard library. All version up to the current Go 1.10 release[27]
were able to follow this guarantee. Current Gopher mascot and old logo.
[28]
Each major Go release is supported until there are two newer major releases.
Initial
Major
version
release Language changes[29] Other changes
date
1-
2012/03/28 Initial release
1.0.3
1.9 - Go now supports type aliases. The Go compiler now supports compiling a
2017/08/24 package's functions in parallel, taking
1.9.7 Force the intermediate rounding
in floating-point arithmetic. advantage of multiple cores.
1.10 - 2018/02/16 A corner case involving shifts of For the X86 64-bit port, the assembler now
1.10.3 untyped constants has been supports 359 new instructions, including the full
clarified. AVX, AVX2, BMI, BMI2, F16C, FMA3, SSE2,
The grammar for method SSE3, SSSE3, SSE4.1, and SSE4.2 extension
expressions has been updated to sets. The assembler also no longer implements
relax the syntax to allow any type MOVL $0, AX as an XORL instruction, to avoid
expression as a receiver. clearing the condition flags unexpectedly.
Implementations
Two major implementations exist:
Google's Go toolchain, targeting multiple platforms includingLinux, BSD, macOS, Plan 9, Windows, and (since
2015) mobile devices.[31] The primary Go compiler becameself-hosting in version 1.5.[32]
A second compiler, gccgo, is a GCC frontend.[33][34]
A third Go compiler, known as GopherJS[35] , also exists. GopherJS compiles Go code into JavaScript code, and enables Go to be
used for frontend development.
Language design
Go is recognizably in the tradition of C, but makes many changes to improve
brevity, simplicity, and safety. The language consists of:
A syntax and environment adopting patterns more common indynamic New logo.
languages:[36]
Optional concise variable declaration and initialization throughtype inference (x := 0 not int x = 0; or var
x = 0;).
Fast compilation times.[37]
( o get)[38] and online package documentation.[39]
Remote package management g
Distinctive approaches to particular problems:
Built-in concurrency primitives:light-weight processes (goroutines), channels, and the select statement.
An interface system in place of virtual inheritance, and type embedding instead of non-virtual inheritance.
A toolchain that, by default, producesstatically linked native binaries without external dependencies.
[40] in part by omitting
A desire to keep the language specification simple enough to hold in a programmer's head,
features which are common in similar languages .
Syntax
Go's syntax includes changes from C aimed at keeping code concise and readable. A combined declaration/initialization operator was
introduced that allows the programmer to write i := 3 or s := "Hello, world!", without specifying the types of variables.
This contrasts with C's int i = 3; and const char *s = "Hello, world!";. Semicolons still terminate statements[a],
but are implicit when the end of a line occurs.[b] Functions may return multiple values, and returning a result, err pair is the
conventional way a function indicates an error to its caller in Go.[c] Go adds literal syntaxes for initializing struct parameters by
name, and for initializing maps and slices. As an alternative to C's three-statement for loop, Go's range expressions allow concise
iteration over arrays, slices, strings, maps, and channels.
Types
Go has a number of built-in types, including numeric ones (byte, int64, float32, etc.), booleans, and character strings
(string). Strings are immutable; built-in operators, and keywords (rather than functions) provide concatenation, comparison, and
UTF-8 encoding/decoding.[43] Record types can be defined with thestruct keyword.
For each type T and each non-negative integer constant n, there is an array type denoted [n]T; arrays of differing lengths are thus of
different types. Dynamic arrays are available as "slices", denoted[]T for some type T. These have a length and acapacity specifying
when new memory needs to be allocated to expand the array .[44][45][46]
. Several slices may share their underlying memory
Pointers are available for all types, and the pointer-to-T type is denoted *T. Address-taking and indirection use the & and * operators
as in C, or happen implicitly through the method call or attribute access syntax.[47] There is no pointer arithmetic[d], except via the
special unsafe.Pointer type in the standard library.[48]
For a pair of types K, V, the type map[K]V is the type of hash tables mapping type-K keys to type-V values. Hash tables are built into
the language, with special syntax and built-in functions. chan T is a channel that allows sending values of type T between
concurrent Go processes.
Aside from its support forinterfaces, Go's type system is nominal: the type keyword can be used to define a new named type, which
is distinct from other named types that have the same layout (in the case of a struct, the same members in the same order). Some
conversions between types (e.g., between the various integer types) are pre-defined and adding a new type may define additional
conversions, but conversions between named types must always be invoked explicitly.[49] For example, the type keyword can be
used to define a type forIPv4 addresses, based on 32-bit unsigned integers.
With this type definition, ipv4addr(x) interprets the uint32 value x as an IP address. Simply assigning x to a variable of type
ipv4addr is a type error.
Constant expressions may be either typed or "untyped"; they are given a type when assigned to a typed variable if the value they
represent passes a compile-time check.[50]
Function types are indicated by the func keyword; they take zero or more parameters and return zero or more values, all of which
are typed. The parameter and return values determine a function type; thus, func(string, int32) (int, error) is the
type of functions that take a string and a 32-bit signed integer, and return a signed integer (of default width) and a value of the
built-in interface typeerror.
Any named type has a method set associated with it. The IP address example above can be extended with a method for checking
whether its value is a known standard.
Due to nominal typing, this method definition adds a method to ipv4addr, but not on uint32. While methods have special
[51]
definition and call syntax, there is no distinct method type.
Interface system
Go provides two features that replaceclass inheritance.
The first is embedding, which can be viewed as an automated form ofcomposition[52] or delegation.[53]:255
The second are its interfaces, which provides runtime polymorphism.[54]:266 Interfaces are a class of types and provide a limited
form of structural typing in the otherwise nominal type system of Go. An object which is of an interface type is also of another type,
much like C++ objects being simultaneously of a base and derived class. Go interfaces were designed after protocols from the
Smalltalk programming language.[55] Multiple sources use the term duck typing when describing Go interfaces.[56][57] Although the
term duck typing is not precisely defined and therefore not wrong, it usually implies that type conformance is not statically checked.
Since conformance to a Go interface is checked statically by the Go compiler (except when performing a type assertion), the Go
authors prefer the termstructural typing.[58]
The definition of an interface type lists required methods by name and type. Any object of type T for which functions exist matching
all the required methods of interface type I is an object of type I as well. The definition of type T need not (and cannot) identify type
I. For example, if Shape, Square and Circle are defined as:
import "math"
Both a Square and a Circle are implicitly a Shape and can be assigned to a Shape-typed variable.[54]:263–268 In formal
language, Go's interface system provides structural rather than nominal typing. Interfaces can embed other interfaces with the effect
of creating a combined interface that is satisfied by exactly the types that implement the embedded interface and any methods that the
newly defined interface adds.[54]:270
The Go standard library uses interfaces to provide genericity in several places, including the input/output system that is based on the
concepts of Reader and Writer.[54]:282–283
Besides calling methods via interfaces, Go allows converting interface values to other types with a run-time type check. The language
constructs to do so are the type assertion,[59] which checks against a single potential type, and the type switch,[60] which checks
against multiple types.
The empty interface interface{} is an important base case because it can refer to an item of any concrete type. It is similar to the
Object class in Java or C# and is satisfied by any type, including built-in types like int.[54]:284 Code using the empty interface
cannot simply call methods (or built-in operators) on the referred-to object, but it can store the interface{} value, try to convert
it to a more useful type via a type assertion or type switch, or inspect it with Go's reflect package.[61] Because interface{}
can refer to any value, it is a limited way to escape the restrictions of static typing, like void* in C but with additional run-time type
checks.
Interface values are implemented using pointer to data and a second pointer to run-time type information.[62] Like some other types
implemented using pointers in Go, interface values arenil if uninitialized.[63]
Package system
In Go's package system, each package has a path (e.g., "compress/bzip2" or "golang.org/x/net/html") and a name
(e.g., bzip2 or html). References to other packages' definitions must always be prefixed with the other package's name, and only
the capitalized names from other packages are accessible: io.Reader is public but bzip2.reader is not.[64] The go get
command can retrieve packages stored in a remote repository such asGitHub,[65] and developers are encouraged to develop packages
inside a base path corresponding to a source repository (such as github.com/user_name/package_name)to reduce the likelihood of
[66]
name collision with future additions to the standard library or other external libraries.
The primary concurrency construct is the goroutine, a type of light-weight process. A function call prefixed with the go keyword
starts a function in a new goroutine. The language specification does not specify how goroutines should be implemented, but current
implementations multiplex a Go process's goroutines onto a smaller set of operating system threads, similar to the scheduling
performed in Erlang.[69]:10
While a standard library package featuring most of the classical concurrency control structures (mutex locks, etc.) is
available,[69]:151–152 idiomatic concurrent programs instead prefer channels, which provide send messages between goroutines.[70]
Optional buffers store messages inFIFO order[53]:43 and allow sending goroutines to proceed before their messages are received.
Channels are typed, so that a channel of type chan T can only be used to transfer messages of type T. Special syntax is used to
operate on them; <-ch is an expression that causes the executing goroutine to block until a value comes in over the channel ch,
while ch <- x sends the value x (possibly blocking until another goroutine receives the value). The built-in switch-like select
statement can be used to implement non-blocking communication on multiple channels; see below for an example. Go has a memory
[71]
model describing how goroutines must use channels or other operations to safely share data.
The existence of channels sets Go apart from actor model-style concurrent languages like Erlang, where messages are addressed
directly to actors (corresponding to goroutines). The actor style can be simulated in Go by maintaining a one-to-one correspondence
between goroutines and channels, but the language allows multiple goroutines to share a channel or a single goroutine to send and
receive on multiple channels.[69]:147
From these tools one can build concurrent constructs like worker pools, pipelines (in which, say, a file is decompressed and parsed as
it downloads), background calls with timeout, "fan-out" parallel calls to a set of services, and others.[72] Channels have also found
uses further from the usual notion of interprocess communication, like serving as a concurrency-safe list of recycled buffers,[73]
implementing coroutines (which helped inspire the namegoroutine),[74] and implementing iterators.[75]
Concurrency-related structural conventions of Go (channels and alternative channel inputs) are derived from Tony Hoare's
communicating sequential processes model. Unlike previous concurrent programming languages such as Occam or Limbo (a
language on which Go co-designer Rob Pike worked),[76] Go does not provide any built-in notion of safe or verifiable
concurrency.[77] While the communicating-processesmodel is favored in Go, it is not the only one: all goroutines in a program share
a single address space. This means that mutable objects and pointers can be shared between goroutines; see § Lack of race condition
safety, below.
Binaries
[82][83]
The linker in the gc toolchain creates statically-linked binaries by default therefore all Go binaries include the Go runtime.
Omissions
Go deliberately omits certain features common in other languages, including (implementation) inheritance, generic programming,
assertions,[e] pointer arithmetic,[d] implicit type conversions, untagged unions,[f] and tagged unions.[g] The designers added only
those facilities that all three agreed on.[86]
Of the omitted language features, the designers explicitly argue against assertions and pointer arithmetic, while defending the choice
to omit type inheritance as giving a more useful language, encouraging instead the use of interfaces to achieve dynamic dispatch[h]
and composition to reuse code. Composition and delegation are in fact largely automated by struct embedding; according to
researchers Schmageret al., this feature "has many of the drawbacks of inheritance: it affects the public interface of objects, it is not
fine-grained (i.e, no method-level control over embedding), methods of embedded objects cannot be hidden, and it is static", making
it "not obvious" whether programmers will overuse it to the extent that programmers in other languages are reputed to overuse
inheritance.[52]
The designers express an openness to generic programming and note that built-in functions are in fact type-generic, but these are
treated as special cases; Pike calls this a weakness that may at some point be changed.[44] The Google team built at least one
compiler for an experimental Go dialect with generics, but did not release it.[87] They are also open to standardizing ways to apply
code generation.[88]
Initially omitted, the exception-like panic/recover mechanism was eventually added, which the Go authors advise using for
unrecoverable errors such as those that should halt an entire program or server request, or as a shortcut to propagate errors up the
[89][90][91][92]
stack within a package (but not across package boundaries; there, error returns are the standard API).
Criticism
Go critics assert that:
lack of compile-time generics leads to code duplication, metaprogramming cannot be statically checked[93][94] and
the standard library cannot offer generic algorithms[95]
lack of exceptions makes some error handling patterns dif ficult, like treating multiple statements that fail as a
block[96]
[93][97]
lack of language extensibility (through, for instance, operator overloading) makes certain tasks more verbose
the lack of Hindley–Milner typing inhibits safety and/or expressiveness[93][98][99]
garbage collection (GC) overhead limits use in systems programming compared to languages with
manual memory
management. [93][98]
The designers argue that these trade-offs are important to Go's success.[100] They explain particular decisions at length.[101]
GC has been improved to sub-millisecond GC pause times in later versions.[102][103][104] However, the developers acknowledge that
this GC algorithm is nothard real-time.
Indentation, spacing, and other surface-level details of code are automatically standardized by the
gofmt tool.
golint does additional style checks automatically .
Tools and libraries distributed with Go suggest standard approaches to things like API documentationgodoc),
( [105]
testing (go test), building (go build), package management (go get), and so on.
Go enforces rules that are recommendations in other languages, for example banning cyclic dependencies, unused
variables or imports, and implicit type conversions.
The omission of certain features (for example, functional-programming shortcuts like
map and Java-style
try/finally blocks) tends to encourage a particular explicit, concrete, and imperative programming style.
On day one the Go team published a collection of Go idioms, [105] and later also collected code review
comments,[106] talks,[107] and official blog posts[108] to teach Go style and coding philosophy .
Tools
Go includes the same sort of debugging, testing, and code-vetting tools as many language distributions. The Go distribution includes,
among other tools,
go build, which builds Go binaries using only information in the source files themselves, no separate makefiles
go test, for unit testing and microbenchmarks
go fmt, for formatting code
go get, for retrieving and installing remote packages
go vet, a static analyzer looking for potential errors in code
go run, a shortcut for building and executing code
godoc, for displaying documentation or serving it via HTTP
gorename, for renaming variables, functions, and so on in a type-safe way
go generate, a standard way to invoke code generators
It also includes profiling and debugging support, runtime instrumentation (to, for example, track garbage collection pauses), and a
race condition tester.
An ecosystem of third-party tools adds to the standard distribution, such as gocode, which enables code autocompletion in many
text editors, goimports (by a Go team member), which automatically adds/removes package imports as needed, and errcheck,
which detects code that might unintentionally ignore errors. Plugins exist for adding language support to several text editors. Several
IDEs are available. For instance, LiteIDE, which is branded as "a simple, open source, cross-platform Go IDE",[109] and GoLand,
which claims to be "capable and ergonomic."[110]
Examples
Hello world
Here is a Hello world program in Go:
package main
import "fmt"
func main() {
fmt.Println ("Hello, World" )
}
Concurrency example
The following simple program demonstrates Go's concurrency features to implement an asynchronous program. It launches two
"goroutines" (lightweight threads): one waits for the user to type some text, while the other implements a timeout. The select
statement waits for either of these goroutines to send a message to the main routine, and acts on the first message to arrive (example
adapted from David Chisnall book).[69]:152
package main
import (
"fmt"
"time"
)
func main() {
t := make(chan bool)
go timeout (t)
ch := make(chan string )
go readword (ch)
select {
case word := <-ch:
fmt.Println ("Received" , word)
case <-t:
fmt.Println ("Timeout." )
}
}
Projects
Some notable open-source applications in Go include:[111]
Caddy, an open source HTTP/2 web server with automatic HTTPS capability .
CockroachDB, an open source, survivable, strongly consistent, scale-out SQL database.
Decred, a cryptocurrency with on-chain governance integrated into itsblockchain.[112]
Docker, a set of tools for deployingLinux containers
Hugo, a static site generator
InfluxDB, an open source database specifically to handle time series data with high availability and high performance
requirements.
[113]
InterPlanetary File System, a content-addressable, peer-to-peer hypermedia protocol.
Juju, a service orchestration tool byCanonical, packagers of Ubuntu Linux
Kubernetes container management system
.[114]
Lightning Network, a bitcoin network that allows for fast Bitcoin transactions and scalability
OpenShift, a cloud computing platform as a service byRed Hat
Snappy, a package manager forUbuntu Touch developed by Canonical.
Syncthing, an open-source file synchronization client/server application
Terraform, an open-source, multiplecloud infrastructure provisioning tool fromHashiCorp.
[115][116]
Other notable companies and sites using Go (generally together with other languages, not exclusively) include:
[117]
Cacoo, for their rendering of the user dashboard page and microservice using Go and gRPC.
Chango, a programmatic advertising company uses Go in its real-time bidding systems. [118]
CoreOS, a Linux-based operating system that usesDocker containers[121] and rkt containers.
[122]
Couchbase, Query and Indexing services within the Couchbase Server
[123]
Dropbox, migrated some of their critical components from Python to Go
[124][125][126]
Google, for many projects, notably including download server dl.google.com
Heroku, for Doozer, a lock service[13]
Hyperledger Fabric, an open source, enterprise-focused distributed ledger project
MercadoLibre, for several public APIs.
MongoDB, tools for administering MongoDB instances[127]
Netflix, for two portions of their server architecture[128]
Novartis, for an internal inventory system[129]
[130]
Nutanix, for a variety of micro-services in its Enterprise Cloud OS.
[131]
Plug.dj, an interactive online social music streaming website.
SendGrid, a Boulder, Colorado-based transactional email delivery and management service.[132]
SoundCloud, for "dozens of systems"[133]
[134]
Splice, for the entire backend (API and parsers) of their online music collaboration platform.
ThoughtWorks, some tools and applications forcontinuous delivery and instant messages (CoyIM).[135]
[136]
Twitch.tv, for their IRC-based chat system (migrated from Python).
Uber, for handling high volumes ofgeofence-based queries.[137]
Zerodha, for realtime peering and streaming of market data
Reception
The interface system, and the deliberate omission of inheritance, were praised by Michele Simionato, who likened these
[138]
characteristics to those ofStandard ML, calling it "a shame that no popular language has followed [this] particular route".
Go is extremely easy to dive into. There are a minimal number of fundamental language concepts and the syntax is
clean and designed to be clear and unambiguous. Go is still experimental and still a little rough around the edges.
The complexity of C++ (even more complexity has been added in the new C++), and the resulting impact on
productivity, is no longer justified. All the hoops that the C++ programmer had to jump through in order to use a C-
compatible language make no sense anymore -- they're just a waste of time and fort.
ef Go makes much more sense for
the class of problems that C++ was originally intended to solve.
A 2011 evaluation of the language and its gc implementation in comparison to C++ (GCC), Java and Scala by a Google engineer
found:
Go offers interesting language features, which also allow for a concise and standardized notation. The compilers for
this language are still immature, which reflects in both performance and binary sizes.
— R. Hundt[143]
The evaluation got a rebuttal from the Go development team. Ian Lance Taylor, who had improved the Go code for Hundt's paper,
had not been aware of the intention to publish his code, and says that his version was "never intended to be an example of idiomatic
or efficient Go"; Russ Cox then did optimize the Go code, as well as the C++ code, and got the Go code to run slightly faster than
.[144]
C++ and more than an order of magnitude faster than the code in the paper
Naming dispute
On 10 November 2009, the day of the general release of the language, Francis McCabe, developer of the Go! programming language
(note the exclamation point), requested a name change of Google's language to prevent confusion with his language, which he had
spent 10 years developing.[145] McCabe raised concerns that "the 'big guy' will end up steam-rollering over" him, and this concern
resonated with the more than 120 developers who commented on Google's official issues thread saying they should change the name,
with some[146] even saying the issue contradicts Google's motto of:Don't be evil.[147]
On 12 October 2010, the issue was closed by Google developer Russ Cox (@rsc) with the custom status "Unfortunate" accompanied
by the following comment:
"There are many computing products and services named Go. In the 11 months since our release, there has been
minimal confusion of the two languages."[147]
See also
Comparison of programming languages
Dart, another programming language developed atGoogle
UFCS, a way of having "open methods" in other languages
Notes
[41]
a. but "To allow complex statements to occupy asingle line, a semicolon may be omitted before a closing ) or }".
[42]
b. “if the newline comes after a token that could end a statement, [the lexer will] insert a semicolon”.
c. Usually, exactly one of the result and error values has a value other than the type's zero value; sometimes both do,
as when a read or write can only be partially completed, and sometimes neither , as when a read returns 0 bytes. See
Semipredicate problem: Multivalued return.
d. Language FAQ "Why is there no pointer arithmetic? Safety … never derive an illegal address that succeeds
incorrectly … using array indices can be as ef
ficient as … pointer arithmetic … simplify the implementation of the
garbage collector…."[10]
e. Language FAQ "Why does Go not have assertions? …our experience has been that programmers use them as a
[10]
crutch to avoid thinking about proper error handling and reporting…."
[10]
f. Language FAQ "Why are there no untaggedunions…? [they] would violate Go's memory safety guarantees."
g. Language FAQ "Why does Go not have variant types? … We considered [them but] they overlap in confusing ways
."[10] (The
with interfaces…. [S]ome of what variant types address is already covered, … although not as elegantly
tag of an interface type[84] is accessed with a type assertion[85] ).
h. Questions "How do I get dynamic dispatch of methods?" and "Why is there no type inheritance?" in the language
FAQ.[10]
References
1. "Go: code that grows with grace"(https://talks.golang.org/2012/chat.slide#5). Retrieved 24 June 2018.
2. "Release History - The Go Programming Language"(https://golang.org/doc/devel/release.html). Retrieved 8 June
2018.
3. "Why doesn't Go have "implements" declarations?"(https://golang.org/doc/faq#implements_interface)
. golang.org.
Retrieved 1 October 2015.
4. Pike, Rob (2014-12-22)."Rob Pike on Twitter" (https://twitter.com/rob_pike/status/546973312543227904). Retrieved
2016-03-13. "Go has structural typing, not duck typing. Full interface satisfaction is checked and required.
"
5. "lang/go: go-1.4 – Go programming language"(http://ports.su/lang/go). OpenBSD ports. 2014-12-23. Retrieved
2015-01-19.
6. "Go Porting Efforts" (http://go-lang.cat-v.org/os-ports). Go Language Resources. cat-v. 12 January 2010. Retrieved
18 January 2010.
7. "Text file LICENSE" (http://golang.org/LICENSE). The Go Programming Language. Google. Retrieved 5 October
2012.
8. "Additional IP Rights Grant"(http://golang.org/PATENTS). The Go Programming Language. Google. Retrieved
5 October 2012.
9. Pike, Rob (2014-04-24)."Hello Gophers" (https://talks.golang.org/2014/hellogophers.slide#21)
. Retrieved
2016-03-11.
10. "Language Design FAQ" (http://golang.org/doc/go_faq.html). golang.org. 16 January 2010. Retrieved 27 February
2010.
11. "The Evolution of Go" (https://talks.golang.org/2015/gophercon-goevolution.slide#19)
. Retrieved 2015-09-26.
12. Kincaid, Jason (10 November 2009)."Google's Go: A New Programming Language That's Python Meets C++"
(http
s://techcrunch.com/2009/11/10/google-go-language/)
. TechCrunch. Retrieved 18 January 2010.
13. Metz, Cade (5 May 2011)."Google Go boldly goes where no code has gone before"(https://www.theregister.co.uk/2
011/05/05/google_go/). The Register.
14. "LICENSE - The Go Programming Language"(https://golang.org/LICENSE). golang.org.
15. Griesemer, Robert; Pike, Rob; Thompson, Ken; Taylor, Ian; Cox, Russ; Kim, Jini; Langley, Adam. "Hey! Ho! Let's
Go!" (https://opensource.googleblog.com/2009/11/hey-ho-lets-go.html)
. Google Open Source. Google. Retrieved
17 May 2018.
16. Shankland, Stephen (2012-03-30)."Google's Go language turns one, wins a spot at Y ouTube: The lower-level
programming language has matured enough to sport the 1.0 version number . And it's being used for real work at
Google" (https://www.cnet.com/news/googles-go-language-turns-one-wins-a-spot-at-youtube/). News. CNet. CBS
Interactive Inc. Retrieved 2017-08-06. "Google has released version 1 of its Go programming language, an
ambitious attempt to improve upon giants of the lower-level programming world such as C and C++. "
17. "Release History" (https://golang.org/doc/devel/release.html).
18. "Go FAQ: Is Google using Go internally?"(http://golang.org/doc/faq#Is_Google_using_go_internally)
. Retrieved
2013-03-09.
19. Pike, Rob (28 April 2010)."Another Go at Language Design"(http://www.stanford.edu/class/ee380/Abstracts/10042
8.html). Stanford EE Computer Systems Colloquium. Stanford University. Video available (https://www.youtube.com/
watch?v=7VcArS4Wpqk).
20. "Frequently Asked Questions (FAQ) - The Go Programming Language"(https://golang.org/doc/faq#different_syntax).
golang.org. Retrieved 2016-02-26.
21. Andrew Binstock (18 May 2011)."Dr. Dobb's: Interview with Ken Thompson"(http://www.drdobbs.com/open-source/i
nterview-with-ken-thompson/229502480). Retrieved 2014-02-07.
22. Pike, Rob (2012). "Less is exponentially more"(http://commandcenter.blogspot.mx/2012/06/less-is-exponentially-mo
re.html).
23. Robert Griesemer (2015)."The Evolution of Go" (https://talks.golang.org/2015/gophercon-goevolution.slide#4)
.
24. "Go 2 Draft Designs" (https://go.googlesource.com/proposal/+/master/design/go2draft.md)
. Retrieved 12 September
2018.
25. "The Go Blog: Go 2 Draft Designs"(https://blog.golang.org/go2draft). 28 August 2018.
26. "Go 1 and the Future of Go Programs"(https://golang.org/doc/go1compat).
27. "Go 1.10 Release Notes"(https://golang.org/doc/go1.10#introduction).
28. "Release History" (https://golang.org/doc/devel/release.html#policy)
.
29. "Release History - The Go Programming Language"(https://golang.org/doc/devel/release.html). golang.org.
Retrieved 2018-08-24.
30. https://golang.org/doc/go1.11
31. "Google's In-House Programming Language Now Runs on Phones"(https://www.wired.com/2015/08/googles-house-
programming-language-now-runs-phones/). wired.com. 19 August 2015.
32. "Go 1.5 Release Notes"(https://golang.org/doc/go1.5#implementation)
. Retrieved 28 January 2016. "The compiler
and runtime are now implemented in Go and assembler , without C."
33. "FAQ: Implementation" (http://golang.org/doc/go_faq.html#Implementation)
. golang.org. 16 January 2010. Retrieved
2010-01-18.
34. "Installing GCC: Configuration"(https://gcc.gnu.org/install/configure.html). Retrieved 2011-12-03. "Ada, Go and
Objective-C++ are not default languages"
35. https://github.com/gopherjs/gopherjs
36. Pike, Rob. "The Go Programming Language"(https://www.youtube.com/watch?v=rKnDgT73v8s&feature=related).
YouTube. Retrieved 2011-07-01.
37. Rob Pike (10 November 2009). The Go Programming Language(https://www.youtube.com/watch?v=rKnDgT73v8s#t
=8m53) (flv) (Tech talk). Google. Event occurs at 8:53.
38. Download and install packages and dependencies - go - The Go Programming Language (http://golang.org/cmd/go/
#hdr-Download_and_install_packages_and_dependencies) ; see godoc.org (http://godoc.org) for addresses and
documentation of some packages
39. "GoDoc" (http://godoc.org). godoc.org.
40. Rob Pike, on The Changelog (http://5by5.tv/changelog/100)podcast
41. "Go Programming Language Specification, §Semicolons"(https://golang.org/ref/spec#Semicolons). golang.org.
42. "Effective Go, §Semicolons"(https://golang.org/doc/effective_go.html#semicolons). golang.org.
43. Rob Pike, Strings, bytes, runes and characters in Go(http://blog.golang.org/strings), 23 October 2013
44. Pike, Rob (26 September 2013)."Arrays, slices (and strings): The mechanics of 'append
' " (http://blog.golang.org/slic
es). The Go Blog. Retrieved 7 March 2015.
45. Andrew Gerrand, Go Slices: usage and internals(http://blog.golang.org/go-slices-usage-and-internals)
46. The Go Authors, Effective Go: Slices (http://golang.org/doc/effective_go.html#slices)
47. The Go authors Selectors - The Go Programming Language Specification(https://golang.org/ref/spec#Selectors)
and Calls - The Go Programming Language Specification(https://golang.org/ref/spec#Calls)
48. "Go Programming Language Specification, §Package unsafe"(https://golang.org/ref/spec#Package_unsafe)
.
golang.org.
49. "The Go Programming Language Specification"(http://golang.org/ref/spec#Assignability). golang.org.
50. "The Go Programming Language Specification"(http://golang.org/ref/spec#Constants). golang.org.
51. "The Go Programming Language Specification"(http://golang.org/ref/spec#Calls). golang.org.
52. Schmager, Frank; Cameron, Nicholas; Noble, James (2010). GoHotDraw: evaluating the Go programming language
with design patterns. Evaluation and Usability of Programming Languages and ools.
T ACM.
53. Summerfield, Mark (2012).Programming in Go: Creating Applications for the 21st Century
. Addison-Wesley.
54. Balbaert, Ivo (2012). The Way to Go: A Thorough Introduction to the Go Programming Language. iUniverse.
55. "The Evolution of Go" (https://talks.golang.org/2015/gophercon-goevolution.slide#19)
. talks.golang.org. Retrieved
2016-03-13.
56. Diggins, Christopher (2009-11-24)."Duck Typing and the Go Programming Language" (http://www.drdobbs.com/arch
itecture-and-design/duck-typing-and-the-go-programming-langu/228701527)
. Dr. Dobb's. Retrieved 2016-03-10.
57. Ryer, Mat (2015-12-01). "Duck typing in Go" (https://medium.com/@matryer/golang-advent-calendar-day-one-duck-t
yping-a513aaed544d#.ebm7j81xu). Retrieved 2016-03-10.
58. "Frequently Asked Questions (FAQ) - The Go Programming Language"(https://golang.org/doc/faq). golang.org.
59. "The Go Programming Language Specification"(http://golang.org/ref/spec#Type_assertions). golang.org.
60. "The Go Programming Language Specification"(http://golang.org/ref/spec#Type_switches). golang.org.
61. reflect.ValueOf(i interface{}) (http://golang.org/pkg/reflect/#ValueOf) converts an interface{} to a
reflect.Value that can be further inspected
62. "Go Data Structures: Interfaces"(http://research.swtch.com/interfaces). Retrieved 15 November 2012.
63. "The Go Programming Language Specification"(http://golang.org/ref/spec#Interface_types). golang.org.
64. "A Tutorial for the Go Programming Language" (http://golang.org/doc/go_tutorial.html). The Go Programming
Language. Google. Retrieved 10 March 2013. "In Go the rule about visibility of information is simple: if a name (of a
top-level type, function, method, constant or variable, or of a structure field or method) is capitalized, users of the
package may see it. Otherwise, the name and hence the thing being named is visible only inside the package in
which it is declared."
65. "go - The Go Programming Language"(http://golang.org/cmd/go/#hdr-Download_and_install_packages_and_depen
dencies). golang.org.
66. "How to Write Go Code" (https://golang.org/doc/code.html). golang.org. "The packages from the standard library are
given short import paths such as "fmt" and "net/http". For your own packages, you must choose a base path that is
unlikely to collide with future additions to the standard library or other external libraries. If you keep your code in a
source repository somewhere, then you should use the root of that source repository as your base path. For
instance, if you have a GitHub account at github.com/user , that should be your base path"
67. "Go Packaging Proposal Process"(https://docs.google.com/document/d/18tNd8r5DV0yluCR7tPvkMT
sWD_lYcRO7N
hpNSDymRr8/edit?pref=2&pli=1).
68. Rob Pike, Concurrency is not Parallelism(http://vimeo.com/49718712)
69. Chisnall, David (2012).The Go Programming Language Phrasebook(https://books.google.com/books?id=scyH562V
XZUC). Addison-Wesley.
70. "Effective Go" (http://golang.org/doc/effective_go.html#sharing). golang.org.
71. "The Go Memory Model"(http://golang.org/ref/mem). Retrieved 10 April 2017.
72. "Go Concurrency Patterns"(http://talks.golang.org/2012/concurrency
.slide). golang.org.
73. John Graham-Cumming,Recycling Memory Buffers in Go (http://blog.cloudflare.com/recycling-memory-buf
fers-in-g
o)
74. "tree.go" (http://golang.org/doc/play/tree.go).
75. Ewen Cheslack-Postava,Iterators in Go (http://ewencp.org/blog/golang-iterators/)
76. Brian W. Kernighan, A Descent Into Limbo (http://www.vitanuova.com/inferno/papers/descent.html)
77. "The Go Memory Model"(http://golang.org/doc/go_mem.html). Google. Retrieved 5 January 2011.
78. Tang, Peiyi (2010). Multi-core parallel programming in Go(http://www.ualr.edu/pxtang/papers/acc10.pdf)(PDF).
Proc. First International Conference on Advanced Computing and Communications.
79. Nanz, Sebastian; West, Scott; Soares Da Silveira, Kaue. Examining the expert gap in parallel programming(http://s
e.inf.ethz.ch/people/west/expert-gap-europar-2013.pdf)(PDF). Euro-Par 2013. CiteSeerX 10.1.1.368.6137 (https://cit
eseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.368.6137) .
80. Russ Cox, Off to the Races (http://research.swtch.com/gorace)
81. Pike, Rob (25 October 2012). "Go at Google: Language Design in the Service of Software Engineering" (http://talks.g
olang.org/2012/splash.article). Google, Inc. "There is one important caveat: Go is not purely memory safe in the
presence of concurrency."
82. https://golang.org/doc/faq
83. https://hackernoon.com/a-story-of-a-fat-go-binary-20edc6549b97
84. "Go Programming Language Specification, §Interface types"(https://golang.org/ref/spec#Interface_types).
golang.org.
85. "Go Programming Language Specification, §T
ype assertions" (https://golang.org/ref/spec#Type_assertion).
golang.org.
86. "All Systems Are Go" (http://www.informit.com/articles/article.aspx?p=1623555). informIT. 2010-08-17. Retrieved
2018-06-21.
87. "E2E: Erik Meijer and Robert Griesemer – Going Go"(http://channel9.msdn.com/Blogs/Charles/Erik-Meijer-and-Rob
ert-Griesemer-Go). Channel 9. Microsoft. 7 May 2012.
88. Rob Pike, Generating code (https://blog.golang.org/generate)
89. Panic And Recover (https://code.google.com/p/go-wiki/wiki/PanicAndRecover)
, Go wiki
90. "Weekly Snapshot History"(http://golang.org/doc/devel/weekly.html#2010-03-30). golang.org.
91. "Proposal for an exception-like mechanism"(https://groups.google.com/group/golang-nuts/browse_thread/thread/1ce
5cd050bb973e4). golang-nuts. 25 March 2010. Retrieved 25 March 2010.
92. "Effective Go" (https://golang.org/doc/effective_go.html#panic). golang.org.
93. Will Yager, Why Go is not Good (http://yager.io/programming/go.html)
94. Egon Elbre, Summary of Go Generics discussions(https://docs.google.com/document/d/1vrAy9gMpMoS3uaVphB32
uVXX4pi-HnNjkMEgyAHX4N4/edit#)
95. Fitzpatrick, Brad. "Go: 90% Perfect, 100% of the time"(https://talks.golang.org/2014/gocon-tokyo.slide#50)
.
Retrieved 28 January 2016.
96. Andrew Morgan, "What I Don’t Like About Error Handling in Go, and How to W
ork Around It" (https://opencredo.com/
why-i-dont-like-error-handling-in-go)
97. Danny Gratzer, Leaving Go (http://jozefg.bitbucket.org/posts/2013-08-23-leaving-go.html)
98. Jared Forsyth, Rust vs. Go (https://jaredly.github.io/2014/03/22/rust-vs-go/)
99. Janos Dobronszki, Everyday Hassles in Go(http://crufter.com/2014/12/01/everyday-hassles-in-go/)
100. Rob Pike, Less is exponentially more(http://commandcenter.blogspot.de/2012/06/less-is-exponentially-more.html)
101. The Go Authors, Frequently Asked Questions (FAQ) (http://golang.org/doc/faq)
102. Rhys Hiltner (2016-07-05)."Go's march to low-latency GC"(https://blog.twitch.tv/gos-march-to-low-latency-gc-a6fa9
6f06eb7#.68hdx6qc1). Twitch.tv. "It’s the story of how improvements to the Goruntime between Go 1.4 and Go 1.6
gave us a 20x improvement in garbage collection (GC) pause time, of how we’ve gotten another 10x improvement in
Go 1.6’s pauses, and of how sharing our experience with the Go runtime team helped them give us an additional 10x
speedup in Go 1.7 while obsoleting our manual tuning. "
103. Richard Hudson, Go 1.4+ Garbage Collection (GC) Plan and Roadmap(http://golang.org/s/go14gc)
104. Hatfield, Brian (2016-12-01)."SUB. MILLISECOND. PAUSE. TIME. ON. AN. 18. GIG. HEAP" (https://twitter.com/bria
nhatfield/status/804355831080751104?lang=en). Retrieved 2017-10-07.
105. "Effective Go" (http://golang.org/doc/effective_go.html). golang.org.
106. "Code Review Comments"(https://github.com/golang/go/wiki/CodeReviewComments)
. Retrieved 3 July 2018.
107. "Talks" (https://talks.golang.org/). Retrieved 3 July 2018.
108. "Errors Are Values" (http://blog.golang.org/errors-are-values). Retrieved 3 July 2018.
109. "visualfc/liteide" (https://github.com/visualfc/liteide). GitHub.
110. "GoLand: A Clever IDE to Go by JetBrains"(https://www.jetbrains.com/go/). JetBrains.
111. avelino/awesome-go: A curated list of awesome Go frameworks, libraries and software
(https://github.com/avelino/a
wesome-go), retrieved 2018-01-10
112. dcrd: Decred daemon in Go (golang)(https://github.com/decred/dcrd), Decred, 2017-12-18, retrieved 2017-12-19
113. "ipfs/go-ipfs" (https://github.com/ipfs/go-ipfs). GitHub. Retrieved 2018-06-01.
114. Lightning Developers Network installation guide(http://dev.lightning.community/guides/installation/)
115. Erik Unger, The Case For Go (https://gist.github.com/ungerik/3731476)
116. Andrew Gerrand, Four years of Go (http://blog.golang.org/4years), The Go Blog
117. "Test driven development in Go | Cacoo"(https://cacoo.com/blog/test-driven-development-in-go/)
. Cacoo. 2016-07-
29. Retrieved 2018-06-01.
118. "Chango" (https://github.com/chango/). GitHub.
119. John Graham-Cumming,Go at CloudFlare (http://blog.cloudflare.com/go-at-cloudflare)
120. John Graham-Cumming,What we've been doing with Go(http://blog.cloudflare.com/what-weve-been-doing-with-go)
121. "Go at CoreOS" (https://blog.gopheracademy.com/birthday-bash-2014/go-at-coreos/).
122. "Couchbase" (https://github.com/couchbase). GitHub.
123. Patrick Lee, Open Sourcing Our Go Libraries(https://tech.dropbox.com/2014/07/open-sourcing-our-go-libraries/)
,7
July 2014.
124. "dl.google.com: Powered by Go"(http://talks.golang.org/2013/oscon-dl.slide). golang.org.
125. Matt Welsh, Rewriting a Large Production System in Go(http://matt-welsh.blogspot.com/2013/08/rewriting-large-pro
duction-system-in-go.html)
126. David Symonds, High Performance Apps on Google App Engine(http://talks.golang.org/2013/highperf.slide)
127. "Mongo DB" (https://github.com/mongodb/mongo-tools#building-tools)
. GitHub.
128. "The Netflix Tech Blog: Application data caching using SSDs" (http://techblog.netflix.com/2016/05/application-data-ca
ching-using-ssds.html?m=1).
129. "Google+ post by Don Dwoske"(https://plus.google.com/114945221884326152379/posts/d1SV
aqkRyTL). Google+.
Retrieved 2017-01-21.
130. "golang/go" (https://github.com/golang/go/wiki/GoUsers). GitHub.
131. Steven Sacks. "Search & Advances" (https://tech.plug.dj/2015/06/09/search-advances/)
. plug.dj tech blog.
132. Tim Jenkins. "How to Convince Your Company to Go WithGolang" (https://sendgrid.com/blog/convince-company-go
-golang/). SendGrid's Email Deliverability Blog.
133. Peter Bourgon, Go at SoundCloud (http://backstage.soundcloud.com/2012/07/go-at-soundcloud/)
134. "Go at Google I/O and Gopher SummerFest - The Go Blog"(http://blog.golang.org/io2014). golang.org.
135. TWSTRIKE. "CoyIM" (https://github.com/twstrike/coyim/). ThoughtWorks STRIKE team.
136. Rhys Hiltner, Go’s march to low-latency GC(https://blog.twitch.tv/gos-march-to-low-latency-gc-a6fa96f06eb7#.wykex
6pkr), 5 July 2016.
137. "How We Built Uber Engineering's Highest Query per Second Service Using Go"(https://eng.uber.com/go-geofenc
e/). Uber Engineering Blog. Retrieved 2016-03-02.
138. Simionato, Michele (15 November 2009)."Interfaces vs Inheritance (or, watch out for Go!)" (http://www.artima.com/w
eblogs/viewpost.jsp?thread=274019). artima. Retrieved 15 November 2009.
139. Astels, Dave (9 November 2009)."Ready, Set, Go!" (http://www.engineyard.com/blog/2009/ready-set-go/).
engineyard. Retrieved 9 November 2009.
140. jt. "Google's Go Wins Programming Language Of The e Yar Award" (http://jaxenter.com/google-s-go-wins-programmi
ng-language-of-the-year-award-10069.html). jaxenter. Retrieved 5 December 2012.
141. "TIOBE Programming Community Index for June 2015"(http://www.tiobe.com/index.php/content/paperinfo/tpci/inde
x.html). TIOBE Software. June 2015. Retrieved 5 July 2015.
142. Bruce Eckel (27 August 2011)."Calling Go from Python via JSON-RPC"(http://www.artima.com/weblogs/viewpost.js
p?thread=333589). Retrieved 29 August 2011.
143. Hundt, Robert (2011). Loop recognition in C++/Java/Go/Scala(https://days2011.scala-lang.org/sites/days2011/files/
ws3-1-Hundt.pdf) (PDF). Scala Days.
144. Metz, Cade (1 July 2011)."Google Go strikes back with C++ bake-off" (https://www.theregister.co.uk/2011/07/01/go_
v_cpluplus_redux/). The Register.
145. Brownlee, John (13 November 2009)."Google didn't google "Go" before naming their programming language
' " (htt
p://www.geek.com/news/google-didnt-google-go-before-naming-their-programming-language-977351/) .
146. Claburn, Thomas (11 November 2009)."Google 'Go' Name Brings Accusations Of Evil ' " (http://www.informationwee
k.com/news/software/web_services/showArticle.jhtml?articleID=221601351)
. InformationWeek. Retrieved
18 January 2010.
147. "Issue 9 - go — I have already used the name for *MY* programming language"
(https://code.google.com/p/go/issue
s/detail?id=9). Google Code. Google Inc. Retrieved 12 October 2010.
External links
Official website
Text is available under theCreative Commons Attribution-ShareAlike License ; additional terms may apply. By using this
site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of theWikimedia
Foundation, Inc., a non-profit organization.