Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetImageURL ¶
func GetImageURL(opts *NewBaseContainerOpts) (string, error)
GetImageURL constructs the full image URL from the provided options. It returns an error if the options are nil or the image name is empty.
Parameters:
- opts: A pointer to NewBaseContainerOpts containing the image name and version.
Returns:
- A string containing the full image URL in the format "image:version".
- An error if the options are nil or the image name is empty.
Example:
opts := &NewBaseContainerOpts{
Image: "golang",
Version: "1.16",
}
imageURL, err := GetImageURL(opts)
if err != nil {
// handle error
}
fmt.Println(imageURL) // Output: "golang:1.16"
Types ¶
type NewBaseContainerOpts ¶
Click to show internal directories.
Click to hide internal directories.