Skip to content

Migrations and Helpers API flexibility improvements and documentation #28

Merged
harrisonde merged 3 commits intoCidekar:developmentfrom
harrisonde:development
Dec 1, 2025
Merged

Migrations and Helpers API flexibility improvements and documentation #28
harrisonde merged 3 commits intoCidekar:developmentfrom
harrisonde:development

Conversation

@harrisonde
Copy link
Contributor

✨ Add documentation and improve API flexibility for migrations and helpers

📝 Summary

  • Added comprehensive GoDoc comments with usage examples to database/migrations and helpers packages
  • Made maxBytes parameter optional in ReadJSON with a sensible default of 1MB

🔧 Changes

database/migrations/migrate.go

  • 📚 Added package-level documentation
  • 📚 Added GoDoc comments to MigrateUp, MigrateDownAll, Steps, and MigrateForce

database/migrations/pop.go

  • 📚 Added GoDoc comments to PopConnect, CreatePopMigration, RunPopMigrations, PopMigrateDown, and PopMigrateReset
  • 📚 Documented parameter details for CreatePopMigration

helpers/response-utils.go

  • 📚 Added GoDoc comments with practical code examples for all methods
  • 🚀 Made maxBytes an optional variadic parameter in ReadJSON (defaults to 1048576 bytes / 1MB)
  • ✅ Backward compatible - existing code continues to work without changes

💡 Example Usage (new optional parameter)

// Use default 1MB limit
err := helpers.ReadJSON(w, r, &data)

// Or specify custom limit (512KB)
err := helpers.ReadJSON(w, r, &data, 524288)

@harrisonde harrisonde merged commit b7b92a9 into Cidekar:development Dec 1, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant