MCPcopy
hub / github.com/docker/docker-agent / String

Method String

pkg/modelsdev/id.go:59–64  ·  view source on GitHub ↗

String returns the canonical "provider/model" representation. When either component is empty the separator is still emitted so the output round-trips through [ParseID] only when both fields are set. For the zero ID the result is the empty string.

()

Source from the content-addressed store, hash-verified

57// output round-trips through [ParseID] only when both fields are set.
58// For the zero ID the result is the empty string.
59func (id ID) String() string {
60 if id.IsZero() {
61 return ""
62 }
63 return id.Provider + "/" + id.Model
64}
65
66// IsZero reports whether the ID has both components empty.
67func (id ID) IsZero() bool {

Callers 15

detectCachingSupportFunction · 0.95
TestNewIDFunction · 0.95
TestIDZeroFunction · 0.95
GenerateMethod · 0.45
drainStreamFunction · 0.45
buildPromptFunction · 0.45
PushFunction · 0.45
RoundTripMethod · 0.45
digestMethod · 0.45
newTestRegistryFunction · 0.45

Calls 1

IsZeroMethod · 0.95