mirror of
https://github.com/grafana/grafana.git
synced 2024-11-28 03:34:15 -06:00
2d7fc55df7
* Unprovision dashboard in case of DisableDeletion = true * Rename command struct * Handle removed provision files * Allow html in confirm-modal * Do not show confirm button without onConfirm * Show dialog on deleting provisioned dashboard * Changed DeleteDashboard to DeleteProvisionedDashboard * Remove unreachable return * Add provisioned checks to API * Remove filter func * Fix and add tests for deleting dashboards * Change delete confirm text * Added and used pkg/errors for error wrapping
18 lines
228 B
Go
18 lines
228 B
Go
package util
|
|
|
|
// MaxInt returns the larger of x or y.
|
|
func MaxInt(x, y int) int {
|
|
if x < y {
|
|
return y
|
|
}
|
|
return x
|
|
}
|
|
|
|
// MinInt returns the smaller of x or y.
|
|
func MinInt(x, y int) int {
|
|
if x > y {
|
|
return y
|
|
}
|
|
return x
|
|
}
|