Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Creating Packages in Go

Gary Clarke via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn to organize your Go code into reusable packages by setting up modules, creating custom packages, and understanding Go's visibility rules. Discover how to use `go mod init` to establish a module with a go.mod file that defines your project's base import path. Create your own packages in separate folders with proper package declarations, then import and use them throughout your project. Master the distinction between exported functions (starting with uppercase letters) that can be accessed from other packages and private functions (lowercase) that remain internal to the package. Understand how Go's folder structure directly affects import paths, enabling you to organize code logically across multiple directories. Practice building maintainable applications by splitting functionality into focused, reusable modules that keep your main.go file clean and your codebase scalable for real-world development.

Syllabus

Creating Packages in Go

Taught by

Gary Clarke

Reviews

Start your review of Creating Packages in Go

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.