CodeWithJay

Seed Data and Request Validation in Go: 201 Products, One Command: E-5

21 min492 views

Seed Data and Request Validation in Go: 201 Products, One Command: E-5

About this video

An empty store is useless for testing. This episode fills Postgres with a real product catalog of two hundred and one items using a single Go command, and adds proper request validation so bad data never reaches the database.

We write a Go seeder that reads structured data and inserts it efficiently, then layer in validator tags on our request structs so Gin rejects invalid input automatically with clean error messages.

Keep learning Go (Golang)

Every free video, mini course and project-based course on Go (Golang) in one place, in the order that makes sense.

All videos