-
Notifications
You must be signed in to change notification settings - Fork 1
⚙️ BUILD
Igor Perkovic edited this page Jul 22, 2026
·
8 revisions
Open terminal app in the folder where you will download the code (Downloads) and type:
git clone https://github.com/igorp74/WhatToDo.git cd ToDo
Make sure Go is installed on your machine, then initialize app
go mod init whattodo/appNow, we will add all necessary dependencies:
go mod tidy
Usual build
go build -o todo .
More optimal build - for a smaller binary size
CGO_ENABLED=0 go build -ldflags="-s -w" -o todo
Copy your binary to the system path
sudo cp todo /usr/local/bin
Usual build
go build -o todo.exe .More optimal build - for a smaller binary size (this one is on Manjaro for Windows)
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o todo.exe .After build is done, either move executable into a folder on declared path, or add your path to the environment variable:
setx /M PATH "%PATH%;<your-new-path>"
todo add -t "Test"
This last step will create todo.db in your home folder