Building a package in Go
Minimum price
Suggested price

Building a package in Go

About the Book

The aim of the book is to show Go newbies the mechanics of creating a package in Go. By the end of the book, you should be able to get started with writing and deploying your own Go packages.

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

Table of Contents

  • Preface
    • Who is the book for?
    • What will you learn?
    • Acknowledgements
    • Using Code Examples
    • Getting the Code
    • How to Contact Me
    • Thanks
  • 1. Project - redditnews for Baby Gophers
    • 1.1 Our Project
    • 1.2 What will you learn?
  • 2. Getting Started
    • 2.1 Downloading Go
    • 2.2 Learning Go
    • 2.3 Install the Go tools
    • 2.4 Editor for Go
    • 2.5 Formatting code
    • 2.6 Test your installation
    • 2.7 Use GitHub
    • 2.8 Set up Git
    • 2.9 Go Code Organization
  • 3. redditnews.go (First Iteration)
  • 4. redditnews.go (Second Iteration)
  • 5. redditnews.go (Third Iteration)
  • 6. Create a package redditnews
  • 7. Sending an Email
  • 8. Documenting redditnews
    • 8.1 References
  • 9. Pushing to GitHub
    • 9.1 Use go vet
    • 9.2 Make a new repository on GitHub
  • 10. Golang Dependency Management
    • 10.1 Git Tagging
    • 10.2 Versioning your package
    • 10.3 When to change the version?
    • 10.4 How to change the version?
    • 10.5 What next?

Authors have earned$10,250,807writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.

Learn more about writing on Leanpub

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

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses! 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