- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for validLabels (0.1 sec)
-
cmd/metrics-v3-types.go
} validLabels := desc.getLabelSet() labelMap := make(map[string]string, len(labels)/2) for i := 0; i < len(labels); i += 2 { if _, ok := validLabels[labels[i]]; !ok { panic(fmt.Sprintf("invalid label: %s (metric: %s)", labels[i], name)) } labelMap[labels[i]] = labels[i+1] } if len(labels)/2 != len(validLabels) { panic("not all labels were given values") }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jul 30 22:28:46 UTC 2024 - 15.6K bytes - Viewed (0) -
internal/event/target/postgresql_test.go
t.Fatal("postgres driver not registered") } } func TestPsqlTableNameValidation(t *testing.T) { validTables := []string{"táblë", "table", "TableName", "\"Table name\"", "\"✅✅\"", "table$one", "\"táblë\""} invalidTables := []string{"table name", "table \"name\"", "✅✅", "$table$"} for _, name := range validTables { if err := validatePsqlTableName(name); err != nil { t.Errorf("Should be valid: %s - %s", name, err) } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Apr 24 17:51:07 UTC 2024 - 1.7K bytes - Viewed (0)