summaryrefslogtreecommitdiff
path: root/vendor/github.com/prometheus/common/model/labels.go
diff options
context:
space:
mode:
authorLibravatar kim <grufwub@gmail.com>2025-05-26 16:13:55 +0200
committerLibravatar tobi <kipvandenbos@noreply.codeberg.org>2025-05-26 16:13:55 +0200
commit143febb318ee16ca68ea312249ab5dadeab608bb (patch)
tree594820ce5f746c7c9d0e28cc8820da563b0c4bdd /vendor/github.com/prometheus/common/model/labels.go
parent[chore] migration to update `statuses.thread_id` to be notnull (#4160) (diff)
downloadgotosocial-143febb318ee16ca68ea312249ab5dadeab608bb.tar.xz
[chore] update dependencies (#4196)
- go.opentelemetry.io/contrib/exporters/autoexport v0.60.0 -> v0.61.0 - go.opentelemetry.io/contrib/instrumentation/runtime v0.60.0 -> v0.61.0 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4196 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/github.com/prometheus/common/model/labels.go')
-rw-r--r--vendor/github.com/prometheus/common/model/labels.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/github.com/prometheus/common/model/labels.go b/vendor/github.com/prometheus/common/model/labels.go
index 73b7aa3e6..de83afe93 100644
--- a/vendor/github.com/prometheus/common/model/labels.go
+++ b/vendor/github.com/prometheus/common/model/labels.go
@@ -22,7 +22,7 @@ import (
)
const (
- // AlertNameLabel is the name of the label containing the an alert's name.
+ // AlertNameLabel is the name of the label containing the alert's name.
AlertNameLabel = "alertname"
// ExportedLabelPrefix is the prefix to prepend to the label names present in
@@ -122,7 +122,8 @@ func (ln LabelName) IsValidLegacy() bool {
return false
}
for i, b := range ln {
- if !((b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' || (b >= '0' && b <= '9' && i > 0)) {
+ // TODO: Apply De Morgan's law. Make sure there are tests for this.
+ if !((b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' || (b >= '0' && b <= '9' && i > 0)) { //nolint:staticcheck
return false
}
}