Job Ready Go

Book description

Tackle GoLang with practical and employment-focused instruction

In Job Ready Go, software education guru Dr. Haythem Balti delivers an essential and hands-on guide to Go, an open-source programming language developed by Google engineers to combine the most sought-after capabilities of other programming languages, including Java, C#, and C++. In the book, the author walks you through all the most critical skills necessary for successful, on-the-job Go programming.

You’ll discover:

  • How to get started with Go, including how to run, build, and test your own go programs
  • Understand control flow and data structures in Go including arrays, slices, maps, and pointerss
  • How to leverage structs, interfaces, and methods to organize and reuse code
  • How to leverage go to process data, access different types of files and develop APIs
  • Leverage concurrency and gRPCs to create complex and interconnected systems.

Job Ready Go offers readers straightforward and elegant instruction based on the renowned mthree Global Academy and Software Guild training program. It’s an essential read for aspiring Go developers looking for a fast-track to developing real-world skills demanded by employers.

Table of contents

  1. Cover
  2. Title Page
  3. Introduction
    1. WHAT DOES THIS BOOK COVER?
    2. READER SUPPORT FOR THIS BOOK
  4. PART I: The Basics of the Go Programming Language
    1. Lesson 1: Getting Started with Go
      1. INSTALLING GO
      2. TESTING THE INSTALLATION
      3. CREATING A HELLO, WORLD! PROGRAM
      4. MULTIPLE VERSIONS OF GO
      5. ONLINE EDITOR FOR GO: THE GO PLAYGROUND
      6. SUMMARY
      7. EXERCISES
    2. Lesson 2: Understanding Go Basics
      1. UNDERSTANDING STATEMENTS AND TOKENS
      2. STATEMENTS
      3. COMMENTS
      4. IDENTIFIERS
      5. KEYWORDS
      6. SUMMARY
      7. EXERCISES
    3. Lesson 3: Storing with Variables
      1. VARIABLES
      2. STATIC VS. DYNAMIC TYPE DECLARATION
      3. VARIABLE SCOPE
      4. OBTAINING USER INPUT
      5. CONVERTING A STRING TO A NUMBER
      6. NUMERIC DATA TYPES
      7. SUMMARY
      8. EXERCISES
    4. Lesson 4: Performing Operations
      1. ARITHMETIC OPERATIONS
      2. ASSIGNMENT OPERATIONS
      3. WORKING WITH BOOLEANS
      4. RELATIONAL OPERATIONS
      5. BOOLEAN OPERATIONS
      6. MATH FUNCTIONS
      7. BITWISE OPERATIONS
      8. RANDOM NUMBERS
      9. SUMMARY
      10. EXERCISES
    5. Lesson 5: Controlling Program Flow with Conditional Statements
      1. CONDITIONAL STATEMENTS
      2. USING AN IF STATEMENT
      3. WORKING WITH MULTIPLE CONDITIONS
      4. USING AN IF-ELSE STATEMENT
      5. CREATING NESTED IF STATEMENTS
      6. USING A SWITCH STATEMENT
      7. SUMMARY
      8. EXERCISES
    6. Lesson 6: Controlling Program Flow with Loops
      1. LOOPING STATEMENTS
      2. FOR LOOPS
      3. LOOPING THROUGH A STRING
      4. THE RANGE FUNCTION
      5. LOOP CONTROL STATEMENTS
      6. SUMMARY
      7. EXERCISES
    7. Lesson 7: Pulling It All Together: Income Tax Calculator
      1. GETTING STARTED
      2. STEP 1: GATHER REQUIREMENTS
      3. STEP 2: DESIGN THE PROGRAM
      4. STEP 3: CREATE THE INPUTS
      5. STEP 4: CALCULATE THE TAXABLE INCOME
      6. STEP 5: CALCULATE THE TAX RATE
      7. STEP 6: UPDATE THE APPLICATION
      8. STEP 7: ADDRESS THE UI
      9. ON YOUR OWN
      10. SUMMARY
  5. PART II: Organizing Code and Data in Go
    1. Lesson 8: Using Functions
      1. DEFINING A FUNCTION
      2. VARIADIC FUNCTIONS
      3. RECURSION
      4. FUNCTION AS A VALUE
      5. CLOSURES
      6. SUMMARY
      7. EXERCISES
    2. Lesson 9: Accessing Arrays
      1. DECLARING AN ARRAY
      2. DECLARING AND INITIALIZING AN ARRAY
      3. INFERRING ARRAY SIZE
      4. USING A FOR LOOP TO DEFINE AN ARRAY
      5. USING RANGE WITH AN ARRAY
      6. CREATING MULTIDIMENSIONAL ARRAYS
      7. DUPLICATING AN ARRAY
      8. COMPARING ARRAYS
      9. SUMMARY
      10. EXERCISES
    3. Lesson 10: Working with Pointers
      1. CREATING A POINTER
      2. ACCESSING THE STORED VALUE OF A POINTER
      3. UNDERSTANDING NIL POINTERS
      4. USING POINTERS TO CHANGE VARIABLES
      5. COMPARING POINTERS
      6. WORKING WITH AN ARRAY OF POINTERS
      7. USING POINTERS WITH FUNCTIONS
      8. SUMMARY
      9. EXERCISES
    4. Lesson 11: Organizing with Structs
      1. DECLARING AND INITIALIZING A STRUCT
      2. USING KEY-VALUE PAIRS WITH STRUCTS
      3. USING THE NEW KEYWORD
      4. POINTERS AND STRUCTS
      5. NESTED STRUCTS
      6. ADDING METHODS TO A STRUCT
      7. TYPE AND VALUE
      8. COMPARING STRUCTS
      9. SUMMARY
      10. EXERCISES
    5. Lesson 12: Accessing Slices
      1. HOW SLICES WORK
      2. SLICE AN ARRAY
      3. CHANGING THE SIZE OF A SLICE
      4. ITERATING THROUGH A SLICE
      5. THE MAKE FUNCTION
      6. CREATING A SLICE VARIABLE WITH VAR
      7. WORKING WITH SLICE ELEMENTS
      8. APPENDING TO A SLICE USING THE APPEND FUNCTION
      9. COPYING A SLICE
      10. CREATING A SLICE USING THE NEW KEYWORD
      11. REMOVING AN ITEM FROM A SLICE
      12. SUMMARY
      13. EXERCISES
    6. Lesson 13: Manipulating Maps
      1. DEFINING A MAP
      2. EMPTY MAPS
      3. CREATING A MAP USING MAKE
      4. MAP LENGTH
      5. RETRIEVING MAP ELEMENTS
      6. CHECKING FOR A KEY
      7. ITERATING THROUGH A MAP
      8. DELETING MAP ELEMENTS
      9. LITERAL DECLARATIONS IN MAPS
      10. SUMMARY
      11. EXERCISES
    7. Lesson 14: Creating Methods
      1. WORKING WITH METHODS
      2. DEFINING A METHOD
      3. USING POINTERS WITH METHODS
      4. NAMING METHODS
      5. WORKING WITH VALUE RECEIVERS AND ARGUMENTS
      6. WORKING WITH POINTER RECEIVERS AND ARGUMENTS
      7. SUMMARY
      8. EXERCISES
    8. Lesson 15: Adding Interfaces
      1. CREATING AN INTERFACE
      2. INTERFACES AND CODE REUSABILITY
      3. STATIC VS. DYNAMIC INTERFACE TYPES
      4. EMPTY INTERFACES
      5. CHECKING AN INTERFACE TYPE
      6. MULTIPLE INTERFACES
      7. EMBEDDED INTERFACES
      8. SUMMARY
      9. EXERCISES
    9. Lesson 16: Pulling It All Together: Building a Burger Shop
      1. REQUIREMENTS FOR OUR APPLICATION
      2. PLANNING THE CODE
      3. CREATING THE STRUCTS
      4. CREATING THE HELPER FUNCTIONS
      5. TYING THE CODE TOGETHER
      6. SUMMARY
      7. THE FULL BURGER SHOP LISTING
  6. PART III: Creating Job Ready Solutions in Go
    1. Lesson 17: Handling Errors
      1. ERRORS IN GO PROGRAMS
      2. THE GO ERROR TYPE
      3. CUSTOM ERROR HANDLING
      4. ERROR METHODS
      5. ERRORF
      6. BLANK IDENTIFIERS
      7. ERROR MESSAGES WITH STRUCTS
      8. MULTIPLE CUSTOM ERROR MESSAGES
      9. SUMMARY
      10. EXERCISES
    2. Lesson 18: Concurrency
      1. USING CONCURRENCY
      2. PARALLELISM
      3. USING GOROUTINES
      4. MULTIPLE GOROUTINES
      5. WORKING WITH CHANNELS
      6. CHANNELS WITH MULTIPLE GOROUTINES
      7. CLOSING CHANNELS
      8. ITERATING THROUGH A CHANNEL
      9. SUMMARY
      10. EXERCISES
    3. Lesson 19: Sorting and Data Processing
      1. SORTING
      2. TIME AND DATE OPERATIONS
      3. REGULAR EXPRESSIONS
      4. SUMMARY
      5. EXERCISES
    4. Lesson 20: File I/O and OS Operations
      1. READING A FILE
      2. WRITING TO A FILE
      3. WORKING WITH DIRECTORIES
      4. COMMAND-LINE ARGUMENTS
      5. SUMMARY
      6. EXERCISES
    5. Lesson 21: Pulling It All Together: Word Analysis in Go
      1. EXAMINING THE DATA
      2. READING THE REVIEW DATA
      3. TOKENIZING AN INPUT STRING
      4. CREATING A TOKENIZE FUNCTION
      5. COUNTING THE WORDS IN EACH REVIEW
      6. TOKENIZING AND COUNTING THE REVIEWS
      7. DESIGNING IMPROVEMENTS
      8. POSSIBLE FURTHER IMPROVEMENTS
      9. FINAL CODE LISTING
      10. SUMMARY
  7. PART IV: Advanced Topics for Go Development
    1. Lesson 22: Testing
      1. TEST-DRIVEN DEVELOPMENT
      2. TESTING LEVELS
      3. THE TDD WORKFLOW
      4. THE TESTING PACKAGE
      5. TUTORIAL: TEST-DRIVEN DEVELOPMENT
      6. BEHAVIOR-DRIVEN DEVELOPMENT
      7. SUMMARY
      8. EXERCISES
    2. Lesson 23: API Development Tutorial
      1. OVERVIEW AND REQUIREMENTS
      2. STEP 1: CREATE THE DATASET AND A SIMPLE API
      3. STEP 2: ADD A ROUTER: GORILLA MUX
      4. STEP 3: RETRIEVE A RECORD
      5. STEP 4: ADD A NEW RECORD
      6. STEP 5: DELETE A RECORD
      7. SUMMARY
      8. EXERCISES
    3. Lesson 24: Working with gRPC
      1. WORKING WITH gRPC
      2. SETTING UP THE SERVICES
      3. CREATING A SERVER
      4. CREATING A gRPC SERVER
      5. CREATING THE CHAT SERVICE
      6. UPDATING THE SERVER CODE TO INCLUDE THE CHAT SERVICE
      7. CREATING THE CHAT PACKAGE
      8. CREATING A CLIENT
      9. RUNNING THE SERVER AND THE CLIENT
      10. SUMMARY
      11. EXERCISES
    4. Lesson 25: Pulling It All Together: Using Smart Data
      1. PROJECT OVERVIEW
      2. DESIGNING OUR API
      3. IMPLEMENTING THE gRPC SERVER
      4. CREATING THE API
      5. SUMMARY
    5. Lesson 26: Using Modules
      1. GETTING STARTED WITH MODULES
      2. STEP 1: CREATE THE PROJECT DIRECTORY
      3. STEP 2: CREATE YOUR PROGRAM(S)
      4. STEP 3: CREATE A TEST PROGRAM
      5. STEP 4: CREATE THE GO.MOD FILE
      6. STEP 5: TEST THE MODULE
      7. STEP 6: USING THE MODULE
      8. NAMING MODULE FUNCTIONS
      9. SUMMARY
      10. EXERCISES
  8. Appendix: File Permissions and Access Rights
    1. CHANGING OTHER USER ACCESS RIGHTS IN LINUX
    2. DIGITAL REPRESENTATION FOR PERMISSIONS
  9. Index
  10. Copyright
  11. About the Authors
  12. About the Technical Writer
  13. About the Technical Editor
  14. Acknowledgments
  15. End User License Agreement

Product information

  • Title: Job Ready Go
  • Author(s): Haythem Balti, Kimberly A. Weiss
  • Release date: October 2022
  • Publisher(s): Wiley
  • ISBN: 9781119889816