Go Programming by EezyTutorials
Home iOS
Tutorials
HTML CSS C++ Java Python C Programming SQL TypeScript Go Machine Learning React Redux
Tools
  • Getting Started
  • Go - Introduction
  • Go - Installation & Toolchain
  • Go - First Program
  • Go - Beginner Path
  • Go - Beginner Checklist
  • Go - Output & Printing
  • Go - Comments
  • Go - User Input
  • Go - Modules & Workspace Setup
  • Language Fundamentals
  • Go - Syntax & Basics
  • Go - Types & Keywords
  • Go - Variables & Constants
  • Go - Operators (Overview)
  • Go - Naming Conventions & Style
  • Control Flow
  • Go - If / Else
  • Go - Switch
  • Go - For Loop
  • Go - Break / Continue
  • Go - Defer / Panic / Recover
  • Data Structures
  • Go - Arrays, Slices, Maps
  • Go - Structs
  • Go - Methods & Receivers
  • Go - Interfaces
  • Go - Generics
  • Go - Pointers (Basics)
  • I/O & Files
  • Go - Files & I/O
  • Go - JSON Encoding/Decoding
  • Error Handling
  • Go - Error Handling
  • Concurrency
  • Go - Goroutines & Channels
  • Go - Select & Concurrency Patterns
  • Go - Context
  • Backend & Web
  • Go - HTTP Server (net/http)
  • Go - REST API & Middleware
  • Go - Auth (JWT)
  • Go - WebSockets & SSE
  • Go - Logging & Configuration
  • Databases
  • Go - database/sql Basics
  • Go - Transactions & Migrations
  • Tooling & Build
  • Go - Modules & Dependency Mgmt
  • Go - Testing & Benchmarking
  • Go - Profiling & pprof
  • Architecture & Deployment
  • Go - Project Layout
  • Go - gRPC Overview
  • Go - gRPC Streaming & Interceptors
  • Go - Observability (OpenTelemetry)
  • Go - Advanced Configuration
  • Go - Dependency Injection Patterns
  • Go - Dockerization
  • Samples
  • Go - Samples Index
  • Go - Samples Quickstart
  • Go - Sample REST API
  • Go - Sample CRUD API (with Migrations)
  • Go - Sample gRPC Streaming Service

Go - Modules & Workspace Setup

Home › Programming › Go › Go - Modules & Workspace Setup
Beginner 10/10 Teacher 10/10 Architect 10/10
On this page
    Back to top ↑

    Initialize a Module

    go mod init example.com/app
    

    Adding Dependencies

    go get github.com/google/uuid@latest
    go mod tidy
    

    Workspaces

    Use go work to manage multi-module repos:

    go work init ./svc-a ./svc-b
    
    « Prev: Go - User Input Next: Go - Syntax & Basics »

    ★ EezyTutorials

    • ℹAbout
    • ✉Contact
    • 📢Advertise
    • 🔒Privacy Policy

    Connect

    🗨 🐦 ▶️
    © 2014–2025 Eezy Tutorials
    Up ↑