Practical Advice for Go Library Authors
Offered By: Gopher Academy via YouTube
Course Description
Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore practical advice for Go library authors in this 41-minute conference talk from GopherCon 2016. Dive into essential topics such as naming conventions, object construction, zero value considerations, and constructor functions. Learn about singleton options, effective logging practices, and the pros and cons of interfaces versus structs. Discover best practices for creating random packages, handling panics, and working with channels and goroutines. Gain insights on when to use context.Context, designing for efficiency, and leveraging /vendor in libraries. Master the art of clean code organization and effective use of build tags to create robust and user-friendly Go libraries.
Syllabus
Intro
Naming examples
Object construction
Zero value considerations
Working with zero values
New constructor function
What do these do?
Singleton options
Logging counter-example
Logging advice
Better logging example
interfaces vs structs
Let's make a random package
When to panic
Channels
When to spawn goroutines
When to use context.Context and when not to
If something is hard to do, make someone else do it
Designing for efficiency
Using /vendor in libraries
Build tags
Staying clean
Taught by
Gopher Academy
Related Courses
Go Serverless with a Graph DatabaseA Cloud Guru System Tooling with Go
A Cloud Guru Aprendiendo a programar en Go
Coursera Project Network via Coursera Learn Go
Codecademy Learn Go: Conditionals
Codecademy