Zum Hauptinhalt springen Zur Suche springen Zur Hauptnavigation springen

Beginning Go Programming

36,99 €

Sofort verfügbar, Lieferzeit: Sofort lieferbar

Format auswählen

Beginning Go Programming, Apress
Build Reliable and Efficient Applications with Go
Von Rumeel Hussain, Maryam Zulfiqar, im heise Shop in digitaler Fassung erhältlich

Produktinformationen "Beginning Go Programming"

Understand and write programs in Go, a multi-paradigm language with built-in features for concurrent programming. This book enables developers to build software that is simple, reliable, and efficient. It'll also help beginners to start programming Go-based applications.

Beginning Go Programming begins by explaining the programming fundamentals of the Go language, including basic syntax, data type and structures, and the use of functions and methods. Next, it covers string formatting, Unicode data handling, and how to use regular expressions in Go. Further, it discusses how to encode and decode JSON formatted data for Go applications, and how to work with HTTP in Go. It concludes by exploring concurrency and covering the most powerful features of Go, as well as tips and tricks related to it.

After reading this book and working through its practical examples, you will be ready to begin programming your own Go-based applications.

WHAT YOU WILL LEARN

*
Understand the fundamentals of the Go programming language*
Master the different features of Go and how to implement real-life scenarios using the language*
Work with text in Go, such as string formatting and Unicode data handling*
Work with HTTP in Go


WHO THIS BOOK IS FOR

Programmers and developers looking to learn Go programming language concepts for efficient application building.

RUMEEL HUSSAIN, has a Bachelors Degree in Computer Science and is presently working as a Senior Blockchain Developer and Senior Tech Evangelist at BNB Chain (UAE), supporting the development and growth of the ecosystem. He is an information technology enthusiast with more than five years of experience leading and implementing blockchain applications and architectures, analyzing and refactoring modern programming languages like Go, troubleshooting cloud infrastructure, and assessing security risks. His current work is focused on leveraging blockchain technology and crypto to achieve the full potential of Web3 applications.

MARYAM ZULFIQAR has four years of research experience and has a Masters Degree in Computer Science. She is currently working as a Tech Martian in BNB Chain (Pakistan Region). She also works as a Senior Researcher and Developer. She is passionate about developer education, especially in sharing her knowledge on topics that are "the talk of the town" in the technology field. She has also worked in the capacity of researcher and team lead roles for HEC-funded projects targeted at community growth and welfare.

Chapter 1: Introduction to Go

Chapter Goal: Provides an overview of the Go programming language in terms of its basic features.

No of pages:

Sub -Topics:

● Is GoLang Static-Typed or Compiled?

● Is Go Object-Oriented?

● Features that make Go lang the premium choice for programming

● Features excluded from Go lang

● Go programs

Chapter 2: Go Basics

Chapter Goal: This chapter is intended to cover the programming fundamentals of the Go programming language. Covering basic syntax, program structure, data types, data structures, statements, functions, I/O from files, concurrency, and error handling.

No of pages:

Sub - Topics

○ Overview

■ Ancestors of Go

○ Go Syntax○ Installing Go

○ Go playground

○ Using IDE for developing Go applications

○ Getting started with programming Go applications

■ Hello world!

■ Different parts of Go programs

■ Executing Go program

■ Keywords

○ Variables

■ Variable data types

■ Naming conventions

■ Declaring variables

■ Taking user input

● Using scanf

● Using scanln

● Using bufio

■ Math operators and packages

● The math package● Dates and times

● Operator precedence in Go

○ Memory management & reference values

■ New vs make

● Incorrect memory allocation example

● Correct memory allocation example

■ Memory deallocation

○ Pointers Data Type

■ What is a pointer

■ Declaring pointers

■ Comparison with Java and C-style languages

○ Ordered values in arrays and slices

■ Arrays in Go

● Declaring arrays

● Initialising arrays

● Accessing array elements

● Querying the size of array

● Multi-dimensional arrays [not included yet]

■ Slices in Go

● Defining a slice

● The len() and cap() functions

● Nil slice

● Sub-slicing

● append() and copy() functions

● Sorting slices

○ Maps

■ Defining maps

■ Adding entries in a map object

■ Deleting entries from a map object

■ Iterating over stored values in a map object



○ Structs Data Type

■ Defining a struct

