这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cloudwatch/cloudwatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ func (c *cloudWatchContext) Query(r *Request) (Response, error) {
}
// custom metrics can have no dimensions
if len(r.Dimensions) == 0 {
id = fmt.Sprintf("q0")
id = "q0"
dq := buildQuery(r, id, nil)
dqs = append(dqs, &dq)
tagSet[id] = buildTags(nil)
Expand Down
2 changes: 1 addition & 1 deletion cloudwatch/cloudwatch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (c mockCloudWatchClient) GetMetricData(input *cloudwatch.GetMetricDataInput
}

for i := 0; i < 10; i++ {
id := fmt.Sprintf("q{i}")
id := "q{i}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooops, I think I see what this was originally meant to be, but looks like this was a Python format string instead. Don't think it matters much, but maybe less confusing if it's this instead?

Suggested change
id := "q{i}"
id := fmt.Sprintf("q%d", i)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I deleted this repository by mistake. Please fix it yourself

m := cloudwatch.MetricDataResult{
Id: &id,
Label: nil,
Expand Down
2 changes: 1 addition & 1 deletion cmd/bosun/database/sentinel/sentinel.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (ns NoSentinelsAvailable) Error() string {
if ns.lastError != nil {
return fmt.Sprintf("redigo: no sentinels available; last error: %s", ns.lastError.Error())
}
return fmt.Sprintf("redigo: no sentinels available")
return "redigo: no sentinels available"
}

// putToTop puts Sentinel address to the top of address list - this means
Expand Down