Categorygithub.com/Onnywrite/lms-golang-24
module
0.0.0-20250116122517-06a01e1adb7a
Repository: https://github.com/onnywrite/lms-golang-24.git
Documentation: pkg.go.dev

# README

LMS Golang 24

Yandex lyceum project of the Golang course 2024.

How to run

export SERVER_PORT=80
go run cmd/server/main.go

If you run go run cmd/server/main.go then it will work on port 8080.

Use cases

Code 200, result -498:

curl -v --location localhost/api/v1/calculate \
--header 'Content-Type: application/json' \
--data '{
  "expression": "2+2*2*(-5)^3"
}'

Code 422:

curl -v --location localhost/api/v1/calculate \
--header 'Content-Type: application/json' \
--data '{
  "expression": "2+2*2*(-5)^"
}'

Code 422:

curl -v --location localhost/api/v1/calculate \
--header 'Content-Type: application/json' \
--data '{
  "expression": "wrong json"
'

Code 500, panic:

curl -v -X POST --location localhost/api/v1/panic

# Packages

No description provided by the author
No description provided by the author