16 lines
252 B
Go
16 lines
252 B
Go
package internal
|
|
|
|
import "fmt"
|
|
|
|
type Registry struct {
|
|
Hostname string
|
|
Port int
|
|
}
|
|
|
|
func (registry Registry) String() string {
|
|
if registry.Port != 0 {
|
|
return fmt.Sprintf("%s:%d", registry.Hostname, registry.Port)
|
|
}
|
|
return registry.Hostname
|
|
}
|