Files
helm-dashboard/pkg/dashboard/utils.go
Andrey Pokhilko 1580c2e9a0 Chart details draft (#4)
* 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
2022-08-31 12:12:08 +01:00

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
}