From 39547fff327343d36d95f35acd8a0f1bfc395a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nils=20ma=CC=8Ase=CC=81n?= Date: Sat, 16 Sep 2023 16:55:49 +0200 Subject: [PATCH] require --prefix in docs --- docs/notifications.md | 6 +++--- internal/flags/flags_test.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/notifications.md b/docs/notifications.md index 903f4dd..3042919 100644 --- a/docs/notifications.md +++ b/docs/notifications.md @@ -20,9 +20,9 @@ system, [logrus](http://github.com/sirupsen/logrus). - `--notifications-hostname` (env. `WATCHTOWER_NOTIFICATIONS_HOSTNAME`): Custom hostname specified in subject/title. Useful to override the operating system hostname. - `--notifications-delay` (env. `WATCHTOWER_NOTIFICATIONS_DELAY`): Delay before sending notifications expressed in seconds. - Watchtower will post a notification every time it is started. This behavior [can be changed](https://containrrr.github.io/watchtower/arguments/#without_sending_a_startup_message) with an argument. -- `notification-title-tag` (env. `WATCHTOWER_NOTIFICATION_TITLE_TAG`): Prefix to include in the title. Useful when running multiple watchtowers. -- `notification-skip-title` (env. `WATCHTOWER_NOTIFICATION_SKIP_TITLE`): Do not pass the title param to notifications. This will not pass a dynamic title override to notification services. If no title is configured for the service, it will remove the title all together. -- `notification-log-stdout` (env. `WATCHTOWER_NOTIFICATION_LOG_STDOUT`): Enable output from `logger://` shoutrrr service to stdout. +- `--notification-title-tag` (env. `WATCHTOWER_NOTIFICATION_TITLE_TAG`): Prefix to include in the title. Useful when running multiple watchtowers. +- `--notification-skip-title` (env. `WATCHTOWER_NOTIFICATION_SKIP_TITLE`): Do not pass the title param to notifications. This will not pass a dynamic title override to notification services. If no title is configured for the service, it will remove the title all together. +- `--notification-log-stdout` (env. `WATCHTOWER_NOTIFICATION_LOG_STDOUT`): Enable output from `logger://` shoutrrr service to stdout. ## [shoutrrr](https://github.com/containrrr/shoutrrr) notifications diff --git a/internal/flags/flags_test.go b/internal/flags/flags_test.go index 73edc56..394b2c7 100644 --- a/internal/flags/flags_test.go +++ b/internal/flags/flags_test.go @@ -264,7 +264,7 @@ func TestFlagsArePrecentInDocumentation(t *testing.T) { } flags.VisitAll(func(f *pflag.Flag) { - if !strings.Contains(allDocs, f.Name) { + if !strings.Contains(allDocs, "--"+f.Name) { if _, found := ignoredFlags[f.Name]; !found { t.Logf("Docs does not mention flag long name %q", f.Name) t.Fail()