diff options
| author | Shulhan <ms@kilabit.info> | 2024-02-19 13:56:42 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-02-19 13:56:42 +0700 |
| commit | 99999635f67931e1a6deb608f13b2dc2ecd9df73 (patch) | |
| tree | 896ada622df0759e067390a84e62b856600514c8 /example.go | |
| parent | 08de328c6bfa5719bdd7003e3064668fd4e62f27 (diff) | |
| download | gorankusu-99999635f67931e1a6deb608f13b2dc2ecd9df73.tar.xz | |
all: fix null navigation links
If the navLinks fields is empty, the HTTP API will return "null" and make
the rendering error.
This changes fix this issue by allocating the slice navLinks with one
capabilities to make JSON always return "[]" if its empty.
Diffstat (limited to 'example.go')
0 files changed, 0 insertions, 0 deletions
