mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
* Add logo * Refactor out structs * Data layer context-awareness * Mod * Data layer improvements * Progress * Progress * Progress * Figured the time format shorter * Statuses colors * Sticky URL * Calculate some diffs inside * Separate checks * Scrap gofmt * Skip custom test in GH * Shows some colorful diff
17 lines
308 B
Go
17 lines
308 B
Go
package dashboard
|
|
|
|
import (
|
|
"errors"
|
|
"strings"
|
|
)
|
|
|
|
type ControlChan = chan struct{}
|
|
|
|
func chartAndVersion(x string) (string, string, error) {
|
|
lastInd := strings.LastIndex(x, "-")
|
|
if lastInd < 0 {
|
|
return "", "", errors.New("can't parse chart version string")
|
|
}
|
|
|
|
return x[:lastInd], x[lastInd+1:], nil
|
|
} |