Простенький сокращатель ссылок
go run cmd/url_shortener/main.go
Create short url
curl -v -X POST -d '{"url": "https://google.com"}' -H 'content-type: application/json' localhost:3000/api/v1/shorten
Get info by short url
curl -v localhost:3000/api/v1/shorten/{shortCode}
Update url
curl -v -X PUT -d '{"url": "https://microsoft.com"}' -H 'content-type: application/json' localhost:3000/api/v1/shorten/{shortCode}
Destroy url
curl -v -X DELETE -H 'content-type: application/json' localhost:3000/api/v1/shorten/{shortCode}
Go to original url by short code
curl -v localhost:3000/{shortCode}