From Ruby to Golang

From Ruby to Golang

Joel Bryan Juliano
This is a sample of the book's content.Buy on Leanpub

Table of Contents

From Ruby to Golang

  • Preface
  • Introduction
    • About the Author
  • Chapter 0: Go Primer
    • Package Name and Imports
    • Println
    • Printf
    • Sprintf
    • Functions
    • Function Basics
    • Function Parameters and Arguments
    • Function Return Types
    • Main Function
  • Chapter 1: Structs
    • Instance Variables
    • Struct
    • Public Structs
    • Attaching a Struct to a Function
    • Pass-by-value and Pass-by-reference
    • Pointer Receiver
    • Value Receiver
    • Decouple and Reuse Structs through Inheritance
    • Anonymous Structs
    • Anonymous Struct Fields
    • Chapter Questions
  • Chapter 2: Maps
    • Maps by Declaration
    • Initialization by Make
    • Initialization by Literal Type Assignment
    • Maps by Assignment
    • Assignment with a Key/Value
    • Assignment on an Empty Map
    • Using Struct in Maps
    • Struct Maps by Declaration
    • Struct Maps by Assignment
    • Struct Maps with Array Values
    • Maps with Dynamic Types
    • Deleting Map Values
    • Reading a Non-Present Key from a Map
    • Variadic Functions
    • Variadic Interface
    • Maps with Variadic Interface
    • Chapter Questions
  • Chapter 3: Arrays and Slices
    • Fixed Array
    • Fixed-Array Automatic Size Calculation
    • Fixed-Array Sizes
    • Fixed-Array Assignment Behaviour
    • Sliced Array
    • Sliced-Array Assignment Behaviour
    • Capacity
    • Deep Copy
    • Append
    • Arrays with Variadic Types
    • Empty Interface Array Type
    • Chapter Questions
  • Chapter 4: Array Navigation
    • C-style Semantic Form
    • Value Semantic Form
    • Value Semantic Form with Muted Parameter
    • Index Semantic Form for Range
    • Value Semantic Form with Pointer Access
    • Chapter Questions
  • Chapter 5: Package Management
    • Sharing Go Packages
    • Package Management using Go Modules
    • Manual go.mod Generation
    • Automatic go.mod Generation Through Source-Code
    • Automatic go.mod Generation Through dep Package Manager
    • Refresh Go Modules
    • Package Management using Dep
    • Chapter Questions
  • Chapter 6: Collection Functions
    • Predicate Method all?
    • Predicate Method any?
    • Collect Enumerable Method
    • Cycle Enumerable Method
    • Detect Enumerable Method
    • Drop Enumerable Method
    • Drop While Enumerable Method
    • Chapter Questions
  • Chapter 7: Interfaces
    • Interface as a Self-Documenting API Reference
    • Interface as Type contract
    • Satisfying Return Values
    • Chapter Questions
  • Glossary
  • Acknowledgments
  • Credits
From Ruby to Golang/overview

From Ruby to Golang

course_overview

A Rubyist guide to learning Go

count_chapters
begin_reading
download
p_implied_book_part_name

From Ruby to Golang13 chapters

Begin ›
  1. Preface

  2. Introduction

  3. Chapter 0: Go Primer

  4. Chapter 1: Structs

  5. Chapter 2: Maps

  6. Chapter 3: Arrays and Slices

  7. Chapter 4: Array Navigation

  8. Chapter 5: Package Management

  9. Chapter 6: Collection Functions

  10. Chapter 7: Interfaces

  11. Glossary

  12. Acknowledgments

  13. Credits