From eb57febdd31388a268931b2c6b72b8b71ae6878e Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Wed, 2 Feb 2022 13:34:28 +0100 Subject: [PATCH] We must please make vet --- .woodpecker/.gitea.yml | 1 - CHANGELOG.md | 2 ++ src/package.v | 2 ++ src/routes.v | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.woodpecker/.gitea.yml b/.woodpecker/.gitea.yml index 7fda6d97..c492d345 100644 --- a/.woodpecker/.gitea.yml +++ b/.woodpecker/.gitea.yml @@ -28,7 +28,6 @@ pipeline: checksum: - md5 - sha256 - prerelease: true title: ${CI_COMMIT_TAG} when: event: tag diff --git a/CHANGELOG.md b/CHANGELOG.md index 397a1a10..80781dd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://git.rustybever.be/Chewing_Bever/vieter) +* Improved logging + ## [0.1.0-rc.1](https://git.rustybever.be/Chewing_Bever/vieter/src/tag/0.1.0-rc.1) ### Added diff --git a/src/package.v b/src/package.v index 34350ecd..4e3b97f8 100644 --- a/src/package.v +++ b/src/package.v @@ -178,6 +178,8 @@ fn format_entry(key string, value string) string { return '\n%$key%\n$value\n' } +// full_name returns the properly formatted name for the package, including +// version & architecture pub fn (pkg &Pkg) full_name() string { p := pkg.info return '$p.name-$p.version-$p.arch' diff --git a/src/routes.v b/src/routes.v index 13cc8c76..8b7ddebe 100644 --- a/src/routes.v +++ b/src/routes.v @@ -25,6 +25,8 @@ fn is_pkg_name(s string) bool { return s.contains('.pkg') } +// healthcheck just returns a string, but can be used to quickly check if the +// server is still responsive. ['/health'; get] pub fn (mut app App) healthcheck() web.Result { return app.text('Healthy')