Golang Interview Assignment 26: Logger Rate Limiter With Two Solutions and Unit Tests

Ramseyjiang
Level Up Coding
Published in
6 min readMay 9, 2024

--

This article will provide two solutions for logger rate limiter with table-driven unit tests.

Photo by Wolfgang Hasselmann on Unsplash

Assignment Description

Design a logger system that receives a stream of messages along with their timestamps. Each unique message should only be printed at most every 10 seconds (i.e. a…

--

--

15 years of code experience, got a software-engineering master's degree, learnt C++, JS, PHP and Python, Golang. Have a strong, friendly and lovely rottweiler.