Skip to content

www.leonenkov.ru

Comprehensive notes of a lifelong learner

  • Home
  • Author

Без рубрики

Terminal Multiplexer – Proof of Concept

01.07.202615.07.2026 ~ Roman Leonenkov
Just sharing a small project that might be useful for anyone interested in Go language and terminal UIs. This is a proof of concept of a terminal multiplexer. The project is very simple, there are just a couple of key source files.
 …

Java Optional implementation in Golang

01.06.202601.07.2026 ~ Roman Leonenkov

On the moment of writing generics in Golang (v1.26) are not very flexible, however you can implement something which almost feels like true Java.

 …

Code snippet to print out a go app memory status

25.05.202525.11.2025 ~ Roman Leonenkov
Helps to trace memory leaks in a Golang application.
1
2
3
4
5
6
7
// For clearer results it's better to call this function after runtime.GC() invocation.
// The code was borrowed from 100 go mistakes book.
func printAlloc() {
    var m runtime.MemStats
    runtime.ReadMemStats(&m)
    fmt.Printf("%d KB\n", m.Alloc/1024)
}