deps: update images to 0.99
This commit is contained in:
parent
b5c71cd7e2
commit
ff2660ef00
29 changed files with 465 additions and 117 deletions
16
vendor/github.com/osbuild/images/pkg/distro/id.go
generated
vendored
16
vendor/github.com/osbuild/images/pkg/distro/id.go
generated
vendored
|
|
@ -4,6 +4,8 @@ import (
|
|||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/hashicorp/go-version"
|
||||
)
|
||||
|
||||
// ID represents a distro name and version
|
||||
|
|
@ -14,12 +16,20 @@ type ID struct {
|
|||
MinorVersion int
|
||||
}
|
||||
|
||||
func (id ID) String() string {
|
||||
func (id ID) versionString() string {
|
||||
if id.MinorVersion == -1 {
|
||||
return fmt.Sprintf("%s-%d", id.Name, id.MajorVersion)
|
||||
return fmt.Sprintf("%d", id.MajorVersion)
|
||||
} else {
|
||||
return fmt.Sprintf("%d.%d", id.MajorVersion, id.MinorVersion)
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s-%d.%d", id.Name, id.MajorVersion, id.MinorVersion)
|
||||
func (id ID) String() string {
|
||||
return fmt.Sprintf("%s-%s", id.Name, id.versionString())
|
||||
}
|
||||
|
||||
func (id ID) Version() (*version.Version, error) {
|
||||
return version.NewVersion(id.versionString())
|
||||
}
|
||||
|
||||
type ParseError struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue