HOME > Development > Building a module in Go (Golang)

Building a module in Go (Golang)

  • Development
  • Apr 14, 2025
SynopsisBuilding a module in Go (Golang , available at $74.99, has an...
Building a module in Go (Golang)  No.1

Building a module in Go (Golang), available at $74.99, has an average rating of 4.67, with 58 lectures, based on 331 reviews, and has 3152 subscribers.

You will learn about How to build a platform agnostic, re-usable Go module How to share your module with other Go developers How to write tests for your module How to manage multiple versions of your module How to use Go 1.18s new go work feature, workspaces This course is ideal for individuals who are This course is intended for Go developers who want to build and share modules (sometimes called packages) for use by other developers, or in their own projects. It is particularly useful for This course is intended for Go developers who want to build and share modules (sometimes called packages) for use by other developers, or in their own projects.

Enroll now: Building a module in Go (Golang)

Summary

Title: Building a module in Go (Golang)

Price: $74.99

Average Rating: 4.67

Number of Lectures: 58

Number of Published Lectures: 58

Number of Curriculum Items: 58

Number of Published Curriculum Objects: 58

Original Price: $27.99

Quality Status: approved

Status: Live

What You Will Learn

  • How to build a platform agnostic, re-usable Go module
  • How to share your module with other Go developers
  • How to write tests for your module
  • How to manage multiple versions of your module
  • How to use Go 1.18s new go work feature, workspaces
  • Who Should Attend

  • This course is intended for Go developers who want to build and share modules (sometimes called packages) for use by other developers, or in their own projects.
  • Target Audiences

  • This course is intended for Go developers who want to build and share modules (sometimes called packages) for use by other developers, or in their own projects.
  • Working with web applications in Go is remarkably easy, but it does not take too long to realize that in a lot of cases, we end up writing the same kind of code every time we start a new project. You might need to read JSON, write JSON, upload files, or any of the commonly used features of a given web application. In other words, we often rewrite code that we have already written, many times over.

    Rather than simply copying and pasting code from one project to another, it makes sense to take advantage of Go modules reusable code that can be included in a project by simply issuing a “go get” command. That way, if new functionality is added to that module, any project that imports it can take advantage of that functionality simply by updating its dependencies, and if a bug is discovered, you can fix it by updating the module; every project that uses that module gets the bug fix with a single “go get -u” command.

    Building a robust, secure, well-tested module is not difficult, but it does require careful planning to ensure that it will work across different operating systems.

    This course will take you through the steps necessary to produce a module that includes many of the tasks commonly used in web applications, including:

  • reading JSON

  • writing JSON

  • producing well formatted, informative error messages

  • uploading one or more files to a server, and limiting uploads by mime type and file size

  • creating directories on the server

  • generating random strings

  • downloading static files

  • posting JSON to a remote service

  • creating a URL safe slug from a string

  • We’ll build our module using Go 1.18’s new workspaces tools, and we’ll ensure that the entire module is well-tested.

    Our final module will not have any external dependencies, and will only use functionality found in Go’s standard library.

    By the time you have finished this course, you’ll have a Go module that will make starting a new web application much faster, and you won’t be depending on someone else’s code to do so.

    Course Curriculum

    Chapter 1: Introduction

    Lecture 1: Introduction

    Lecture 2: About me

    Lecture 3: How to ask for help

    Chapter 2: Project Setup

    Lecture 1: Installing Go

    Lecture 2: Installing an IDE

    Lecture 3: Setting up our Go Workspace

    Chapter 3: Getting Started with the Module

    Lecture 1: What well cover in this section

    Lecture 2: Creating a function to generate a random string

    Lecture 3: Trying out our new module in a simple Go application

    Lecture 4: Writing a test for our RandomString function

    Lecture 5: Pushing our module up to GitHub

    Chapter 4: Uploading one or More Files

    Lecture 1: What well cover in this section

    Lecture 2: Getting started with the UploadFiles method

    Lecture 3: Adding a project to our workspace to test uploading files

    Lecture 4: Trying out our new upload functionality

    Lecture 5: Adding a convenience method, UploadOneFile

    Lecture 6: Writing a test for the UploadFiles method in our module

    Lecture 7: Writing a test for UploadOneFile

    Lecture 8: Pushing our changes to GitHub

    Chapter 5: Creating Directories if they do not exist

    Lecture 1: What well cover in this section

    Lecture 2: Writing the CreateDirIfNotExists method

    Lecture 3: Trying out our new method

    Lecture 4: Writing a test for CreateDirIfNotExists

    Lecture 5: Updating the UploadFiles method to take advantage of our new method

    Lecture 6: Updating our readme and pushing changes to GitHUB

    Chapter 6: Generating Slugs

    Lecture 1: What well cover in this section

    Lecture 2: Writing the Slugify method for our module

    Lecture 3: Adding an app-slug project to our Go workspace and trying things out

    Lecture 4: Update our tests

    Lecture 5: Pushing our changes to GitHub

    Chapter 7: Downloading a Static File

    Lecture 1: What well cover in this section

    Lecture 2: Writing the DownloadStaticFile function

    Lecture 3: Trying things out

    Lecture 4: Writing a test for DownloadStaticFile

    Lecture 5: Pushing our changes to GitHub

    Chapter 8: Working with JSON

    Lecture 1: What well cover in this section

    Lecture 2: Reading JSON

    Lecture 3: Improving error messages in ReadJSON

    Lecture 4: Writing a test for ReadJSON

    Lecture 5: Adding additional cases to our table test for ReadJSON

    Lecture 6: Writing JSON

    Lecture 7: Writing a test for WriteJSON

    Lecture 8: Creating the ErrorJSON function

    Lecture 9: Writing a test for ErrorJSON

    Lecture 10: Pushing JSON to a remote service

    Lecture 11: Writing a test for PushJSONToRemote

    Lecture 12: Setting up our simple web app and adding some HTML

    Lecture 13: Getting started with the web app

    Lecture 14: Handling a simple JSON Post

    Lecture 15: Handling pushing to a remote service

    Chapter 9: Tagging a release & Semantic Versioning

    Lecture 1: What well cover in this section

    Lecture 2: What is semantic versioning?

    Lecture 3: Tagging version 1.0.0 of our module

    Lecture 4: Updating the version to 2.0.0

    Chapter 10: Trying our module out

    Lecture 1: What well cover in this section

    Lecture 2: Creating a simple (dummy) API

    Lecture 3: Importing our toolkit module to the project and trying one endpoint

    Lecture 4: Trying out the login handler

    Instructors

  • Building a module in Go (Golang)  No.2
    Trevor Sawler
    Ph.D.
  • Rating Distribution

  • 1 stars: 3 votes
  • 2 stars: 4 votes
  • 3 stars: 13 votes
  • 4 stars: 94 votes
  • 5 stars: 217 votes
  • Frequently Asked Questions

    How long do I have access to the course materials?

    You can view and review the lecture materials indefinitely, like an on-demand channel.

    Can I take my courses with me wherever I go?

    Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don’t have an internet connection, some instructors also let their students download course lectures. That’s up to the instructor though, so make sure you get on their good side!