■ Accessing structure members

■ Structures as function arguments

■ Pointers to structures

○ Program flow

■ If statement

■ Switch statement

■ For statement

■ Goto statement

○ Functions

■ Defining a function

■ Calling a function

■ Returning multiple values from Function

■ Function arguments

■ Methods

○ Read/Write text files

■ Write text files

■ Read text files

○ HTTP Package

○ JSON

○ Go Recipes: Basics programming fundamentals

■ Overview

■ Numbers and slice in Go

■ Working with maps in Go

■ Go error handling

■ Defer and panic recovery

○ Hands-On challenge

Chapter 3: Working with Text

Chapter Goal: In this chapter, we will discuss how to work with text in Go language. Specifically, we will cover the string formatting, Unicode data handling, and how to use regular expressions in Go language.

No of pages:

Sub -Topics

● Go String formatting and working with unicode

● Case insensitive comparisons in Go

● Regular expressions and reading text files with Go

● Hands-On challenge

Chapter 4: Structs, Methods, and Interfaces

Chapter Goal: In this chapter, we will provide exercise related to the usage of structs, methods, and interfaces.

No of pages:

Sub -Topics:

● Overview

● Go structs, methods and interfaces

○ Structs

○ Methods

○ Interfaces

● Empty interface and working with iota in Go

○ JSON Encoding/Decoding

○ Generics

● Hands-on challenge

Chapter 5: Working with JSON

Chapter Goal: In this chapter, we will discuss working with JSON, especially, how to encode and decode the JSON formatted data for use in Go applications.

No of pages:

Sub -Topics:

● Overview

● Unmarshalling JSON with GO

● Parsing complex JSON with Go● Marshalling JSON with Go

● Dealing with zero and missing values in Go

● Using mapstructure to handle arbitrary JSON

Chapter 6: HTTP

Chapter Goal: In this chapter, we cover on how to work with HTTP in Go language. No of pages:

Sub -Topics

● Overview

● HTTP calls in Go

● Authentication and Writing an HTTP server in Go

● REST with gorilla/mux

● Hands-on challenge

Chapter 7: Concurrency

Chapter Goal: Go has rich support for concurrency using goroutines and channels. In this chapter, we discuss the most powerful feature of the Go Language, i.e., concurrency.

No of pages:

Sub -Topics

● Understanding goroutines

○ Converting sequential code to concurrent in Go

● Using Goroutines with shared resources

○ Seeing how shared resources impact goroutines

○ Accessing shared resources using mutual exclusion

○ Using atomic counters for modifying shared resources

● Synchronizing Goroutines

○ Timeouts in Go

○ sync.WaitGroup and sync.Once

○ Using a pool of goroutines

○ sync/atomic

● Hands-on Challenge

Chapter 8: Tips & Tricks

Chapter Goal: this chapter we cover different tips and tricks related to the Go language.

No of pages:

Sub -Topics

● Alternate ways to import packages○ goimports

○ Organization

● Custom constructors

● Breaking down code into packages

● Sets

● Dependency package management● Using errors

● Quick look at some compiler’s optimizations

● Set the build id using git’s SHA

● How to see what packages my app imports

● Iota: Elegant Constants

○ Auto Increment

○ Custom Types

Artikel-Details

Anbieter:
Apress
Autor:
Maryam Zulfiqar, Rumeel Hussain
Artikelnummer:
9781484288580
Veröffentlicht:
22.11.22

Barrierefreiheit

This PDF does not fully comply with PDF/UA standards, but does feature limited screen reader support, described non-text content (images, graphs), bookmarks for easy navigation and searchable, selecta

  • keine Vorlesefunktionen des Lesesystems deaktiviert (bis auf) (10)
  • navigierbares Inhaltsverzeichnis (11)
  • logische Lesereihenfolge eingehalten (13)
  • kurze Alternativtexte (z.B für Abbildungen) vorhanden (14)
  • Inhalt auch ohne Farbwahrnehmung verständlich dargestellt (25)
  • hoher Kontrast zwischen Text und Hintergrund (26)
  • Navigation über vor-/zurück-Elemente (29)
  • alle zum Verständnis notwendigen Inhalte über Screenreader zugänglich (52)
  • Kontakt zum Herausgeber für weitere Informationen zur Barrierefreiheit (99)