Computer Science
Golang
Golang, also known as Go, is a programming language developed by Google in 2007. It is designed to be efficient, reliable, and easy to use, with a focus on concurrency and scalability. Golang is commonly used for web development, network programming, and system administration.
Written by Perlego with AI-assistance
Related key terms
1 of 5
8 Key excerpts on "Golang"
- eBook - PDF
Golang for Jobseekers
Unleash the power of Go programming for career advancement (English Edition)
- Hairizuan Bin Noorazman(Author)
- 2023(Publication Date)
- BPB Publications(Publisher)
Introduction Golang is one of the “newer” programming languages that appeared in the block, although it has been around for at least 10 years at this point. The language was birthed and designed in Google by several Google engineers, Robert Griesemer, Rob Pike, and Ken Thomson. Other engineers eventually joined the team, adding new functionality to the language and shaping the language into how it is today. The language was created in order to try to find a way to resolve several issues that were identified with codebases at that time in Google (codebases were written in C++ and Java programming languages). The languages mentioned previously were definitely not designed for the applications that were to be built—Web applications. One can write Web applications with those said languages, but naturally, there will be downsides to using those languages for building Web applications. Refer to the following video here for the full context: https://www.youtube.com/watch?v=YXV7sa4oM4I. Structure In this chapter, we will discuss the following topics: • Characteristics of Golang Programming Language o Statically typed CHAPTER 1 Understanding Golang and its Potential 2 Golang for Jobseekers o Garbage collection o Cross compilation o “Batteries Included” standard library o Version guarantees • What kind of development work is Golang used in? o Web applications o Command Line Interfaces (CLI) • Examples of major applications that are built with Golang o Docker o Kubernetes o Hugo • Overview of some of the companies that use Golang o Cloudflare o Monzo Objectives This chapter serves to provide an initial understanding of the potential of the Golang Programming Language. It will start off with a listing of potential desirable properties of the languages before leading readers to its potential use cases, such as Web applications and command line interface applications. - Available until 4 Dec |Learn more
- Ray Toal, Rachel Rivera, Alexander Schneider, Eileen Choe(Authors)
- 2016(Publication Date)
- Chapman and Hall/CRC(Publisher)
CHAPTER 11Go Go is “an open source programming language that makes it easy to build simple, reliable, and efficient software.” [37 ]First appeared 2009Designers Robert Griesemer, Rob Pike, Ken ThompsonNotable versions 1 (2012) • 1.5 (2015)Recognized for Being simpler than C++, GoroutinesNotable uses ServersTags Statically Typed, Concurrent, Channel-OrientedSix words or less Google’s language for Google-sized problemsGo was conceived, designed, and first implemented at Google to help address Google-sized problems. It powers large, scalable, distributed systems running on thousands of machines. Though a garbage-collected language, it targets applications traditionally written in systems languages such as C++. Implementations are known for lightning fast compilation and lightweight concurrent processes.Go is statically typed, but feels lighter than Java. You’ll find a good deal of type inference—not as much as in Elm—but plenty nevertheless. You create concurrent programs with goroutines, channels, and a powerful select statement; not with threads, semaphores, polling loops, or other low-level constructs. Go often feels like a dynamic language. Your types conform to interfaces not via explicit implements clauses, but simply by defining the stated methods. You have easy access to run-time type information when needed.Go’s designers strove to keep the language simple, omitting not only threads but implementation inheritance, compile-time generics, conditional expressions, and operator overloading. You won’t encounter exception objects in Go: operations that can fail generally return two values, one of which signals an error. You can panic, though, when you deem an error condition too unwieldy to handle immediately, and recover from it elsewhere. You get safety, too: simply include deferred operations to ensure resources are cleaned up even during panics.Our tour of Go begins with a look at our three traditional scripts and coverage of the basics. Go is intentionally a small language, so we won’t have a great deal to discuss here. We will instead spend time on several of Go’s interesting features: pointers, arrays and slices, its approach to interfaces, and panics. We’ll conclude with Go’s signature mechanisms for concurrent programming and a brief look at its reflective capabilities. - eBook - PDF
- G.Michael Schneider, Judith Gersting(Authors)
- 2018(Publication Date)
- Cengage Learning EMEA(Publisher)
Here are three more programming languages that are relatively new. It remains to be seen whether they will stand the test of time and become widely used “standard” languages. 10.5.1 Go Go, sometimes referred to as Golang , is a programming language devel-oped at Google. One of the people involved in its development was Ken Thompson, a recipient, along with Dennis Ritchie, of the 1983 A. M. Turing Award (see Chapter 12) for the development of UNIX. What prompted the development of yet another programming language? Here is a quote from the FAQ (Frequently Asked Questions) page at http:// Golang.org/doc/faq : Go was born out of frustration with existing languages and environ-ments for systems programming. Programming had become too dif-ficult and the choice of languages was partly to blame. One had to choose either efficient compilation, efficient execution, or ease of pro-gramming; all three were not available in the same mainstream lan-guage. Programmers who could were choosing ease over safety and efficiency by moving to dynamically typed languages such as Python and JavaScript rather than C 11 or, to a lesser extent, Java. 1. Explain how parallel processing can be used to evaluate the expression A + B + C + D If each addition operation takes one “time slot,” what savings can be achieved by using parallel processing instead of sequential processing? 2. Explain how you could get the parallel reverse telephone directory lookup problem to work correctly even if the desired NUMBER is not in the directory. Practice Problems Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. - eBook - ePub
- Matt Farina, Matt Butcher(Authors)
- 2016(Publication Date)
- Manning(Publisher)
Toolchains around building applications have changed. Increased functionality and complexity in software requires environments that can build and execute the code rapidly and efficiently. Testing larger and more complicated codebases needs to happen quickly so it doesn’t become a development blocker. Many applications are developed using libraries. Libraries and their versions are managed differently, thanks to solutions to disk-space problems that hampered this in the past.The way infrastructure and software are delivered has changed. Using colocated servers, managing your own hardware, or getting simple virtual private servers used to be the norm. Standing up a service at scale often meant you needed an investment in running your own hardware, including load balancers, servers, and storage. Getting everything ordered, assembled, and connected to the world would take weeks or months. Now it’s available in a matter of seconds or minutes via the cloud.This chapter introduces the Go programming language for those not already familiar with it. In this chapter, you’ll learn about the language, the toolchain that accompanies it, where Go fits into the landscape of languages, and how to install Go and get it running.1.1. What is Go?
Go, sometimes referred to as Golang to make it easier to find on the web, is a statically typed and compiled open source programming language initially developed by Google. Robert Griesemer, Rob Pike, and Ken Thompson were attempting to create a language for modern systems programming that solved real-world problems they encountered while building large systems at scale.Instead of attempting to attain theoretical pureness, these designers engineered Go around real-world practical situations. It’s inspired by a host of languages that came before it, including C, Pascal, Smalltalk, Newsqueak, C#, JavaScript, Python, Java, and many others.Go isn’t the typical statically typed and compiled language. The static typing has features that make it feel dynamic, and the compiled binaries have a runtime that includes garbage collection. The design of the language took into account the types of projects that Google would need to use it for: large codebases operating at scale and being developed by large developer teams. - eBook - ePub
Building Server-side and Microservices with Go
Building Modern Backends and Microservices Using Go, Docker and Kubernetes
- Dušan Stojanović(Author)
- 2021(Publication Date)
- BPB Publications(Publisher)
HAPTER 1Fundamentals of Go Programming Language
I n this chapter, we will explain the basic concepts of Go programming language. That includes variables, constants, data types, flow control statements, functions, methods, interfaces, and concurrency. With the knowledge learned in this chapter, we can write any program and application in Go programming language.Structure
In this chapter, we will discuss the following topics:- History of Go
- Installation
- Basics of Go
- First Go Program
- Packages
- Variables
- Constants
- Comments
- Data types
- Basic types
- Type conversion
- Pointers
- Struct
- Arrays
- Slices
- Maps
- Flow control
- For loop
- Range
- If and if-else
- Switch
- Defer
- Functions and Methods
- Functions
- Methods
- Interfaces
- Concurrency
- Goroutines
- Channels
- Select
- Mutex
- WaitGroups
- Scheduling in Go
- Garbage Collector
- Testing
Objectives
After studying this unit, you should be able to:- Understand the concepts of Go programming language
- Write any kind of Go applications
1.1 History of Go
Go is a programming language designed at Google by Rob Pike , Robert Griesemer and Ken Thompson in 2007. Because of the official language domain Golang.org , Go is often called Golang.Syntactically, Go is similar to C, but many “features ” are borrowed from other languages. The structure of programs and declaration structure is similar to Oberon (in declaration structures name always comes first, then type, in C type comes first then name). Some concurrency aspects (channels, select statement) are taken from Newsqueak. All features will be explained later, with some useful examples.The official logo is a stylized, italic GO with trailing streamlines that resemble two wheels in motion, symbolizing speed and efficiency. The logo is presented in April 2018. Gopher (rodent from North and Central America) is an official mascot of language.Many modern-day languages, like C++, C#, or Java, are fast but usually they are too complex and development unfriendly. Scripting languages (PHP, Ruby, JS,…) are created to be more development friendly but they are slow and unsafe. Go combines best from two worlds; it is fast safe and development friendly. - eBook - ePub
- Dušan Stojanovi?(Author)
- 2023(Publication Date)
- Orange Education Pvt Ltd(Publisher)
CHAPTER 1Basic Concepts of Go Programming Language
Introduction
This chapter will cover basic concepts of the Go programming language, which will help us to develop our web server application in the later chapters. We will talk and learn about variables, constants, data types (simple and complex ones), control structures, and functions. We will do a deep dive into these subjects and give some best practices. At the beginning of the chapter, we will give a short introduction and history of the Go programming language as well as some advantages compared to other programming languages.Structure
In this chapter, we will discuss the following topics:- Fundamentals of Go programming language
- Advantages of Go programming language
- Keywords
- Packages
- Basic data types
- Variables
- Constants
- Complex data types
- Control structures
- Functions
Fundamentals of Go programming language
Go is a procedural programming language based on concurrent programming. In procedural programming languages, procedures are stitched together to form a program. It is mainly used for the development of system and server software because it is designed to be performant.Designed in 2007 by Google employees Robert Griesemer , Rob Pike , and Ken Thompson as a part of an experiment, with the idea to improve programming productivity. Designers wanted to eliminate bad practices from the programming language used inside Google , but keep the good ones, in order to create an efficient and elegant programming language that can be used for the development of complex software solutions.Go was officially announced in November 2009 , and the first version (1.0) was released in March 2012 . As we can see Go is a relatively young and new programming language.Go has the official logo and mascot. The official logo represents stylized italic GO , with trailing streamlines, which symbolize speed and efficiency . The official mascot is a Gopher (rodent from North and Central America ) and was designed by Renee French , (Figure 1.1 - eBook - ePub
- Wei-Meng Lee(Author)
- 2021(Publication Date)
- For Dummies(Publisher)
Part 1Getting Started with Go
IN THIS PART … Write your first Go program. Discover the basic data types in Go and find out how to declare variables and constants. Explore the various logical and comparison operators and use them to make decisions. Understand how looping works and how you can execute code repeatedly. Use functions to create Go programs that are easy to maintain and understand.Passage contains an image Chapter 1
Hello, Go!
IN THIS CHAPTERUnderstanding why Go is the wave of the futureInstalling Go on your computerWorking with an integrated development environmentWriting a Go program and understanding how it worksSeeing how Go compares to other languagesGo is an open-source programming language — one of the fastest-growing programming languages around — released by Google in 2009. It’s a multipurpose programming language specifically designed to build fast, scalable applications.Go comes from a pretty impressive team of people: Ken Thompson (designer and creator of Unix and C), Rob Pike (cocreator of UTF-8 and Unix format), and Robert Griesemer (a Google engineer). If you’re technically inclined, you may want to check out an article called “Go at Google: Language Design in the Service of Software Engineering” (https://talks.Golang.org/2012/splash.article ), which discusses how Go was initially conceived to solve problems at Google.In this chapter, I explain why learning Go is important for your career, where Go can be used, and how to get started with Go programming.Go is often referred to as Golang because of its web address: https://Golang.org . However, the official name of the language is Go, so that’s how I refer to it throughout this book.Seeing What Learning Go Can Do for You
You can learn many programming languages today, but Go stands out from the others for a few reasons:- Go is easy to learn.
- No longer available |Learn more
Hands-On System Programming with Go
Build modern and concurrent applications for Unix and Linux systems using Golang
- Alex Guerrieri(Author)
- 2019(Publication Date)
- Packt Publishing(Publisher)
An Overview of Go
This chapter will provide an overview of the Go language and its basic functionality. We will provide a short explanation of the language and its features, which we will elaborate on in more detail in the following chapters. This will help us to understand Go better while we're using all its features and applications.The following topics will be covered in this chapter:- Features of the language
- Packages and imports
- Basic types, interfaces, and user-defined types
- Variables and functions
- Flow control
- Built-in functions
- Concurrency model
- Memory management
Passage contains an image
Technical requirements
From this chapter onward, you will need Go installed on your machine. Follow these steps to do this:- Download the latest version of Go from https://Golang.org/dl/ .
- Extract it with tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz.
- Add it to PATH with export PATH=$PATH:/usr/local/go/bin.
- Ensure that Go is installed with go version.
- Add the export statement in your .profile to add it automatically.
- You can also change the GOPATH variable (the default one is ~/go) if you want to use a different directory for your code.
I also recommend installing Visual Studio Code (https://code.visualstudio.com/ ) with its vscode-go (https://github.com/Microsoft/vscode-go ) extension, which contains a helper that will install all the tools that are needed to improve the Go development experience.Passage contains an image
Language features
Go is a modern server language with great concurrency primitives and a memory system that is mostly automated. It is considered by some to be a successor to C, and it manages to do so in many scenarios because it's performant, has an extensive standard library, and has a great community that provides many third-party libraries which cover, extend, and improve its functionalities.Passage contains an image
History of Go
Go was created in 2007 in order to try and address Google's engineering problems, and was publicly announced in 2009, reaching version 1.0 in 2012. The major version is still the same (version 1), while the minor version grows (version 1.1, 1.2, and so on) together with its functionalities. This is done to keep Go's promise of compatibility for all major versions. A draft for two new features (generics and error handling), which will probably be included in version 2.0, were presented in 2018.
Index pages curate the most relevant extracts from our library of academic textbooks. They’ve been created using an in-house natural language model (NLM), each adding context and meaning to key research topics.







