Skip to content

Instantly share code, notes, and snippets.

View ikrauchanka's full-sized avatar
🏠
Working from home

Illia K. ikrauchanka

🏠
Working from home
View GitHub Profile
@flaviocopes
flaviocopes / go-sort-map.go
Last active December 25, 2023 21:03
Go: sort a Map by key #golang
import "sort"
ages := map[string]int{
"a": 1,
"c": 3,
"d": 4,
"b": 2,
}
names := make([]string, 0, len(ages))
@hassansin
hassansin / request-response.go
Last active January 20, 2025 07:26
Request-response pattern over asynchronous protocol using Go channel
package main
import (
"errors"
"fmt"
"math/rand"
"net/http"
"sync"
"time"