Setting up golang-migrate for windows

prematid

Prem

Posted on September 13, 2021

Setting up golang-migrate for windows

First Install scoop

But Wait! What is scoop

Scoop is a command-line package manager for Windows which makes it easier to install and use common programs and tools.

Make sure PowerShell 5 (or later, include PowerShell Core) and .NET Framework 4.5 (or later) are installed. Then run:

Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')

or 
iwr -useb get.scoop.sh | iex 
Enter fullscreen mode Exit fullscreen mode

In case you get an error, you might need to change the execution policy (i.e. enable Powershell) with:

Set-ExecutionPolicy RemoteSigned -scope CurrentUser
Enter fullscreen mode Exit fullscreen mode

Now that you have installed scoop on your windows system, we can move ahead with our main task i.e. golang-migrate

Download pre-built binary (Windows, MacOS, or Linux)
curl -L https://github.com/golang-migrate/migrate/releases/download/$version/migrate.$platform-amd64.tar.gz | tar xvz
Enter fullscreen mode Exit fullscreen mode

Now that we have downloaded scoop and the pre-built library for golang-migrate, we will go ahead and install it using this simple command

For Windows

scoop install migrate
Enter fullscreen mode Exit fullscreen mode

And There You GO!!!
Your golang-migrate is setup for windows.

💖 💪 🙅 🚩
prematid
Prem

Posted on September 13, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related