Learning Go Programming
eBook - ePub

Learning Go Programming

Vladimir Vivien

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

Learning Go Programming

Vladimir Vivien

Book details
Book preview
Table of contents
Citations

About This Book

An insightful guide to learning the Go programming language

About This Book

  • Insightful coverage of Go programming syntax, constructs, and idioms to help you understand Go code effectively
  • Push your Go skills, with topics such as, data types, channels, concurrency, object-oriented Go, testing, and network programming
  • Each chapter provides working code samples that are designed to help reader quickly understand respective topic

Who This Book Is For

If you have prior exposure to programming and are interested in learning the Go programming language, this book is designed for you. It will quickly run you through the basics of programming to let you exploit a number of features offered by Go programming language.

What You Will Learn

  • Install and configure the Go development environment to quickly get started with your first program.
  • Use the basic elements of the language including source code structure, variables, constants, and control flow primitives to quickly get started with Go
  • Gain practical insight into the use of Go's type system including basic and composite types such as maps, slices, and structs.
  • Use interface types and techniques such as embedding to create idiomatic object-oriented programs in Go.
  • Develop effective functions that are encapsulated in well-organized package structures with support for error handling and panic recovery.
  • Implement goroutine, channels, and other concurrency primitives to write highly-concurrent and safe Go code
  • Write tested and benchmarked code using Go's built test tools
  • Access OS resources by calling C libraries and interact with program environment at runtime

In Detail

The Go programming language has firmly established itself as a favorite for building complex and scalable system applications. Go offers a direct and practical approach to programming that let programmers write correct and predictable code using concurrency idioms and a full-featured standard library.

This is a step-by-step, practical guide full of real world examples to help you get started with Go in no time at all. We start off by understanding the fundamentals of Go, followed by a detailed description of the Go data types, program structures and Maps. After this, you learn how to use Go concurrency idioms to avoid pitfalls and create programs that are exact in expected behavior. Next, you will be familiarized with the tools and libraries that are available in Go for writing and exercising tests, benchmarking, and code coverage.

Finally, you will be able to utilize some of the most important features of GO such as, Network Programming and OS integration to build efficient applications. All the concepts are explained in a crisp and concise manner and by the end of this book; you would be able to create highly efficient programs that you can deploy over cloud.

Style and approach

The book is written to serve as a reader-friendly step-by-step guide to learning the Go programming language. Each topic is sequentially introduced to build on previous materials covered. Every concept is introduced with easy-to-follow code examples that focus on maximizing the understanding of the topic at hand.

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 Learning Go Programming an online PDF/ePUB?
Yes, you can access Learning Go Programming by Vladimir Vivien in PDF and/or ePUB format, as well as other popular books in Ciencia de la computación & Ciencias computacionales general. We have over one million books available in our catalogue for you to explore.

Information

Learning Go Programming


Learning Go Programming

Copyright © 2016 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: October 2016
Production reference: 1201016
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78439-543-8
www.packtpub.com

Credits

Authors
Vladimir Vivien
Copy Editor
Safis Editing
Reviewers
Quintessence Anx
Parth Desai
Abhishek Kumar
Chris Schaefer
Project Coordinator
Nidhi Joshi
Commissioning Editor
Akram Hussain
Proofreader
Safis Editing
Acquisition Editor
Manish Nainnani
Indexer
Aishwarya Gangawane
Content Development Editor
Aishwarya Pandere
Graphics
Disha Haria
Technical Editor
Mohita Vyas
Production Coordinator
Nilesh Mohite

About the Author

Vladimir Vivien (@vladimirvivien) is a software engineer living in the United States. He is a previously published author and has written code in languages such as Java, JavaScript, Python, C to name a few. Vladimir has work in diverse industries including technology, publishing, financial, and healthcare. After years of building enterprise systems using Java, Vladimir came to Go for its simplicity and stayed for its concurrency and fast build time. Vladimir continues to use Go as his primary language to build and create open source software (https://github.com/vladimirivivien).

About the Reviewers

Quintessence Anx. is a superhero (also called as Cloud Engineer) at Stark & Wayne LLC by day and an astronomer with a passion for the Internet of Things by night. She is a chapter leader for her local Girl Develop It, where she empowers women programmers of all levels and abilities through classes and hands-on project experiences, as well as co-founder of City of Light 2.0, an organization working to bring more affordable, reliable, and faster internet to Western New York
Parth Desai is a polygot programmer and architect, and has worked on almost all popular languages like Golang, python, C#. He regularly contributes to various open-source golang projects, like a notification engine called “Khabar”, a http framework written in golang called “Gottp”, and media server called “moire”. He implemented url signing protocol using cryptography in python, from scratch.
He has also written custom single sign on solution (SSO) in c#, with proper implementation of oauth and saml protocols. He also developed pluggable architecture to facilitate easier adding and removing of authentication providers for the SSO. Currently, He is working as a lead backend engineer, and designing and implementing scalable systems in golang and python. You can reach out to him on linkedin at https://in.linkedin.com/in/parthdesai08. Or on his email-id [email protected].
Abhishek Kumar is a technologist in IT Industry since 2010 mainly working in Systems Programming, DevOps Practices and Security. He likes to keep in sync with all domains, paradigms and up-coming technologies to get a wholistic approach for problem solving and planning ahead. He loves to learn new programming languages. Abhishek has been using Golang since 2012. He started a timeseries datastore project in Golang by Sep'2013 and is currently pivoting it. [ @abionic | https://abhishekkr.github.io ]
Want to thank my mother ShivPyari to enable me choose my own path
Chris Schaefer software developer with a passion for learning new things. He enjoys writing code and participating in local community software events.

www.PacktPub.com

For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
www.PacktPub.com
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.

Why subscribe?

  • Fully searchable across every book published by Packt
  • Copy and paste, print, and bookmark content
  • On demand and accessible via a web browser

Preface

Go is an open source programming language that lets programmers easily build reliable and scalable programs. It does this by offering a simple syntax which makes it fun to write correct and predictable code using concurrency idioms and a robust standard library.
Go has a large and active online community and there are several Go conferences that take place around the world yearly. Starting with https://golang.org/, you will find numerous places on the web that provide documentations, blogs, videos, and slides that cover a wide range of Go-related topics. On GitHub, the story is no different; some of the best known projects that are driving the future of cloud computing, for instance, are written in Go with an ever growing list.
As you would expect, getting started with Go is simple, fast, and well documented. However, “getting into” Go can be more challenging, especially for newcomers from other languages. My first attempt at Go failed. Even after reading the prescribed documentations and going through the tutorials, there was a gap in understanding driven by my own biases from previous programming experiences. Months later I returned to Go and got into it. This time I read the language specs, I read blogs, watch videos, and searched the web for any discussion that provided desi...

Table of contents