feat: implement Stringer on custom string types
Add String() methods to ImageID, ContainerID, and UnparsedURL. Replace all string() casts with .String() method calls throughout the codebase for cleaner interface compliance.
This commit is contained in:
@@ -3,5 +3,11 @@ package docker
|
||||
// ImageID is a Docker image identifier (ID or tag).
|
||||
type ImageID string
|
||||
|
||||
// String implements fmt.Stringer.
|
||||
func (id ImageID) String() string { return string(id) }
|
||||
|
||||
// ContainerID is a Docker container identifier.
|
||||
type ContainerID string
|
||||
|
||||
// String implements fmt.Stringer.
|
||||
func (id ContainerID) String() string { return string(id) }
|
||||
|
||||
Reference in New Issue
Block a user