diff --git a/core/condition.go b/core/condition.go index fd4bfef8..6820e92f 100644 --- a/core/condition.go +++ b/core/condition.go @@ -80,7 +80,7 @@ const ( maximumLengthBeforeTruncatingWhenComparedWithPattern = 25 ) -// Condition is a condition that needs to be met in order for a Endpoint to be considered healthy. +// Condition is a condition that needs to be met in order for an Endpoint to be considered healthy. type Condition string // evaluate the Condition with the Result of the health check @@ -283,7 +283,7 @@ func prettifyNumericalParameters(parameters []string, resolvedParameters []int64 return prettify(parameters, []string{strconv.Itoa(int(resolvedParameters[0])), strconv.Itoa(int(resolvedParameters[1]))}, operator) } -// XXX: make this configurable? i.e. show-resolved-conditions-on-failure +// prettify returns a string representation of a condition with its parameters resolved between parentheses func prettify(parameters []string, resolvedParameters []string, operator string) string { // Since, in the event of an invalid path, the resolvedParameters also contain the condition itself, // we'll return the resolvedParameters as-is. diff --git a/storage/store/sql/sql.go b/storage/store/sql/sql.go index 2235da88..b9c8a2b1 100644 --- a/storage/store/sql/sql.go +++ b/storage/store/sql/sql.go @@ -342,7 +342,7 @@ func (s *Store) DeleteAllEndpointStatusesNotInKeys(keys []string) int { query += fmt.Sprintf("$%d,", i+1) args = append(args, keys[i]) } - query = query[:len(query)-1] + ")" // Remove the last comma and close the parenthesis + query = query[:len(query)-1] + ")" // Remove the last comma and add the closing parenthesis result, err = s.db.Exec(query, args...) } if err != nil {