Skip to content

Solving a real task from the company for the position of junior Go developer

Notifications You must be signed in to change notification settings

HELSSIUS/umbrella-test-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

umbrella-test-task [ Build echo middleware ]

Solving a real task from the company for the position of junior Go developer

Example project of test assessment from imaginary company. Full text of the task can be found here Video here

Task

You have 1 hour to solve the task. If you are lucky enough and have time left, please try to optimise your solution.

Build a middleware using echo framework

First of all, you should create a handler which sends how many days left until 1 Jan 2025 and response with HTTP 200 OK status code.

Secondly, build a middleware, which checks HTTP header User-Role presents and contains admin and prints red button user detected to the console (using default log package or any 3rd party) if so.

Run

go run github.com/spatecon/echo-middleware-assessment/cmd/umbrella-test-task

Test

curl --location --request GET '127.0.0.1:8080/status' \
--header 'User-Role: admin'

About

Solving a real task from the company for the position of junior Go developer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages