diff --git a/x/model/name.go b/x/model/name.go index b02c8162..5c0dd3e5 100644 --- a/x/model/name.go +++ b/x/model/name.go @@ -191,7 +191,10 @@ func (r Name) DisplayModel() string { return r.model } -func (r Name) DisplayComplete() string { +// DisplayFullest returns the most specific display string of the Name. +// +// It does not include the build. +func (r Name) DisplayFullest() string { return (Name{ host: r.host, namespace: r.namespace, @@ -219,7 +222,7 @@ func (r Name) LogValue() slog.Value { } // DisplayShort returns a short display string of the Name with only the -// model, tag, and build parts. +// model, tag. // // It does not include the build. func (r Name) DisplayShort() string { @@ -230,7 +233,7 @@ func (r Name) DisplayShort() string { } // DisplayLong returns a long display string of the Name including namespace, -// model, tag, and build parts. +// model, tag. // // It does not include the build. func (r Name) DisplayLong() string { diff --git a/x/model/name_test.go b/x/model/name_test.go index 8898c5f9..54f44ce8 100644 --- a/x/model/name_test.go +++ b/x/model/name_test.go @@ -254,8 +254,8 @@ func TestNameDisplay(t *testing.T) { if g := p.DisplayLong(); g != tt.wantLong { t.Errorf("DisplayLong = %q; want %q", g, tt.wantLong) } - if g := p.DisplayComplete(); g != tt.wantComplete { - t.Errorf("DisplayComplete = %q; want %q", g, tt.wantComplete) + if g := p.DisplayFullest(); g != tt.wantComplete { + t.Errorf("DisplayFullest = %q; want %q", g, tt.wantComplete) } if g := p.String(); g != tt.in { t.Errorf("String(%q) = %q; want %q", tt.in, g, tt.in)