Skip to content

Commit

Permalink
go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmasi committed Nov 18, 2022
1 parent 561d26d commit f53de9d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions api/types/v1alpha1/srl_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@ import (
"strings"
)

var (
engineeringVersions = []string{
"",
"latest",
"ga",
}
)

// ErrVersionParse is an error which is raised when srlinux version is failed to parse.
var ErrVersionParse = errors.New("version parsing failed")

Expand All @@ -32,6 +24,7 @@ type SrlVersion struct {

func parseVersionString(s string) (*SrlVersion, error) {
// Check if the version string is an engineering build with major = 0
engineeringVersions := []string{"", "latest", "ga"}
for _, ver := range engineeringVersions {
if ver == strings.ToLower(s) {
return &SrlVersion{"0", "", "", "", ""}, nil
Expand Down

0 comments on commit f53de9d

Please sign in to comment.