golang gin realworld example app
1.0.0

Golang/Gin Codebase ที่มีตัวอย่างในโลกแห่งความเป็นจริง (CRUD, Auth, Auth, รูปแบบขั้นสูง ฯลฯ ) ที่ปฏิบัติตามข้อมูลจำเพาะของ RealWorld และ API
codebase นี้ถูกสร้างขึ้นเพื่อแสดงแอปพลิเคชัน Fullstack ที่เต็มเปี่ยมที่สร้างขึ้นด้วย Golang/Gin รวมถึงการดำเนินการ CRUD การตรวจสอบการกำหนดเส้นทางการปนเปื้อนและอื่น ๆ
.
├── gorm.db
├── hello.go
├── common
│ ├── utils.go //small tools function
│ └── database.go //DB connect manager
├── users
| ├── models.go //data models define & DB operation
| ├── serializers.go //response computing & format
| ├── routers.go //business logic & router binding
| ├── middlewares.go //put the before & after logic of handle request
| └── validators.go //form/json checker
├── ...
...
ตรวจสอบให้แน่ใจว่าคุณได้ติดตั้ง 1.13 หรือสูงกว่า
https://golang.org/doc/install
การตั้งค่าตัวแปรสภาพแวดล้อม GO มาตรฐานตามคำแนะนำล่าสุด (ดู https://golang.org/doc/install#install)
จากรูทโครงการรัน:
go build ./...
go test ./...
go mod tidy
จากรูทโครงการรัน:
go test ./...
หรือ
go test ./... -cover
หรือ
go test -v ./... -cover
ขึ้นอยู่กับว่าคุณต้องการเห็นความครอบคลุมการทดสอบและวิธีการที่คุณต้องการ