18 Commits

Author SHA1 Message Date
Vincent Bernat
abca5e983d chore: modernize some code 2025-11-14 23:22:02 +01:00
Vincent Bernat
17b1eeea90 console: use strings.Builder when working with strings
Some checks failed
CI / 🤖 Check dependabot status (push) Has been cancelled
CI / 🐧 Test on Linux (${{ github.ref_type == 'tag' }}, misc) (push) Has been cancelled
CI / 🐧 Test on Linux (coverage) (push) Has been cancelled
CI / 🐧 Test on Linux (regular) (push) Has been cancelled
CI / ❄️ Build on Nix (push) Has been cancelled
CI / 🍏 Build and test on macOS (push) Has been cancelled
CI / 🧪 End-to-end testing (push) Has been cancelled
CI / 🔍 Upload code coverage (push) Has been cancelled
CI / 🔬 Test only Go (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 20) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 22) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 24) (push) Has been cancelled
CI / ⚖️ Check licenses (push) Has been cancelled
CI / 🐋 Build Docker images (push) Has been cancelled
CI / 🐋 Tag Docker images (push) Has been cancelled
CI / 🚀 Publish release (push) Has been cancelled
This is faster than bytes.Buffer.
2025-10-12 08:08:47 +02:00
Vincent Bernat
b1d6382585 common/embed: replace all go:embed use by an embedded archive
Some of the files were quite big:

- asns.csv ~ 3 MB
- index.js ~ 1.5 MB
- *.svg ~ 2 MB

Use a ZIP archive to put them all and embed it. This reduce the binary
size from 89 MB to 82 MB. 🤯

This also pulls some code modernization (use of http.ServeFileFS).
2025-09-03 00:00:05 +02:00
Vincent Bernat
2c787ff75c console: use mux to simplify static assets serving 2025-09-02 17:53:59 +02:00
Vincent Bernat
032cd1336d console: display missing images in documentation
And don't embed SVG. This is wasteful.
2025-09-02 08:30:32 +02:00
Vincent Bernat
af745151fc console: update chroma to v2 2025-08-24 14:04:05 +02:00
Vincent Bernat
8ac89407fd console: add admonitions to documentation markdown 2025-07-27 21:44:28 +02:00
Vincent Bernat
9db516e424 build: don't use ioutil
This is deprecated.
2023-11-12 22:58:41 +01:00
Vincent Bernat
1ec89aac1f build: fix various lint issues
revive default configuration has changed in 1.3.0. Some stuff is a bit
silly (like empty blocks), but I find it easier to follow that than to
try to tweak the configuration.
2023-03-21 00:01:13 +01:00
Vincent Bernat
77fe2c7b77 console/docs: tell documentation is public
Initially, the goal was to also add client caching for POST requests.
However, no browser respect the cache for POST.
2022-12-19 16:51:05 +01:00
Vincent Bernat
1d39c1d9ec console: remove unsafe rendering from Goldmark
With the recent update, we don't need it anymore.
2022-09-05 23:50:28 +02:00
Vincent Bernat
78fb01c223 chore: fix some small issues detected by golangci-lint
But not using it as some linters are either plain incorrect (the one
suggesting to not use nil for `c.t.Context()`) or just
debatable (checking for err value is a good practice, but there are
good reasons to opt out in some cases).
2022-08-10 17:44:32 +02:00
Vincent Bernat
dd140d2a5c console/docs: update Dracula theme
We extract from a PR which makes it more readable, notably for console
output.
2022-08-10 10:31:05 +02:00
Vincent Bernat
8be1bca4fd license: AGPL-3.0-only
```
git ls-files \*.js \*.go \
  | xargs sed -i '1i // SPDX-FileCopyrightText: 2022 Free Mobile\n// SPDX-License-Identifier: AGPL-3.0-only\n'
git ls-files \*.vue \
  | xargs sed -i '1i <!-- SPDX-FileCopyrightText: 2022 Free Mobile -->\n<!-- SPDX-License-Identifier: AGPL-3.0-only -->\n'
```
2022-06-29 11:42:28 +02:00
Vincent Bernat
0ad6eacac8 console: use PureJSON for documentation 2022-05-30 10:51:33 +02:00
Vincent Bernat
50ca1987b2 http: use Gin web framework to reduce API boilerplate 2022-04-10 22:13:38 +02:00
Vincent Bernat
ce7fce32ba console: switch to Vue.JS + Tailwind CSS + Headless UI for the frontend 2022-04-06 21:03:19 +02:00
Vincent Bernat
1dc253764d global: split Akvorado into 3 services 2022-04-01 20:21:53 +02:00