diff --git a/distro/debian/debian.go b/distro/debian/debian.go index dc65480..a7de726 100644 --- a/distro/debian/debian.go +++ b/distro/debian/debian.go @@ -119,10 +119,14 @@ var ReleaseStrings = [...]string{ "bookworm", } -func (cn Release) String() string { +func (cn Release) Name() string { return ReleaseStrings[cn] } +func (cn Release) String() string { + return fmt.Sprintf("%d", cn) +} + func ReleaseFromString(s string) (r Release) { switch strings.ToLower(s) { case "7", "wheezy": @@ -220,7 +224,7 @@ func repositories(release Release) (repos []string) { format := "deb [check-valid-until=no trusted=yes] " + "http://snapshot.debian.org/archive/%s/%s " + "%s%s main" - r := fmt.Sprintf(format, archive, snapshot, release, s) + r := fmt.Sprintf(format, archive, snapshot, release.Name(), s) repos = append(repos, r) }