Complete BLoC with Clean Architecture (group chat) Discount !! E-commerce App With Backend Source Code Video and Voice Chatting App Firebase Chatting App Source Code Complete Gym App BLoC State Management Source Code Complete Study App Buy Ticket Booking App Source Code Buy Travel App With Backend Source Code Complete Chat App Udemy Course Special Offer Discount !! Online Learning Course App (BLoC) Online Learning Course App (Riverpod) Online Learning Course App (Getx) Discount !! Shopping App (Provider) Cool Flutter Game Flutter Nodejs Chat App Flutter Nodejs Api And Firebase Chat App Riverpod Task Management App
Here we will learn how to create a Taskfile in GoLang. The benefit of Taskfile is that you don't have to write a long command to run your Go lang app.
To create a Taskfile tool make sure you have installed Taskfile for your OS.
To install the the tool you run the command
brew install go-task/tap/go-task
Then you can do your Taskfile
version: '3'
tasks:
build:
cmds:
- go build -o app cmd/service/main.go
test:
cmds:
- go test -v ./...
lints:
cmds:
- golangci-lint run
run:
cmds:
- docker-compose up --build
You see from the file, right after every file we put cmds. It contains the actual commands. In my case, my main.go file is in the cmd/service
folder.
Now I can simply run task run and it will build my project.