Learn Go programming
Learn Go programming
$5.00
Minimum price
$6.00
Suggested price
Learn Go programming

This book is 90% complete

Last updated on 2015-08-31

About the Book

About the Author

Satish Talim
Satish Talim

Satish Talim is the founder of RubyLearning, that helps Ruby programmers become awesome! He has more than 40 years of industrial experience and is a board member at Josh Software Pvt. Ltd. and Maybole Technologies Pvt. Ltd.

He is a trustee on the Emerging Technology Trust that organizes conferences in India like GopherConIndia and RubyConfIndia.

He has published many books on Amazon and was awarded Ruby's Top Teacher in 2008 and the winner of the Shorty Award in Education in 2009.

Follow @indianguru on Twitter or email him at satish@rubylearning.org

About the Contributors

Victor Goff
Victor Goff

Reviewer

Manages RubyLearning sites and teaches Go and Ruby

Table of Contents

  • Preface
    • Who is the eBook for?
    • What will you learn?
    • Using code examples
    • Errata
    • Acknowledgements
    • How to contact me?
    • Thanks
  • How to use this eBook
  • 1. Introduction
    • 1.1 What is Go?
    • 1.2 Go Recent History
    • 1.3 Go Authors
    • 1.4 Why Go?
  • 2. Learn Go programming
    • 2.1 Comments
    • 2.2 Statements
    • 2.3 Identifiers
      • 2.3.1 Blank identifier
      • 2.3.2 Pre-declared identifiers
    • 2.4 Keywords
    • 2.5 package
    • 2.6 import
      • 2.6.1 Aliasing of imports
      • 2.6.2 Removing explicit package reference
    • 2.7 functions
    • 2.8 String literal
    • 2.9 Numbers
      • 2.9.1 Integers
      • 2.9.2 Floating Point Numbers
      • 2.9.3 Some default values
    • 2.10 Console output
      • 2.10.1 Print and Println
      • 2.10.2 Formatting using Printf
    • 2.11 Console input
    • 2.12 Command-line arguments - Args
    • 2.13 Solutions
  • 3. Variables, Constants, and Types
    • 3.1 Variable
    • 3.2 Constants
      • 3.2.1 Typed and Untyped constants
    • 3.3 Named types
    • 3.4 Boolean types
    • 3.5 Operators
      • 3.5.1 Boolean Operators
      • 3.5.2 Arithmetic Operators
      • 3.5.3 Bitwise Operators
    • 3.6 Solutions
  • 4. Control Structures
    • 4.1 if-else
    • 4.2 goto statement
    • 4.3 switch
      • 4.3.1 fallthrough statement
    • 4.4 for loop
    • 4.5 Solutions
  • 5. Pointers
    • 5.1 Solutions
  • 6. More on Functions
    • 6.1 A function can have multiple return values. Some examples:
    • 6.2 A function can take zero or more arguments
    • 6.3 Named return values
    • 6.4 What’s the idiomatic way to exit a program with some error code?
    • 6.5 Variadic Functions
    • 6.6 Closures
    • 6.7 Recursion
    • 6.8 Solutions
  • 7. Detailed information
    • 7.1 Semicolons
    • 7.2 init
    • 7.3 Formatting
    • 7.4 More on Strings
      • 7.4.1 String functions
    • 7.5 defer
    • 7.6 Using the log package
    • 7.7 Using the big package
    • 7.8 go vet
    • 7.9 golint
    • 7.10 goimports
    • 7.11 Naming Convention Summary
  • 8. Arrays
  • 9. Slices
    • 9.1 Slice Functions
    • 9.2 Slice internals
    • 9.3 Passing a slice to a function
  • 10. Range
    • 10.1 Variadic Functions using range
  • 11. Maps
  • 12. Structs
    • 12.1 What’s the difference between pointer and non-pointer method receivers?
    • 12.2 Solutions
  • 13. interface
    • 13.1 The interface{} type
    • 13.2 Solutions
  • 14. Error
  • 15. io, os and net/http - Getting started
    • 15.1 io
    • 15.2 os
    • 15.3 TCP and net/http
      • 15.3.1 Basic Networking
      • 15.3.2 Port
      • 15.3.3 Internet Addresses
      • 15.3.4 net/http
  • 16. Random Numbers
  • 17. File Handling
    • 17.1 Package ioutil
    • 17.2 Package os
      • 17.2.1 read_file_os1.go
      • 17.2.2 read_file_os2.go
      • 17.2.3 write_file_os.go
      • 17.2.4 read_dir_os.go
    • 17.3 Package bufio
      • 17.3.1 NewReader
      • 17.3.2 Peek
      • 17.3.3 NewWriter
    • 17.4 Solutions
  • 18. JSON and Go
    • 18.1 JSON
    • 18.2 Package json
      • 18.2.1 Encoding
      • 18.2.2 Struct tags
      • 18.2.3 Decoding
      • 18.2.4 Streaming Encoders and Decoders
    • 18.3 A Fun, Weather Forecast Go Web App
      • 18.3.1 Register for an account at Forecast for Developers
  • 19. TCP programming using Go
    • 19.1 TCP Sockets
    • 19.2 Package net
      • 19.2.1 TCP Client
      • 19.2.2 A Daytime server
  • 20. Unit testing and Benchmarking Go programs
    • 20.1 Testing
    • 20.2 Benchmarks
  • 21. Concurrency
    • 21.1 Goroutines
    • 21.2 Channels
      • 21.2.1 Channel direction
      • 21.2.2 Unbuffered channel
  • 22. Additional Exercises
    • 22.1 Solutions
  • 23. Additional Reading
    • 23.1 Testable Examples in Go
  • Appendix A
    • Downloading Go
    • Install the Go tools
      • Test your installation
    • Go Code Organization
      • Workspaces
      • The GOPATH environment variable
      • Package paths
      • Editing a Go program
      • A Go program
  • Appendix B - Project: redditnews for Baby Gophers
    • Use GitHub
      • Create an account
    • Set up Git
    • Complete Appendix A
    • redditnews.go (First Iteration)
  • Appendix C - Build, deploy webapps to cloud
    • Complete Appendix A
    • A basic Go web app
    • Static Sites with Go
    • Deploying Go Web Apps to Heroku
    • Cloud Computing Service Levels
      • SaaS
      • IaaS
      • PaaS
    • Program webapp_h.go
    • Create an account on Heroku
    • Install the Heroku Toolbelt
    • Create a Procfile
    • Use Git
    • Install Godep
    • Heroku deploy
    • A brief note on Heroku
      • Troubleshooting
      • Heroku’s Architecture
      • Slugs
    • License

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Write and Publish on Leanpub

Authors, publishers and universities use Leanpub to publish amazing in-progress and completed books and courses, just like this one. You can use Leanpub to write, publish and sell your book or course as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub