https://github.com/anucha-tk/gobank
https://github.com/anucha-tk/gobank
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/anucha-tk/gobank
- Owner: anucha-tk
- Created: 2024-04-05T07:46:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-06T15:10:14.000Z (over 2 years ago)
- Last Synced: 2024-12-27T01:12:22.431Z (over 1 year ago)
- Language: Go
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GOBANK
- [GOBANK](#gobank)
- [tech and tools](#tech-and-tools)
- [migrate](#migrate)
- [up](#up)
- [down](#down)
- [sqlc](#sqlc)
- [init](#init)
- [testing](#testing)
## tech and tools
- golang
- database
- postgresql
- SQL Query Builders
- [slqc](https://github.com/sqlc-dev/sqlc)
- Database Schema Migration
- [migrate](https://github.com/golang-migrate/migrate)
## migrate
```bash
migrate create -ext sql -dir db/migration -seq init_schema
```
### up
```bash
❯ migrate -path db/migration -database "postgresql://:@localhost:5432/?sslmode=disable" --verbose up
```
### down
```bash
❯ migrate -path db/migration -database "postgresql://:@localhost:5432/?sslmode=disable" --verbose down
```
## sqlc
### init
```bash
sqlc init
```
## testing
> we use testify
```bash
# default cache
go test -v ./...
# not cache
go test -v -count=1 ./...
```