go get github.com/gin-gonic/gin #HTTP framework
go get github.com/jackc/pgx/v5 #PostgreSQL driver
go get gorm.io/gorm #ORM
go get gorm.io/driver/postgres #GORM PostgreSQL driver
go get github.com/spf13/viper #Configuration management
go get github.com/go-playground/validator/v10 #Data validation
go get github.com/go-redis/redis/v8 #Redis client
go get github.com/sirupsen/logrus #Logging
go get github.com/golang-jwt/jwt/v4 #JWT
go get github.com/prometheus/client_golang/prometheus #Prometheus
go get github.com/uber-go/zap #Alternative to logrus [not working]
go get github.com/stretchr/testify/assert #Testing [not working]
go get github.com/axw/gocov/gocov@latest #Code coverage
go get github.com/modocache/gover@latest #Coverage Merging
go get github.com/golangci/golangci-lint/cmd/golangci-lint@latest #Linter
go get github.com/fzipp/gocyclo/cmd/gocyclo@latest #Cyclomatic complexity
go get github.com/swaggo/swag #Swagger
go get github.com/swaggo/files
go get github.com/swaggo/gin-swagger
sudo apt update
sudo apt install postgresql postgresql-contrib
Installing postgis:
sudo apt install postgis
Enable postgis extension:
CREATE EXTENSION IF NOT EXISTS postgis;
go get github.com/jinzhu/copier
go-studi-kasus-kredit-plus