Похожие чаты

Now another question. I have an HTTP API DB I want

to use to store arbitrary data. I guess the lowest common denominator is always going to be []byte and I can use Content-Type headers that HTTP already implements to give it the "format" I need.

https://paste.0x7.io/?5bcb45afddade2d9#QeiHmUAQzJC3ADQYBQEwSZze1PcRePqxRiKd4hNAn4e

4 ответов

18 просмотров

type nabia_struct struct { nabia_map map[string]*nabia_data // Key = path; value = pointer to content rwmutex sync.RWMutex } small trick: type Path = string type nabia_struct struct { nabia_map map[Path]*nabia_data rwmutex sync.RWMutex }

Liλn-🌻 Автор вопроса
Edwing123
What's the trick?

he aliased Path to string

Похожие вопросы

Обсуждают сегодня

Карта сайта