Build the future of communications.
Start Building for Free

go posts

  • By Oluyemi Olususi
    Get Started Testing an API Built With Golang Get Started Testing  a Golang API

    Writing code that "works" is the easy part. The real issue is writing code that "lasts". Whether it’s a change in team membership or a change in requirements, your code should be able to grow with the changes, by virtue of a well-defined architecture, and also identify breaking changes/unhandled edge cases that may arise due to said changes.

    This article - the second in a series; aims to show you how testing will help you with the latter requirement. It will introduce testing in Golang and focus on unit testing a REST API. You will build on the first article to write tests for existing features, as well as employ test-driven development in the implementation of a new feature.

    Prerequisites

    To follow this tutorial, you will need the following:

    Get started

    If you already …

    Read More
  • By Oluyemi Olususi
    Send Bulk SMS With Go and Twilio Send Bulk SMS  With Go and Twilio

    Sometimes, nothing beats a good old SMS. The delivery of an SMS is not reliant on the recipient having any form of connection to the internet. This makes it highly reliable when delivering critical notifications. In certain instances, such as Amber alerts, for example, these notifications need to be sent in bulk to a wide audience.

    You might be wondering how difficult it would be to implement such a system. Well, with Twilio it’s actually a breeze. In this post, I will show you how to build a bulk SMS-sending application using Golang, powered by Twilio.

    Prerequisites

    To follow this tutorial, you will need the following:

    Set up the project

    The first thing you need to do is to create a project directory and change …

    Read More
  • By Joseph Udonsak
    How to Use Svelte and Go to Build a Video Chat App Main tutorial image for the "How to Use a Svelte and Go to Build a Video Chat App" tutorial

    The internet has made the world a much smaller place. Not only can you chat with your loved ones in real-time, but you can also see them and experience an extra level of interaction that words fail to capture.

    In this tutorial, I will show you how simple it is to build a video chat app using Twilio Video, using Svelte for the frontend and Golang for the backend.

    Prerequisites

    To follow this tutorial, you will need the following:

    Getting started

    Brief Overview

    The process flow of the application is as follows:

    1. The frontend displays a form that allows the user to specify a room name.
    2. The room name provided by the user is then passed to the backend.
    3. Using this room name, the backend will then generate and return an Access Token containing …
    Read More
  • By Joseph Udonsak
    Make Spooky Automated Calls at Halloween With Twilio Voice and Go Make Spooky Automated Calls at Halloween With Twilio Voice and Go

    Automation is essential to improving the efficiency of any process. By harnessing technology solutions for monotonous tasks, human resources are freed up for use in more intricate aspects of the process. An excellent example of this is automating notifications and reminders using phone calls.

    In this article, I will show how to build a Go web application which, when provided with a phone number, will make an automated phone call to the provided phone number and play one of three pre-recorded audio files. But keeping with the spirit of the season the caller will be greeted with a spooky Halloween message.

    Prerequisites

    To follow this tutorial, you need the following:

    Set up the project

    The first thing you need to do is to create a …

    Read More
  • By Oluyemi Olususi
    Build a RESTful API using Golang and Gin Build a RESTful API using Golang and Gin

    Go has risen to be one of the most in-demand programming languages - despite being relatively young. For example, it's been used to build a wide range of applications including CLIs, compilers, APIs, and desktop apps. What's more, it has a gentler learning curve and faster execution time than most modern languages. So you'd be hard-pressed to go wrong by using Go for your next project.

    This is the first in a series of articles where I will show you how to build, test, dockerize, and deploy an application written in Go. In this article, you will build a RESTful API using Golang and Gin. If you're not familiar with it, Gin is an HTTP web framework written in Go. The application will have a database powered by PostgreSQL.

    What you will build

    You will build an API for a personal diary app which will have the following …

    Read More
  • By Gareth Paul Jones
    Scaling your Go Application with Kubernetes scaling-go-app-with-kubernetes

    In this tutorial we’ll walk through scaling your Go application with Kubernetes. We will do this by building an application in Go. We will then get it up and running locally on your development machine, containerize it with Docker, deploy it to a Kubernetes cluster with Minikube, and create a load balancer that will serve as its public facing entry point.

    Docker is a containerization tool used to provide applications with a filesystem holding everything they need to run. This ensures that apps will have a consistent run-time environment and behave the same way regardless of where they are deployed. Kubernetes is a cloud platform for automating the deployment, scaling, and management of containerized applications.

    Prerequisites

    Before you can complete the tutorial, you’ll need a few things.

    • Go 1.19
    • Kubernetes 1.25
    • Minikube 1.26
    • You preferred editor or IDE
    • Some prior experience with containers and with developing applications …
    Read More
  • By Matthew Setter
    How to Manage Go Application Secrets Using Vault How to Manage Go Application Secrets Using Vault

    Because modern software is so complex it needs to use secrets and confidential information, such as API keys, tokens, and the older usernames and passwords for connecting to remote servers and databases.

    While once it might have been seen as okay to store these alongside the code itself, these days — especially in light of the 12-factor app movement — that's no longer the case. It's considered bad security practice — with good reason — to keep any kind of secure information within your code.

    Consequently, a range of approaches and tools have been developed to keep credentials out of code bases, keeping them secure and readily available to the code as and when required.

    In this tutorial, you're going to learn how to manage Go application secrets with HashiCorp Vault.

    If you're a PHP developer, check out the PHP version of this tutorial.

    Prerequisites

    To follow along …

    Read More
  • By Kelley Robinson
    How to do phone verification in Go with Twilio Verify Phone verification in Go with Twilio Verify

    Phone verification is an essential part of the user onboarding process: whenever you collect new contact methods from users you should make sure those are valid. You can also use a similar workflow to authenticate users on an ongoing basis with a one-time passcode (OTP) sent to the user's phone. This is a user-friendly way to do either primary or two-factor authentication (2FA).

    This blog post will show you how to send an SMS OTP in Go using Twilio's Verify API. Best of all, once you implement the code you can send an OTP via WhatsApp, voice calls, and emails with one parameter change.

    This post uses the Twilio Go Helper Library which is currently in Pilot and under active development. If you identify any issues, please open an issue on GitHub. Learn more about support for Pilot products.

    Prerequisites for sending an SMS OTP

    To follow along …

    Read More
  • By Matthew Setter
    How to Send an Email with Go and SendGrid in 30 Seconds How to Send an Email with Go and SendGrid in 30 Seconds

    SendGrid is all about delivering exceptional email experiences. In this tutorial, you'll learn how to send your first email with Go and SendGrid in 30 seconds. To do this, you'll use the official Twilio SendGrid Golang API library to save yourself a lot of time and effort.

    Ready? Let's get started!

    Tutorial requirements

    To follow along with the tutorial, you're only going to need three things:

    1. A SendGrid account. If you are new to Twilio Sendgrid you can create a free account, which allows you to send 100 emails per day — forever.
    2. Go, version 1.18 or newer. You can download an installer from the official Go website.
    3. An email address to receive the email.
    4. An email address to send the email which has a verified identity.

    Create the project directory

    Create a new directory named send-email-with-sendgrid in your Go workspace (somewhere inside $GOPATH/src), and change into …

    Read More
  • By Miguel Grinberg
    Send Scheduled SMS with Go and Twilio Send Scheduled SMS with Go and Twilio

    Twilio is all about powering communication – and doing it conveniently and fast. Our Programmable Messaging service has been available for a long time, but until now, scheduling a message to be sent at a future time required a developer to use their own scheduling solution.

    Fortunately, this is now a thing of the past! With Message Scheduling, you can send your scheduled SMS and MMS messages with a single API call, without using custom schedulers.

    In this tutorial, you’ll learn how to send scheduled SMS notifications in Go.

    Tutorial requirements

    Read More
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.