Go Programming Language For Dummies
eBook - ePub

Go Programming Language For Dummies

Wei-Meng Lee

Share book
  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Go Programming Language For Dummies

Wei-Meng Lee

Book details
Book preview
Table of contents
Citations

About This Book

Ready, set, program with Go!

Now is the perfect time to learntheGoProgramming Language. It's one of the most in-demand languages among tech recruitersand developers love its simplicity and power. Go Programming LanguageForDummies is an easy way to add this top job skill to your toolkit.Writtenfor novice and experienced coders alike, this booktraversesbasic syntax, writing functions, organizing data, building packages, and interfacing with APIs.

Go—orGoLang, as it's also known—has proven to be a strong choice for developers creating applications for the cloud-based world we live in.This book will put youon the path to using the language that's created some oftoday's leading webapplications, so you can steer your career where you want to Go!

  • Learn how Go works and start writing programs and modules
  • Install and implement the most powerful third-party Go packages
  • Use Go in conjunction with web services and MySQL databases
  • Keep your codebase organized and use Go to structure data

With this book, you canjoin the growing numbers of developers using Go to create 21st century solutions. Step inside to take start writing code that putsdatain users'hands.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Go Programming Language For Dummies an online PDF/ePUB?
Yes, you can access Go Programming Language For Dummies by Wei-Meng Lee in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming Languages. We have over one million books available in our catalogue for you to explore.

Information

Publisher
For Dummies
Year
2021
ISBN
9781119786214
Edition
1
Part 1

Getting 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.
Chapter 1

Hello, Go!

IN THIS CHAPTER
Bullet
Understanding why Go is the wave of the future
Bullet
Installing Go on your computer
Bullet
Working with an integrated development environment
Bullet
Writing a Go program and understanding how it works
Bullet
Seeing how Go compares to other languages
Go 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.
Technical Stuff
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.
Tip
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. Go’s syntax makes it a readable language. It has no support for object-oriented programming (OOP), which means you don’t have to worry about classes and inheritance and the complexities that come with that.
    Technical Stuff
    Object-oriented programming (OOP) is a programming paradigm that is based on the concept of objects (data). Instead of focusing on the functions and logics, OOP organizes software around data, or objects. A key concept in OOP is classes (sort of like templates). Suppose you want to display buttons in your application. Instead of writing the code to display each button individually, you can create a class to represent a generic button and use it to create buttons to display in your application. Each button has its own properties (characteristics). Using the concept of inheritance in OOP, you can create multiple subclasses of the button class to create different types of buttons, such as a rounded button, a rectangular button, and so on.
  • Go has fewer features than other programming languages. You don’t have to worry about the best way to solve a problem — there is only one right way to solve a problem in Go. This makes your codebase easy to maintain.
  • Go excels in concurrent programming. Go’s support for Goroutines makes it extre...

Table of contents