World Conquest Chronicles

World Conquest Chronicles

go-exercises-backend, v1.7.2

Back-end of the service for solving programming exercises.

Add a few example tasks.

Change Log

  • example tasks:
    • add the migration that creates a few example tasks:
      • add the utility for applying migrations;
    • add the solutions for the example tasks.

Migration

The necessary tables will be created automatically on service starting.

Then run the manual migration to create a few example tasks (optionally):

$ ./tools/migrate.sh -h | --help
$ ./tools/migrate.sh

Options:

  • -h, --help — show the help message and exit.

Environment variables:

  • PATH_TO_MIGRATIONS — path to migrations (default: ./migrations);
  • STORAGE_ADDRESSPostgreSQL connection URI (default: postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable).

The following example tasks will be created:

  1. Sum of Two Numbers (Test Task)
  2. Sum of Array
  3. Product of Array
  4. Minimum of Array
  5. Maximum of Array
  6. Index of Array Minimum
  7. Index of Array Maximum
  8. Search in Array
  9. Search in Array (Last Occurrence)
  10. Filtering of Array
  11. Filtering of Array (In-place)
  12. Removing of Duplicates
  13. Removing of Duplicates (In-place)

Repository

Link: https://github.com/thewizardplusplus/go-exercises-backend/tree/v1.7.2.

Content: code.

License: MIT.